* RET_ERROR, RET_SUCCESS
*/
int
-__bt_close(dbp)
- DB *dbp;
+__bt_close(DB *dbp)
{
BTREE *t;
int fd;
* RET_SUCCESS, RET_ERROR.
*/
int
-__bt_sync(dbp, flags)
- const DB *dbp;
- u_int flags;
+__bt_sync(const DB *dbp, u_int flags)
{
BTREE *t;
int status;
* RET_ERROR, RET_SUCCESS
*/
static int
-bt_meta(t)
- BTREE *t;
+bt_meta(BTREE *t)
{
BTMETA m;
void *p;
* h: page to convert
*/
void
-__bt_pgin(t, pg, pp)
- void *t;
- pgno_t pg;
- void *pp;
+__bt_pgin(void *t, pgno_t pg, void *pp)
{
PAGE *h;
int i, top;
}
void
-__bt_pgout(t, pg, pp)
- void *t;
- pgno_t pg;
- void *pp;
+__bt_pgout(void *t, pgno_t pg, void *pp)
{
PAGE *h;
int i, top;
* p: page to convert
*/
static void
-mswap(pg)
- PAGE *pg;
+mswap(PAGE *pg)
{
char *p;
* RET_ERROR, RET_SUCCESS and RET_SPECIAL if the key not found.
*/
int
-__bt_delete(dbp, key, flags)
- const DB *dbp;
- const DBT *key;
- u_int flags;
+__bt_delete(const DB *dbp, const DBT *key, u_int flags)
{
BTREE *t;
int status;
* RET_ERROR, RET_SUCCESS and RET_SPECIAL if the key not found.
*/
static int
-bt_bdelete(t, key)
- BTREE *t;
- const DBT *key;
+bt_bdelete(BTREE *t, const DBT *key)
{
EPG *e, save;
PAGE *h;
* RET_SUCCESS, RET_ERROR.
*/
int
-__bt_dleaf(t, h, index)
- BTREE *t;
- PAGE *h;
- int index;
+__bt_dleaf(BTREE *t, PAGE *h, int index)
{
register BLEAF *bl;
register indx_t *ip, offset;
* RET_ERROR, RET_SUCCESS and RET_SPECIAL if the key not found.
*/
int
-__bt_get(dbp, key, data, flags)
- const DB *dbp;
- const DBT *key;
- DBT *data;
- u_int flags;
+__bt_get(const DB *dbp, const DBT *key, DBT *data, u_int flags)
{
BTREE *t;
EPG *e;
* The first entry in the tree greater than or equal to key.
*/
EPG *
-__bt_first(t, key, exactp)
- BTREE *t;
- const DBT *key;
- int *exactp;
+__bt_first(BTREE *t, const DBT *key, int *exactp)
{
register PAGE *h;
register EPG *e;
*
*/
DB *
-__bt_open(fname, flags, mode, openinfo, dflags)
- const char *fname;
- int flags, mode, dflags;
- const BTREEINFO *openinfo;
+__bt_open(const char *fname, int flags, int mode, const BTREEINFO *openinfo, int dflags)
{
BTMETA m;
BTREE *t;
* RET_ERROR, RET_SUCCESS
*/
static int
-nroot(t)
- BTREE *t;
+nroot(BTREE *t)
{
PAGE *meta, *root;
pgno_t npg;
}
static int
-tmp()
+tmp(void)
{
sigset_t set, oset;
int fd;
}
static int
-byteorder()
+byteorder(void)
{
u_long x; /* XXX: 32-bit assumption. */
u_char *p;
}
int
-__bt_fd(dbp)
- const DB *dbp;
+__bt_fd(const DB *dbp)
{
BTREE *t;
* RET_ERROR, RET_SUCCESS
*/
int
-__ovfl_get(t, p, ssz, buf, bufsz)
- BTREE *t;
- void *p;
- size_t *ssz;
- char **buf;
- size_t *bufsz;
+__ovfl_get(BTREE *t, void *p, size_t *ssz, char **buf, size_t *bufsz)
{
PAGE *h;
pgno_t pg;
* RET_ERROR, RET_SUCCESS
*/
int
-__ovfl_put(t, dbt, pg)
- BTREE *t;
- const DBT *dbt;
- pgno_t *pg;
+__ovfl_put(BTREE *t, const DBT *dbt, pgno_t *pg)
{
PAGE *h, *last;
void *p;
* RET_ERROR, RET_SUCCESS
*/
int
-__ovfl_delete(t, p)
- BTREE *t;
- void *p;
+__ovfl_delete(BTREE *t, void *p)
{
PAGE *h;
pgno_t pg;
* RET_ERROR, RET_SUCCESS
*/
int
-__bt_free(t, h)
- BTREE *t;
- PAGE *h;
+__bt_free(BTREE *t, PAGE *h)
{
/* Insert the page at the start of the free list. */
h->prevpg = P_INVALID;
* Pointer to a page, NULL on error.
*/
PAGE *
-__bt_new(t, npg)
- BTREE *t;
- pgno_t *npg;
+__bt_new(BTREE *t, pgno_t *npg)
{
PAGE *h;
* tree and R_NOOVERWRITE specified.
*/
int
-__bt_put(dbp, key, data, flags)
- const DB *dbp;
- DBT *key;
- const DBT *data;
- u_int flags;
+__bt_put(const DB *dbp, DBT *key, const DBT *data, u_int flags)
{
BTREE *t;
DBT tkey, tdata;
* EPG for new record or NULL if not found.
*/
static EPG *
-bt_fast(t, key, data, exactp)
- BTREE *t;
- const DBT *key, *data;
- int *exactp;
+bt_fast(BTREE *t, const DBT *key, const DBT *data, int *exactp)
{
static EPG e;
PAGE *h;
* next search of any kind in any tree.
*/
EPG *
-__bt_search(t, key, exactp)
- BTREE *t;
- const DBT *key;
- int *exactp;
+__bt_search(BTREE *t, const DBT *key, int *exactp)
{
register indx_t index;
register int base, cmp, lim;
* RET_ERROR, RET_SUCCESS or RET_SPECIAL if there's no next key.
*/
int
-__bt_seq(dbp, key, data, flags)
- const DB *dbp;
- DBT *key, *data;
- u_int flags;
+__bt_seq(const DB *dbp, DBT *key, DBT *data, u_int flags)
{
BTREE *t;
EPG e;
* RET_ERROR, RET_SUCCESS or RET_SPECIAL if there's no next key.
*/
static int
-bt_seqset(t, ep, key, flags)
- BTREE *t;
- EPG *ep;
- DBT *key;
- int flags;
+bt_seqset(BTREE *t, EPG *ep, DBT *key, int flags)
{
EPG *e;
PAGE *h;
* RET_ERROR, RET_SUCCESS or RET_SPECIAL if there's no next key.
*/
static int
-bt_seqadv(t, e, flags)
- BTREE *t;
- EPG *e;
- int flags;
+bt_seqadv(BTREE *t, EPG *e, int flags)
{
EPGNO *c, delc;
PAGE *h;
* RET_ERROR, RET_SUCCESS
*/
int
-__bt_crsrdel(t, c)
- BTREE *t;
- EPGNO *c;
+__bt_crsrdel(BTREE *t, EPGNO *c)
{
PAGE *h;
int status;
* RET_ERROR, RET_SUCCESS
*/
int
-__bt_split(t, sp, key, data, flags, ilen, skip)
- BTREE *t;
- PAGE *sp;
- const DBT *key, *data;
- u_long flags;
- size_t ilen;
- u_int skip;
+__bt_split(BTREE *t, PAGE *sp, const DBT *key, const DBT *data, u_long flags, size_t ilen, u_int skip)
{
BINTERNAL *bi = NULL;
BLEAF *bl = NULL;
* Pointer to page in which to insert or NULL on error.
*/
static PAGE *
-bt_page(t, h, lp, rp, skip, ilen)
- BTREE *t;
- PAGE *h, **lp, **rp;
- u_int *skip;
- size_t ilen;
+bt_page(BTREE *t, PAGE *h, PAGE **lp, PAGE **rp, u_int *skip, size_t ilen)
{
PAGE *l, *r, *tp;
pgno_t npg;
* Pointer to page in which to insert or NULL on error.
*/
static PAGE *
-bt_root(t, h, lp, rp, skip, ilen)
- BTREE *t;
- PAGE *h, **lp, **rp;
- u_int *skip;
- size_t ilen;
+bt_root(BTREE *t, PAGE *h, PAGE **lp, PAGE **rp, u_int *skip, size_t ilen)
{
PAGE *l, *r, *tp;
pgno_t lnpg, rnpg;
* RET_ERROR, RET_SUCCESS
*/
static int
-bt_rroot(t, h, l, r)
- BTREE *t;
- PAGE *h, *l, *r;
+bt_rroot(BTREE *t, PAGE *h, PAGE *l, PAGE *r)
{
char *dest;
* RET_ERROR, RET_SUCCESS
*/
static int
-bt_broot(t, h, l, r)
- BTREE *t;
- PAGE *h, *l, *r;
+bt_broot(BTREE *t, PAGE *h, PAGE *l, PAGE *r)
{
BINTERNAL *bi;
BLEAF *bl;
* Pointer to page in which to insert.
*/
static PAGE *
-bt_psplit(t, h, l, r, pskip, ilen)
- BTREE *t;
- PAGE *h, *l, *r;
- u_int *pskip;
- size_t ilen;
+bt_psplit(BTREE *t, PAGE *h, PAGE *l, PAGE *r, u_int *pskip, size_t ilen)
{
BINTERNAL *bi;
BLEAF *bl;
* RET_SUCCESS, RET_ERROR.
*/
static int
-bt_preserve(t, pg)
- BTREE *t;
- pgno_t pg;
+bt_preserve(BTREE *t, pgno_t pg)
{
PAGE *h;
* all the way back to bt_split/bt_rroot and it's not very clean.
*/
static recno_t
-rec_total(h)
- PAGE *h;
+rec_total(PAGE *h)
{
recno_t recs;
indx_t nxt, top;
* RET_ERROR, RET_SUCCESS
*/
int
-__bt_push(t, pgno, index)
- BTREE *t;
- pgno_t pgno;
- int index;
+__bt_push(BTREE *t, pgno_t pgno, int index)
{
if (t->bt_sp == t->bt_maxstack) {
t->bt_maxstack += 50;
* RET_SUCCESS, RET_ERROR.
*/
int
-__bt_ret(t, e, key, data)
- BTREE *t;
- EPG *e;
- DBT *key, *data;
+__bt_ret(BTREE *t, EPG *e, DBT *key, DBT *data)
{
register BLEAF *bl;
register void *p;
* > 0 if k1 is > record
*/
int
-__bt_cmp(t, k1, e)
- BTREE *t;
- const DBT *k1;
- EPG *e;
+__bt_cmp(BTREE *t, const DBT *k1, EPG *e)
{
BINTERNAL *bi;
BLEAF *bl;
* > 0 if a is > b
*/
int
-__bt_defcmp(a, b)
- const DBT *a, *b;
+__bt_defcmp(const DBT *a, const DBT *b)
{
register u_char *p1, *p2;
register int diff, len;
* Number of bytes needed to distinguish b from a.
*/
int
-__bt_defpfx(a, b)
- const DBT *a, *b;
+__bt_defpfx(const DBT *a, const DBT *b)
{
register u_char *p1, *p2;
register int len;
#include <db.h>
DB *
-dbopen(fname, flags, mode, type, openinfo)
- const char *fname;
- int flags, mode;
- DBTYPE type;
- const void *openinfo;
+dbopen(const char *fname, int flags, int mode, DBTYPE type, const void *openinfo)
{
#define DB_FLAGS (DB_LOCK | DB_SHMEM | DB_TXN)
}
static int
-__dberr()
+__dberr(void)
{
return (RET_ERROR);
}
* dbp: pointer to the DB structure.
*/
void
-__dbpanic(dbp)
- DB *dbp;
+__dbpanic(DB *dbp)
{
/* The only thing that can succeed is a close. */
dbp->del = (int (*)())__dberr;
static int _gettemp(char*, int*);
-int mkstemp(path)
- char *path;
+int mkstemp(char *path)
{
int fd;
}
char *
-mktemp(path)
- char *path;
+mktemp(char *path)
{
return(_gettemp(path, (int *)NULL) ? path : (char *)NULL);
}
static int
-_gettemp(path, doopen)
- char *path;
- register int *doopen;
+_gettemp(char *path, register int *doopen)
{
register char *start, *trv;
struct stat sbuf;
* MPOOL pointer, NULL on error.
*/
MPOOL *
-mpool_open(key, fd, pagesize, maxcache)
- DBT *key;
- int fd;
- pgno_t pagesize, maxcache;
+mpool_open(DBT *key, int fd, pgno_t pagesize, pgno_t maxcache)
{
struct stat sb;
MPOOL *mp;
* pgcookie: Cookie for page in/out routines.
*/
void
-mpool_filter(mp, pgin, pgout, pgcookie)
- MPOOL *mp;
- void (*pgin) __P((void *, pgno_t, void *));
- void (*pgout) __P((void *, pgno_t, void *));
- void *pgcookie;
+mpool_filter(MPOOL *mp,
+ void (*pgin) __P((void *, pgno_t, void *)),
+ void (*pgout) __P((void *, pgno_t, void *)),
+ void *pgcookie)
{
mp->pgin = pgin;
mp->pgout = pgout;
* RET_ERROR, RET_SUCCESS
*/
void *
-mpool_new(mp, pgnoaddr)
- MPOOL *mp;
- pgno_t *pgnoaddr;
+mpool_new(MPOOL *mp, pgno_t *pgnoaddr)
{
BKT *b;
BKTHDR *hp;
* RET_ERROR, RET_SUCCESS
*/
void *
-mpool_get(mp, pgno, flags)
- MPOOL *mp;
- pgno_t pgno;
- u_int flags; /* XXX not used? */
+mpool_get(MPOOL *mp, pgno_t pgno, u_int flags /* XXX not used? */)
{
BKT *b;
BKTHDR *hp;
* RET_ERROR, RET_SUCCESS
*/
int
-mpool_put(mp, page, flags)
- MPOOL *mp;
- void *page;
- u_int flags;
+mpool_put(MPOOL *mp, void *page, u_int flags)
{
BKT *baddr;
#ifdef DEBUG
* RET_ERROR, RET_SUCCESS
*/
int
-mpool_close(mp)
- MPOOL *mp;
+mpool_close(MPOOL *mp)
{
BKT *b, *next;
* RET_ERROR, RET_SUCCESS
*/
int
-mpool_sync(mp)
- MPOOL *mp;
+mpool_sync(MPOOL *mp)
{
BKT *b;
* NULL on failure and a pointer to the BKT on success
*/
static BKT *
-mpool_bkt(mp)
- MPOOL *mp;
+mpool_bkt(MPOOL *mp)
{
BKT *b;
* RET_ERROR, RET_SUCCESS
*/
static int
-mpool_write(mp, b)
- MPOOL *mp;
- BKT *b;
+mpool_write(MPOOL *mp, BKT *b)
{
off_t off;
* NULL on failure and a pointer to the BKT on success
*/
static BKT *
-mpool_look(mp, pgno)
- MPOOL *mp;
- pgno_t pgno;
+mpool_look(MPOOL *mp, pgno_t pgno)
{
register BKT *b;
register BKTHDR *tb;
* mp: mpool cookie
*/
void
-mpool_stat(mp)
- MPOOL *mp;
+mpool_stat(MPOOL *mp)
{
BKT *b;
int cnt;
#include <stdlib.h>
void *
-__fix_realloc(p, n)
- void *p;
- size_t n;
+__fix_realloc(void *p, size_t n)
{
return (p == 0 ? malloc(n) : realloc(p, n));
}
* *
*****************************************************************************/
-static void reset_shadow_gc (pw) /* used when resources change */
- PannerWidget pw;
+static void reset_shadow_gc (PannerWidget pw) /* used when resources change */
{
XtGCMask valuemask = GCForeground;
XGCValues values;
pw->panner.shadow_gc = XtGetGC ((Widget) pw, valuemask, &values);
}
-static void reset_slider_gc (pw) /* used when resources change */
- PannerWidget pw;
+static void reset_slider_gc (PannerWidget pw) /* used when resources change */
{
XtGCMask valuemask = GCForeground;
XGCValues values;
pw->panner.slider_gc = XtGetGC ((Widget) pw, valuemask, &values);
}
-static void reset_xor_gc (pw) /* used when resources change */
- PannerWidget pw;
+static void reset_xor_gc (PannerWidget pw) /* used when resources change */
{
if (pw->panner.xor_gc) XtReleaseGC ((Widget) pw, pw->panner.xor_gc);
}
-static void check_knob (pw, knob)
- register PannerWidget pw;
- Boolean knob;
+static void check_knob (register PannerWidget pw, Boolean knob)
{
Position pad = pw->panner.internal_border * 2;
Position maxx = (((Position) pw->core.width) - pad -
}
-static void move_shadow (pw)
- register PannerWidget pw;
+static void move_shadow (register PannerWidget pw)
{
if (pw->panner.shadow_thickness > 0) {
int lw = pw->panner.shadow_thickness + pw->panner.line_width * 2;
pw->panner.shadow_valid = FALSE;
}
-static void scale_knob (pw, location, size) /* set knob size and/or loc */
- PannerWidget pw;
- Boolean location, size;
+static void scale_knob (PannerWidget pw, Boolean location, Boolean size) /* set knob size and/or loc */
{
if (location) {
pw->panner.knob_x = (Position) PANNER_HSCALE (pw, pw->panner.slider_x);
move_shadow (pw);
}
-static void rescale (pw)
- PannerWidget pw;
+static void rescale (PannerWidget pw)
{
int hpad = pw->panner.internal_border * 2;
int vpad = hpad;
}
-static void get_default_size (pw, wp, hp)
- PannerWidget pw;
- Dimension *wp, *hp;
+static void get_default_size (PannerWidget pw, Dimension *wp, Dimension *hp)
{
Dimension pad = pw->panner.internal_border * 2;
*wp = PANNER_DSCALE (pw, pw->panner.canvas_width) + pad;
*hp = PANNER_DSCALE (pw, pw->panner.canvas_height) + pad;
}
-static Boolean get_event_xy (pw, event, x, y)
- PannerWidget pw;
- XEvent *event;
- int *x, *y;
+static Boolean get_event_xy (PannerWidget pw, XEvent *event, int *x, int *y)
{
int pad = pw->panner.internal_border;
return FALSE;
}
-static int parse_page_string (s, pagesize, canvassize, relative)
- register char *s;
- int pagesize, canvassize;
- Boolean *relative;
+static int parse_page_string (register char *s, int pagesize, int canvassize, Boolean *relative)
{
char *cp;
double val = 1.0;
*****************************************************************************/
-static void Initialize (greq, gnew)
- Widget greq, gnew;
+static void Initialize (Widget greq, Widget gnew)
{
PannerWidget req = (PannerWidget) greq, new = (PannerWidget) gnew;
Dimension defwidth, defheight;
}
-static void Realize (gw, valuemaskp, attr)
- Widget gw;
- XtValueMask *valuemaskp;
- XSetWindowAttributes *attr;
+static void Realize (Widget gw, XtValueMask *valuemaskp, XSetWindowAttributes *attr)
{
PannerWidget pw = (PannerWidget) gw;
Pixmap pm = XtUnspecifiedPixmap;
}
-static void Destroy (gw)
- Widget gw;
+static void Destroy (Widget gw)
{
PannerWidget pw = (PannerWidget) gw;
XtReleaseGC (gw, pw->panner.xor_gc);
}
-static void Resize (gw)
- Widget gw;
+static void Resize (Widget gw)
{
rescale ((PannerWidget) gw);
}
/* ARGSUSED */
-static void Redisplay (gw, event, region)
- Widget gw;
- XEvent *event;
- Region region;
+static void Redisplay (Widget gw, XEvent *event, Region region)
{
PannerWidget pw = (PannerWidget) gw;
Display *dpy = XtDisplay(gw);
/* ARGSUSED */
-static Boolean SetValues (gcur, greq, gnew)
- Widget gcur, greq, gnew;
+static Boolean SetValues (Widget gcur, Widget greq, Widget gnew)
{
PannerWidget cur = (PannerWidget) gcur;
PannerWidget new = (PannerWidget) gnew;
return redisplay;
}
-static void SetValuesAlmost (gold, gnew, req, reply)
- Widget gold, gnew;
- XtWidgetGeometry *req, *reply;
+static void SetValuesAlmost (Widget gold, Widget gnew, XtWidgetGeometry *req, XtWidgetGeometry *reply)
{
if (reply->request_mode == 0) { /* got turned down, so cope */
Resize (gnew);
(gold, gnew, req, reply);
}
-static XtGeometryResult QueryGeometry (gw, intended, pref)
- Widget gw;
- XtWidgetGeometry *intended, *pref;
+static XtGeometryResult QueryGeometry (Widget gw, XtWidgetGeometry *intended, XtWidgetGeometry *pref)
{
PannerWidget pw = (PannerWidget) gw;
*****************************************************************************/
/* ARGSUSED */
-static void ActionStart (gw, event, params, num_params)
- Widget gw;
- XEvent *event;
- String *params; /* unused */
- Cardinal *num_params; /* unused */
+static void ActionStart (Widget gw, XEvent *event, String *params /* unused */, Cardinal *num_params /* unused */)
{
PannerWidget pw = (PannerWidget) gw;
int x, y;
}
/* ARGSUSED */
-static void ActionStop (gw, event, params, num_params)
- Widget gw;
- XEvent *event;
- String *params; /* unused */
- Cardinal *num_params; /* unused */
+static void ActionStop (Widget gw, XEvent *event, String *params /* unused */, Cardinal *num_params /* unused */)
{
PannerWidget pw = (PannerWidget) gw;
int x, y;
}
/* ARGSUSED */
-static void ActionAbort (gw, event, params, num_params)
- Widget gw;
- XEvent *event;
- String *params; /* unused */
- Cardinal *num_params; /* unused */
+static void ActionAbort (Widget gw, XEvent *event, String *params /* unused */, Cardinal *num_params /* unused */)
{
PannerWidget pw = (PannerWidget) gw;
/* ARGSUSED */
-static void ActionMove (gw, event, params, num_params)
- Widget gw;
- XEvent *event; /* must be a motion event */
- String *params; /* unused */
- Cardinal *num_params; /* unused */
+static void ActionMove (Widget gw, XEvent *event /* must be a motion event */, String *params /* unused */, Cardinal *num_params /* unused */)
{
PannerWidget pw = (PannerWidget) gw;
int x, y;
/* ARGSUSED */
-static void ActionPage (gw, event, params, num_params)
- Widget gw;
- XEvent *event; /* unused */
- String *params;
- Cardinal *num_params; /* unused */
+static void ActionPage (Widget gw, XEvent *event /* unused */, String *params, Cardinal *num_params /* unused */)
{
PannerWidget pw = (PannerWidget) gw;
Cardinal zero = 0;
/* ARGSUSED */
-static void ActionNotify (gw, event, params, num_params)
- Widget gw;
- XEvent *event; /* unused */
- String *params; /* unused */
- Cardinal *num_params; /* unused */
+static void ActionNotify (Widget gw, XEvent *event /* unused */, String *params /* unused */, Cardinal *num_params /* unused */)
{
PannerWidget pw = (PannerWidget) gw;
}
/* ARGSUSED */
-static void ActionSet (gw, event, params, num_params)
- Widget gw;
- XEvent *event; /* unused */
- String *params;
- Cardinal *num_params;
+static void ActionSet (Widget gw, XEvent *event /* unused */, String *params, Cardinal *num_params)
{
PannerWidget pw = (PannerWidget) gw;
Boolean rb;
WidgetClass pixmapWidgetClass = (WidgetClass)&pixmapClassRec;
static void
-Initialize(req, new, args, nargs )
-PixmapWidget req, new ;
-ArgList args ;
-Cardinal *nargs ;
+Initialize(PixmapWidget req, PixmapWidget new, ArgList args, Cardinal *nargs)
{
XtGCMask value_mask ;
XGCValues values ;
}
static void
-Resize(w)
-PixmapWidget w ;
+Resize(PixmapWidget w)
{
ON_DEBUG(fprintf(stderr, "PixmapWidget: RESIZE (%d, %d)\n",
w->core.width, w->core.height));
}
static void
-Destroy(w)
-PixmapWidget w;
+Destroy(PixmapWidget w)
{
if (w->pixmap.pixmap != 0)
{
}
static Boolean
-SetValues(current, request, new, args, num_args)
-PixmapWidget current, request, new ;
-ArgList args ;
-Cardinal *num_args ;
+SetValues(PixmapWidget current, PixmapWidget request, PixmapWidget new, ArgList args, Cardinal *num_args)
{
Window root ;
int x, y ;
static XtGeometryResult
-QueryGeometry(w, proposed, answer)
-PixmapWidget w ;
-XtWidgetGeometry *proposed, *answer;
+QueryGeometry(PixmapWidget w, XtWidgetGeometry *proposed, XtWidgetGeometry *answer)
{
ON_DEBUG(fprintf(stderr, "PixmapWidget:\tQueryGeometry()\n"));
#ifdef DEBUG
#endif
static void
-ReDisplay(w, event)
-PixmapWidget w ;
-XExposeEvent *event ;
+ReDisplay(PixmapWidget w, XExposeEvent *event)
{
ON_DEBUG(fprintf(stderr, "PixmapWidget: EXPOSE\n"));
* *
*****************************************************************************/
-static Widget find_child (pw)
- register PortholeWidget pw;
+static Widget find_child (register PortholeWidget pw)
{
register Widget *children;
register int i;
return (Widget) NULL;
}
-static void SendReport (pw, changed)
- PortholeWidget pw;
- unsigned int changed;
+static void SendReport (PortholeWidget pw, unsigned int changed)
{
Widget child = find_child (pw);
}
-static void layout_child (pw, child, geomp, xp, yp, widthp, heightp)
- PortholeWidget pw;
- Widget child;
- XtWidgetGeometry *geomp;
- Position *xp, *yp;
- Dimension *widthp, *heightp;
+static void layout_child (PortholeWidget pw, Widget child,
+ XtWidgetGeometry *geomp,
+ Position *xp, Position *yp,
+ Dimension *widthp, Dimension *heightp)
{
Position minx, miny;
*****************************************************************************/
-static void Realize (gw, valueMask, attributes)
- register Widget gw;
- Mask *valueMask;
- XSetWindowAttributes *attributes;
+static void Realize (register Widget gw, Mask *valueMask, XSetWindowAttributes *attributes)
{
attributes->bit_gravity = NorthWestGravity;
*valueMask |= CWBitGravity;
}
-static void Resize (gw)
- Widget gw;
+static void Resize (Widget gw)
{
PortholeWidget pw = (PortholeWidget) gw;
Widget child = find_child (pw);
}
-static XtGeometryResult QueryGeometry (gw, intended, preferred)
- Widget gw;
- XtWidgetGeometry *intended, *preferred;
+static XtGeometryResult QueryGeometry (Widget gw, XtWidgetGeometry *intended, XtWidgetGeometry *preferred)
{
register PortholeWidget pw = (PortholeWidget) gw;
Widget child = find_child (pw);
}
-static XtGeometryResult GeometryManager (w, req, reply)
- Widget w;
- XtWidgetGeometry *req, *reply;
+static XtGeometryResult GeometryManager (Widget w, XtWidgetGeometry *req, XtWidgetGeometry *reply)
{
PortholeWidget pw = (PortholeWidget) w->core.parent;
Widget child = find_child (pw);
}
-static void ChangeManaged (gw)
- Widget gw;
+static void ChangeManaged (Widget gw)
{
PortholeWidget pw = (PortholeWidget) gw;
Widget child = find_child (pw); /* ignore extra children */
#if XmVersion == 1002
static void
-ClassInitialize ()
+ClassInitialize (void)
{
/* set up base class extension quark */
portholeClassExtRec.record_type = XmQmotif;
WidgetClass simpleWidgetClass = (WidgetClass)&simpleClassRec;
-static void ClassInitialize()
+static void ClassInitialize(void)
{
static XtConvertArgRec convertArg[] = {
{XtWidgetBaseOffset, (XtPointer) XtOffsetOf(WidgetRec, core.screen),
XtCacheByDisplay, NULL);
}
-static void ClassPartInitialize(class)
- WidgetClass class;
+static void ClassPartInitialize(WidgetClass class)
{
register SimpleWidgetClass c = (SimpleWidgetClass)class;
register SimpleWidgetClass super = (SimpleWidgetClass)
c->simple_class.change_sensitive = super->simple_class.change_sensitive;
}
-static void Realize(w, valueMask, attributes)
- register Widget w;
- Mask *valueMask;
- XSetWindowAttributes *attributes;
+static void Realize(register Widget w, Mask *valueMask, XSetWindowAttributes *attributes)
{
Pixmap border_pixmap = 0;
*/
static void
-ConvertCursor(w)
-Widget w;
+ConvertCursor(Widget w)
{
SimpleWidget simple = (SimpleWidget) w;
XrmValue from, to;
/* ARGSUSED */
-static Boolean SetValues(current, request, new)
- Widget current, request, new;
+static Boolean SetValues(Widget current, Widget request, Widget new)
{
SimpleWidget s_old = (SimpleWidget) current;
SimpleWidget s_new = (SimpleWidget) new;
}
-static Boolean ChangeSensitive(w)
- register Widget w;
+static Boolean ChangeSensitive(register Widget w)
{
if (XtIsRealized(w)) {
if (XtIsSensitive(w))
* *
*****************************************************************************/
-static void initialize_dimensions (listp, sizep, n)
- Dimension **listp;
- int *sizep;
- int n;
+static void initialize_dimensions (Dimension **listp, int *sizep, int n)
{
register int i;
register Dimension *l;
return;
}
-static GC get_tree_gc (w)
- TreeWidget w;
+static GC get_tree_gc (TreeWidget w)
{
XtGCMask valuemask = GCBackground | GCForeground;
XGCValues values;
return XtGetGC ((Widget) w, valuemask, &values);
}
-static void insert_node (parent, node)
- Widget parent, node;
+static void insert_node (Widget parent, Widget node)
{
TreeConstraints pc;
TreeConstraints nc = TREE_CONSTRAINT(node);
pc->tree.n_children++;
}
-static void delete_node (parent, node)
- Widget parent, node;
+static void delete_node (Widget parent, Widget node)
{
TreeConstraints pc;
int pos, i;
pc->tree.children[pc->tree.n_children]=0;
}
-static void check_gravity (tw, grav)
- TreeWidget tw;
- XtGravity grav;
+static void check_gravity (TreeWidget tw, XtGravity grav)
{
switch (tw->tree.gravity) {
case WestGravity: case NorthGravity: case EastGravity: case SouthGravity:
* *
*****************************************************************************/
-static void ClassInitialize ()
+static void ClassInitialize (void)
{
XawInitializeWidgetSet();
XtAddConverter (XtRString, XtRGravity, XmuCvtStringToGravity,
}
-static void Initialize (grequest, gnew)
- Widget grequest, gnew;
+static void Initialize (Widget grequest, Widget gnew)
{
TreeWidget request = (TreeWidget) grequest, new = (TreeWidget) gnew;
Arg args[2];
/* ARGSUSED */
-static void ConstraintInitialize (request, new)
- Widget request, new;
+static void ConstraintInitialize (Widget request, Widget new)
{
TreeConstraints tc = TREE_CONSTRAINT(new);
TreeWidget tw = (TreeWidget) new->core.parent;
/* ARGSUSED */
-static Boolean SetValues (gcurrent, grequest, gnew)
- Widget gcurrent, grequest, gnew;
+static Boolean SetValues (Widget gcurrent, Widget grequest, Widget gnew)
{
TreeWidget current = (TreeWidget) gcurrent, new = (TreeWidget) gnew;
Boolean redraw = FALSE;
/* ARGSUSED */
-static Boolean ConstraintSetValues (current, request, new, args, num_args)
- Widget current, request, new;
- ArgList args;
- Cardinal *num_args;
+static Boolean ConstraintSetValues (Widget current, Widget request, Widget new, ArgList args, Cardinal *num_args)
{
TreeConstraints newc = TREE_CONSTRAINT(new);
TreeConstraints curc = TREE_CONSTRAINT(current);
}
-static void ConstraintDestroy (w)
- Widget w;
+static void ConstraintDestroy (Widget w)
{
TreeConstraints tc = TREE_CONSTRAINT(w);
TreeWidget tw = (TreeWidget) XtParent(w);
}
/* ARGSUSED */
-static XtGeometryResult GeometryManager (w, request, reply)
- Widget w;
- XtWidgetGeometry *request;
- XtWidgetGeometry *reply;
+static XtGeometryResult GeometryManager (Widget w, XtWidgetGeometry *request, XtWidgetGeometry *reply)
{
TreeWidget tw = (TreeWidget) w->core.parent;
return (XtGeometryYes);
}
-static void ChangeManaged (gw)
- Widget gw;
+static void ChangeManaged (Widget gw)
{
layout_tree ((TreeWidget) gw, FALSE);
}
-static void Destroy (gw)
- Widget gw;
+static void Destroy (Widget gw)
{
TreeWidget w = (TreeWidget) gw;
/* ARGSUSED */
-static void Redisplay (tw, event, region)
- TreeWidget tw;
- XEvent *event;
- Region region;
+static void Redisplay (TreeWidget tw, XEvent *event, Region region)
{
/*
* If the Tree widget is visible, visit each managed child.
}
}
-static XtGeometryResult QueryGeometry (w, intended, preferred)
- Widget w;
- XtWidgetGeometry *intended, *preferred;
+static XtGeometryResult QueryGeometry (Widget w, XtWidgetGeometry *intended, XtWidgetGeometry *preferred)
{
register TreeWidget tw = (TreeWidget) w;
* *
*****************************************************************************/
-static void compute_bounding_box_subtree (tree, w, depth)
- TreeWidget tree;
- Widget w;
- int depth;
+static void compute_bounding_box_subtree (TreeWidget tree, Widget w, int depth)
{
TreeConstraints tc = TREE_CONSTRAINT(w); /* info attached to all kids */
register int i;
}
-static void set_positions (tw, w, level)
- TreeWidget tw;
- Widget w;
- int level;
+static void set_positions (TreeWidget tw, Widget w, int level)
{
int i;
}
-static void arrange_subtree (tree, w, depth, x, y)
- TreeWidget tree;
- Widget w;
- int depth;
- Position x, y;
+static void arrange_subtree (TreeWidget tree, Widget w, int depth, Position x, Position y)
{
TreeConstraints tc = TREE_CONSTRAINT(w); /* info attached to all kids */
TreeConstraints firstcc, lastcc;
}
}
-static void set_tree_size (tw, insetvalues, width, height)
- TreeWidget tw;
- Boolean insetvalues;
- Dimension width, height;
+static void set_tree_size (TreeWidget tw, Boolean insetvalues, Dimension width, Dimension height)
{
if (insetvalues) {
tw->core.width = width;
}
/* now the integers */
/* unsigned CGM integer at arbitrary legal precision */
-static unsigned int b_guint(in_ptr, bits_p)
- unsigned char **in_ptr; /* pointer to the input data pointer */
- int bits_p; /* no. of bits precision */
+/* in_ptr, pointer to the input data pointer */
+/* bits_p, no. of bits precision */
+static unsigned int b_guint(unsigned char **in_ptr, int bits_p)
{
int i;
unsigned int val;
return(val);
}
/* signed CGM integer at arbitrary legal precision */
-static int b_gsint(in_ptr, bits_p)
- unsigned char **in_ptr; /* pointer to the input data pointer */
- int bits_p; /* no. of bits precision */
+/* in_ptr, pointer to the input data pointer */
+/* bits_p, no. of bits precision */
+static int b_gsint(unsigned char **in_ptr, int bits_p)
{
int i, val;
/* have to worry about sign extension, may not have signed char */
}
/* now the reals */
/* the fixed point real */
-static double b_fixed(dat_ptr, prec)
- unsigned char **dat_ptr;
- rp_type *prec;
+static double b_fixed(unsigned char **dat_ptr, rp_type *prec)
{
double ret;
/* do it in two parts; the big (first) part and fractional (second) part */
return(ret);
}
/* the IEEE floating point */
-static double b_ieee(dat_ptr, prec)
- unsigned char **dat_ptr;
- rp_type *prec;
+static double b_ieee(unsigned char **dat_ptr, rp_type *prec)
{
#define TABLESIZE 128
static double shift_table[TABLESIZE];
#undef TABLESIZE
}
/* the general real */
-static double b_real(dat_ptr, rprec)
- unsigned char **dat_ptr;
- rp_type *rprec;
+static double b_real(unsigned char **dat_ptr, rp_type *rprec)
{
if (rprec->fixed == 0) { /* floating point */
return(b_ieee(dat_ptr, rprec));
}
/* Metafile Descriptors */
/* Metafile Version */
-static int mfversion(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int mfversion(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
/* nothing for now */
return 1;
}
/* Metafile Descriptor */
-static int mfdescrip(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int mfdescrip(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
/* nothing for now */
return 1;
}
/* VDC type */
-static int vdctype(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int vdctype(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
/* 0=>integer, 1=>real */
return 1;
}
/* Integer Precision */
-static int intprec(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int intprec(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
cgm_s->intprec = b_gsint(&dat_ptr, cgm_s->intprec);
return 1;
}
/* Real Precision */
-static int realprec(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int realprec(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
cgm_s->realprec.fixed = b_gsint(&dat_ptr, cgm_s->intprec);
cgm_s->realprec.exp = b_gsint(&dat_ptr, cgm_s->intprec);
return 1;
}
/* Index Precision */
-static int indexprec(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int indexprec(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
cgm_s->indexprec = b_gsint(&dat_ptr, cgm_s->intprec);
return 1;
}
/* Colour Precision */
-static int colprec(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int colprec(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
cgm_s->colprec = b_gsint(&dat_ptr, cgm_s->intprec);
return 1;
}
/* Colour Index Precision */
-static int cindprec(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int cindprec(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
cgm_s->cindprec = b_gsint(&dat_ptr, cgm_s->intprec);
return 1;
}
/* Maximum Colour Index */
-static int maxcind(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int maxcind(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
cgm_s->maxcind = b_guint(&dat_ptr, cgm_s->cindprec);
return 1;
}
/* Colour Value Extent */
-static int cvextent(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int cvextent(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
int i;
for (i=0; i<6; ++i)
return 1;
}
/* Metafile Element List */
-static int mfellist(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int mfellist(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
int i;
cgm_s->mfellist_s = b_gsint(&dat_ptr, cgm_s->intprec);
return 1;
}
/* Metafile Defaults Replacement, a complex element */
-static int mfdefrep(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int mfdefrep(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
struct cmd_info_s new_cmd; /* for the new commands */
int i, new_len, b_to_move, data_left;
return 1;
}
/* Font List, store the data, but ignored for now */
-static int fontlist(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int fontlist(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
int i;
unsigned char *my_ptr = NULL;
return 1;
}
/* Character Set List, stored but ignored */
-static int charlist(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int charlist(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
int i;
unsigned char *my_ptr = NULL;
return 1;
}
/* Character Announcer */
-static int charannounce(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int charannounce(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
cgm_s->charannounce = b_gsint(&dat_ptr, 16);
return 1;
}
/* Picture Descriptors */
/* Scaling Mode */
-static int scalmode(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int scalmode(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
cgm_s->scalmode = b_gsint(&dat_ptr, 16);
return 1;
}
/* Colour Selection Mode */
-static int colselmode(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int colselmode(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
cgm_s->colselmode = b_gsint(&dat_ptr, 16);
return 1;
}
/* Line Width Specification Mode */
-static int lwidspecmode(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int lwidspecmode(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
cgm_s->lwidspecmode = b_gsint(&dat_ptr, 16);
return 1;
}
/* Marker Size Specification Mode */
-static int marksizspecmode(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int marksizspecmode(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
cgm_s->marksizspecmode = b_gsint(&dat_ptr, 16);
return 1;
}
/* Edge Width Specification Mode */
-static int edwidspecmode(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int edwidspecmode(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
cgm_s->edwidspecmode = b_gsint(&dat_ptr, 16);
return 1;
}
/* VDC Extent */
-static int vdcextent(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int vdcextent(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
int i;
return 1;
}
/* Background Colour */
-static int backcolr(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int backcolr(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
int i;
for (i=0; i<3; ++i)
}
/* Control Elements */
/* VDC Integer Precision */
-static int vdcintprec(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int vdcintprec(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
cgm_s->vdcintprec = b_gsint(&dat_ptr, cgm_s->intprec);
return 1;
}
/* VDC Real Precision */
-static int vdcrprec(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int vdcrprec(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
cgm_s->vdcrprec.fixed = b_gsint(&dat_ptr, cgm_s->intprec);
cgm_s->vdcrprec.exp = b_gsint(&dat_ptr, cgm_s->intprec);
return 1;
}
/* Auxiliary Colour */
-static int auxcolr(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int auxcolr(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
int i;
switch(cgm_s->colselmode) {
return 1;
}
/* Transparency */
-static int transp(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int transp(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
cgm_s->transp = b_gsint(&dat_ptr, 16);
return 1;
return noSegments;
}
/* Polyline */
-static int polyline(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int polyline(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
int noPts;
XPoint *myPtr = NULL;
return(1);
}
/* Disjoint Polyline, on/off segments */
-static int dispoly(dat_ptr, cmd_ptr, cgm_s)
-unsigned char *dat_ptr;
-struct cmd_info_s *cmd_ptr;
-cgm_s_type *cgm_s;
+static int dispoly(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
int noSegments;
XSegment *myPtr = NULL;
return(1);
}
/* Polymarker */
-static int polymarker(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int polymarker(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
int noPts, i, x, y, size, asize;
/* figure out the number of points */
textX = textY = textW = textH = 0;
}
/* Regular Text */
-static int text(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int text(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
int final_flag;
partialText *newPtr, *myPtr;
return 1;
}
/* Restricted Text */
-static int restext(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int restext(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
int final_flag;
partialText *newPtr, *myPtr;
return 1;
}
/* Appended Text */
-static int apptext(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int apptext(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
partialText *newPtr, *myPtr;
if (!textPtr) return 0; /* can't append if there's nothing started ! */
return 1;
}
/* Polygon */
-static int polygon(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int polygon(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
int noPts;
XPoint *myPtr = NULL;
return 1;
}
/* Polyset */
-static int polyset(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int polyset(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
int i, noPts, *vPtr, lastFill;
XPoint *myPtr;
return retPtr;
}
/* actually get the cellarray command */
-static int cellarray(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int cellarray(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
int i, x[3], y[3], nx, ny, local_prec, rep_mode, xSize, ySize;
int Qx, Qy, Rx, Ry, det, xMin, xMax, yMin, yMax, newX, newY, ix, iy,
return 1;
}
/* Rectangle */
-static int rectangle(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int rectangle(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
int i, xPts[2], yPts[2], x, y, old_style;
unsigned int w, h;
return 1;
}
/* Circle */
-static int circle(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int circle(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
int x, y, r;
/* get the center position and radius */
return r;
}
/* Circular Arc, set by 3 points */
-static int circ3(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int circ3(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
int xc, yc, r, i;
double theta0, dtheta;
return 1;
}
/* Circular Arc, set by 3 points, close */
-static int circ3close(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int circ3close(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
int xc, yc, r, i, close_type, x0, y0, x2, y2;
float det1, x[3], y[3]; /* use floats since we must manipulate them */
return dtheta;
}
/* Circular Arc, set by center */
-static int circcentre(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int circcentre(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
int i, xc, yc, r;
double theta0, dtheta;
return 1;
}
/* Circular Arc, set by center, close */
-static int circcclose(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int circcclose(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
int i, xc, yc, r, close_type, x0, y0, x1, y1;
double theta0, dtheta;
return nSteps;
}
/* Ellipse */
-static int ellipse(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int ellipse(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
int xc, yc, cdx0, cdy0, cdx1, cdy1, noPts, i;
XPoint *myPtr = NULL;
return 1;
}
/* Elliptical arc */
-static int elarc(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int elarc(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
int xc, yc, cdx0, cdy0, cdx1, cdy1, i, noPts;
float dxy[4];
return 1;
}
/* Elliptical arc, close */
-static int elarcclose(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int elarcclose(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
int xc, yc, cdx0, cdy0, cdx1, cdy1, i, close_type, noPts;
float dxy[4];
return 1;
}
/* Line Type */
-static int ltype(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int ltype(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
/* get the line type */
cgm_s->ltype = b_gsint(&dat_ptr, cgm_s->indexprec);
return setLineType(cgm_s->ltype, lineGC);
}
/* Line Width */
-static int lwidth(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int lwidth(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
switch (cgm_s->lwidspecmode) {
case ABSOLUTE:
return 1;
}
/* Line Colour */
-static int lcolr(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int lcolr(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
int i;
return 1;
}
/* Marker Type */
-static int mtype(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int mtype(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
/* get the line type */
cgm_s->mtype = b_gsint(&dat_ptr, cgm_s->indexprec);
return 1;
}
/* Marker Size */
-static int msize(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int msize(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
switch (cgm_s->marksizspecmode) {
case ABSOLUTE:
return 1;
}
/* Marker Colour */
-static int mcolr(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int mcolr(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
int i;
/* may be in direct colour mode or indexed colour mode */
return 1;
}
/* Character Set Index */
-static int csetindex(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int csetindex(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
cgm_s->csetindex = b_gsint(&dat_ptr, cgm_s->indexprec);
return 1;
}
/* Alternate Character Set Index */
-static int altcsetindex(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int altcsetindex(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
cgm_s->altcsetindex = b_gsint(&dat_ptr, cgm_s->indexprec);
return 1;
}
/* Interior Style */
-static int intstyle(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int intstyle(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
cgm_s->intstyle = b_gsint(&dat_ptr, 16);
switch (cgm_s->intstyle) {
return 1;
}
/* Fill Colour */
-static int fillcolr(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int fillcolr(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
int i;
return 1;
}
/* Hatch Index */
-static int hatchindex(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int hatchindex(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
cgm_s->hatchindex = b_gsint(&dat_ptr, cgm_s->indexprec);
return 1;
}
/* Pattern Index */
-static int patindex(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int patindex(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
cgm_s->patindex = b_gsint(&dat_ptr, cgm_s->indexprec);
return 1;
}
/* Edge Type */
-static int etype(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int etype(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
cgm_s->etype = b_gsint(&dat_ptr, cgm_s->indexprec);
return setLineType(cgm_s->etype, edgeGC);
}
/* Edge Width */
-static int ewidth(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int ewidth(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
switch (cgm_s->edwidspecmode) {
case ABSOLUTE:
return 1;
}
/* Edge Colour */
-static int ecolr(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int ecolr(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
int i;
return 1;
}
/* Edge Visibility */
-static int evis(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int evis(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
cgm_s->evis = b_gsint(&dat_ptr, 16);
if (cgm_s->evis) { /* visible edge */
return 1;
}
/* Colour Table */
-static int coltab(dat_ptr, cmd_ptr, cgm_s)
- unsigned char *dat_ptr;
- struct cmd_info_s *cmd_ptr;
- cgm_s_type *cgm_s;
+static int coltab(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
{
int i, j, first_index, no_entries, iColrs[3];
#include <stdio.h>
#include <stdlib.h>
-int main(argc, argv)
-int argc ;
-char **argv;
+int main(int argc, char **argv)
{
/* first parameter d or h */
/* second parameter is library name, other params are classnames */
#include <stdio.h>
#include <stdlib.h>
-int main(argc, argv)
-int argc ;
-char **argv ;
+int main(int argc, char **argv)
{
FILE *f ;
int i;