1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

dtinfo: Change to ANSI function definitions

This commit is contained in:
Peter Howkins 2018-06-28 04:15:16 +01:00
parent e239c31702
commit 4cf746f177
25 changed files with 203 additions and 660 deletions

View file

@ -84,8 +84,7 @@ static int bt_meta __P((BTREE *));
* RET_ERROR, RET_SUCCESS
*/
int
__bt_close(dbp)
DB *dbp;
__bt_close(DB *dbp)
{
BTREE *t;
int fd;
@ -134,9 +133,7 @@ __bt_close(dbp)
* 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;
@ -208,8 +205,7 @@ ecrsr: if (ISSET(t, B_DELCRSR)) {
* RET_ERROR, RET_SUCCESS
*/
static int
bt_meta(t)
BTREE *t;
bt_meta(BTREE *t)
{
BTMETA m;
void *p;

View file

@ -81,10 +81,7 @@ static void mswap __P((PAGE *));
* 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;
@ -149,10 +146,7 @@ __bt_pgin(t, pg, pp)
}
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;
@ -223,8 +217,7 @@ __bt_pgout(t, pg, pp)
* p: page to convert
*/
static void
mswap(pg)
PAGE *pg;
mswap(PAGE *pg)
{
char *p;

View file

@ -84,10 +84,7 @@ static int bt_bdelete __P((BTREE *, const DBT *));
* 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;
@ -141,9 +138,7 @@ einval: errno = EINVAL;
* 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;
@ -299,10 +294,7 @@ done2: mpool_put(t->bt_mp, h, dirty1);
* 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;

View file

@ -83,11 +83,7 @@ static char sccsid[] = "@(#)bt_get.c 8.2 (Berkeley) 9/7/93";
* 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;
@ -153,10 +149,7 @@ __bt_get(dbp, key, data, flags)
* 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;

View file

@ -106,10 +106,7 @@ static int tmp __P((void));
*
*/
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;
@ -373,8 +370,7 @@ err: if (t) {
* RET_ERROR, RET_SUCCESS
*/
static int
nroot(t)
BTREE *t;
nroot(BTREE *t)
{
PAGE *meta, *root;
pgno_t npg;
@ -406,7 +402,7 @@ nroot(t)
}
static int
tmp()
tmp(void)
{
sigset_t set, oset;
int fd;
@ -426,7 +422,7 @@ tmp()
}
static int
byteorder()
byteorder(void)
{
u_long x; /* XXX: 32-bit assumption. */
u_char *p;
@ -444,8 +440,7 @@ byteorder()
}
int
__bt_fd(dbp)
const DB *dbp;
__bt_fd(const DB *dbp)
{
BTREE *t;

View file

@ -100,12 +100,7 @@ static char sccsid[] = "@(#)bt_overflow.c 8.1 (Berkeley) 6/4/93";
* 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;
@ -157,10 +152,7 @@ __ovfl_get(t, p, ssz, buf, bufsz)
* 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;
@ -210,9 +202,7 @@ __ovfl_put(t, dbt, pg)
* RET_ERROR, RET_SUCCESS
*/
int
__ovfl_delete(t, p)
BTREE *t;
void *p;
__ovfl_delete(BTREE *t, void *p)
{
PAGE *h;
pgno_t pg;

View file

@ -77,9 +77,7 @@ static char sccsid[] = "@(#)bt_page.c 8.1 (Berkeley) 6/4/93";
* 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;
@ -101,9 +99,7 @@ __bt_free(t, h)
* 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;

View file

@ -87,11 +87,7 @@ static EPG *bt_fast __P((BTREE *, const DBT *, const DBT *, int *));
* 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;
@ -285,10 +281,7 @@ u_long bt_cache_hit, bt_cache_miss;
* 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;

View file

@ -85,10 +85,7 @@ static char sccsid[] = "@(#)bt_search.c 8.1 (Berkeley) 6/4/93";
* 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;

View file

@ -100,10 +100,7 @@ static int bt_seqset __P((BTREE *, EPG *, DBT *, int));
* 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;
@ -176,11 +173,7 @@ __bt_seq(dbp, key, data, flags)
* 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;
@ -306,10 +299,7 @@ bt_seqset(t, ep, key, flags)
* 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;
@ -387,9 +377,7 @@ bt_seqadv(t, e, flags)
* RET_ERROR, RET_SUCCESS
*/
int
__bt_crsrdel(t, c)
BTREE *t;
EPGNO *c;
__bt_crsrdel(BTREE *t, EPGNO *c)
{
PAGE *h;
int status;

View file

@ -103,13 +103,7 @@ u_long bt_rootsplit, bt_split, bt_sortsplit, bt_pfxsaved;
* 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;
@ -365,11 +359,7 @@ err2: mpool_put(t->bt_mp, l, 0);
* 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;
@ -467,11 +457,7 @@ bt_page(t, h, lp, rp, skip, ilen)
* 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;
@ -514,9 +500,7 @@ bt_root(t, h, lp, rp, skip, ilen)
* 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;
@ -554,9 +538,7 @@ bt_rroot(t, h, l, r)
* 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;
@ -631,11 +613,7 @@ bt_broot(t, h, l, r)
* 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;
@ -811,9 +789,7 @@ bt_psplit(t, h, l, r, pskip, ilen)
* RET_SUCCESS, RET_ERROR.
*/
static int
bt_preserve(t, pg)
BTREE *t;
pgno_t pg;
bt_preserve(BTREE *t, pgno_t pg)
{
PAGE *h;
@ -839,8 +815,7 @@ bt_preserve(t, pg)
* 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;

View file

@ -94,10 +94,7 @@ static char sccsid[] = "@(#)bt_stack.c 8.1 (Berkeley) 6/4/93";
* 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;

View file

@ -83,10 +83,7 @@ static char sccsid[] = "@(#)bt_utils.c 8.2 (Berkeley) 9/7/93";
* 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;
@ -158,10 +155,7 @@ __bt_ret(t, e, key, data)
* > 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;
@ -221,8 +215,7 @@ __bt_cmp(t, k1, e)
* > 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;
@ -245,8 +238,7 @@ __bt_defcmp(a, b)
* 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;

View file

@ -69,11 +69,7 @@ static char sccsid[] = "@(#)db.c 8.2 (Berkeley) 9/7/93";
#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)
@ -102,7 +98,7 @@ dbopen(fname, flags, mode, type, openinfo)
}
static int
__dberr()
__dberr(void)
{
return (RET_ERROR);
}
@ -114,8 +110,7 @@ __dberr()
* 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;

View file

@ -73,8 +73,7 @@ extern int errno;
static int _gettemp(char*, int*);
int mkstemp(path)
char *path;
int mkstemp(char *path)
{
int fd;
@ -82,16 +81,13 @@ int mkstemp(path)
}
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;

View file

@ -91,10 +91,7 @@ static void __mpoolerr __P((const char *fmt, ...));
* 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;
@ -145,11 +142,10 @@ mpool_open(key, fd, pagesize, maxcache)
* 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;
@ -166,9 +162,7 @@ mpool_filter(mp, pgin, pgout, pgcookie)
* 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;
@ -201,10 +195,7 @@ mpool_new(mp, pgnoaddr)
* 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;
@ -277,10 +268,7 @@ mpool_get(mp, pgno, flags)
* 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
@ -316,8 +304,7 @@ mpool_put(mp, page, flags)
* RET_ERROR, RET_SUCCESS
*/
int
mpool_close(mp)
MPOOL *mp;
mpool_close(MPOOL *mp)
{
BKT *b, *next;
@ -340,8 +327,7 @@ mpool_close(mp)
* RET_ERROR, RET_SUCCESS
*/
int
mpool_sync(mp)
MPOOL *mp;
mpool_sync(MPOOL *mp)
{
BKT *b;
@ -361,8 +347,7 @@ mpool_sync(mp)
* NULL on failure and a pointer to the BKT on success
*/
static BKT *
mpool_bkt(mp)
MPOOL *mp;
mpool_bkt(MPOOL *mp)
{
BKT *b;
@ -424,9 +409,7 @@ new: if ((b = malloc(sizeof(BKT) + mp->pagesize)) == NULL)
* RET_ERROR, RET_SUCCESS
*/
static int
mpool_write(mp, b)
MPOOL *mp;
BKT *b;
mpool_write(MPOOL *mp, BKT *b)
{
off_t off;
@ -456,9 +439,7 @@ mpool_write(mp, b)
* 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;
@ -489,8 +470,7 @@ mpool_look(mp, pgno)
* mp: mpool cookie
*/
void
mpool_stat(mp)
MPOOL *mp;
mpool_stat(MPOOL *mp)
{
BKT *b;
int cnt;

View file

@ -26,9 +26,7 @@
#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));
}

View file

@ -228,8 +228,7 @@ WidgetClass pannerWidgetClass = (WidgetClass) &pannerClassRec;
* *
*****************************************************************************/
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;
@ -270,8 +269,7 @@ static void reset_shadow_gc (pw) /* used when resources change */
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;
@ -283,8 +281,7 @@ static void reset_slider_gc (pw) /* used when resources change */
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);
@ -308,9 +305,7 @@ static void reset_xor_gc (pw) /* used when resources change */
}
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 -
@ -340,8 +335,7 @@ static void check_knob (pw, knob)
}
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;
@ -366,9 +360,7 @@ static void move_shadow (pw)
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);
@ -393,8 +385,7 @@ static void scale_knob (pw, location, size) /* set knob size and/or loc */
move_shadow (pw);
}
static void rescale (pw)
PannerWidget pw;
static void rescale (PannerWidget pw)
{
int hpad = pw->panner.internal_border * 2;
int vpad = hpad;
@ -415,19 +406,14 @@ static void rescale (pw)
}
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;
@ -459,10 +445,7 @@ static Boolean get_event_xy (pw, event, x, y)
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;
@ -540,8 +523,7 @@ static int parse_page_string (s, pagesize, canvassize, relative)
*****************************************************************************/
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;
@ -579,10 +561,7 @@ static void Initialize (greq, gnew)
}
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;
@ -605,8 +584,7 @@ static void Realize (gw, valuemaskp, attr)
}
static void Destroy (gw)
Widget gw;
static void Destroy (Widget gw)
{
PannerWidget pw = (PannerWidget) gw;
@ -615,18 +593,14 @@ static void Destroy (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);
@ -710,8 +684,7 @@ static void Redisplay (gw, event, region)
/* 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;
@ -787,9 +760,7 @@ static Boolean SetValues (gcur, greq, 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);
@ -798,9 +769,7 @@ static void SetValuesAlmost (gold, gnew, req, reply)
(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;
@ -826,11 +795,7 @@ static XtGeometryResult QueryGeometry (gw, intended, pref)
*****************************************************************************/
/* 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;
@ -851,11 +816,7 @@ static void ActionStart (gw, event, params, num_params)
}
/* 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;
@ -870,11 +831,7 @@ static void ActionStop (gw, event, params, num_params)
}
/* 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;
@ -892,11 +849,7 @@ static void ActionAbort (gw, event, params, num_params)
/* 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;
@ -922,11 +875,7 @@ static void ActionMove (gw, event, params, num_params)
/* 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;
@ -965,11 +914,7 @@ static void ActionPage (gw, event, params, num_params)
/* 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;
@ -1016,11 +961,7 @@ static void ActionNotify (gw, event, params, num_params)
}
/* 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;

View file

@ -98,10 +98,7 @@ PixmapClassRec pixmapClassRec = {
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 ;
@ -136,16 +133,14 @@ Cardinal *nargs ;
}
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)
{
@ -154,10 +149,7 @@ PixmapWidget w;
}
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 ;
@ -191,9 +183,7 @@ Cardinal *num_args ;
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
@ -218,9 +208,7 @@ XtWidgetGeometry *proposed, *answer;
#endif
static void
ReDisplay(w, event)
PixmapWidget w ;
XExposeEvent *event ;
ReDisplay(PixmapWidget w, XExposeEvent *event)
{
ON_DEBUG(fprintf(stderr, "PixmapWidget: EXPOSE\n"));

View file

@ -166,8 +166,7 @@ WidgetClass portholeWidgetClass = (WidgetClass) &portholeClassRec;
* *
*****************************************************************************/
static Widget find_child (pw)
register PortholeWidget pw;
static Widget find_child (register PortholeWidget pw)
{
register Widget *children;
register int i;
@ -184,9 +183,7 @@ static Widget find_child (pw)
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);
@ -206,12 +203,10 @@ static void SendReport (pw, changed)
}
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;
@ -256,10 +251,7 @@ static void layout_child (pw, child, geomp, xp, yp, widthp, heightp)
*****************************************************************************/
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;
@ -271,8 +263,7 @@ static void Realize (gw, valueMask, attributes)
}
static void Resize (gw)
Widget gw;
static void Resize (Widget gw)
{
PortholeWidget pw = (PortholeWidget) gw;
Widget child = find_child (pw);
@ -293,9 +284,7 @@ static void Resize (gw)
}
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);
@ -321,9 +310,7 @@ static XtGeometryResult QueryGeometry (gw, intended, preferred)
}
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);
@ -385,8 +372,7 @@ static XtGeometryResult GeometryManager (w, req, reply)
}
static void ChangeManaged (gw)
Widget gw;
static void ChangeManaged (Widget gw)
{
PortholeWidget pw = (PortholeWidget) gw;
Widget child = find_child (pw); /* ignore extra children */
@ -420,7 +406,7 @@ static void ChangeManaged (gw)
#if XmVersion == 1002
static void
ClassInitialize ()
ClassInitialize (void)
{
/* set up base class extension quark */
portholeClassExtRec.record_type = XmQmotif;

View file

@ -139,7 +139,7 @@ SimpleClassRec simpleClassRec = {
WidgetClass simpleWidgetClass = (WidgetClass)&simpleClassRec;
static void ClassInitialize()
static void ClassInitialize(void)
{
static XtConvertArgRec convertArg[] = {
{XtWidgetBaseOffset, (XtPointer) XtOffsetOf(WidgetRec, core.screen),
@ -157,8 +157,7 @@ static void ClassInitialize()
XtCacheByDisplay, NULL);
}
static void ClassPartInitialize(class)
WidgetClass class;
static void ClassPartInitialize(WidgetClass class)
{
register SimpleWidgetClass c = (SimpleWidgetClass)class;
register SimpleWidgetClass super = (SimpleWidgetClass)
@ -178,10 +177,7 @@ static void ClassPartInitialize(class)
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;
@ -221,8 +217,7 @@ static void Realize(w, valueMask, attributes)
*/
static void
ConvertCursor(w)
Widget w;
ConvertCursor(Widget w)
{
SimpleWidget simple = (SimpleWidget) w;
XrmValue from, to;
@ -251,8 +246,7 @@ Widget w;
/* 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;
@ -284,8 +278,7 @@ static Boolean SetValues(current, request, new)
}
static Boolean ChangeSensitive(w)
register Widget w;
static Boolean ChangeSensitive(register Widget w)
{
if (XtIsRealized(w)) {
if (XtIsSensitive(w))

View file

@ -210,10 +210,7 @@ WidgetClass treeWidgetClass = (WidgetClass) &treeClassRec;
* *
*****************************************************************************/
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;
@ -237,8 +234,7 @@ static void initialize_dimensions (listp, sizep, n)
return;
}
static GC get_tree_gc (w)
TreeWidget w;
static GC get_tree_gc (TreeWidget w)
{
XtGCMask valuemask = GCBackground | GCForeground;
XGCValues values;
@ -253,8 +249,7 @@ static GC get_tree_gc (w)
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);
@ -287,8 +282,7 @@ static void insert_node (parent, 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;
@ -323,9 +317,7 @@ static void delete_node (parent, node)
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:
@ -343,7 +335,7 @@ static void check_gravity (tw, grav)
* *
*****************************************************************************/
static void ClassInitialize ()
static void ClassInitialize (void)
{
XawInitializeWidgetSet();
XtAddConverter (XtRString, XtRGravity, XmuCvtStringToGravity,
@ -351,8 +343,7 @@ static void ClassInitialize ()
}
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];
@ -406,8 +397,7 @@ static void Initialize (grequest, gnew)
/* 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;
@ -436,8 +426,7 @@ static void ConstraintInitialize (request, new)
/* 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;
@ -482,10 +471,7 @@ static Boolean SetValues (gcurrent, grequest, gnew)
/* 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);
@ -513,8 +499,7 @@ static Boolean ConstraintSetValues (current, request, new, args, num_args)
}
static void ConstraintDestroy (w)
Widget w;
static void ConstraintDestroy (Widget w)
{
TreeConstraints tc = TREE_CONSTRAINT(w);
TreeWidget tw = (TreeWidget) XtParent(w);
@ -540,10 +525,7 @@ static void ConstraintDestroy (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;
@ -570,15 +552,13 @@ static XtGeometryResult GeometryManager (w, request, reply)
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;
@ -588,10 +568,7 @@ static void Destroy (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.
@ -683,9 +660,7 @@ static void Redisplay (tw, event, region)
}
}
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;
@ -717,10 +692,7 @@ static XtGeometryResult QueryGeometry (w, intended, preferred)
* *
*****************************************************************************/
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;
@ -790,10 +762,7 @@ static void compute_bounding_box_subtree (tree, w, depth)
}
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;
@ -831,11 +800,7 @@ static void set_positions (tw, w, level)
}
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;
@ -938,10 +903,7 @@ static void arrange_subtree (tree, w, depth, x, y)
}
}
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;

View file

@ -103,9 +103,9 @@ static int b_str(unsigned char **in_ptr, char **out_ptr)
}
/* 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;
@ -117,9 +117,9 @@ static unsigned int b_guint(in_ptr, bits_p)
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 */
@ -132,9 +132,7 @@ static int b_gsint(in_ptr, bits_p)
}
/* 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 */
@ -145,9 +143,7 @@ static double b_fixed(dat_ptr, prec)
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];
@ -227,9 +223,7 @@ static double b_ieee(dat_ptr, prec)
#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));
@ -566,28 +560,19 @@ static int epic(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr,
}
/* 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 */
@ -596,19 +581,13 @@ static int vdctype(dat_ptr, cmd_ptr, cgm_s)
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);
@ -617,46 +596,31 @@ static int realprec(dat_ptr, cmd_ptr, cgm_s)
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)
@ -671,10 +635,7 @@ static int cvextent(dat_ptr, cmd_ptr, cgm_s)
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);
@ -688,10 +649,7 @@ static int mfellist(dat_ptr, cmd_ptr, cgm_s)
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;
@ -761,10 +719,7 @@ static int mfdefrep(dat_ptr, cmd_ptr, cgm_s)
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;
@ -783,10 +738,7 @@ static int fontlist(dat_ptr, cmd_ptr, cgm_s)
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;
@ -808,20 +760,14 @@ static int charlist(dat_ptr, cmd_ptr, cgm_s)
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);
@ -831,47 +777,32 @@ static int scalmode(dat_ptr, cmd_ptr, cgm_s)
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;
@ -886,10 +817,7 @@ static int vdcextent(dat_ptr, cmd_ptr, cgm_s)
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)
@ -899,19 +827,13 @@ static int backcolr(dat_ptr, cmd_ptr, cgm_s)
}
/* 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);
@ -920,10 +842,7 @@ static int vdcrprec(dat_ptr, cmd_ptr, cgm_s)
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) {
@ -936,10 +855,7 @@ static int auxcolr(dat_ptr, cmd_ptr, cgm_s)
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;
@ -1061,10 +977,7 @@ unsigned int getXSegments(unsigned char *dat_ptr,
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;
@ -1074,10 +987,7 @@ static int polyline(dat_ptr, cmd_ptr, cgm_s)
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;
@ -1089,10 +999,7 @@ cgm_s_type *cgm_s;
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 */
@ -1158,10 +1065,7 @@ void doText(cgm_s_type *cgm_s)
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;
@ -1198,10 +1102,7 @@ static int text(dat_ptr, cmd_ptr, cgm_s)
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;
@ -1238,10 +1139,7 @@ static int restext(dat_ptr, cmd_ptr, cgm_s)
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 ! */
@ -1267,10 +1165,7 @@ static int apptext(dat_ptr, cmd_ptr, cgm_s)
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;
@ -1288,10 +1183,7 @@ static int polygon(dat_ptr, cmd_ptr, cgm_s)
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;
@ -1491,10 +1383,7 @@ static Pixel *getPixels(unsigned char *dat_ptr, cgm_s_type *cgm_s,
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,
@ -1575,10 +1464,7 @@ static int cellarray(dat_ptr, cmd_ptr, cgm_s)
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;
@ -1622,10 +1508,7 @@ static int rectangle(dat_ptr, cmd_ptr, cgm_s)
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 */
@ -1705,10 +1588,7 @@ static int getArc(float inX[3], float inY[3], int *outXC, int *outYC,
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;
@ -1738,10 +1618,7 @@ static int circ3(dat_ptr, cmd_ptr, cgm_s)
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 */
@ -1806,10 +1683,7 @@ static double getAngles(int xc, int yc, float dxy[4], double *outTheta0)
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;
@ -1834,10 +1708,7 @@ static int circcentre(dat_ptr, cmd_ptr, cgm_s)
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;
@ -1994,10 +1865,7 @@ static int getEllipseXPoints(int x1, int y1, int x2, int y2,
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;
@ -2032,10 +1900,7 @@ static int ellipse(dat_ptr, cmd_ptr, cgm_s)
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];
@ -2068,10 +1933,7 @@ static int elarc(dat_ptr, cmd_ptr, cgm_s)
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];
@ -2153,20 +2015,14 @@ static int setLineType(int inType, GC inGC)
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:
@ -2188,10 +2044,7 @@ static int lwidth(dat_ptr, cmd_ptr, cgm_s)
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;
@ -2209,10 +2062,7 @@ static int lcolr(dat_ptr, cmd_ptr, cgm_s)
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);
@ -2220,10 +2070,7 @@ static int mtype(dat_ptr, cmd_ptr, cgm_s)
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:
@ -2241,10 +2088,7 @@ static int msize(dat_ptr, cmd_ptr, cgm_s)
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 */
@ -2365,30 +2209,21 @@ static int talign(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr,
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) {
@ -2409,10 +2244,7 @@ static int intstyle(dat_ptr, cmd_ptr, cgm_s)
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;
@ -2430,39 +2262,27 @@ static int fillcolr(dat_ptr, cmd_ptr, cgm_s)
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:
@ -2484,10 +2304,7 @@ static int ewidth(dat_ptr, cmd_ptr, cgm_s)
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;
@ -2505,10 +2322,7 @@ static int ecolr(dat_ptr, cmd_ptr, cgm_s)
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 */
@ -2519,10 +2333,7 @@ static int evis(dat_ptr, cmd_ptr, cgm_s)
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];

View file

@ -24,9 +24,7 @@
#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 */

View file

@ -24,9 +24,7 @@
#include <stdio.h>
#include <stdlib.h>
int main(argc, argv)
int argc ;
char **argv ;
int main(int argc, char **argv)
{
FILE *f ;
int i;