Replaced extern references in .c file with #include of suitable headers.
This commit is contained in:
parent
08fb461abb
commit
c87326ebc8
|
|
@ -1,6 +1,7 @@
|
|||
/**********
|
||||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1988 Jeffrey M. Hsu
|
||||
$Id$
|
||||
**********/
|
||||
|
||||
/*
|
||||
|
|
@ -9,7 +10,6 @@ Author: 1988 Jeffrey M. Hsu
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <ngspice.h>
|
||||
#include "cpdefs.h" /* for VT_ */
|
||||
#include "cpextern.h"
|
||||
|
|
@ -23,9 +23,14 @@ Author: 1988 Jeffrey M. Hsu
|
|||
#include "ftedev.h"
|
||||
#include <terminal.h>
|
||||
#include <variable.h>
|
||||
#include "../terminal.h"
|
||||
#include "graf.h"
|
||||
|
||||
#include "graphdb.h"
|
||||
#include "grid.h"
|
||||
#include "../terminal.h"
|
||||
#include "../breakp2.h"
|
||||
#include "../error.h"
|
||||
#include "../display.h"
|
||||
#include "../runcoms.h"
|
||||
|
||||
/* static declarations */
|
||||
static void gr_start_internal(struct dvec *dv, bool copyvec);
|
||||
|
|
@ -33,14 +38,6 @@ static int iplot(struct plot *pl, int id);
|
|||
static void set(struct plot *plot, struct dbcomm *db, bool unset, int mode);
|
||||
static char * getitright(char *buf, double num);
|
||||
|
||||
|
||||
extern struct dbcomm *dbs; /* for iplot */
|
||||
|
||||
/* note: let's try to get rid of these */
|
||||
/* global variables */
|
||||
/* Graphics mode in progress, so signal handlers know to call gr_clean */
|
||||
/* bool gr_gmode = FALSE; */
|
||||
|
||||
/* for legends, set in gr_start, reset in gr_iplot and gr_init */
|
||||
static int plotno;
|
||||
static int curcolor = 1; /* for assigning unique colors */
|
||||
|
|
@ -70,23 +67,6 @@ double *readtics(char *string);
|
|||
*
|
||||
*/
|
||||
|
||||
extern void SetGraphContext (int graphid);
|
||||
extern void internalerror (char *message);
|
||||
extern int NewViewport (GRAPH *pgraph);
|
||||
extern void DevClear (void);
|
||||
extern void gr_redrawgrid (GRAPH *graph);
|
||||
extern void DatatoScreen (GRAPH *graph, double x, double y, int *screenx, int *screeny);
|
||||
extern void SetLinestyle (int linestyleid);
|
||||
extern void SetColor (int colorid);
|
||||
extern void DrawLine (int x1, int y1, int x2, int y2);
|
||||
extern void Text (char *text, int x, int y);
|
||||
extern void SaveText (GRAPH *graph, char *text, int x, int y);
|
||||
extern void Update (void);
|
||||
extern void PushGraphContext (GRAPH *graph);
|
||||
extern void PopGraphContext (void);
|
||||
extern void Input (REQUEST *request, RESPONSE *response);
|
||||
extern int DestroyGraph (int id);
|
||||
|
||||
int
|
||||
gr_init(double *xlims, double *ylims, /* The size of the screen. */
|
||||
char *xname, char *plotname, /* What to label things. */
|
||||
|
|
@ -641,8 +621,6 @@ gr_restoretext(GRAPH *graph)
|
|||
* another reason why we need to pull color and linestyle out of dvec
|
||||
* XXX Or maybe even something more drastic ?? */
|
||||
|
||||
extern bool resumption;
|
||||
|
||||
static int
|
||||
iplot(struct plot *pl, int id)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
/**********
|
||||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
$Id$
|
||||
**********/
|
||||
|
||||
/*
|
||||
|
|
@ -12,7 +13,7 @@ Copyright 1990 Regents of the University of California. All rights reserved.
|
|||
#include <fteext.h>
|
||||
|
||||
#include "graphdb.h"
|
||||
|
||||
#include "../breakp2.h"
|
||||
|
||||
|
||||
/* invariant: currentgraph contains the current graph */
|
||||
|
|
@ -145,7 +146,6 @@ DestroyGraph(int id)
|
|||
LISTGRAPH *list, *lastlist;
|
||||
struct _keyed *k, *nextk;
|
||||
struct dveclist *d, *nextd;
|
||||
extern struct dbcomm *dbs;
|
||||
struct dbcomm *db;
|
||||
|
||||
list = GBucket[id % NUMGBUCKETS].list;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
/**********
|
||||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
$Id$
|
||||
**********/
|
||||
|
||||
#include <ngspice.h>
|
||||
|
|
@ -7,6 +8,8 @@ Copyright 1990 Regents of the University of California. All rights reserved.
|
|||
#include <ftedev.h>
|
||||
|
||||
#include "plot5.h"
|
||||
#include "graf.h"
|
||||
#include "../error.h"
|
||||
|
||||
static FILE *plotfile;
|
||||
|
||||
|
|
@ -18,10 +21,6 @@ static char *linestyle[] = { "solid", "dotted", "longdashed", "shortdashed",
|
|||
"dotdashed" };
|
||||
static int currentlinestyle = SOLID;
|
||||
|
||||
|
||||
extern void gr_relinestyle (GRAPH *graph);
|
||||
extern void internalerror (char *message);
|
||||
|
||||
int
|
||||
Plt5_Init(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
/**********
|
||||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1988 Jeffrey M. Hsu
|
||||
$Id$
|
||||
**********/
|
||||
|
||||
/*
|
||||
X11 drivers.
|
||||
*/
|
||||
|
||||
|
||||
#include <ngspice.h>
|
||||
|
||||
#ifndef X_DISPLAY_MISSING
|
||||
|
|
@ -36,15 +36,15 @@ Author: 1988 Jeffrey M. Hsu
|
|||
# include <X11/Xaw/Form.h>
|
||||
# include <X11/Shell.h>
|
||||
|
||||
#include "x11.h"
|
||||
|
||||
static void linear_arc(int x0, int y0, int radius, double theta1, double theta2);
|
||||
|
||||
|
||||
# ifdef DEBUG
|
||||
extern int _Xdebug;
|
||||
# include <X11/Xlib.h> /* for _Xdebug */
|
||||
# endif
|
||||
|
||||
#include "x11.h"
|
||||
#include "graphdb.h"
|
||||
#include "display.h"
|
||||
#include "graf.h"
|
||||
#include "../error.h"
|
||||
|
||||
#define RAD_TO_DEG (180.0 / M_PI)
|
||||
|
||||
|
|
@ -67,7 +67,6 @@ typedef struct x11info {
|
|||
|
||||
#define DEVDEP(g) (*((X11devdep *) (g)->devdep))
|
||||
|
||||
static void linear_arc(int x0, int y0, int radius, double theta1, double theta2);
|
||||
static Display *display;
|
||||
static GC xorgc;
|
||||
static char *xlinestyles[NUMLINESTYLES] = { /* test patterns XXX */
|
||||
|
|
@ -86,23 +85,11 @@ static GRAPH *lasthardcopy; /* graph user selected */
|
|||
static int X11_Open = 0;
|
||||
static int numdispplanes;
|
||||
|
||||
|
||||
extern void internalerror (char *message);
|
||||
extern void externalerror (char *message);
|
||||
/* static functions */
|
||||
static void initlinestyles (void);
|
||||
static void initcolors (GRAPH *graph);
|
||||
extern void PushGraphContext (GRAPH *graph);
|
||||
extern void SetColor (int colorid);
|
||||
extern void Text (char *text, int x, int y);
|
||||
extern void SaveText (GRAPH *graph, char *text, int x, int y);
|
||||
extern void PopGraphContext (void);
|
||||
void slopelocation (GRAPH *graph, int x0, int y0);
|
||||
void zoomin (GRAPH *graph);
|
||||
static void X_ScreentoData (GRAPH *graph, int x, int y, double *fx, double *fy);
|
||||
extern int DestroyGraph (int id);
|
||||
extern void gr_redraw (GRAPH *graph);
|
||||
extern void gr_resize (GRAPH *graph);
|
||||
|
||||
static void linear_arc(int x0, int y0, int radius, double theta1, double theta2);
|
||||
|
||||
int
|
||||
errorhandler(Display *display, XErrorEvent *errorev)
|
||||
|
|
|
|||
Loading…
Reference in New Issue