Commit d1244c80 authored by John Ellson's avatar John Ellson

convert 'unsigned long' to 'uint64_t' for Windows portability

parent 5f026ed1
......@@ -59,6 +59,7 @@ extern "C" {
#endif
#endif
#include <inttypes.h>
#include <math.h>
#include <stdio.h>
#include <setjmp.h>
......
......@@ -791,18 +791,18 @@ found:
return new;
}
Gwidget_t *findwidget (unsigned long w, int type) {
Gwidget_t *findwidget (uint64_t w, int type) {
int wi;
if (type == G_WTYPESIZE) {
for (wi = 0; wi < Gwidgetn; wi++)
if (Gwidgets[wi].inuse && (unsigned long) Gwidgets[wi].w == w)
if (Gwidgets[wi].inuse && (uint64_t) Gwidgets[wi].w == w)
return &Gwidgets[wi];
} else {
for (wi = 0; wi < Gwidgetn; wi++)
if (
Gwidgets[wi].inuse && Gwidgets[wi].type == type &&
(unsigned long) Gwidgets[wi].w == w
(uint64_t) Gwidgets[wi].w == w
)
return &Gwidgets[wi];
}
......
......@@ -177,7 +177,7 @@ typedef struct Gwattr_t {
Grect_t r;
Gcolor_t c;
void *func;
unsigned long u;
uint64_t u;
} u;
} Gwattr_t;
typedef struct Gwlist_t {
......@@ -429,7 +429,7 @@ typedef struct Gwidget_t {
Gtw_t *t;
Gvw_t *v;
} u;
unsigned long udata;
uint64_t udata;
} Gwidget_t;
#define WIDGETINCR 20
#define WIDGETSIZE sizeof (Gwidget_t)
......@@ -523,7 +523,7 @@ int Gawgetmode (Gwidget_t *);
void Gawdefcoordscb (int, Gawdata_t *);
Gwidget_t *newwidget (int);
Gwidget_t *findwidget (unsigned long, int);
Gwidget_t *findwidget (uint64_t, int);
Gbitmap_t *newbitmap (void);
void Gerr (char *, int, int, ...);
......
......@@ -1581,7 +1581,7 @@ static void rectinsert (int ni, Tobj ko, Grect_t r) {
gfxrect_t **rp;
gfxrect_t *crp;
rp = &gfxnodes[ni].rect[(unsigned long) ko % LISTSIZE];
rp = &gfxnodes[ni].rect[(uint64_t) ko % LISTSIZE];
for (crp = *rp; crp; crp = crp->next)
if (crp->ko == ko) {
crp->r.o.x = min (r.o.x, r.c.x);
......@@ -1606,7 +1606,7 @@ static void rectmerge (int ni, Tobj ko, Grect_t r) {
gfxrect_t **rp;
gfxrect_t *crp;
rp = &gfxnodes[ni].rect[(unsigned long) ko % LISTSIZE];
rp = &gfxnodes[ni].rect[(uint64_t) ko % LISTSIZE];
for (crp = *rp; crp; crp = crp->next)
if (crp->ko == ko) {
crp->r.o.x = min (crp->r.o.x, min (r.o.x, r.c.x));
......@@ -1648,7 +1648,7 @@ static void rectdelete (int ni, Tobj ko) {
gfxrect_t **rp;
gfxrect_t *crp, *prp;
rp = &gfxnodes[ni].rect[(unsigned long) ko % LISTSIZE];
rp = &gfxnodes[ni].rect[(uint64_t) ko % LISTSIZE];
for (crp = *rp, prp = NULL; crp; prp = crp, crp = crp->next)
if (crp->ko == ko) {
if (crp == *rp)
......@@ -1683,7 +1683,7 @@ static void menuinsert (int ni, Tobj ko, long time, int mi) {
gfxmenu_t **mp;
gfxmenu_t *cmp;
mp = &gfxnodes[ni].menu[(unsigned long) ko % LISTSIZE];
mp = &gfxnodes[ni].menu[(uint64_t) ko % LISTSIZE];
for (cmp = *mp; cmp; cmp = cmp->next)
if (cmp->ko == ko) {
cmp->time = time, cmp->mi = mi;
......@@ -1703,7 +1703,7 @@ static int menufind (int ni, Tobj ko, long time) {
gfxmenu_t **mp;
gfxmenu_t *cmp;
mp = &gfxnodes[ni].menu[(unsigned long) ko % LISTSIZE];
mp = &gfxnodes[ni].menu[(uint64_t) ko % LISTSIZE];
for (cmp = *mp; cmp; cmp = cmp->next)
if (cmp->ko == ko && cmp->time == time)
return cmp->mi;
......
......@@ -32,9 +32,9 @@ Tobj Ttrue, Tfalse;
T_ISSTRING (ko) && strcmp (((Tstring_t *) (ko))->s, (sk)) == 0 \
)
#define GETIKINDEX(tp, ik) (unsigned long) ik % tp->ln
#define GETRKINDEX(tp, rk) (unsigned long) rk % tp->ln
#define GETSKINDEX(tp, sk) (unsigned long) *sk % tp->ln
#define GETIKINDEX(tp, ik) (uint64_t) ik % tp->ln
#define GETRKINDEX(tp, rk) (uint64_t) rk % tp->ln
#define GETSKINDEX(tp, sk) (uint64_t) *sk % tp->ln
typedef struct mapentry_t {
struct mapentry_t *next;
......@@ -655,7 +655,7 @@ static void mapinsert (Tobj fmo, Tobj too) {
mapentry_t **lp;
mapentry_t *cep;
lp = &map.list[(unsigned long) fmo % MAPLISTN];
lp = &map.list[(uint64_t) fmo % MAPLISTN];
if (!(cep = Mallocate (MAPENTRYSIZE)))
panic1 (POS, "mapinsert", "cannot allocate mapentry");
cep->fmo = fmo, cep->too = too;
......@@ -666,7 +666,7 @@ static Tobj mapfind (Tobj fmo) {
mapentry_t **lp;
mapentry_t *cep;
lp = &map.list[(unsigned long) fmo % MAPLISTN];
lp = &map.list[(uint64_t) fmo % MAPLISTN];
for (cep = *lp; cep; cep = cep->next)
if (cep->fmo == fmo)
return cep->too;
......
......@@ -486,7 +486,7 @@ static void fillnode (txtnode_t *pnode, txtnode_t *cnode) {
case TXT_SEEN:
cnode->u.s.text = Sseen (cnode->ko, cnode->u.s.txtnode->path);
buttondata[3].u.t = cnode->u.s.text;
buttondata[4].u.u = (unsigned long) cnode->vo;
buttondata[4].u.u = (uint64_t) cnode->vo;
cnode->u.s.wi = Gcreatewidget (
pnode->u.f.t.mwi, G_BUTTONWIDGET, 5, &buttondata[0]
);
......@@ -494,7 +494,7 @@ static void fillnode (txtnode_t *pnode, txtnode_t *cnode) {
case TXT_ABSTRACT:
cnode->u.a.text = Sabstract (cnode->ko, cnode->vo);
buttondata[3].u.t = cnode->u.a.text;
buttondata[4].u.u = (unsigned long) cnode->vo;
buttondata[4].u.u = (uint64_t) cnode->vo;
cnode->u.a.wi = Gcreatewidget (
pnode->u.f.t.mwi, G_BUTTONWIDGET, 5, &buttondata[0]
);
......@@ -504,7 +504,7 @@ static void fillnode (txtnode_t *pnode, txtnode_t *cnode) {
cnode->u.f.t.ftext = Stfull (cnode->ko);
cnode->u.f.t.ltext = "];";
buttondata[3].u.t = cnode->u.f.t.ftext;
buttondata[4].u.u = (unsigned long) cnode->vo;
buttondata[4].u.u = (uint64_t) cnode->vo;
cnode->u.f.t.fwi = Gcreatewidget (
pnode->u.f.t.mwi, G_BUTTONWIDGET, 5, &buttondata[0]
);
......@@ -512,14 +512,14 @@ static void fillnode (txtnode_t *pnode, txtnode_t *cnode) {
pnode->u.f.t.mwi, G_ARRAYWIDGET, 2, &arraydata[0]
);
buttondata[3].u.t = cnode->u.f.t.ltext;
buttondata[4].u.u = (unsigned long) cnode->vo;
buttondata[4].u.u = (uint64_t) cnode->vo;
cnode->u.f.t.lwi = Gcreatewidget (
pnode->u.f.t.mwi, G_BUTTONWIDGET, 5, &buttondata[0]
);
} else {
cnode->u.f.s.text = Ssfull (cnode->ko, cnode->vo);
buttondata[3].u.t = cnode->u.f.s.text;
buttondata[4].u.u = (unsigned long) cnode->vo;
buttondata[4].u.u = (uint64_t) cnode->vo;
cnode->u.f.s.wi = Gcreatewidget (
pnode->u.f.t.mwi, G_BUTTONWIDGET, 5, &buttondata[0]
);
......
......@@ -191,10 +191,14 @@ gv2gml_LDADD = \
gml2gv_SOURCES = gml2gv.c gmlparse.y gmlscan.l
gmlparse.c: y.tab.c
@SED@ "s/yy/gml/g" < y.tab.c > gmlparse.c
@SED@ "s/yy/gml/g" < y.tab.c | \
@SED@ "s/unsigned long int/uint64_t/g" | \
@SED@ "s/unsigned long/uint64_t/g" > gmlparse.c
gmlparse.h: y.tab.h
@SED@ "s/yy/gml/g" < y.tab.h > gmlparse.h
@SED@ "s/yy/gml/g" < y.tab.h | \
@SED@ "s/unsigned long int/uint64_t/g" | \
@SED@ "s/unsigned long/uint64_t/g" > gmlparse.h
y.tab.c y.tab.h : y.output
......
......@@ -27,6 +27,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
......@@ -44,7 +45,7 @@
static FILE *outFile;
static char *CmdName;
static char **Files;
static unsigned long id;
static uint64_t id;
#define streq(s,t) (!strcmp(s,t))
......@@ -94,7 +95,7 @@ typedef struct {
typedef struct Agnodeinfo_t {
Agrec_t h;
unsigned long id;
uint64_t id;
} Agnodeinfo_t;
#define ID(n) (((Agnodeinfo_t*)(n->base.data))->id)
......@@ -615,7 +616,7 @@ emitEdgeAttrs (Agraph_t* G, Agedge_t* ep, FILE* outFile, int ix)
static void
emitEdge (Agraph_t* G, Agedge_t* e, FILE* outFile)
{
fprintf (outFile, " edge [\n id %lu\n", (unsigned long)AGSEQ(e));
fprintf (outFile, " edge [\n id %lu\n", (uint64_t)AGSEQ(e));
fprintf (outFile, " source %lu\n", ID(agtail(e)));
fprintf (outFile, " target %lu\n", ID(aghead(e)));
emitEdgeAttrs (G, e, outFile, 2);
......
......@@ -14,13 +14,14 @@
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include <errno.h>
#include <generic_list.h>
#define DFLT_SIZE 100
generic_list_t *new_generic_list(unsigned long size)
generic_list_t *new_generic_list(uint64_t size)
{
generic_list_t *list;
......@@ -52,7 +53,7 @@ void free_generic_list(generic_list_t * list)
generic_list_t *add_to_generic_list(generic_list_t * list, gl_data element)
{
unsigned long new_size;
uint64_t new_size;
gl_data *new_data;
if (list->size == list->used) {
......
......@@ -22,12 +22,12 @@ extern "C" {
typedef void *gl_data;
typedef struct generic_list_s {
unsigned long used; /* number of elements in the list */
unsigned long size; /* number of elements that the list can hold */
uint64_t used; /* number of elements in the list */
uint64_t size; /* number of elements that the list can hold */
gl_data *data; /* pointer to first element */
} generic_list_t;
extern generic_list_t *new_generic_list(unsigned long size);
extern generic_list_t *new_generic_list(uint64_t size);
extern generic_list_t *add_to_generic_list(generic_list_t * list,
gl_data element);
extern void free_generic_list(generic_list_t * list);
......
......@@ -34,10 +34,14 @@ scan.c: $(top_srcdir)/lib/cgraph/scan.l
rm @LEX_OUTPUT_ROOT@.c
grammar.c: y.tab.c
@SED@ "s/yy/aag/g" < y.tab.c > grammar.c
@SED@ "s/yy/aag/g" < y.tab.c | \
@SED@ "s/unsigned long int/uint64_t/g" | \
@SED@ "s/unsigned long/uint64_t/g" > grammar.c
grammar.h: y.tab.h
@SED@ "s/yy/aag/g" < y.tab.h > grammar.h
@SED@ "s/yy/aag/g" < y.tab.h | \
@SED@ "s/unsigned long int/uint64_t/g" | \
@SED@ "s/unsigned long/uint64_t/g" > grammar.h
y.tab.c y.tab.h: y.output
......
......@@ -115,7 +115,7 @@ Dtcompar_f agdictorder(Agraph_t *, Dict_t *, Dtcompar_f);
int agedgecmpf(Dict_t * d, void *arg_e0, void *arg_e1, Dtdisc_t * disc);
int agnamecmpf(Dict_t * d, void *, void *, Dtdisc_t * disc);
void agset_node_disc(Agraph_t * g, Dtdisc_t * disc);
unsigned long agnextseq(Agraph_t * g, int objtype);
uint64_t agnextseq(Agraph_t * g, int objtype);
/* dict helper functions */
Dict_t *agdtopen(Agraph_t * g, Dtdisc_t * disc, Dtmethod_t * method);
......
......@@ -14,7 +14,8 @@
#ifndef ATT_GRAPH_H
#define ATT_GRAPH_H
#include "cdt.h"
#include <inttypes.h>
#include "cdt.h"
#ifdef __cplusplus
extern "C" {
......@@ -37,17 +38,7 @@ extern "C" {
#define NILedge NIL(Agedge_t*)
#define NILsym NIL(Agsym_t*)
#if 0
// FIXME - I didn't understand this comment about Win64.
// - What is that loss?
// - Do we ever cast a pointer to an IDTYPE in graphviz?
// - Is uintptr_t is available on all architectures/compilers?
/* avoid loss when casting pointer to unsigned long on Win64 */
typedef uintptr_t IDTYPE;
#else
typedef unsigned long IDTYPE;
#endif
typedef uint64_t IDTYPE;
/* forward struct type declarations */
typedef struct Agtag_s Agtag_t;
......@@ -235,7 +226,7 @@ struct Agclos_s {
Agdisc_t disc; /* resource discipline functions */
Agdstate_t state; /* resource closures */
Dict_t *strdict; /* shared string dict */
unsigned long seq[3]; /* local object sequence number counter */
uint64_t seq[3]; /* local object sequence number counter */
Agcbstack_t *cb; /* user and system callback function stacks */
unsigned char callbacks_enabled; /* issue user callbacks or hold them? */
Dict_t *lookup_by_name[3];
......
......@@ -523,7 +523,7 @@ Agedge_t *agopp(Agedge_t * e)
static Agedge_t *agfindedge_by_name(Agraph_t * g, Agnode_t * t,
Agnode_t * h, char *name)
{
unsigned long id;
uint64_t id;
if (agmapnametoid(agraphof(t), AGEDGE, name, &id, FALSE))
return agfindedge_by_id(g, t, h, id);
......
......@@ -154,7 +154,7 @@ int agclose(Agraph_t * g)
return SUCCESS;
}
unsigned long agnextseq(Agraph_t * g, int objtype)
uint64_t agnextseq(Agraph_t * g, int objtype)
{
return ++(g->clos->seq[objtype]);
}
......
......@@ -67,7 +67,7 @@ Agnode_t *agprvnode(Agraph_t * g, Agnode_t * n)
/* internal node constructor */
static Agnode_t *newnode(Agraph_t * g, IDTYPE id, unsigned long seq)
static Agnode_t *newnode(Agraph_t * g, IDTYPE id, uint64_t seq)
{
Agnode_t *n;
......@@ -217,10 +217,10 @@ int agdelnode(Agraph_t * g, Agnode_t * n)
static void dict_relabel(Agnode_t * n, void *arg)
{
Agraph_t *g;
unsigned long new_id;
uint64_t new_id;
g = agraphof(n);
new_id = *(unsigned long *) arg;
new_id = *(uint64_t *) arg;
dtdelete(g->n_id, n); /* wrong, should be subrep */
AGID(n) = new_id;
dtinsert(g->n_id, n); /* also wrong */
......
......@@ -59,7 +59,7 @@ static void freef(Dict_t * dict, void *ptr, Dtdisc_t * disc)
static Dtdisc_t Disc = {
offsetof(pending_cb_t, key), /* sort by 'key' */
sizeof(unsigned long),
sizeof(uint64_t),
0, /* link offset */
NIL(Dtmake_f),
freef,
......
......@@ -21,12 +21,12 @@
* reference counted strings.
*/
static unsigned long HTML_BIT; /* msbit of unsigned long */
static unsigned long CNT_BITS; /* complement of HTML_BIT */
static uint64_t HTML_BIT; /* msbit of uint64_t */
static uint64_t CNT_BITS; /* complement of HTML_BIT */
typedef struct refstr_t {
Dtlink_t link;
unsigned long refcnt;
uint64_t refcnt;
char *s;
char store[1]; /* this is actually a dynamic array */
} refstr_t;
......
......@@ -397,7 +397,7 @@ static int has_no_edges(Agraph_t * g, Agnode_t * n)
}
static int has_no_predecessor_below(Agraph_t * g, Agnode_t * n,
unsigned long val)
uint64_t val)
{
Agedge_t *e;
......@@ -547,7 +547,7 @@ static int write_node(Agnode_t * n, iochan_t * ofile, Dict_t * d)
* or has non-default attributes.
*/
static int write_node_test(Agraph_t * g, Agnode_t * n,
unsigned long pred_id)
uint64_t pred_id)
{
if (NOT(node_in_subg(g, n)) && has_no_predecessor_below(g, n, pred_id)) {
if (has_no_edges(g, n) || not_default_attrs(g, n))
......
......@@ -59,10 +59,14 @@ htmllex.o htmllex.lo: htmllex.c htmllex.h htmlparse.h
htmlparse.o htmlparse.lo: htmlparse.c htmlparse.h
htmlparse.c: y.tab.c
@SED@ "s/yy/html/g" < y.tab.c > htmlparse.c
@SED@ "s/yy/html/g" < y.tab.c | \
@SED@ "s/unsigned long int/uint64_t/g" | \
@SED@ "s/unsigned long/uint64_t/g" > htmlparse.c
htmlparse.h: y.tab.h
@SED@ "s/yy/html/g" < y.tab.h > htmlparse.h
@SED@ "s/yy/html/g" < y.tab.h | \
@SED@ "s/unsigned long int/uint64_t/g" | \
@SED@ "s/unsigned long/uint64_t/g"> htmlparse.h
y.tab.c y.tab.h: y.output
......
......@@ -917,9 +917,9 @@ static node_t *checkdfs(graph_t* g, node_t * n)
if (ND_onstack(w)) {
dump_graph (g);
fprintf(stderr, "cycle: last edge %lx %s(%lx) %s(%lx)\n",
(unsigned long int)e,
agnameof(n), (unsigned long int)n,
agnameof(w), (unsigned long int)w);
(uint64_t)e,
agnameof(n), (uint64_t)n,
agnameof(w), (uint64_t)w);
return w;
}
else {
......@@ -927,8 +927,8 @@ static node_t *checkdfs(graph_t* g, node_t * n)
x = checkdfs(g, w);
if (x) {
fprintf(stderr,"unwind %lx %s(%lx)\n",
(unsigned long int)e,
agnameof(n), (unsigned long int)n);
(uint64_t)e,
agnameof(n), (uint64_t)n);
if (x != n) return x;
fprintf(stderr,"unwound to root\n");
fflush(stderr);
......
......@@ -43,6 +43,8 @@ extern "C" {
#include <string.h>
#endif
#include <inttypes.h>
#include "types.h"
#include "macros.h"
#include "const.h"
......
......@@ -1325,7 +1325,7 @@ static void cluster_ranksetup(Agraph_t *ug)
static int printfn(Dict_t *dict, void *arg, void *data)
{
repkey_t *rk = arg;
printf("%lx=>%d,%lx\n",(long unsigned int)(rk->key),rk->val.type,(long unsigned int)(rk->val.p));
printf("%lx=>%d,%lx\n",(uint64_t)(rk->key),rk->val.type,(uint64_t)(rk->val.p));
return 0;
}
static void dumpdict(Agraph_t *model)
......
......@@ -53,6 +53,8 @@ exop.h: exparse.h
exparse.c: y.tab.c
@SED@ "s/yy/ex/g" <y.tab.c | \
@SED@ "s/YY/EX/g" | \
@SED@ "s/unsigned long int/uint64_t/g" | \
@SED@ "s/unsigned long/uint64_t/g" | \
@SED@ "s/fprintf/sfprintf/g" | \
@SED@ "s/FILE/Sfio_t/g" | \
@SED@ "s/stderr/sfstderr/g" > exparse.c
......@@ -60,7 +62,10 @@ exparse.c: y.tab.c
exparse.h: y.tab.h
echo "#ifndef _EXPARSE_H" > exparse.h
echo "#define _EXPARSE_H" >> exparse.h
@SED@ "s/yy/ex/g" < y.tab.h | @SED@ "s/YY/EX/g" >> exparse.h
@SED@ "s/yy/ex/g" < y.tab.h | \
@SED@ "s/unsigned long int/uint64_t/g" | \
@SED@ "s/unsigned long/uint64_t/g" | \
@SED@ "s/YY/EX/g" >> exparse.h
echo "#endif /* _EXPARSE_H */" >> exparse.h
y.tab.c y.tab.h: y.output
......
......@@ -26,6 +26,7 @@ extern "C" {
#define _EXPR_H
#include <ast.h>
#include <inttypes.h>
#undef RS /* hp.pa <signal.h> grabs this!! */
......@@ -159,7 +160,7 @@ struct Exref_s /* . reference list */
typedef struct Exbuf_s /* sized buffer */
{
unsigned long size; /* buffer size */
uint64_t size; /* buffer size */
char* data; /* buffer data */
} Exbuf_t;
......@@ -223,8 +224,8 @@ struct Exnode_s /* expression tree node */
struct Exdisc_s /* discipline */
{
unsigned long version; /* EX_VERSION */
unsigned long flags; /* EX_* flags */
uint64_t version; /* EX_VERSION */
uint64_t flags; /* EX_* flags */
Exid_t* symbols; /* static symbols */
char** data; /* compiled function arg data */
char* lib; /* pathfind() lib */
......@@ -276,7 +277,7 @@ struct Exccdisc_s /* excc() discipline */
{
Sfio_t* text; /* text output stream */
char* id; /* symbol prefix */
unsigned long flags; /* EXCC_* flags */
uint64_t flags; /* EXCC_* flags */
int (*ccf)(Excc_t*, Exnode_t*, Exid_t*, Exref_t*, Exnode_t*, Exccdisc_t*);
/* program generator function */
};
......
......@@ -41,6 +41,7 @@
#include <values.h>
#endif
#endif
#include <inttypes.h>
#include <assert.h>
#include "tlayout.h"
#include "neatoprocs.h"
......@@ -334,10 +335,10 @@ static char *portName(graph_t * g, bport_t * p)
len += strlen(agnameof(g)) + strlen(agnameof(h)) + strlen(agnameof(t));
if (len >= BSZ)
sprintf(buf, "_port_%s_%s_%s_%ld", agnameof(g), agnameof(t), agnameof(h),
(unsigned long)AGSEQ(e));
(uint64_t)AGSEQ(e));
else
sprintf(buf, "_port_%s_(%d)_(%d)_%ld",agnameof(g), ND_id(t), ND_id(h),
(unsigned long)AGSEQ(e));
(uint64_t)AGSEQ(e));
return buf;
}
......
......@@ -22,6 +22,7 @@
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#ifdef HAVE_ERRNO_H
#include <errno.h>
......@@ -48,7 +49,7 @@ static char z_file_header[] =
static z_stream z_strm;
static unsigned char *df;
static unsigned int dfallocated;
static unsigned long int crc;
static uint64_t crc;
#endif /* HAVE_LIBZ */
#include "const.h"
......
......@@ -30,9 +30,9 @@ typedef enum {
typedef struct inkpot_values_s {
#if 0
/* FIXME - not sure about all this ... */
unsigned long * named[SZT_VTYPE];
unsigned long * unnamed[SZT_VTYPE];
unsigned long * palette[SZT_VTYPE];
uint64_t * named[SZT_VTYPE];
uint64_t * unnamed[SZT_VTYPE];
uint64_t * palette[SZT_VTYPE];
size_t named_64_size[SZT_VTYPE];
size_t named_48_size[SZT_VTYPE];
size_t named_32_size[SZT_VTYPE];
......
......@@ -21,6 +21,8 @@ extern "C" {
#define _BLD_sfio 1
#endif
#include <inttypes.h>
/* Internal definitions for sfio.
** Written by Kiem-Phong Vo
*/
......@@ -375,7 +377,7 @@ extern "C" {
#define uchar unsigned char
#endif
#ifndef ulong
#define ulong unsigned long
#define ulong uint64_t
#endif
#ifndef uint
#define uint unsigned int
......
......@@ -354,7 +354,7 @@ int digitsQ(char *s){
int validQ_int_string(char *to_convert, int *v){
/* check to see if this is a string is integer */
char *p = to_convert;
unsigned long val;
uint64_t val;
errno = 0;
val = strtoul(to_convert, &p, 10);
if (errno != 0 ||// conversion failed (EINVAL, ERANGE)
......
......@@ -21,10 +21,10 @@ extern "C" {
#endif
typedef struct {
unsigned long nStepsToLeaf;
unsigned long subtreeSize;
unsigned long nChildren;
unsigned long nStepsToCenter;
uint64_t nStepsToLeaf;
uint64_t subtreeSize;
uint64_t nChildren;
uint64_t nStepsToCenter;
node_t *parent;
double span;
double theta;
......
......@@ -24,6 +24,8 @@ extern "C" {
#include <io.h>
#endif
#include <inttypes.h>
/* Common types, and macros for vmalloc functions.
**
** Written by Kiem-Phong Vo, kpv@research.att.com, 01/16/94.
......@@ -59,7 +61,7 @@ extern "C" {
#undef BITS
typedef unsigned char Vmuchar_t;
typedef unsigned long Vmulong_t;
typedef uint64_t Vmulong_t;
typedef union _head_u Head_t;
typedef union _body_u Body_t;
......
......@@ -18,6 +18,7 @@
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include "macros.h"
#include "const.h"
......@@ -135,7 +136,7 @@ char *html_string(char *s)
int len, pos = 0;
int temp,cnt,remaining=0;
char workstr[16];
long unsigned int charnum=0;
uint64_t charnum=0;
unsigned char byte;
unsigned char mask;
......
......@@ -16,15 +16,10 @@
#endif
#include <stdio.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#ifdef HAVE_UNISTD_H
#include <inttypes.h>
#include <unistd.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
......@@ -70,7 +65,7 @@
typedef struct window_glitz_s {
Window win;
unsigned long event_mask;
uint64_t event_mask;
Pixmap pix;
GC gc;
Visual *visual;
......@@ -283,7 +278,7 @@ static void init_window(GVJ_t *job, Display *dpy, int scr)
XWMHints *wmhints;
XSizeHints *normalhints;
XClassHint *classhint;
unsigned long attributemask = 0;
uint64_t attributemask = 0;
char *name;
window_t *window;
......
......@@ -16,15 +16,10 @@
#endif
#include <stdio.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#ifdef HAVE_UNISTD_H
#include <inttypes.h>
#include <unistd.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
......@@ -61,7 +56,7 @@