Index: setoolkit/bin/se =================================================================== RCS file: /cvsroot/upstream/setoolkit/bin/se,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- setoolkit/bin/se 5 Jan 2005 21:39:46 -0000 1.1.1.1 +++ setoolkit/bin/se 29 Apr 2005 14:24:01 -0000 1.2 @@ -1,10 +1,6 @@ #! /bin/sh -case `/bin/isalist` in -sparc*) MACH=sparcv9;; -pentium*) MACH=i386;; -*) MACH='what?';; -esac +MACH=`isainfo -k` TOP=`/bin/dirname $0` if [ "$TOP" = "." ]; then Index: setoolkit/include/stat.se =================================================================== RCS file: /cvsroot/upstream/setoolkit/include/stat.se,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- setoolkit/include/stat.se 5 Jan 2005 21:39:47 -0000 1.1.1.1 +++ setoolkit/include/stat.se 29 Apr 2005 14:24:01 -0000 1.2 @@ -131,7 +131,7 @@ attach "libc.so" { -#if defined(i86pc) +#if defined(i86pc) && !defined(_LP64) /* * NOTE: Application software should NOT program * to the _xstat interface. @@ -156,7 +156,7 @@ ulong umask(ulong cmask); }; -#if defined(i86pc) +#if defined(i86pc) && !defined(_LP64) #define stat(p,b) _xstat(_STAT_VER,p,b) #define lstat(p,b) _lxstat(_STAT_VER,p,b) #define fstat(f,b) _fxstat(_STAT_VER,f,b) Index: setoolkit/include/utsname.se =================================================================== RCS file: /cvsroot/upstream/setoolkit/include/utsname.se,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- setoolkit/include/utsname.se 5 Jan 2005 21:39:47 -0000 1.1.1.1 +++ setoolkit/include/utsname.se 29 Apr 2005 14:24:01 -0000 1.2 @@ -27,7 +27,7 @@ char machine[SYS_NMLN]; }; -#if defined(i86pc) +#if defined(i86pc) && !defined(_LP64) # define uname _nuname #endif Index: setoolkit/src/Makefile =================================================================== RCS file: /cvsroot/upstream/setoolkit/src/Makefile,v retrieving revision 1.1.1.1 retrieving revision 1.3 diff -u -r1.1.1.1 -r1.3 --- setoolkit/src/Makefile 5 Jan 2005 21:39:46 -0000 1.1.1.1 +++ setoolkit/src/Makefile 29 Apr 2005 14:56:35 -0000 1.3 @@ -28,7 +28,13 @@ strip bin/se.`./isa` v9: - @$(MAKE) se OPTIM="$(OPTIM) -m64 -mcpu=v9 -mtune=ultrasparc3" LIBDIR=-L/usr/lib/sparcv9 $(MFLAGS) + @$(MAKE) se OPTIM="$(OPTIM) -m64 -mcpu=v9 -mtune=ultrasparc3" LIBDIR=-L/usr/lib/64 $(MFLAGS) + +amd64: + @$(MAKE) se OPTIM="$(OPTIM) -m64 -march=opteron" LIBDIR=-L/usr/lib/64 $(MFLAGS) + +generic64cc: + @$(MAKE) se CC=/opt/SUNWspro/bin/cc OPTIM="$(OPTIM) -v -xarch=generic64" LIBDIR=-L/usr/lib/64 $(MFLAGS) # INCLUDE=-I/usr/include_2.9 removed because gcc pukes on __builtin_va_alist @@ -87,6 +93,8 @@ code.o: md5/code.c $(CC) $(CFLAGS) -c md5/code.c -o code.o +version.c: always + always: echo '#define NOW "\c' > version.c echo `/bin/date '+%I:%M %p %D'`\\c >> version.c Index: setoolkit/src/debug.c =================================================================== RCS file: /cvsroot/upstream/setoolkit/src/debug.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- setoolkit/src/debug.c 5 Jan 2005 21:39:46 -0000 1.1.1.1 +++ setoolkit/src/debug.c 29 Apr 2005 14:22:28 -0000 1.2 @@ -336,6 +336,7 @@ return buf; } +void __dv__(T_VARIABLE *vp) { dump_variable(vp, 1); Index: setoolkit/src/funcs.c =================================================================== RCS file: /cvsroot/upstream/setoolkit/src/funcs.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- setoolkit/src/funcs.c 5 Jan 2005 21:39:46 -0000 1.1.1.1 +++ setoolkit/src/funcs.c 29 Apr 2005 14:22:28 -0000 1.2 @@ -260,7 +260,7 @@ char *p; #ifdef _LP64 - my_handle = dlopen("/usr/lib/sparcv9/libc.so", RTLD_LAZY); + my_handle = dlopen("/usr/lib/64/libc.so", RTLD_LAZY); #else my_handle = dlopen("/usr/lib/libc.so", RTLD_LAZY); #endif Index: setoolkit/src/isa =================================================================== RCS file: /cvsroot/upstream/setoolkit/src/isa,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- setoolkit/src/isa 5 Jan 2005 21:39:46 -0000 1.1.1.1 +++ setoolkit/src/isa 29 Apr 2005 14:22:28 -0000 1.2 @@ -1,9 +1,3 @@ #! /bin/sh -case `isalist` in -sparc*) mach=sparcv9;; -pentium*) mach=i386;; -*) mach='what?';; -esac - -echo $mach +isainfo -k Index: setoolkit/src/kvm.c =================================================================== RCS file: /cvsroot/upstream/setoolkit/src/kvm.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- setoolkit/src/kvm.c 5 Jan 2005 21:39:46 -0000 1.1.1.1 +++ setoolkit/src/kvm.c 29 Apr 2005 14:22:28 -0000 1.2 @@ -4,6 +4,7 @@ #include #include #include +#include #include "avl.h" #include "se.h" Index: setoolkit/src/main.c =================================================================== RCS file: /cvsroot/upstream/setoolkit/src/main.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- setoolkit/src/main.c 5 Jan 2005 21:39:46 -0000 1.1.1.1 +++ setoolkit/src/main.c 29 Apr 2005 14:22:28 -0000 1.2 @@ -6,6 +6,7 @@ #include #include #include +#include #include #ifdef USE_LICENSE #include Index: setoolkit/src/run.c =================================================================== RCS file: /cvsroot/upstream/setoolkit/src/run.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- setoolkit/src/run.c 5 Jan 2005 21:39:46 -0000 1.1.1.1 +++ setoolkit/src/run.c 29 Apr 2005 14:22:28 -0000 1.2 @@ -22,11 +22,15 @@ #define SIGNAL_DEFAULT "@default" #define SIGNAL_IGNORE "@ignore" -#ifdef _LP64 -# define _PARAM_(x) \ +#if defined(_LP64) +# if defined(_BIG_ENDIAN) +# define _PARAM_(x) \ (((Se_type_sizes[x.var_type] < 8) && \ (Se_type_sizes[x.var_type] > 0)) && (x.var_dimension == 0) ? \ (x.var_un.var_uldigit >> 32) : (x.var_un.var_uldigit)) +# else +# define _PARAM_(x) (x.var_un.var_uldigit) +# endif #else # define _PARAM_(x) (x.var_un.var_udigit) #endif @@ -155,6 +159,10 @@ static char *expr_name (T_EXPR *); static T_VARIABLE *get_lazy_member (T_VARIABLE *, T_VARIABLE *[]); +#if defined(ppc) || defined(__amd64) +static int anprintf(char *buf, size_t buf_size, char *format, + T_VARTYPE *vtypes, unsigned long arg_list[], int n); +#endif static char **sig_functions; static int line_no; static T_VARIABLE zero_variable; @@ -621,12 +629,40 @@ switch(type) { case SPRINTF_TYPE: case SYSLOG_TYPE: - vsnprintf((char *) arg, argsz, format, (va_list) arg_list); +#if defined(ppc) || defined(__amd64) + /* arg_list is not a va_list, do it the hard way */ + anprintf((char *)arg, argsz, format, vtypes, arg_list, i); +#else + vsnprintf((char *) arg, argsz, format, arg_list); +#endif break; case PRINTF_TYPE: case FPRINTF_TYPE: +#if defined(ppc) || defined(__amd64) + /* arg_list is not a va_list, do it the hard way. + Format into a buffer, then print the buffer to the file */ + { + int buf_size = 8192; + char * buf = NULL; + int rc; + + /* Will loop at most once if 8k isn't enough */ + for (;;) { + buf = (char *)realloc(buf, buf_size); + rc = anprintf(buf, buf_size, format, vtypes, arg_list, i); + if (rc < buf_size) + break; + buf_size = rc + 1; /* +1 for the terminating 0 */ + } + + cp->c_block->b_return->var_un.var_digit = + fprintf((FILE *) arg, "%s", buf); + free(buf); + } +#else cp->c_block->b_return->var_un.var_digit = vfprintf((FILE *) arg, format, arg_list); +#endif break; } switch(type) { @@ -644,37 +680,60 @@ se_free((void *) arg_list[j]); } -#ifdef ppc +#if defined(ppc) || defined(__amd64) /* this code is kept here because it parses an intf string * * and I may want that some day. */ -static void -aprintf(char *buf, char *format, T_VARTYPE *vtypes, char *arg_list[], int n) +/* The anprintf() function returns the number of characters + formatted, that is, the number of characters that would have + been written to the buffer if it were large enough. If the + value of n is 0 on a call to anprintf(), an unspecified + value less than 1 is returned. +*/ +static int +anprintf(char *buf, size_t buf_size, char *format, T_VARTYPE *vtypes, unsigned long arg_list[], int n) { char fmt_buf[32]; char *fmt; char *p; int i; - int vindex = 0; + int vindex = -1; int stars; int first_star; int second_star; unsigned long long ull; double d; + int result = 0; + int rc; + + if (buf_size == 0) + return -1; p = format; - for(i=0; i 1) { + *buf++ = '%'; + buf_size--; + } + result++; p++; - } else + } else { + ++vindex; break; - } else - *buf++ = *p; + } + } else { + if (buf_size > 1) { + *buf++ = *p; + buf_size--; + } + result++; + } } + if (*p) { stars = 0; fmt = fmt_buf; @@ -689,6 +748,8 @@ *fmt = '\0'; } else break; + + rc = 0; switch(stars) { case 0: switch(vtypes[i]) { @@ -699,18 +760,26 @@ case VAR_UCHAR: case VAR_USHORT: case VAR_ULONG: - sprintf(buf, fmt_buf, arg_list[vindex]); + rc = snprintf(buf, buf_size, fmt_buf, arg_list[vindex]); break; case VAR_LONGLONG: case VAR_ULONGLONG: +#if defined(_LP64) + ull = (unsigned long) arg_list[vindex]; +#else ((unsigned long *) &ull)[0] = (unsigned long) arg_list[vindex++]; ((unsigned long *) &ull)[1] = (unsigned long) arg_list[vindex]; - sprintf(buf, fmt_buf, ull); +#endif + rc = snprintf(buf, buf_size, fmt_buf, ull); break; case VAR_DOUBLE: +#if defined(_LP64) + ((unsigned long *) &d)[0] = (unsigned long) arg_list[vindex]; +#else ((unsigned long *) &d)[0] = (unsigned long) arg_list[vindex++]; ((unsigned long *) &d)[1] = (unsigned long) arg_list[vindex]; - sprintf(buf, fmt_buf, d); +#endif + rc = snprintf(buf, buf_size, fmt_buf, d); break; default: se_fatal("Bogus type: %u\n", vtypes[i]); @@ -725,21 +794,29 @@ case VAR_UCHAR: case VAR_USHORT: case VAR_ULONG: - sprintf(buf, fmt_buf, arg_list[vindex], arg_list[vindex+1]); + rc = snprintf(buf, buf_size, fmt_buf, arg_list[vindex], arg_list[vindex+1]); vindex++; break; case VAR_LONGLONG: case VAR_ULONGLONG: first_star = (long) arg_list[vindex++]; +#if defined(_LP64) + ull = (unsigned long) arg_list[vindex]; +#else ((unsigned long *) &ull)[0] = (unsigned long) arg_list[vindex++]; ((unsigned long *) &ull)[1] = (unsigned long) arg_list[vindex]; - sprintf(buf, fmt_buf, first_star, ull); +#endif + rc = snprintf(buf, buf_size, fmt_buf, first_star, ull); break; case VAR_DOUBLE: first_star = (long) arg_list[vindex++]; +#if defined(_LP64) + ((unsigned long *) &d)[0] = (unsigned long) arg_list[vindex]; +#else ((unsigned long *) &d)[0] = (unsigned long) arg_list[vindex++]; ((unsigned long *) &d)[1] = (unsigned long) arg_list[vindex]; - sprintf(buf, fmt_buf, first_star, d); +#endif + rc = snprintf(buf, buf_size, fmt_buf, first_star, d); break; default: se_fatal("Bogus type: %u\n", vtypes[i]); @@ -754,7 +831,7 @@ case VAR_UCHAR: case VAR_USHORT: case VAR_ULONG: - sprintf(buf, fmt_buf, + rc = snprintf(buf, buf_size, fmt_buf, arg_list[vindex], arg_list[vindex+1], arg_list[vindex+2]); vindex += 2; break; @@ -762,16 +839,24 @@ case VAR_ULONGLONG: first_star = (long) arg_list[vindex++]; second_star = (long) arg_list[vindex++]; +#if defined(_LP64) + ull = (unsigned long) arg_list[vindex]; +#else ((unsigned long *) &ull)[0] = (unsigned long) arg_list[vindex++]; ((unsigned long *) &ull)[1] = (unsigned long) arg_list[vindex]; - sprintf(buf, fmt_buf, first_star, second_star, ull); +#endif + rc = snprintf(buf, buf_size, fmt_buf, first_star, second_star, ull); break; case VAR_DOUBLE: first_star = (long) arg_list[vindex++]; second_star = (long) arg_list[vindex++]; +#if defined(_LP64) + ((unsigned long *) &d)[0] = (unsigned long) arg_list[vindex]; +#else ((unsigned long *) &d)[0] = (unsigned long) arg_list[vindex++]; ((unsigned long *) &d)[1] = (unsigned long) arg_list[vindex]; - sprintf(buf, fmt_buf, first_star, second_star, d); +#endif + rc = snprintf(buf, buf_size, fmt_buf, first_star, second_star, d); break; default: se_fatal("Bogus type: %u\n", vtypes[i]); @@ -781,19 +866,37 @@ se_fatal("Too many stars in format string"); break; } - buf = &buf[strlen(buf)]; + if (rc < buf_size) { + buf += rc; + buf_size -= rc; + } else { + buf = &buf[buf_size - 1]; + buf_size = 1; + } + result += rc; } for(; *p; p++) { if (*p == '%') { if (*(p + 1) == '%') { - *buf++ = '%'; + if (buf_size > 1) { + *buf++ = '%'; + buf_size--; + } + result++; p++; } else break; - } else - *buf++ = *p; + } else { + if (buf_size > 1) { + *buf++ = *p; + buf_size--; + } + result++; + } } *buf = '\0'; + + return result; } #endif @@ -2675,10 +2778,12 @@ switch(ep->le_op) { case LE_RE_EQ: - compile(right.var_un.var_string, expbuf, &expbuf[BUFSIZ]); + if (!compile(right.var_un.var_string, expbuf, &expbuf[sizeof expbuf])) + se_fatal("compile failed"); return step(left.var_un.var_string, expbuf) != 0; case LE_RE_NEQ: - compile(right.var_un.var_string, expbuf, &expbuf[BUFSIZ]); + if (!compile(right.var_un.var_string, expbuf, &expbuf[sizeof expbuf])) + se_fatal("compile failed"); return step(left.var_un.var_string, expbuf) == 0; case LE_EQ: switch(left.var_type) { Index: setoolkit/src/se.h =================================================================== RCS file: /cvsroot/upstream/setoolkit/src/se.h,v retrieving revision 1.1.1.1 retrieving revision 1.3 diff -u -r1.1.1.1 -r1.3 --- setoolkit/src/se.h 5 Jan 2005 21:39:46 -0000 1.1.1.1 +++ setoolkit/src/se.h 4 May 2005 08:19:46 -0000 1.3 @@ -65,7 +65,12 @@ /* paths */ #define CPP_CMD "/usr/ccs/lib/cpp -B -D__symbel" #define TAIL_CMD "/usr/bin/tail +2" +#ifndef DEFAULT_SE_INCLUDE #define DEFAULT_SE_INCLUDE "/opt/RICHPse/include" +#endif +#ifndef DEFAULT_SE_LIB +#define DEFAULT_SE_LIB "/opt/RICHPse/lib" +#endif /* for Solarii < 2.6 */ #ifndef KSTAT_DATA_INT32 @@ -538,6 +543,7 @@ extern void se_update_extern_variable(T_VARIABLE *); extern void se_refresh_extern_variable(T_VARIABLE *); extern void se_add_kstat_type(T_STRUCT *); +extern void se_add_disk_name(char *); extern int se_cleanup_tok_syms(char *); extern char *se_string_save(char *); @@ -575,6 +581,7 @@ extern void se_init_kstat(void); extern void se_init_mib(void); extern void se_init_ndd(void); +extern void se_add_ndd_type(T_STRUCT *); extern void se_end_kvm(void); extern void se_end_kstat(void); extern void se_end_mib(void); Index: setoolkit/src/se.y =================================================================== RCS file: /cvsroot/upstream/setoolkit/src/se.y,v retrieving revision 1.1.1.1 retrieving revision 1.3 diff -u -r1.1.1.1 -r1.3 --- setoolkit/src/se.y 5 Jan 2005 21:39:46 -0000 1.1.1.1 +++ setoolkit/src/se.y 4 May 2005 08:19:46 -0000 1.3 @@ -4665,11 +4665,15 @@ /* ahh what the hey, let's see if it's actually where I'd like it to be */ if (processor[0] == '\0') #ifdef _LP64 - strcpy(processor, "sparcv9"); +#ifdef SI_ARCHITECTURE_64 + sysinfo(SI_ARCHITECTURE_64, processor, sizeof processor); #else - sysinfo(SI_ARCHITECTURE, processor, sizeof processor); + strcpy(processor, "sparcv9"); #endif - snprintf(path, sizeof path, "/opt/RICHPse/lib/%s/%s", processor, lib); +#else + sysinfo(SI_ARCHITECTURE, processor, sizeof processor); +#endif + snprintf(path, sizeof path, DEFAULT_SE_LIB "/%s/%s", processor, lib); if (access(path, F_OK) == 0) return path; p = getenv("LD_LIBRARY_PATH"); @@ -4717,9 +4721,9 @@ p = getenv("LD_LIBRARY_PATH"); if (p) - snprintf(buf, sizeof buf, "LD_LIBRARY_PATH=/usr/lib/sparcv9:%s", p); + snprintf(buf, sizeof buf, "LD_LIBRARY_PATH=/usr/lib/64:%s", p); else - strcpy(buf, "LD_LIBRARY_PATH=/usr/lib/sparcv9"); + strcpy(buf, "LD_LIBRARY_PATH=/usr/lib/64"); putenv(buf); } #endif Index: setoolkit/src/version =================================================================== RCS file: /cvsroot/upstream/setoolkit/src/version,v retrieving revision 1.1.1.1 retrieving revision 1.3 diff -u -r1.1.1.1 -r1.3 --- setoolkit/src/version 5 Jan 2005 21:39:46 -0000 1.1.1.1 +++ setoolkit/src/version 4 May 2005 08:19:46 -0000 1.3 @@ -5,6 +5,7 @@ double Se_version = 3.4; #include +#include #include #include @@ -13,13 +14,17 @@ { char v[128]; char processor[128]; - char *arch = ""; extern double Se_version; #ifdef _LP64 - arch = "v9"; +#ifdef SI_ARCHITECTURE_64 + sysinfo(SI_ARCHITECTURE_64, processor, sizeof processor); +#else + strcpy(processor, "sparcv9"); #endif - sysinfo(SI_ARCHITECTURE, processor, sizeof(processor)); - snprintf(v, sizeof v, "%s (%s) for %s%s", VERSION, NOW, processor, arch); +#else + sysinfo(SI_ARCHITECTURE, processor, sizeof processor); +#endif + snprintf(v, sizeof v, "%s (%s) for %s", VERSION, NOW, processor); puts(&v[4]); } Index: setoolkit/src/sex/gui/lib/Clock.c =================================================================== RCS file: /cvsroot/upstream/setoolkit/src/sex/gui/lib/Clock.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- setoolkit/src/sex/gui/lib/Clock.c 5 Jan 2005 21:39:46 -0000 1.1.1.1 +++ setoolkit/src/sex/gui/lib/Clock.c 29 Apr 2005 14:22:28 -0000 1.2 @@ -42,7 +42,8 @@ #endif static void clock_tic(), DrawHand(), DrawSecond(), SetSeg(), DrawClockFace(); -static erase_hands(), ci_round(); +static void erase_hands(); +static int ci_round(double); /* Private Definitions */ @@ -442,7 +443,7 @@ } } -static erase_hands (w, tm) +static void erase_hands (w, tm) ClockWidget w; struct tm *tm; { Index: setoolkit/src/sex/gui/lib/counter.c =================================================================== RCS file: /cvsroot/upstream/setoolkit/src/sex/gui/lib/counter.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- setoolkit/src/sex/gui/lib/counter.c 5 Jan 2005 21:39:46 -0000 1.1.1.1 +++ setoolkit/src/sex/gui/lib/counter.c 29 Apr 2005 14:22:28 -0000 1.2 @@ -1,3 +1,5 @@ +#include +#include #include #include #include Index: setoolkit/src/sex/gui/lib/dialogs.c =================================================================== RCS file: /cvsroot/upstream/setoolkit/src/sex/gui/lib/dialogs.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- setoolkit/src/sex/gui/lib/dialogs.c 5 Jan 2005 21:39:46 -0000 1.1.1.1 +++ setoolkit/src/sex/gui/lib/dialogs.c 29 Apr 2005 14:22:28 -0000 1.2 @@ -8,11 +8,14 @@ #include #include +#include #include #include #include #include "gui.h" #include "gui_defines.h" +#include "../../../avl.h" +#include "../../../se.h" typedef struct { char *callback; Index: setoolkit/src/sex/gui/lib/gui.c =================================================================== RCS file: /cvsroot/upstream/setoolkit/src/sex/gui/lib/gui.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- setoolkit/src/sex/gui/lib/gui.c 5 Jan 2005 21:39:46 -0000 1.1.1.1 +++ setoolkit/src/sex/gui/lib/gui.c 29 Apr 2005 14:22:28 -0000 1.2 @@ -97,7 +97,7 @@ { if ((mp == 0) || (mp->m_primary == 0)) return; - XtVaSetValues(mp->m_primary, XtNtitle, title, 0); + XtVaSetValues(mp->m_primary, XtNtitle, title, NULL); } static void @@ -707,7 +707,7 @@ } XtVaGetValues(frame->m_primary, XmNx, &X, XmNy, &Y, - XmNwidth, &Width, XmNheight, &Height, 0); + XmNwidth, &Width, XmNheight, &Height, NULL); *x = (int) X; *y = (int) Y; *width = (int) Width; @@ -722,12 +722,12 @@ XtSetMappedWhenManaged(frame->m_primary, False); XtManageChild(frame->m_primary); XtVaSetValues(frame->m_primary, - XmNx, (Position) x, XmNy, (Position) y, 0); + XmNx, (Position) x, XmNy, (Position) y, NULL); XtUnmanageChild(frame->m_primary); XtSetMappedWhenManaged(frame->m_primary, True); } else XtVaSetValues(frame->m_primary, - XmNx, (Position) x, XmNy, (Position) y, 0); + XmNx, (Position) x, XmNy, (Position) y, NULL); } void @@ -745,19 +745,19 @@ XtSetMappedWhenManaged(frame->m_primary, False); XtManageChild(frame->m_primary); - XtVaGetValues(frame->m_primary, XmNx, &x, XmNy, &y, 0); + XtVaGetValues(frame->m_primary, XmNx, &x, XmNy, &y, NULL); if (x == 0 && y == 0) { XtVaGetValues(Gui_toplevel, XmNx, &x, XmNy, &y, - XmNheight, &height, XmNwidth, &width, 0); + XmNheight, &height, XmNwidth, &width, NULL); XtVaGetValues(frame->m_primary, - XmNheight, &child_height, XmNwidth, &child_width, 0); + XmNheight, &child_height, XmNwidth, &child_width, NULL); x += ((Position) (width - child_width) / 2); y += ((Position) (height - child_height) / 2); - XtVaSetValues(frame->m_primary, XmNx, x, XmNy, y, 0); + XtVaSetValues(frame->m_primary, XmNx, x, XmNy, y, NULL); } XtSetMappedWhenManaged(frame->m_primary, True); Index: setoolkit/src/sex/gui/lib/gui_create.c =================================================================== RCS file: /cvsroot/upstream/setoolkit/src/sex/gui/lib/gui_create.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- setoolkit/src/sex/gui/lib/gui_create.c 5 Jan 2005 21:39:46 -0000 1.1.1.1 +++ setoolkit/src/sex/gui/lib/gui_create.c 29 Apr 2005 14:22:28 -0000 1.2 @@ -1,3 +1,4 @@ +#include #include #include #include Index: setoolkit/src/sex/gui/lib/gui_update.c =================================================================== RCS file: /cvsroot/upstream/setoolkit/src/sex/gui/lib/gui_update.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- setoolkit/src/sex/gui/lib/gui_update.c 5 Jan 2005 21:39:46 -0000 1.1.1.1 +++ setoolkit/src/sex/gui/lib/gui_update.c 29 Apr 2005 14:22:28 -0000 1.2 @@ -760,7 +760,7 @@ { if (w == 0) return; - XtVaSetValues(w, XtVaTypedArg, XmNfontList, XmRString, font_name, 4, 0); + XtVaSetValues(w, XtVaTypedArg, XmNfontList, XmRString, font_name, 4, NULL); } void @@ -857,7 +857,7 @@ if (to.addr == 0) return; xmFontp = *((XmFontList *) to.addr); - XtVaSetValues(mp->m_primary, XmNfontList, xmFontp, 0); + XtVaSetValues(mp->m_primary, XmNfontList, xmFontp, NULL); break; case R_TFIELD: set_font(mp->m_primary, font_name); Index: setoolkit/src/sex/gui/lib/icon.c =================================================================== RCS file: /cvsroot/upstream/setoolkit/src/sex/gui/lib/icon.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- setoolkit/src/sex/gui/lib/icon.c 5 Jan 2005 21:39:46 -0000 1.1.1.1 +++ setoolkit/src/sex/gui/lib/icon.c 29 Apr 2005 14:22:28 -0000 1.2 @@ -1,3 +1,4 @@ +#include #include #include #include @@ -145,7 +146,7 @@ /* * read next hex value in the input stream, return -1 if EOF */ -static NextInt (fstream) +static int NextInt (fstream) FILE *fstream; { int ch; Index: setoolkit/src/sex/gui/lib/text.c =================================================================== RCS file: /cvsroot/upstream/setoolkit/src/sex/gui/lib/text.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- setoolkit/src/sex/gui/lib/text.c 5 Jan 2005 21:39:46 -0000 1.1.1.1 +++ setoolkit/src/sex/gui/lib/text.c 29 Apr 2005 14:22:28 -0000 1.2 @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include Index: setoolkit/src/sex/gui/lib/transform.c =================================================================== RCS file: /cvsroot/upstream/setoolkit/src/sex/gui/lib/transform.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- setoolkit/src/sex/gui/lib/transform.c 5 Jan 2005 21:39:46 -0000 1.1.1.1 +++ setoolkit/src/sex/gui/lib/transform.c 29 Apr 2005 14:22:28 -0000 1.2 @@ -57,6 +57,7 @@ return xpoints; } +void TFillPolygon (dpy, d, gc, t, points, n_points, shape, mode) register Display *dpy; Drawable d; @@ -77,6 +78,7 @@ } } +void TDrawArc (dpy, d, gc, t, x, y, width, height, angle1, angle2) register Display *dpy; Drawable d; @@ -102,6 +104,7 @@ XDrawArc (dpy, d, gc, xx, xy, xw, xh, angle1, angle2); } +void TFillArc (dpy, d, gc, t, x, y, width, height, angle1, angle2) register Display *dpy; Drawable d; @@ -127,6 +130,7 @@ XFillArc (dpy, d, gc, xx, xy, xw, xh, angle1, angle2); } +void SetTransform (t, xx1, xx2, xy1, xy2, tx1, tx2, ty1, ty2) Transform *t; int xx1, xx2, xy1, xy2; Index: setoolkit/src/sex/net/lib/netlib.c =================================================================== RCS file: /cvsroot/upstream/setoolkit/src/sex/net/lib/netlib.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- setoolkit/src/sex/net/lib/netlib.c 5 Jan 2005 21:39:46 -0000 1.1.1.1 +++ setoolkit/src/sex/net/lib/netlib.c 29 Apr 2005 14:22:29 -0000 1.2 @@ -1026,6 +1026,7 @@ &*/ +int net_port_number(int sd) { int n = sizeof(struct sockaddr_in); @@ -1162,6 +1163,7 @@ #define SERVICE_OF_CHOICE "echo" +int net_ping(char *node) { extern int errno; Index: setoolkit/src/sex/net/lib/rstat.c =================================================================== RCS file: /cvsroot/upstream/setoolkit/src/sex/net/lib/rstat.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- setoolkit/src/sex/net/lib/rstat.c 5 Jan 2005 21:39:46 -0000 1.1.1.1 +++ setoolkit/src/sex/net/lib/rstat.c 29 Apr 2005 14:22:29 -0000 1.2 @@ -6,6 +6,7 @@ #include #include /* getenv, exit */ +#include #include "rstat.h" /*