Replaced some more K&R style function definitions

This commit is contained in:
89391914+robxnano@users.noreply.github.com 2023-04-08 16:23:34 +01:00
parent 0878ca7fd7
commit 6c85a2fc76
No known key found for this signature in database
GPG Key ID: 9FB6B03B782D1E42
15 changed files with 373 additions and 723 deletions

View File

@ -184,9 +184,7 @@ dm_manage (void)
* don't bother if it doesn't exist or is unmanaged now or no one is logging.
*/
void
dm_update (np, how_much)
Now *np;
int how_much;
dm_update (Now *np, int how_much)
{
int i;
@ -227,8 +225,8 @@ dm_newfavs (void)
* first on or the last off.
*/
void
dm_selection_mode (whether)
int whether; /* whether setting up for plotting or for not plotting */
dm_selection_mode (int whether)
/* whether setting up for plotting or for not plotting */
{
if (whether)
dm_selecting++;
@ -273,10 +271,7 @@ dm_resetuhzndep (void)
* this takes into account the options currently in effect with the Data menu.
*/
void
dm_riset (np, op, rsp)
Now *np;
Obj *op;
RiseSet *rsp;
dm_riset (Now *np, Obj *op, RiseSet *rsp)
{
double dis; /* rads apparent horizon is above true */
@ -296,8 +291,7 @@ RiseSet *rsp;
/* called to put up or remove the watch cursor. */
void
dm_cursor (c)
Cursor c;
dm_cursor (Cursor c)
{
Window win;
@ -322,9 +316,7 @@ Cursor c;
* return 0 if column is on, else -1
*/
int
dm_colHeader (c, str)
DMCol c;
char str[];
dm_colHeader (DMCol c, char str[])
{
if (!col[c].on)
return (-1);
@ -336,12 +328,11 @@ char str[];
* return 0 if column is on, else -1 (but always fill in str).
*/
int
dm_colFormat (np, op, rp, c, str)
Now *np;
Obj *op;
RiseSet *rp;
DMCol c;
char str[];
dm_colFormat (Now *np,
Obj *op,
RiseSet *rp,
DMCol c,
char str[])
{
static Widget w;
char *lstr;
@ -606,8 +597,8 @@ dm_sep (Obj *op)
* should appear to look like buttons or just flat labels.
*/
static void
dm_set_buttons (whether)
int whether; /* whether setting up for plotting or for not plotting */
dm_set_buttons (int whether)
/* whether setting up for plotting or for not plotting */
{
int r, c;
@ -747,10 +738,9 @@ dm_help_cb (Widget w, XtPointer client, XtPointer call)
/* compute and print body info in data menu format */
/* ARGSUSED */
static void
dm_compute (r, force, np)
int r; /* which row */
int force; /* whether to print for sure or only if things have changed */
Now *np;
dm_compute (int r, /* which row */
int force, /* whether to print even if things haven't changed */
Now *np)
{
int did_rs = 0;
RiseSet rs;
@ -771,12 +761,11 @@ Now *np;
}
static void
dm_format (np, op, rp, c, w)
Now *np;
Obj *op;
RiseSet *rp;
int c;
Widget w;
dm_format (Now *np,
Obj *op,
RiseSet *rp,
int c,
Widget w)
{
static char me[] = "dm_format()";
double tmp;
@ -1171,10 +1160,7 @@ dm_settags (void)
* convert tm to local time if tzpref && PREF_ZONE == PREF_LOCALTZ.
*/
static void
dm_showtim (np, w, t)
Now *np;
Widget w;
double t;
dm_showtim (Now *np, Widget w, double t)
{
if (pref_get(PREF_ZONE) == PREF_LOCALTZ)
t -= tz/24.0;
@ -1193,11 +1179,10 @@ double t;
*/
/* ARGSUSED */
static void
dm_rs_hrsup (np, op, w, rp)
Now *np;
Obj *op;
Widget w;
RiseSet *rp;
dm_rs_hrsup (Now *np,
Obj *op,
Widget w,
RiseSet *rp)
{
double r, s, up;
@ -1236,10 +1221,9 @@ RiseSet *rp;
}
static void
show_constellation (np, op, w)
Now *np;
Obj *op;
Widget w;
show_constellation (Now *np,
Obj *op,
Widget w)
{
char nm[10], *name;
int id;
@ -1252,9 +1236,7 @@ Widget w;
/* compute the separation between the two sky locations */
void
dm_separation (p, q, sp)
Obj *p, *q;
double *sp;
dm_separation (Obj *p, Obj *q, double *sp)
{
double csep;
@ -1265,8 +1247,7 @@ double *sp;
/* create the setup dialog */
static void
ds_create_selection(parent)
Widget parent;
ds_create_selection(Widget parent)
{
static struct { /* info to streamline creation of control buttons */
DSCtrls id;
@ -1740,9 +1721,7 @@ flistok_overwrite_cb (void)
/* open the named flist file "a" or "w" and fill it in. */
static void
make_flist (name, how)
char *name;
char *how;
make_flist (char *name, char *how)
{
FILE *fp = fopend (name, NULL, how);
@ -1778,8 +1757,7 @@ dm_xsel_cb (Widget w, XtPointer client, XtPointer call)
/* write the current data table to the given file */
static void
dm_list_tofile(fp)
FILE *fp;
dm_list_tofile(FILE *fp)
{
char *buf = XtMalloc ((nfavs+3)*(NC*20)); /* plenty big :-) */
dm_list_get (buf);
@ -1790,8 +1768,7 @@ FILE *fp;
/* fetch the current table into the given buffer.
*/
static void
dm_list_get (buf)
char buf[];
dm_list_get (char buf[])
{
Now *np = mm_get_now();
int maxch[NC];

View File

@ -91,8 +91,7 @@ db_n (void)
* updated Obj in the database.
*/
Obj *
db_basic(id)
int id;
db_basic (int id)
{
Obj *op;
@ -184,8 +183,7 @@ db_dups (DupName **dnpp)
* N.B. dbcp not valid on return
*/
void
db_catdel (dbcp)
DBCat *dbcp;
db_catdel (DBCat *dbcp)
{
int t, c;
@ -242,8 +240,7 @@ db_opfindcat (Obj *op)
* if find it return pointer to DBCat, else return NULL.
*/
static DBCat *
db_nmfindcat (name)
char *name;
db_nmfindcat (char *name)
{
char *base;
int i;
@ -267,8 +264,7 @@ char *name;
* return pointer if ok, else NULL if no more memory.
*/
static DBCat *
db_catadd (name)
char *name;
db_catadd (char *name)
{
DBCat *dbcp;
int i;
@ -325,11 +321,7 @@ db_invalidate (void)
* N.B. nothing should be assumed as to the order these are returned.
*/
void
db_scaninit (sp, tmask, op, nop)
DBScan *sp;
int tmask;
ObjF *op;
int nop;
db_scaninit (DBScan *sp, int tmask, ObjF *op, int nop)
{
if (!DBINITED)
db_init();
@ -346,8 +338,7 @@ int nop;
* N.B. the s_ fields are *not* updated -- call db_update() when you need that.
*/
Obj *
db_scan (sp)
DBScan *sp;
db_scan (DBScan *sp)
{
if (!DBINITED)
db_init();
@ -389,8 +380,7 @@ DBScan *sp;
* although we guarantee an actual update occurs if it's not.
*/
void
db_update(op)
Obj *op;
db_update(Obj *op)
{
static char me[] = "db_update()";
@ -466,8 +456,7 @@ db_del_all (void)
* N.B. caller is responsible for calling all_newdb().
*/
void
db_read (fn)
char *fn;
db_read (char *fn)
{
char bufs[3][MAXDBLINE];
char *brot, *b0 = bufs[0], *b1 = bufs[1], *b2 = bufs[2];
@ -713,10 +702,9 @@ DBCatObj (DBCat *dbcp, int t, int i)
*/
/* ARGSUSED */
static void
dbfifo_cb (client, fdp, idp)
XtPointer client; /* file name */
int *fdp; /* pointer to file descriptor */
XtInputId *idp; /* pointer to input id */
dbfifo_cb (XtPointer client, /* file name */
int *fdp, /* pointer to file descriptor */
XtInputId *idp) /* pointer to input id */
{
static char partial[MAXDBLINE]; /* partial line from before */
static int npartial; /* length of stuff in partial[] */

View File

@ -68,8 +68,7 @@ db_manage (void)
*/
/* ARGSUSED */
void
db_newdb (appended)
int appended;
db_newdb (int appended)
{
if (isUp(dbshell_w))
db_set_report();
@ -87,9 +86,7 @@ db_chkAltNames(void)
/* update the list of catalogs.
*/
void
db_newcatmenu (dbcp, ndbcp)
DBCat dbcp[];
int ndbcp;
db_newcatmenu (DBCat dbcp[], int ndbcp)
{
char buf[128];
Arg args[20];
@ -123,8 +120,7 @@ int ndbcp;
/* called to put up or remove the watch cursor. */
void
db_cursor (c)
Cursor c;
db_cursor (Cursor c)
{
Window win;
@ -508,10 +504,7 @@ dbdelall (void)
*/
/* ARGSUSED */
static void
db_index_cb (w, client, data)
Widget w;
XtPointer client;
XtPointer data;
db_index_cb (Widget w, XtPointer client, XtPointer data)
{
obj_manage();
}
@ -520,10 +513,7 @@ XtPointer data;
*/
/* ARGSUSED */
static void
db_delall_cb (w, client, data)
Widget w;
XtPointer client;
XtPointer data;
db_delall_cb (Widget w, XtPointer client, XtPointer data)
{
if (confirm())
query (dbshell_w, "Delete all files from memory?",
@ -546,10 +536,7 @@ dbrelall (void)
*/
/* ARGSUSED */
static void
db_relall_cb (w, client, data)
Widget w;
XtPointer client;
XtPointer data;
db_relall_cb (Widget w, XtPointer client, XtPointer data)
{
if (confirm())
query (dbshell_w, "Reload all files in memory?",
@ -562,20 +549,14 @@ XtPointer data;
/* callback from the open fifo button */
/* ARGSUSED */
static void
db_openfifo_cb (w, client, data)
Widget w;
XtPointer client;
XtPointer data;
db_openfifo_cb (Widget w, XtPointer client, XtPointer data)
{
db_connect_fifo();
}
/* ARGSUSED */
static void
db_help_cb (w, client, data)
Widget w;
XtPointer client;
XtPointer data;
db_help_cb (Widget w, XtPointer client, XtPointer data)
{
static char *msg[] = {
"This displays a count of the various types of objects currently in memory.",
@ -597,10 +578,7 @@ db_helpon_cb (Widget w, XtPointer client, XtPointer call)
/* ARGSUSED */
static void
db_popdown_cb (w, client, data)
Widget w;
XtPointer client;
XtPointer data;
db_popdown_cb (Widget w, XtPointer client, XtPointer data)
{
if (dbf_w)
XtUnmanageChild (dbf_w);
@ -608,10 +586,7 @@ XtPointer data;
/* ARGSUSED */
static void
db_close_cb (w, client, data)
Widget w;
XtPointer client;
XtPointer data;
db_close_cb (Widget w, XtPointer client, XtPointer data)
{
XtPopdown (dbshell_w);
}
@ -643,9 +618,7 @@ cathdr_cb (Widget w, XtPointer client, XtPointer call)
/* build one new catalog entry */
static void
db_1catrow (rc_w, dbcp)
Widget rc_w;
DBCat *dbcp;
db_1catrow (Widget rc_w, DBCat *dbcp)
{
Widget f_w, pb_w;
Widget nl_w, cl_w;

View File

@ -390,9 +390,7 @@ e_manage (void)
* remove all trail history if any.
*/
void
e_update(np, force)
Now *np;
int force;
e_update (Now *np, int force)
{
EObj *eop;
@ -454,8 +452,7 @@ e_newfavs (void)
* so we rebuild the favorites list.
*/
void
e_newdb (appended)
int appended;
e_newdb (int appended)
{
if (!eshell_w)
return;
@ -468,8 +465,7 @@ int appended;
* the ons and offs stack.
*/
void
e_selection_mode (whether)
int whether;
e_selection_mode (int whether)
{
if (whether)
e_selecting++;
@ -483,8 +479,7 @@ int whether;
}
void
e_cursor(c)
Cursor c;
e_cursor (Cursor c)
{
Window win;
@ -1652,8 +1647,8 @@ e_mloop_cb (Widget w, XtPointer client, XtPointer call)
* should appear to look like buttons or just flat labels.
*/
static void
e_set_buttons (whether)
int whether; /* whether setting up for plotting or for not plotting */
e_set_buttons (int whether)
/* whether setting up for plotting or for not plotting */
{
int i;
@ -1759,8 +1754,7 @@ e_print (void)
}
static void
e_ps_annotate (np)
Now *np;
e_ps_annotate (Now *np)
{
int unitspref = pref_get (PREF_UNITS);
double sslat, sslong;
@ -1897,10 +1891,7 @@ Now *np;
/* label print with center lat/long */
static void
e_ps_ll (tag, lt, lg, x, y)
char *tag;
double lt, lg;
int x, y;
e_ps_ll (char *tag, double lt, double lg, int x, int y)
{
char ltstr[32], lgstr[32];
char buf[128];
@ -1991,11 +1982,10 @@ e_exp_cb (Widget w, XtPointer client, XtPointer call)
*/
/* ARGSUSED */
static void
e_motion_eh (w, client, ev, continue_to_dispatch)
Widget w;
XtPointer client;
XEvent *ev;
Boolean *continue_to_dispatch;
e_motion_eh (Widget w,
XtPointer client,
XEvent *ev,
Boolean *continue_to_dispatch)
{
static int inwin;
Display *dsp = XtDisplay(w);
@ -2078,10 +2068,7 @@ Boolean *continue_to_dispatch;
*/
/* ARGSUSED */
static void
e_tb_cb (wid, client, call)
Widget wid;
XtPointer client;
XtPointer call;
e_tb_cb (Widget wid, XtPointer client, XtPointer call)
{
int state = TBISON (wid);
int want = (long int) client;
@ -2647,12 +2634,13 @@ e_copy_pm (void)
*/
/* ARGSUSED */
static void
e_popup (wid, ev, d, xb, yb, x, y)
Widget wid;
XEvent *ev;
unsigned d;
unsigned xb, yb;
int x, y;
e_popup (Widget wid,
XEvent *ev,
unsigned d,
unsigned xb,
unsigned yb,
int x,
int y)
{
Now *np = mm_get_now();
int mind = 10000000; /* min pick dist so far */
@ -2997,11 +2985,12 @@ e_create_popup (void)
/* given diameter and x/y border display info at the given lat/long
*/
static void
e_track_latlng (w, d, xb, yb, lt, lg)
Widget w;
int d;
int xb, yb;
double lt, lg;
e_track_latlng (Widget w,
int d,
int xb,
int yb,
double lt,
double lg)
{
static int last_lst_w, last_lmt_w, last_ll_w, last_db_w;
int topy = projection == WXMAP ? WXM_TY : 0;
@ -3106,8 +3095,7 @@ double lt, lg;
* -PI/2 .. elat .. PI/2 and -PI .. elng .. PI.
*/
static void
e_setelatlng (lt, lg)
double lt, lg;
e_setelatlng (double lt, double lg)
{
elat = lt;
selat = sin(elat);
@ -3127,10 +3115,10 @@ double lt, lg;
* both are in rads, lat is +N, long is +E.
*/
static void
e_subobject(np, op, latp, longp)
Now *np;
Obj *op;
double *latp, *longp;
e_subobject (Now *np,
Obj *op,
double *latp,
double *longp)
{
if (op->o_type == EARTHSAT) {
/* these are all ready to go */
@ -3178,8 +3166,7 @@ e_edist_rate (Now *np, Obj *op)
* turn off the display of these items.
*/
static void
e_show_esat_stats (eop)
EObj *eop;
e_show_esat_stats (EObj *eop)
{
Now *np = mm_get_now();
Obj *op = &eop->trail[0].t_obj;
@ -3285,11 +3272,13 @@ rd2ll (double ra, double dec, double *lp, double *Lp)
* it's over the limb.
*/
static int
e_coord (d, wb, hb, pl, pL, xp, yp)
unsigned d; /* diameter of drawing surface circle */
unsigned wb, hb; /* width/height borders between circle and edges */
double pl, pL; /* point p lat, rads, +N; long, rads, +E */
short *xp, *yp; /* projected location onto drawing surface */
e_coord (unsigned d, /* diameter of drawing surface circle */
unsigned wb,
unsigned hb, /* width/height borders between circle and edges */
double pl,
double pL, /* point p lat, rads, +N; long, rads, +E */
short *xp,
short *yp) /* projected location onto drawing surface */
{
switch (projection) {
case CYLI: /* FALLTHRU */
@ -3342,12 +3331,14 @@ short *xp, *yp; /* projected location onto drawing surface */
* return 1 if any part was visible, else 0.
*/
static int
e_drawfootprint (np, eop, d, wb, hb, slat, slng, el)
Now *np; /* circumstances */
EObj *eop; /* object info */
int d, wb, hb; /* dia and width/height borders of circle to use */
double slat, slng; /* satellite's lat and lng */
double el; /* satellite's elevation above surface, m */
e_drawfootprint (Now *np, /* circumstances */
EObj *eop, /* object info */
int d,
int wb,
int hb, /* dia and width/height borders of circle to use */
double slat,
double slng, /* satellite's lat and lng */
double el) /* satellite's elevation above surface, m */
{
double rad; /* viewing altitude radius, rads */
int isvis;
@ -3371,11 +3362,13 @@ double el; /* satellite's elevation above surface, m */
* return 1 if any part of the circle is visible, else 0.
*/
static int
e_drawcircle (pix, d, wb, hb, slat, slng, rad)
Pixel pix; /* drawing color */
unsigned d, wb, hb; /* dia and width/height borders of circle to use */
double slat, slng; /* lat/long of object */
double rad; /* angular radius of circle to draw */
e_drawcircle (Pixel pix, /* drawing color */
unsigned d, /* diameter, */
unsigned wb, /* width border, */
unsigned hb, /* height border of circle to use */
double slat, /* latitude, */
double slng, /* longitude of object */
double rad) /* angular radius of circle to draw */
{
#define MAXVCIRSEGS 62
XPoint xp[MAXVCIRSEGS+1];
@ -3415,10 +3408,12 @@ double rad; /* angular radius of circle to draw */
* return whether visible
*/
static int
e_drawcross (d, wb, hb, lt, lg, style)
unsigned d, wb, hb; /* dia and width/height borders of circle to use */
double lt, lg; /* desired center location */
int style; /* CROSSH or PLUSS */
e_drawcross (unsigned d, /* diameter, */
unsigned wb, /* border width, */
unsigned hb, /* border height of circle to use */
double lt,
double lg, /* desired center location */
int style) /* CROSSH or PLUSS */
{
double lats[4], lngs[4]; /* lats and longs of endpoints */
XSegment xs[4]; /* one for each cardinal direction */
@ -3501,8 +3496,9 @@ int style; /* CROSSH or PLUSS */
/* draw the lat/long grid lines */
static void
e_drawgrid (d, wb, hb)
unsigned d, wb, hb; /* dia and width/height borders of circle to use */
e_drawgrid (unsigned d, /* diameter, */
unsigned wb, /* border width, */
unsigned hb) /* border height of circle to use */
{
#define MAXGRIDSEGS 60 /* max segments per grid line */
int nsegs = MAXGRIDSEGS;
@ -3545,12 +3541,14 @@ unsigned d, wb, hb; /* dia and width/height borders of circle to use */
* return 1 if inside the map, else 0.
*/
static int
e_uncoord (proj, d, xb, yb, x, y, ltp, lgp)
Proj proj; /* which projection to use */
unsigned int d; /* diameter of earth limb, pixels */
unsigned xb, yb; /* borders around circle */
int x, y; /* X-windows coords of loc */
double *ltp, *lgp; /* resulting lat/long, rads */
e_uncoord (Proj proj, /* which projection to use */
unsigned int d, /* diameter of earth limb, pixels */
unsigned xb,
unsigned yb, /* borders around circle */
int x,
int y, /* X-windows coords of loc */
double *ltp,
double *lgp) /* resulting lat/long, rads */
{
switch (proj) {
@ -3631,8 +3629,7 @@ noTrack (void)
* for faster redraw when we know full well the stats have not changed.
*/
static void
e_all (statstoo)
int statstoo;
e_all (int statstoo)
{
Now *np = mm_get_now();
EObj *eop;
@ -3687,10 +3684,11 @@ int statstoo;
* if wxmap, assume correct (fixed) size, r is horizontal half-width.
*/
static void
e_getcircle (wp, hp, dp, xbp, ybp)
int *wp, *hp; /* overall width and height */
int *dp; /* circle diameter */
int *xbp, *ybp; /* x and y border */
e_getcircle (int *wp,
int *hp, /* overall width and height */
int *dp, /* circle diameter */
int *xbp,
int *ybp) /* x and y border */
{
Display *dsp = XtDisplay(e_da_w);
Window win = XtWindow(e_da_w);
@ -3722,8 +3720,7 @@ int *xbp, *ybp; /* x and y border */
/* draw everything centered at elat/elng onto e_pm.
*/
static void
e_map (np)
Now *np;
e_map (Now *np)
{
Display *dsp = XtDisplay(e_da_w);
int w, h, d, wb, hb;
@ -3839,9 +3836,10 @@ e_ano (double *latp, double *longp, int *xp, int *yp, int w2x, int arg)
/* draw the portion of the earth lit by the sun */
static void
e_sunlit (np, d, wb, hb)
Now *np; /* circumstances */
unsigned int d, wb, hb; /* circle dia, width and height borders in pixmap */
e_sunlit (Now *np, /* circumstances */
unsigned int d,
unsigned int wb,
unsigned int hb) /* circle dia, width/height borders in pixmap */
{
switch (projection) {
case CYLI:
@ -3865,9 +3863,10 @@ unsigned int d, wb, hb; /* circle dia, width and height borders in pixmap */
/* draw the sunlit portion of the Earth in cylindrical projection.
*/
static void
e_msunlit (np, d, wb, hb)
Now *np; /* circumstances */
unsigned int d, wb, hb; /* circle dia, width and height borders in pixmap */
e_msunlit (Now *np, /* circumstances */
unsigned int d,
unsigned int wb,
unsigned int hb) /* circle dia, width/height borders in pixmap */
{
#define MAXNMPTS 256 /* n segments -- larger is finer but slower */
Display *dsp = XtDisplay(e_da_w);
@ -3946,9 +3945,10 @@ unsigned int d, wb, hb; /* circle dia, width and height borders in pixmap */
* projection.
*/
static void
e_ssunlit (np, d, wb, hb)
Now *np; /* circumstances */
unsigned int d, wb, hb; /* circle dia, width and height borders in pixmap */
e_ssunlit (Now *np, /* circumstances */
unsigned int d,
unsigned int wb,
unsigned int hb) /* circle dia, width/height borders in pixmap */
{
#define MAXNSPTS 52 /* max number of polyline points */
#define FULLANGLE degrad(5)/* consider full if within this angle */
@ -4020,8 +4020,7 @@ unsigned int d, wb, hb; /* circle dia, width and height borders in pixmap */
/* draw each continent border */
static void
e_drawcontinents (d, wb, hb)
unsigned d, wb, hb;
e_drawcontinents (unsigned d, unsigned wb, unsigned hb)
{
#define MINSEP 1000 /* min sep to draw in low prec, 100ths deg */
#define PTCACHE 64 /* number of XPoints to cache */
@ -4064,8 +4063,7 @@ unsigned d, wb, hb;
/* draw each site */
static void
e_drawsites (d, wb, hb)
unsigned d, wb, hb;
e_drawsites (unsigned d, unsigned wb, unsigned hb)
{
#define NPCACHE 64 /* number of XPoints to cache */
Display *dsp = XtDisplay(e_da_w);
@ -4103,10 +4101,10 @@ unsigned d, wb, hb;
* elat/elng connected lines, with tickmarks and possible time stamps.
*/
static void
e_drawtrail (eop, d, wb, hb)
EObj *eop; /* info about object */
int d; /* Earth circle diameter, pixels */
int wb, hb; /* width and height borders, pixels */
e_drawtrail (EObj *eop, /* info about object */
int d, /* Earth circle diameter, pixels */
int wb,
int hb) /* width and height borders, pixels */
{
int w = d + 2*wb;
short lx = 0, ly = 0, lv;
@ -4192,11 +4190,11 @@ int wb, hb; /* width and height borders, pixels */
* return 1 if any part was visible, else 0.
*/
static int
e_drawobject (np, eop, d, wb, hb)
Now *np; /* circumstances */
EObj *eop; /* which object */
int d; /* Earth circle diameter, pixels */
int wb, hb; /* width and height borders, pixels */
e_drawobject (Now *np, /* circumstances */
EObj *eop, /* which object */
int d, /* Earth circle diameter, pixels */
int wb,
int hb) /* width and height borders, pixels */
{
Trail *tp = eop->trail;
int isvis;
@ -4224,10 +4222,10 @@ int wb, hb; /* width and height borders, pixels */
* draw name if want.
*/
static void
e_draworbit (eop, d, wb, hb)
EObj *eop; /* which object */
int d; /* Earth circle diameter, pixels */
int wb, hb; /* width and height borders, pixels */
e_draworbit (EObj *eop, /* which object */
int d, /* Earth circle diameter, pixels */
int wb,
int hb) /* width and height borders, pixels */
{
Now now, *np; /* advance time through one rev */
Obj obj, *op; /* advance object through one rev */
@ -4390,10 +4388,10 @@ int wb, hb; /* width and height borders, pixels */
/* draw obj's name */
static void
e_drawname (eop, d, wb, hb)
EObj *eop; /* which object */
int d; /* Earth circle diameter, pixels */
int wb, hb; /* width and height borders, pixels */
e_drawname (EObj *eop, /* which object */
int d, /* Earth circle diameter, pixels */
int wb,
int hb) /* width and height borders, pixels */
{
Trail *tp = &eop->trail[0];
char *name = tp->t_obj.o_name;
@ -4427,15 +4425,16 @@ e_draworbname (EObj *eop, int x, int y)
* polylines.
*/
static int
add_to_polyline (xp, xpsize, i, vis, nxp, max, w, x, y)
XPoint xp[]; /* working array */
int xpsize; /* entries in xp[] */
int i; /* item we are on: 0..max */
int vis; /* is this point visible */
int nxp; /* number of items in xp[] in use -- next goes in xp[npx] */
int max; /* largest item number we will draw */
int w; /* window width -- used to check top wraps */
int x, y; /* the point to add to polyline */
add_to_polyline (XPoint xp[], /* working array */
int xpsize, /* entries in xp[] */
int i, /* item we are on: 0..max */
int vis, /* is this point visible */
int nxp, /* number of items in xp[] in use, */
/* next goes in xp[npx] */
int max, /* largest item number we will draw */
int w, /* window width -- used to check top wraps */
int x,
int y) /* the point to add to polyline */
{
int lx = 0, ly = 0;
int xwrap = 0;
@ -4530,9 +4529,10 @@ int x, y; /* the point to add to polyline */
/* mark the mainmenu location */
static void
e_mainmenuloc (np, d, wb, hb)
Now *np;
unsigned d, wb, hb;
e_mainmenuloc (Now *np,
unsigned d,
unsigned wb,
unsigned hb)
{
XSetForeground (XtD, e_olgc, ecolors[HEREC].p);
e_drawcross (d, wb, hb, lat, lng, PLUSS);
@ -4587,9 +4587,10 @@ unsigned d, wb, hb;
* gst, set latitude to dec, project and draw!
*/
static void
e_soleclipse (np, d, wb, hb)
Now *np;
unsigned d, wb, hb;
e_soleclipse (Now *np,
unsigned d,
unsigned wb,
unsigned hb)
{
Obj *op0 = db_basic (SUN); /* op0 must be the further one */
Obj *op1 = db_basic (MOON);
@ -4666,11 +4667,11 @@ unsigned d, wb, hb;
* N.B. beware of negative heights (deorbited ;-))
*/
static void
e_viewrad (np, height, alt, radp)
Now *np; /* refraction circumstances */
double height; /* satellite elevation, m above mean earth */
double alt; /* viewing altitude, rads above horizon */
double *radp; /* great-circle distance from subpoint to viewing circle, rads*/
e_viewrad (Now *np, /* refraction circumstances */
double height, /* satellite elevation, m above mean earth */
double alt, /* viewing altitude, rads above horizon */
double *radp) /* great-circle distance from subpoint
to viewing circle, rads */
{
/* remove effect of refraction from geometry */
unrefract (pressure, temp, alt, &alt);
@ -4686,10 +4687,7 @@ double *radp; /* great-circle distance from subpoint to viewing circle, rads*/
* return 0 if ok else -1 if no memory.
*/
static void
e_resettrail(eop, np, discard)
EObj *eop;
Now *np;
int discard;
e_resettrail (EObj *eop, Now *np, int discard)
{
Obj *op = eop->op;
Trail *tp = eop->trail;
@ -4722,10 +4720,7 @@ int discard;
*/
/* ARGSUSED */
static int
e_mktrail (ts, statep, client)
TrTS ts[];
TrState *statep;
XtPointer client;
e_mktrail (TrTS ts[], TrState *statep, XtPointer client)
{
EObj *eop = &eobjs[(long int)client];
Obj *op = eop->op;
@ -4790,8 +4785,7 @@ XtPointer client;
/* grow the trails list by one and return the address of the new entry.
*/
static Trail *
e_growtrail (eop)
EObj *eop;
e_growtrail (EObj *eop)
{
eop->trail = (Trail *) XtRealloc ((char *)eop->trail,
(eop->ntrail+1)*sizeof(Trail));
@ -4910,8 +4904,7 @@ e_getwxgif (void)
* return XImage * if ok else NULL and xe_msg().
*/
static XImage *
e_create_xim (w, h)
int w, h;
e_create_xim (int w, int h)
{
Display *dsp = XtDisplay(e_da_w);
XImage *xip;
@ -4961,9 +4954,7 @@ int w, h;
/* given a time and location, return 1 if location is in sunlight, else 0 */
static int
e_issunlit (np, l, L)
Now *np;
double l, L;
e_issunlit (Now *np, double l, double L)
{
static double last_mjd;
static double csslat, ssslat;
@ -4983,8 +4974,7 @@ double l, L;
/* return 1 if the given wxgifpix is gray, else 0 */
static int
e_wxisgray (p)
int p;
e_wxisgray (int p)
{
int r = (int)wxxcols[p].red >> 8;
int g = (int)wxxcols[p].green >> 8;
@ -5050,9 +5040,7 @@ e_newwxpm (void)
* return 0 if ok, else -1.
*/
static int
e_setupwxpm (reload, rebuild)
int reload;
int rebuild;
e_setupwxpm (int reload, int rebuild)
{
static double last_mjd;
Now *np = mm_get_now();
@ -5083,9 +5071,8 @@ int rebuild;
/* convert lat/long to x/y on www.ssec.wisc.edu/data/comp/latest_cmoll.gif */
static void
mollweide_llxy (l, L, xp, yp)
double l, L; /* lat, long, rads, +N, +E */
short *xp, *yp; /* gif location */
mollweide_llxy (double l, double L, /* lat, long, rads, +N, +E */
short *xp, short *yp) /* gif location */
{
double tmp;
@ -5102,9 +5089,8 @@ short *xp, *yp; /* gif location */
* return 1 if actually on the earth map, else 0.
*/
static int
mollweide_xyll (x, y, lp, Lp)
int x, y; /* gif location */
double *lp, *Lp; /* lat, long, rads, +N, +E */
mollweide_xyll (int x, int y, /* gif location */
double *lp, double *Lp) /* lat, long, rads, +N, +E */
{
double fx, fy;
@ -5235,8 +5221,8 @@ loadnei (void)
/* render deipix and neipix into e_pm */
static void
drawei (ww, wh, d, xb, yb)
unsigned int ww, wh, d, xb, yb;
drawei (unsigned int ww, unsigned int wh,
unsigned int d, unsigned int xb, unsigned int yb)
{
Now *np = mm_get_now();
Display *dsp = XtD;

View File

@ -390,9 +390,7 @@ showFavorites (void)
/* using info from favs[i] create its row in the favories window */
static void
setup1Row (rc_w, i)
Widget rc_w;
int i;
setup1Row (Widget rc_w, int i)
{
Widget f_w, on_w, del_w, lbl_w, up_w, dn_w;
Arg args[20];

View File

@ -39,9 +39,7 @@ f_ison (void)
* if we don't update the value then mark it as insensitive for feedback.
*/
void
f_showit (w, s)
Widget w;
char *s;
f_showit (Widget w, char *s)
{
/* testing is faster than setting */
if (XtIsSensitive(w) != !f_scrnoff)
@ -61,11 +59,10 @@ char *s;
* see fs_sexa for full formatting details.
*/
void
f_sexa (wid, a, w, fracbase)
Widget wid;
double a;
int w;
int fracbase;
f_sexa (Widget wid,
double a,
int w,
int fracbase)
{
char out[64];
@ -77,9 +74,7 @@ int fracbase;
/* print ra, in radians, to widget w in hours according to the precision pref.
*/
void
f_ra (w, ra)
Widget w;
double ra;
f_ra (Widget w, double ra)
{
if (pref_get(PREF_DPYPREC) == PREF_LOPREC)
f_sexa (w, radhr(ra), 2, 600);
@ -90,9 +85,7 @@ double ra;
/* print ra, in radians, into string out[] in hours according to precision pref.
*/
void
fs_ra (out, ra)
char out[];
double ra;
fs_ra (char out[], double ra)
{
if (pref_get(PREF_DPYPREC) == PREF_LOPREC)
fs_sexa (out, radhr(ra), 2, 600);
@ -104,9 +97,7 @@ double ra;
* precision preference.
*/
void
f_prdec(w, a)
Widget w;
double a;
f_prdec (Widget w, double a)
{
if (pref_get(PREF_DPYPREC) == PREF_LOPREC)
f_sexa (w, raddeg(a), 3, 60);
@ -118,9 +109,7 @@ double a;
* precision preference.
*/
void
fs_prdec(out, a)
char out[];
double a;
fs_prdec (char out[], double a)
{
if (pref_get(PREF_DPYPREC) == PREF_LOPREC)
fs_sexa (out, raddeg(a), 3, 60);
@ -130,9 +119,7 @@ double a;
/* print time, t, as hh:mm:ss */
void
f_time (w, t)
Widget w;
double t;
f_time (Widget w, double t)
{
range (&t, 24.0);
#ifdef AVOID_24H
@ -144,9 +131,7 @@ double t;
/* print time, t, as hh:mm:ss */
void
fs_time (out, t)
char out[];
double t;
fs_time (char out[], double t)
{
range (&t, 24.0);
#ifdef AVOID_24H
@ -158,9 +143,7 @@ double t;
/* print time, t, as hh:mm to widget w */
void
f_mtime (w, t)
Widget w;
double t;
f_mtime (Widget w, double t)
{
range (&t, 24.0);
#ifdef AVOID_24H
@ -172,9 +155,7 @@ double t;
/* print time, t, as hh:mm into out[] */
void
fs_mtime (out, t)
char out[];
double t;
fs_mtime (char out[], double t)
{
range (&t, 24.0);
#ifdef AVOID_24H
@ -186,18 +167,14 @@ double t;
/* print angle, a, in rads, as degrees to widget w in form ddd:mm */
void
f_dm_angle(w, a)
Widget w;
double a;
f_dm_angle (Widget w, double a)
{
f_sexa (w, raddeg(a), 3, 60);
}
/* print angle, a, in rads, as degrees into string out[] in form ddd:mm */
void
fs_dm_angle(out, a)
char out[];
double a;
fs_dm_angle (char out[], double a)
{
fs_sexa (out, raddeg(a), 3, 60);
}
@ -207,9 +184,7 @@ double a;
* precision preference.
*/
void
f_pangle(w, a)
Widget w;
double a;
f_pangle (Widget w, double a)
{
if (pref_get(PREF_DPYPREC) == PREF_LOPREC)
f_sexa (w, raddeg(a), 3, 60);
@ -221,9 +196,7 @@ double a;
* precision preference.
*/
void
fs_pangle(out, a)
char out[];
double a;
fs_pangle (char out[], double a)
{
if (pref_get(PREF_DPYPREC) == PREF_LOPREC)
fs_sexa (out, raddeg(a), 3, 60);
@ -233,18 +206,14 @@ double a;
/* print angle, a, in rads, as degrees to widget w in form dddd:mm:ss */
void
f_dms_angle(w, a)
Widget w;
double a;
f_dms_angle (Widget w, double a)
{
f_sexa (w, raddeg(a), 4, 3600);
}
/* print angle, a, in rads, as degrees into string out[] in form dddd:mm:ss */
void
fs_dms_angle(out, a)
char out[];
double a;
fs_dms_angle (char out[], double a)
{
fs_sexa (out, raddeg(a), 4, 3600);
}
@ -252,9 +221,7 @@ double a;
/* print the given modified Julian date, jd, in the preferred format.
*/
void
f_date (w, jd)
Widget w;
double jd;
f_date (Widget w, double jd)
{
char out[32];
double tmp;
@ -276,19 +243,14 @@ double jd;
* use f_showit() directly.
*/
void
f_string (w, s)
Widget w;
char *s;
f_string (Widget w, char *s)
{
field_log (w, 0.0, 0, s);
f_showit (w, s);
}
void
f_double (w, fmt, f)
Widget w;
char *fmt;
double f;
f_double (Widget w, char *fmt, double f)
{
char str[80];
(void) sprintf (str, fmt, f);
@ -298,10 +260,9 @@ double f;
/* fill buf() with given timezone name */
void
fs_tz (buf, tzpref, np)
char buf[];
int tzpref; /* PREF_UTCTZ or PREF_LOCALTZ */
Now *np;
fs_tz (char buf[],
int tzpref, /* PREF_UTCTZ or PREF_LOCALTZ */
Now *np)
{
if (tzpref == PREF_UTCTZ)
(void) strcpy(buf, "UTC");
@ -316,9 +277,7 @@ Now *np;
/* fill buf[] with time stamp from np */
void
fs_timestamp (np, stamp)
Now *np;
char stamp[];
fs_timestamp (Now *np, char stamp[])
{
double lmjd;
char d[32], t[32];
@ -342,9 +301,7 @@ char stamp[];
* because we want the time to always be updated even during movie loops.
*/
void
timestamp (np, w)
Now *np;
Widget w;
timestamp (Now *np, Widget w)
{
char stamp[64];
char *txtp;

View File

@ -116,9 +116,7 @@ ng_manage (void)
/* commanded from main to update with a new set of circumstances */
/* ARGSUSED */
void
ng_update (np, how_much)
Now *np;
int how_much;
ng_update (Now *np, int how_much)
{
/* only if we're up */
if (!ng_ison())
@ -150,8 +148,7 @@ ng_newres (void)
/* called to put up or remove the watch cursor. */
void
ng_cursor (c)
Cursor c;
ng_cursor (Cursor c)
{
Window win;
@ -698,8 +695,7 @@ ng_redraw (void)
* if ep just copy that much, else copy all.
*/
static void
ng_refresh(ep)
XExposeEvent *ep;
ng_refresh (XExposeEvent *ep)
{
Display *dsp = XtDisplay(ngda_w);
Window win = XtWindow (ngda_w);
@ -754,10 +750,7 @@ ng_init_gcs (void)
* N.B. this is just the geometry, we ignore rp->rs_flags
*/
static void
rs_x (np, rp, xr, xs)
Now *np;
RiseSet *rp;
int *xr, *xs;
rs_x (Now *np, RiseSet *rp, int *xr, int *xs)
{
double t;
@ -772,10 +765,7 @@ int *xr, *xs;
* N.B. do not use this for EARTHSAT, use rs_es().
*/
static int
rs_xrs (np, op, xr, xs)
Now *np;
Obj *op;
int *xr, *xs;
rs_xrs (Now *np, Obj *op, int *xr, int *xs)
{
RiseSet rs;
int nowright;
@ -829,11 +819,7 @@ int *xr, *xs;
* set xrp to left-most rise, xsp to right-most set.
*/
static int
rs_es (np, op, y, xrp, xsp)
Now *np;
Obj *op;
int y;
int *xrp, *xsp;
rs_es (Now *np, Obj *op, int y, int *xrp, int *xsp)
{
Display *dsp = XtD;
RiseSet rs;

View File

@ -123,10 +123,7 @@ static void cacheWriteEntry (GSCRegion *rp, GSCEntry *ep);
* N.B. cdp and chp must remain valid for GSCFetch().
*/
int
GSCSetup (cdp, chp, msg)
char *cdp;
char *chp;
char msg[];
GSCSetup (char *cdp, char *chp, char msg[])
{
/* set up the new paths and flags */
cdpath = cdp;
@ -184,14 +181,13 @@ char msg[];
* msg might contain a message regardless of the return value.
*/
int
GSCFetch (ra0, dec0, fov, fmag, spp, nspp, msg)
double ra0; /* center RA, rads */
double dec0; /* center Dec, rads */
double fov; /* field of view, rads */
double fmag; /* faintest mag */
ObjF **spp; /* *spp will be a malloced array of ObjF stars in region */
int nspp; /* if spp: initial number of ObjF already in *spp */
char msg[]; /* possible return error or status message */
GSCFetch (double ra0, /* center RA, rads */
double dec0, /* center Dec, rads */
double fov, /* field of view, rads */
double fmag, /* faintest mag */
ObjF **spp, /* *spp will be malloced array of ObjF stars in rgn */
int nspp, /* if spp: initial number of ObjF already in *spp */
char msg[]) /* possible return error or status message */
{
Request q;
GSCArray sa;
@ -258,9 +254,7 @@ char msg[]; /* possible return error or status message */
* return 0 if ok else fill lmsg[] and return -1 if trouble.
*/
static int
handleRequest (qp, ap)
Request *qp;
GSCArray *ap;
handleRequest (Request *qp, GSCArray *ap)
{
char ids[9537]; /* set when region has already been visited */
GSCRegion region;
@ -328,10 +322,7 @@ GSCArray *ap;
* if ok return count, else put reason in lmsg and return -1.
*/
static int
fetchRegion (rp, qp, ap)
GSCRegion *rp;
Request *qp;
GSCArray *ap;
fetchRegion (GSCRegion *rp, Request *qp, GSCArray *ap)
{
GSCRegion cr; /* used for the cache entry */
@ -403,9 +394,7 @@ GSCArray *ap;
/* return 0 if the given entry is within the given request, else return -1.
*/
static int
inFOV (qp, ep)
Request *qp;
GSCEntry *ep;
inFOV (Request *qp, GSCEntry *ep)
{
double cr = qp->sdec*sin(ep->dec) +
qp->cdec*cos(ep->dec)*cos(qp->ra - ep->ra);
@ -414,9 +403,7 @@ GSCEntry *ep;
/* return 0 if the given entry is at least as bright as the faint limit, else -1 */
static int
magOK (qp, ep)
Request *qp;
GSCEntry *ep;
magOK (Request *qp, GSCEntry *ep)
{
return (ep->mag <= qp->mag ? 0 : -1);
}
@ -426,10 +413,7 @@ GSCEntry *ep;
* return 0 if ok, else put reason in lmsg and return -1
*/
static int
addOneStar (ap, rp, ep)
GSCArray *ap;
GSCRegion *rp;
GSCEntry *ep;
addOneStar (GSCArray *ap, GSCRegion *rp, GSCEntry *ep)
{
int sz = sizeof(ObjF);
Obj *op;
@ -472,13 +456,11 @@ GSCEntry *ep;
}
static int
mymkdir (path)
char *path;
mymkdir (char *path)
{
return (mkdir (expand_home (path), 0755));
}
/* code to handle the details of reading the CDROM */
/* index by dec band and get the number of large regions in it and its first
@ -626,10 +608,7 @@ static SmallRegionTable sm_reg[733] = {
* sm_reg_x.tbl, lg_reg_x.tbl and regions.tbl.
*/
static void
gscPickRegion (ra, dec, rp)
double ra;
double dec;
GSCRegion *rp;
gscPickRegion (double ra, double dec, GSCRegion *rp)
{
int decband; /* which 7.5-degree dec band: 0..11 */
int raband; /* which group of small ra bands */
@ -714,8 +693,7 @@ GSCRegion *rp;
* N.B. this code heavily assumes these the GSC FITS files.
*/
static int
gscOpenRegion (rp)
GSCRegion *rp;
gscOpenRegion (GSCRegion *rp)
{
typedef enum {FINDNAXIS2, FINDEND, SKIPTOBLOCK, FOUNDTABLE} State;
char buf[FLL+1]; /* we add EOS */
@ -782,8 +760,7 @@ GSCRegion *rp;
* else return -1.
*/
static int
gscSimpleFits (fp)
FILE *fp;
gscSimpleFits (FILE *fp)
{
static char smpl[31] = "SIMPLE = T";
char buf[FLL];
@ -800,9 +777,7 @@ FILE *fp;
* else set rp->fp to NULL and full msg with an error message.
*/
static void
gscOpenFile (rp, msg)
GSCRegion *rp;
char *msg;
gscOpenFile (GSCRegion *rp, char *msg)
{
char path[1024];
@ -823,9 +798,7 @@ char *msg;
* decrement rp->nrows as we go and return -1 when it reaches 0, else 0.
*/
static int
gscGetNextEntry (rp, ep)
GSCRegion *rp;
GSCEntry *ep;
gscGetNextEntry (GSCRegion *rp, GSCEntry *ep)
{
char buf[16];
@ -890,14 +863,12 @@ GSCEntry *ep;
/* do whatever cleanup might be required when finished with rp
*/
static void
gscCloseRegion (rp)
GSCRegion *rp;
gscCloseRegion (GSCRegion *rp)
{
fclose (rp->fp);
rp->fp = NULL;
}
/* code to handle the details of the GSC cache files.
* the files have a short header at the front in ASCII.
* the stars then follow in a packed binary format.
@ -923,9 +894,7 @@ GSCRegion *rp;
* return 0 if ok else return -1.
*/
static int
cacheOpenRegion (rp, cp)
GSCRegion *rp;
GSCRegion *cp;
cacheOpenRegion (GSCRegion *rp, GSCRegion *cp)
{
char fullpath[1024];
@ -972,9 +941,7 @@ GSCRegion *cp;
* decrement rp->nrows as we go and return -1 when it reaches 0, else 0.
*/
static int
cacheGetNextEntry (rp, ep)
GSCRegion *rp;
GSCEntry *ep;
cacheGetNextEntry (GSCRegion *rp, GSCEntry *ep)
{
if (rp->nrows <= 0)
return (-1);
@ -987,8 +954,7 @@ GSCEntry *ep;
/* do whatever cleanup might be required when finished with rp.
*/
static void
cacheCloseRegion (rp)
GSCRegion *rp;
cacheCloseRegion (GSCRegion *rp)
{
fclose (rp->fp);
rp->fp = NULL;
@ -999,9 +965,7 @@ GSCRegion *rp;
* return 0 if ok, else complain to lmsg and return -1.
*/
static int
cacheCreateRegion (rp, cp)
GSCRegion *rp;
GSCRegion *cp;
cacheCreateRegion (GSCRegion *rp, GSCRegion *cp)
{
char fullpath[1024];
@ -1042,9 +1006,7 @@ GSCRegion *cp;
/* write ep to rp->fp.
*/
static void
cacheAddEntry (rp, ep)
GSCRegion *rp;
GSCEntry *ep;
cacheAddEntry (GSCRegion *rp, GSCEntry *ep)
{
cacheWriteEntry (rp, ep);
}
@ -1052,9 +1014,7 @@ GSCEntry *ep;
/* build a full cache filename for rp off chpath dir.
*/
static void
cacheBuildFilename (fullpath, rp)
char fullpath[];
GSCRegion *rp;
cacheBuildFilename (char fullpath[], GSCRegion *rp)
{
(void) sprintf (fullpath, "%s/%s/%04d.ech", chpath, rp->dir, rp->id);
}
@ -1062,9 +1022,7 @@ GSCRegion *rp;
/* build a full cache dir for rp off chpath dir.
*/
static void
cacheBuildDir (fullpath, rp)
char fullpath[];
GSCRegion *rp;
cacheBuildDir (char fullpath[], GSCRegion *rp)
{
(void) sprintf (fullpath, "%s/%s", chpath, rp->dir);
}
@ -1073,8 +1031,7 @@ GSCRegion *rp;
* leave rp->fp positioned at first star.
*/
static int
cacheReadHeader (rp)
GSCRegion *rp;
cacheReadHeader (GSCRegion *rp)
{
char hdr[128];
double v;
@ -1116,8 +1073,7 @@ GSCRegion *rp;
* N.B. must be same length every time because we are called to overright.
*/
static void
cacheWriteHeader (rp)
GSCRegion *rp;
cacheWriteHeader (GSCRegion *rp)
{
char hdr[128];
int n;
@ -1140,9 +1096,7 @@ GSCRegion *rp;
* all values stored in big-endian byte order.
*/
static void
cacheReadEntry (rp, ep)
GSCRegion *rp;
GSCEntry *ep;
cacheReadEntry (GSCRegion *rp, GSCEntry *ep)
{
FILE *fp = rp->fp;
unsigned char buf[2];
@ -1176,9 +1130,7 @@ GSCEntry *ep;
* all values stored in big-endian byte order.
*/
static void
cacheWriteEntry (rp, ep)
GSCRegion *rp;
GSCEntry *ep;
cacheWriteEntry (GSCRegion *rp, GSCEntry *ep)
{
FILE *fp = rp->fp;
unsigned char buf[2];

View File

@ -427,10 +427,7 @@ char msg[]) /* return diagnostic message here, if returning -1 */
* if ok update *opp and return 0, else -1.
*/
static int
moreObjF (opp, nop, nnew)
ObjF **opp;
int nop;
int nnew;
moreObjF (ObjF **opp, int nop, int nnew)
{
char *newmem;

View File

@ -52,10 +52,9 @@ static char help_instructions[] =
* if fail so and use the deflt provided, if any.
*/
void
hlp_dialog (tag, deflt, ndeflt)
char *tag; /* tag to look for in help file */
char *deflt[]; /* help text to use if tag not found */
int ndeflt; /* number of strings in deflt[] */
hlp_dialog (char *tag, /* tag to look for in help file */
char *deflt[], /* help text to use if tag not found */
int ndeflt) /* number of strings in deflt[] */
{
static char *hurl;
static int triedhurl;

View File

@ -77,9 +77,7 @@ expand_home (char *path)
/* like fopen() but substitutes HOME if name starts with '~'
*/
FILE *
fopenh (name, how)
char *name;
char *how;
fopenh (char *name, char *how)
{
return (fopen (expand_home(name), how));
}
@ -153,8 +151,7 @@ openh (char *name, int flags, ...)
* substitute HOME if name starts with '~'.
*/
int
existsh (name)
char *name;
existsh (char *name)
{
struct stat s;

View File

@ -102,8 +102,7 @@ hznEditingOff (void)
/* called to put up or remove the watch cursor. */
void
hzn_cursor (c)
Cursor c;
hzn_cursor (Cursor c)
{
Window win;
@ -151,8 +150,7 @@ hznProfile (int i, double *altp, double *azp)
/* given an az, return the horizon altitude, both in rads.
*/
double
hznAlt(az)
double az;
hznAlt(double az)
{
Profile *pb, *pt;
double daz;
@ -560,8 +558,7 @@ hzn_radio (int choose_displ)
* control the Tbs as well as do the work.
*/
static void
hzn_choose (choose_displ)
int choose_displ;
hzn_choose (int choose_displ)
{
/* do the work */
if (choose_displ)

View File

@ -150,8 +150,7 @@ ir_setstar (double ix, double iy)
/* called to put up or remove the watch cursor. */
void
ir_cursor (c)
Cursor c;
ir_cursor (Cursor c)
{
Window win;

View File

@ -193,7 +193,7 @@ static int pendingexit; /* set when saving just before exiting */
* (can't use xm*Class in static initialization!!)
*/
#define CLASSCHKF(f,c1, c2) \
static int f(w) Widget w; { \
static int f(Widget w) { \
WidgetClass wc = XtClass(w); \
return (wc == c1 || wc == c2); \
}
@ -206,7 +206,7 @@ CLASSCHKF (isList, xmListWidgetClass, 0)
CLASSCHKF (isText, xmTextWidgetClass, 0)
CLASSCHKF (isTextF, xmTextFieldWidgetClass, 0)
CLASSCHKF (isScale, xmScaleWidgetClass, 0)
static int isAny(w) Widget w; { return (1); }
static int isAny(Widget w) { return (1); }
/* Font window info */
static Widget srfshell_w; /* main shell */
@ -608,11 +608,7 @@ static char prefsavecategory[] = "Main -- Preferences -- Save";
* value.
*/
void
sr_reg (w, res, cat, autosav)
Widget w;
char *res;
char *cat;
int autosav;
sr_reg (Widget w, char *res, char *cat, int autosav)
{
Resource *rp, newr, *newrp = &newr;
char *val;
@ -659,8 +655,7 @@ int autosav;
/* unregister all instances of the given widget */
void
sr_unreg (w)
Widget w;
sr_unreg (Widget w)
{
Resource *rp, *endrp;
@ -682,8 +677,7 @@ Widget w;
/* called to put up or remove the watch cursor on any of the Save windows */
void
sr_cursor (c)
Cursor c;
sr_cursor (Cursor c)
{
Window win;
@ -714,7 +708,7 @@ Cursor c;
/* call to possibly engage night mode when first coming up. */
void
sr_chknightv()
sr_chknightv (void)
{
sr_init();
@ -726,7 +720,7 @@ sr_chknightv()
/* return 1/0 whether either autotag is on */
int
sr_autosaveon()
sr_autosaveon (void)
{
sr_init();
return (XmToggleButtonGetState (asav_w));
@ -737,7 +731,7 @@ sr_autosaveon()
* last-saved value.
*/
int
sr_refresh()
sr_refresh (void)
{
char *val;
Category *lastcp;
@ -788,7 +782,7 @@ sr_refresh()
/* compute and display resources that have changed since last saved.
*/
void
sr_manage()
sr_manage (void)
{
/* create if first time */
sr_init();
@ -806,7 +800,7 @@ sr_manage()
/* just like sr_manage() but exits when saving is completed */
void
sr_xmanage()
sr_xmanage (void)
{
pendingexit = 1;
sr_manage();
@ -814,7 +808,7 @@ sr_xmanage()
/* bring up the font management window */
void
srf_manage()
srf_manage (void)
{
sr_init();
XtPopup (srfshell_w, XtGrabNone);
@ -823,7 +817,7 @@ srf_manage()
/* bring up the color management window */
void
src_manage()
src_manage (void)
{
sr_init();
XtPopup (srcshell_w, XtGrabNone);
@ -832,7 +826,7 @@ src_manage()
/* return 1/0 whether Save window is currently up */
int
sr_isUp()
sr_isUp (void)
{
return (isUp (srshell_w));
}
@ -841,8 +835,7 @@ sr_isUp()
* when finished all resources as "up to date".
*/
int
sr_save(talk)
int talk;
sr_save (int talk)
{
char nam[MRNAM]; /* resource name */
char buf[1024]; /* handy buffer */
@ -929,8 +922,7 @@ int talk;
* N.B. these pixmaps should be factors out of here someday.
*/
void
sr_getDirPM (pmopen, pmclose)
Pixmap *pmopen, *pmclose;
sr_getDirPM (Pixmap *pmopen, Pixmap *pmclose)
{
sr_init();
*pmopen = more_pm;
@ -941,7 +933,7 @@ Pixmap *pmopen, *pmclose;
* allowing for possible override.
*/
char *
getPrivateDir()
getPrivateDir (void)
{
static char *mydir;
@ -981,7 +973,7 @@ getPrivateDir()
/* return full path of of per-user resource file.
*/
char *
userResFile ()
userResFile (void)
{
static char *myres;
@ -995,7 +987,7 @@ userResFile ()
}
static void
create_srshell()
create_srshell (void)
{
Widget srform_w, close_w;
Widget t_w, w;
@ -1199,9 +1191,7 @@ create_srshell()
/* set majorn_w and minorn_w with message of counts */
static void
sr_setnnew (nanew, ntnew)
int nanew;
int ntnew;
sr_setnnew (int nanew, int ntnew)
{
char buf[128];
@ -1215,7 +1205,7 @@ int ntnew;
/* one-time stuff */
static void
sr_init()
sr_init (void)
{
int i;
@ -1263,7 +1253,7 @@ sr_init()
/* (re)create the pixmaps */
static void
sr_createpms()
sr_createpms (void)
{
Display *dsp = XtDisplay(toplevel_w);
Window win = RootWindow(dsp, DefaultScreen(dsp));
@ -1311,10 +1301,7 @@ sr_createpms()
/* ARGSUSED */
static void
sr_save_cb (w, client, call)
Widget w;
XtPointer client;
XtPointer call;
sr_save_cb (Widget w, XtPointer client, XtPointer call)
{
watch_cursor(1);
@ -1335,10 +1322,7 @@ XtPointer call;
/* ARGSUSED */
static void
sr_refresh_cb (w, client, call)
Widget w;
XtPointer client;
XtPointer call;
sr_refresh_cb (Widget w, XtPointer client, XtPointer call)
{
watch_cursor(1);
sr_refresh();
@ -1348,10 +1332,7 @@ XtPointer call;
/* ARGSUSED */
static void
sr_close_cb (w, client, call)
Widget w;
XtPointer client;
XtPointer call;
sr_close_cb (Widget w, XtPointer client, XtPointer call)
{
pendingexit = 0;
XtPopdown (srshell_w);
@ -1361,10 +1342,7 @@ XtPointer call;
*/
/* ARGSUSED */
static void
sr_help_cb (w, client, call)
Widget w;
XtPointer client;
XtPointer call;
sr_help_cb (Widget w, XtPointer client, XtPointer call)
{
static char *help_msg[] = {
"Display preferences changed since last Save and allowing saving.",
@ -1377,10 +1355,7 @@ static char *help_msg[] = {
*/
/* ARGSUSED */
static void
sr_catexp_cb (w, client, call)
Widget w;
XtPointer client;
XtPointer call;
sr_catexp_cb (Widget w, XtPointer client, XtPointer call)
{
Resource *rp = (Resource *)client;
@ -1393,10 +1368,7 @@ XtPointer call;
*/
/* ARGSUSED */
static void
sr_ressav_cb (w, client, call)
Widget w;
XtPointer client;
XtPointer call;
sr_ressav_cb (Widget w, XtPointer client, XtPointer call)
{
Resource *rp = (Resource *)client;
rp->save = XmToggleButtonGetState(w);
@ -1406,8 +1378,7 @@ XtPointer call;
* first sort by category, then by fb, pushing all !autosav after all autosav.
*/
static int
cmpRes (r1, r2)
Resource *r1, *r2;
cmpRes (Resource *r1, Resource *r2)
{
Category *c1 = &catlist[r1->cati];
Category *c2 = &catlist[r2->cati];
@ -1424,9 +1395,7 @@ Resource *r1, *r2;
/* add one entry to rc_w for the Category used by rp */
static void
sr_1cat (rc_w, rp)
Widget rc_w;
Resource *rp;
sr_1cat (Widget rc_w, Resource *rp)
{
Widget s_w, x_w, l_w, fo_w;
Category *cp = &catlist[rp->cati];
@ -1493,10 +1462,7 @@ Resource *rp;
/* add one entry to rc_w for the Resource rp */
static void
sr_1res (rc_w, rp, center)
Widget rc_w;
Resource *rp;
int center;
sr_1res (Widget rc_w, Resource *rp, int center)
{
Widget s_w, l_w, v_w, fo_w;
Arg args[20];
@ -1564,8 +1530,7 @@ int center;
/* make a non-autosave header */
static void
sr_1nonas (rc_w)
Widget rc_w;
sr_1nonas (Widget rc_w)
{
Widget w, fo_w;
Arg args[20];
@ -1593,7 +1558,7 @@ Widget rc_w;
* N.B. reslist[] assumed to be in cmpRes() sorted order.
*/
static void
sr_display()
sr_display (void)
{
XmScrollBarCallbackStruct sbcs;
Widget ww;
@ -1670,8 +1635,7 @@ sr_display()
* return 0 if ok, or -1 if doesn't even look like a resource.
*/
static int
crackNam (res, nam)
char *res, *nam;
crackNam (char *res, char *nam)
{
char *colp = strchr (res, ':');
char wsnam[MRNAM];
@ -1687,8 +1651,7 @@ char *res, *nam;
* return 0 if ok, or -1 if doesn't even look like a resource.
*/
static int
crackVal (res, val)
char *res, *val;
crackVal (char *res, char *val)
{
char *colp = strchr (res, ':');
@ -1702,8 +1665,7 @@ char *res, *val;
* TODO: using XtNameToWidget precludes cases of multiple instances, eg plot.
*/
static char *
findWFB (findw)
Widget findw;
findWFB (Widget findw)
{
char wnam[MRNAM];
Widget w;
@ -1737,8 +1699,7 @@ Widget findw;
/* find the fallback that corresponds to res.
*/
static char *
findRFB (res)
char *res;
findRFB (char *res)
{
char fbnam[MRNAM];
char resnam[MRNAM];
@ -1764,8 +1725,7 @@ char *res;
/* print "nam":"val" into res; try to look nice */
static void
fmtRes (res, nam, val)
char *res, *nam, *val;
fmtRes (char *res, char *nam, char *val)
{
int rl;
@ -1779,9 +1739,7 @@ char *res, *nam, *val;
/* copy from[] to to[], sans any white space on either end.
*/
static void
cpyNoWS (to, from)
char *to;
char *from;
cpyNoWS (char *to, char *from)
{
char *lastnwsp; /* last non w/s char in to not counting '\0' */
@ -1799,8 +1757,7 @@ char *from;
* TODO: speed this up somehow making use of knowing it is in cmpRes() order?
*/
static Resource *
findRes (findnam)
char *findnam;
findRes (char *findnam)
{
char nam[MRNAM];
int i;
@ -1817,9 +1774,7 @@ char *findnam;
/* put full name of w into buf[] */
static char *
fullWName (w, buf)
Widget w;
char *buf;
fullWName (Widget w, char *buf)
{
if (w == toplevel_w)
sprintf (buf, "%s", XtName(w));
@ -1835,8 +1790,7 @@ char *buf;
* entry if none currently exist.
*/
static int
findCat (cat)
char *cat;
findCat (char *cat)
{
Category *cp;
@ -1861,13 +1815,12 @@ static char *_xrmVal;
/* stolen from appres.c and Xlib Xrm.c */
/*ARGSUSED*/
static Bool
DumpEntry(db, bindings, quarks, type, value, data)
XrmDatabase *db;
XrmBindingList bindings;
XrmQuarkList quarks;
XrmRepresentation *type;
XrmValuePtr value;
XPointer data;
DumpEntry (XrmDatabase *db,
XrmBindingList bindings,
XrmQuarkList quarks,
XrmRepresentation *type,
XrmValuePtr value,
XPointer data)
{
static XrmQuark qstring;
char buf[MRNAM];
@ -1905,8 +1858,7 @@ XPointer data;
* if find copy malloced value to *val and return 0, else return -1.
*/
static int
getXrmDB (nam, val)
char *nam, **val;
getXrmDB (char *nam, char **val)
{
XrmDatabase db = XtDatabase(XtDisplay(toplevel_w));
XrmName names[101];
@ -1937,9 +1889,7 @@ char *nam, **val;
* if we run into trouble, we just return .x and .y from w.
*/
static void
getGeometry (w, xp, yp)
Widget w;
int *xp, *yp;
getGeometry (Widget w, int *xp, int *yp)
{
Display *dsp = XtDisplay(w);
Window win = XtWindow (w);
@ -1982,9 +1932,7 @@ int *xp, *yp;
* exit if fails.
*/
static void
getCurVal (rp, valp)
Resource *rp;
char **valp;
getCurVal (Resource *rp, char **valp)
{
/* if in night vision mode, just return the "current" value of the
* resource, don't actually read its real value since we know that is
@ -2082,11 +2030,7 @@ char **valp;
* with args[nargs]
*/
static void
loadArgsChildren (w, isf, args, nargs)
Widget w;
int (*isf)();
Arg *args;
int nargs;
loadArgsChildren (Widget w, int (*isf)(), Arg *args, int nargs)
{
if (XtIsComposite (w)) {
WidgetList children;
@ -2112,13 +2056,12 @@ int nargs;
XtSetValues (w, args, nargs);
}
}
/* Font control */
/* display the named font in srfsample_w and store name in srfsname_w */
static void
srf_showsample (xlfd)
char *xlfd;
srf_showsample (char *xlfd)
{
Display *dsp = XtDisplay (toplevel_w);
XFontStruct *fsp;
@ -2145,8 +2088,7 @@ char *xlfd;
/* add the given xlfd to the scrolled history list if not already present */
static void
srf_addhistory (xlfd)
char *xlfd;
srf_addhistory (char *xlfd)
{
XmString xms = XmStringCreateSimple (xlfd);
if (!XmListItemExists (srfhl_w, xms))
@ -2158,8 +2100,7 @@ char *xlfd;
/* perform the Get-and-show current or default actions for the Choice */
static void
srf_getshow (fcp)
Choice *fcp;
srf_getshow (Choice *fcp)
{
Resource *rp = findRes (fcp->res);
char *val = NULL;
@ -2189,9 +2130,7 @@ Choice *fcp;
* evidently it must remain loaded.
*/
static XFontStruct *
srf_install (res, res2, xlfd)
char *res, *res2;
char *xlfd;
srf_install (char *res, char *res2, char *xlfd)
{
Display *dsp = XtDisplay(toplevel_w);
XrmDatabase db = XrmGetDatabase (dsp);
@ -2233,10 +2172,7 @@ char *xlfd;
*/
/* ARGSUSED */
static void
srf_go_cb (w, client, call)
Widget w;
XtPointer client;
XtPointer call;
srf_go_cb (Widget w, XtPointer client, XtPointer call)
{
Choice *fcp = (Choice *)client;
int setdef;
@ -2285,10 +2221,7 @@ XtPointer call;
*/
/* ARGSUSED */
static void
srf_appres_cb (w, client, call)
Widget w;
XtPointer client;
XtPointer call;
srf_appres_cb (Widget w, XtPointer client, XtPointer call)
{
Choice *fcp = (Choice *)client;
int setdef;
@ -2319,10 +2252,7 @@ XtPointer call;
*/
/* ARGSUSED */
static void
srf_views_cb (w, client, call)
Widget w;
XtPointer client;
XtPointer call;
srf_views_cb (Widget w, XtPointer client, XtPointer call)
{
Choice *fcp = (Choice *)client;
int setdef;
@ -2364,10 +2294,7 @@ XtPointer call;
*/
/* ARGSUSED */
static void
srf_tracking_cb (w, client, call)
Widget w;
XtPointer client;
XtPointer call;
srf_tracking_cb (Widget w, XtPointer client, XtPointer call)
{
Choice *fcp = (Choice *)client;
int setdef;
@ -2407,10 +2334,7 @@ XtPointer call;
*/
/* ARGSUSED */
static void
srf_moons_cb (w, client, call)
Widget w;
XtPointer client;
XtPointer call;
srf_moons_cb (Widget w, XtPointer client, XtPointer call)
{
Choice *fcp = (Choice *)client;
int setdef;
@ -2449,10 +2373,7 @@ XtPointer call;
/* called when an item in the font history list is selected */
/* ARGSUSED */
static void
srf_hist_cb (w, client, call)
Widget w;
XtPointer client;
XtPointer call;
srf_hist_cb (Widget w, XtPointer client, XtPointer call)
{
XmListCallbackStruct *lp = (XmListCallbackStruct *)call;
char *txt;
@ -2466,10 +2387,7 @@ XtPointer call;
/* called to clear font pattern field */
/* ARGSUSED */
static void
srf_clear_cb (w, client, call)
Widget w;
XtPointer client;
XtPointer call;
srf_clear_cb (Widget w, XtPointer client, XtPointer call)
{
XmTextFieldSetString (srfpat_w, "");
}
@ -2480,10 +2398,7 @@ XtPointer call;
*/
/* ARGSUSED */
static void
srf_search_cb (w, client, call)
Widget w;
XtPointer client;
XtPointer call;
srf_search_cb (Widget w, XtPointer client, XtPointer call)
{
srf_search ();
}
@ -2491,10 +2406,7 @@ XtPointer call;
/* called to clear font history list */
/* ARGSUSED */
static void
srf_clrhistory_cb (w, client, call)
Widget w;
XtPointer client;
XtPointer call;
srf_clrhistory_cb (Widget w, XtPointer client, XtPointer call)
{
XmListDeleteAllItems (srfhl_w);
}
@ -2502,10 +2414,7 @@ XtPointer call;
/* called to close font chooser */
/* ARGSUSED */
static void
srf_close_cb (w, client, call)
Widget w;
XtPointer client;
XtPointer call;
srf_close_cb (Widget w, XtPointer client, XtPointer call)
{
XtPopdown (srfshell_w);
}
@ -2514,10 +2423,7 @@ XtPointer call;
*/
/* ARGSUSED */
static void
srf_help_cb (w, client, call)
Widget w;
XtPointer client;
XtPointer call;
srf_help_cb (Widget w, XtPointer client, XtPointer call)
{
static char *fhelp_msg[] = {
"Type a font, then install into the specified widgets.",
@ -2535,7 +2441,7 @@ cmpStr (const void *p1, const void *p2)
/* fill list srfaf_w with names matching pattern in srfpat_w */
static void
srf_search ()
srf_search (void)
{
Display *dsp = XtDisplay (toplevel_w);
char *pattern;
@ -2577,10 +2483,7 @@ srf_search ()
/* called when an item in the font list is selected */
/* ARGSUSED */
static void
srf_sel_cb (w, client, call)
Widget w;
XtPointer client;
XtPointer call;
srf_sel_cb (Widget w, XtPointer client, XtPointer call)
{
XmListCallbackStruct *lp = (XmListCallbackStruct *)call;
char *txt;
@ -2592,10 +2495,7 @@ XtPointer call;
/* build menus across the given menu bar based on given array of Choices */
static void
create_menus (mb_w, cp, ncp)
Widget mb_w;
Choice *cp;
int ncp;
create_menus (Widget mb_w, Choice *cp, int ncp)
{
Widget pd_w = (Widget)0, cb_w, w;
Choice *lastcp;
@ -2628,7 +2528,7 @@ int ncp;
}
static void
create_srfshell()
create_srfshell (void)
{
Widget mf_w, w;
Widget tl_w, al_w;
@ -2916,14 +2816,12 @@ abcdefghijklmnopqrstuvwxyz\n\
srf_search ();
XtManageChild (srfaf_w);
}
/* Color control */
/* display the named color in the sample area and maybe set scales to match */
static void
src_showcolor (name, scalestoo)
char *name;
int scalestoo;
src_showcolor (char *name, int scalestoo)
{
Display *dsp = XtDisplay(toplevel_w);
Window win = XtWindow (srcda_w);
@ -2967,8 +2865,7 @@ int scalestoo;
/* perform the Get-and-show current or default actions for the cchoice */
static void
src_getshow (ccp)
Choice *ccp;
src_getshow (Choice *ccp)
{
Resource *rp = findRes (ccp->res);
char *val = NULL;
@ -2998,10 +2895,7 @@ Choice *ccp;
/* load w and its children with the background colors assoc with bg. */
static void
src_setbg (w, bg, isf)
Widget w;
Pixel bg;
int (*isf)();
src_setbg (Widget w, Pixel bg, int (*isf)())
{
Display *dsp = XtDisplay(w);
Screen *scr = DefaultScreenOfDisplay(dsp);
@ -3026,9 +2920,7 @@ int (*isf)();
/* install colorname in res{,2} in database and our history list */
static void
src_install (res, res2, cnam)
char *res, *res2;
char *cnam;
src_install (char *res, char *res2, char *cnam)
{
Display *dsp = XtDisplay(toplevel_w);
XrmDatabase db = XrmGetDatabase (dsp);
@ -3074,10 +2966,7 @@ char *cnam;
*/
/* ARGSUSED */
static void
src_bg_cb (w, client, call)
Widget w;
XtPointer client;
XtPointer call;
src_bg_cb (Widget w, XtPointer client, XtPointer call)
{
Choice *ccp = (Choice *)client;
int setdef;
@ -3129,10 +3018,7 @@ XtPointer call;
*/
/* ARGSUSED */
static void
src_fg_cb (w, client, call)
Widget w;
XtPointer client;
XtPointer call;
src_fg_cb (Widget w, XtPointer client, XtPointer call)
{
Choice *ccp = (Choice *)client;
int setdef;
@ -3179,7 +3065,7 @@ XtPointer call;
/* install night vision foreground color from XEphem.NightColor
*/
static void
installNVFg()
installNVFg (void)
{
Display *dsp = XtDisplay(toplevel_w);
XrmDatabase db = XrmGetDatabase (dsp);
@ -3234,7 +3120,7 @@ installNVFg()
/* distribute night vision foreground color from XEphem.NightColor
*/
static void
installNVBg()
installNVBg (void)
{
Display *dsp = XtDisplay(toplevel_w);
XrmDatabase db = XrmGetDatabase (dsp);
@ -3287,10 +3173,7 @@ installNVBg()
*/
/* ARGSUSED */
static void
src_nightv_cb (w, client, call)
Widget w;
XtPointer client;
XtPointer call;
src_nightv_cb (Widget w, XtPointer client, XtPointer call)
{
Display *dsp = XtDisplay(w);
XrmDatabase db = XrmGetDatabase (dsp);
@ -3399,10 +3282,7 @@ XtPointer call;
*/
/* ARGSUSED */
static void
src_obj_cb (w, client, call)
Widget w;
XtPointer client;
XtPointer call;
src_obj_cb (Widget w, XtPointer client, XtPointer call)
{
Choice *ccp = (Choice *)client;
int setdef;
@ -3443,10 +3323,7 @@ XtPointer call;
*/
/* ARGSUSED */
static void
src_appres_cb (w, client, call)
Widget w;
XtPointer client;
XtPointer call;
src_appres_cb (Widget w, XtPointer client, XtPointer call)
{
Choice *ccp = (Choice *)client;
int setdef;
@ -3477,10 +3354,7 @@ XtPointer call;
/* called when an item in the color history list is selected */
/* ARGSUSED */
static void
src_hist_cb (w, client, call)
Widget w;
XtPointer client;
XtPointer call;
src_hist_cb (Widget w, XtPointer client, XtPointer call)
{
XmListCallbackStruct *lp = (XmListCallbackStruct *)call;
char *txt;
@ -3494,10 +3368,7 @@ XtPointer call;
/* called to clear color text list */
/* ARGSUSED */
static void
src_clrl_cb (w, client, call)
Widget w;
XtPointer client;
XtPointer call;
src_clrl_cb (Widget w, XtPointer client, XtPointer call)
{
XmListDeleteAllItems (srcsl_w);
}
@ -3505,10 +3376,7 @@ XtPointer call;
/* called to close color chooser */
/* ARGSUSED */
static void
src_close_cb (w, client, call)
Widget w;
XtPointer client;
XtPointer call;
src_close_cb (Widget w, XtPointer client, XtPointer call)
{
XtPopdown (srcshell_w);
}
@ -3516,10 +3384,7 @@ XtPointer call;
/* called when ENTER is typed in the color text field */
/* ARGSUSED */
static void
src_enter_cb (w, client, call)
Widget w;
XtPointer client;
XtPointer call;
src_enter_cb (Widget w, XtPointer client, XtPointer call)
{
char *txt = XmTextFieldGetString (w);
src_showcolor (txt, 1);
@ -3529,10 +3394,7 @@ XtPointer call;
/* called when RGB TB changes */
/* ARGSUSED */
static void
src_rgb_cb (w, client, call)
Widget w;
XtPointer client;
XtPointer call;
src_rgb_cb (Widget w, XtPointer client, XtPointer call)
{
char *rgbstr;
@ -3545,10 +3407,7 @@ XtPointer call;
/* called while any RGB/HSV scale is being dragged */
/* ARGSUSED */
static void
src_scale_cb (w, client, call)
Widget w;
XtPointer client;
XtPointer call;
src_scale_cb (Widget w, XtPointer client, XtPointer call)
{
int r, g, b;
char buf[32];
@ -3575,10 +3434,7 @@ XtPointer call;
/* callback from the color Help button */
/* ARGSUSED */
static void
src_help_cb (w, client, call)
Widget w;
XtPointer client;
XtPointer call;
src_help_cb (Widget w, XtPointer client, XtPointer call)
{
static char *chelp_msg[] = {
"Type a color name, then install into the specified widgets.",
@ -3590,10 +3446,7 @@ static char *chelp_msg[] = {
/* called to start color picker */
/* ARGSUSED */
static void
cpk_grab_cb (w, client, call)
Widget w;
XtPointer client;
XtPointer call;
cpk_grab_cb (Widget w, XtPointer client, XtPointer call)
{
static Cursor wc;
Display *dsp = XtDisplay(w);
@ -3658,7 +3511,7 @@ XtPointer call;
}
static void
create_srcshell()
create_srcshell (void)
{
Display *dsp = XtDisplay(toplevel_w);
Widget mf_w, ti_w, fr_w, top_w, ttl_w, rb_w;
@ -4031,10 +3884,7 @@ create_srcshell()
* return 0 if ok, -1 if EOF.
*/
static int
fgetres (buf, bufl, fp)
char *buf;
int bufl;
FILE *fp;
fgetres (char *buf, int bufl, FILE *fp)
{
int c;
@ -4073,9 +3923,7 @@ FILE *fp;
* see comment at setXRes() for more insite.
*/
static void
fputres (fp, buf)
FILE *fp;
char *buf;
fputres (FILE *fp, char *buf)
{
int c;
@ -4090,7 +3938,7 @@ char *buf;
/* one update for both skyview and binary star window */
static void
skyview_newres()
skyview_newres (void)
{
sv_newres();
svbs_newres();

View File

@ -133,9 +133,7 @@ static XrmOptionDescRec options[] = {
};
int
main(argc, argv)
int argc;
char *argv[];
main (int argc, char *argv[])
{
Arg args[10];
int n;
@ -403,9 +401,7 @@ addOurDBs (void)
/* ARGSUSED */
static void
chk_args (argc, argv)
int argc;
char *argv[];
chk_args (int argc, char *argv[])
{
if (getXRes ("log", NULL)) {