diff --git a/ChangeLog b/ChangeLog index 3ad0aa6..b19723a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2587,25 +2587,40 @@ Tue Oct 12 16:24:20 PDT 1999 Michael Jennings . ------------------------------------------------------------------------------- -Mon Oct 18 19:33:26 PDT 1999 Mandrake +Mon Oct 18 19:33:26 PDT 1999 Mandrake Warnings begone! Eterm/src/command.c still has two warnings but I don't know why - I didn't get rid fo them. there are still warnings in + I didn't get rid of them. there are still warnings in Esetroot.c and in Etbg, but I'll fix those later. ------------------------------------------------------------------------------- - -Mon Oct 18 23:59:17 PDT 1999 Mandrake +Mon Oct 18 23:59:17 PDT 1999 Mandrake More warning bashing in Esetroot.c ------------------------------------------------------------------------------- - -Tue Oct 19 00:13:17 PDT 1999 Mandrake +Tue Oct 19 00:13:17 PDT 1999 Mandrake Almost all the warnings are gone. only 3 remain on my system at home. two in command.c (where do I get proper prototypes for grantpt() and unlockpt()?) and one in options.c that is bizarre: - options.c:3433: warning: `%x' yields only last 2 digits of year in some - locales + options.c:3433: warning: `%x' yields only last 2 digits of year in + some locales + +------------------------------------------------------------------------------- +Tue Oct 19 16:34:51 PDT 1999 Michael Jennings + + This should get rid of all the warnings. If you're running Linux and + get warnings about setresuid, setresgid, grantpt, and unlockpt not + having prototypes, feel free to add the following lines to your copy + of /usr/include/unistd.h: + + /* Linux- and HP-UX-only setres?id() calls -- mej */ + extern int setresuid(uid_t ruid, uid_t euid, uid_t suid); + extern int setresgid(gid_t rgid, gid_t egid, gid_t sgid); + /* SVR4 PTY functions */ + extern int grantpt(int fd); + extern int unlockpt(int fd); + +------------------------------------------------------------------------------- diff --git a/libmej/mem.c b/libmej/mem.c index 68ed3bb..cac061d 100644 --- a/libmej/mem.c +++ b/libmej/mem.c @@ -184,7 +184,7 @@ memrec_dump(void) memset(buff, 0, 9); memcpy(buff, ptr + j, l); for (k = 0; k < l; k++) { - fprintf(stderr, "%02.2X ", buff[k]); + fprintf(stderr, "%02x ", buff[k]); } for (; k < 8; k++) { fprintf(stderr, " "); @@ -198,7 +198,7 @@ memrec_dump(void) memset(buff, 0, 9); memcpy(buff, ptr + j, l); for (k = 0; k < l; k++) { - fprintf(stderr, "%02.2X ", buff[k]); + fprintf(stderr, "%02x ", buff[k]); } for (; k < 8; k++) { fprintf(stderr, " "); @@ -214,7 +214,7 @@ memrec_dump(void) memset(buff, 0, 9); memcpy(buff, ptr + j, l); for (k = 0; k < l; k++) { - fprintf(stderr, "%02.2X ", buff[k]); + fprintf(stderr, "%02x ", buff[k]); } for (; k < 8; k++) { fprintf(stderr, " "); diff --git a/libmej/strings.c b/libmej/strings.c index c46e0bc..b98361a 100644 --- a/libmej/strings.c +++ b/libmej/strings.c @@ -567,13 +567,13 @@ HexDump(void *buff, register size_t count) fprintf(stderr, " Address | Size | Offset | 00 01 02 03 04 05 06 07 | ASCII \n"); fprintf(stderr, "---------+--------+---------+-------------------------+---------\n"); for (ptr = (unsigned char *) buff, j = 0; j < count; j += 8) { - fprintf(stderr, " %08x | %06lu | %07X | ", (unsigned int) buff, + fprintf(stderr, " %08x | %06lu | %07x | ", (unsigned int) buff, (unsigned long) count, (unsigned int) j); l = ((count - j < 8) ? (count - j) : (8)); memset(buffr, 0, 9); memcpy(buffr, ptr + j, l); for (k = 0; k < l; k++) { - fprintf(stderr, "%02.2X ", buffr[k]); + fprintf(stderr, "%02x ", buffr[k]); } for (; k < 8; k++) { fprintf(stderr, " "); diff --git a/src/actions.c b/src/actions.c index 17e80f2..138dbbf 100644 --- a/src/actions.c +++ b/src/actions.c @@ -56,18 +56,20 @@ action_t *action_list = NULL; unsigned char action_handle_string(event_t *ev, action_t *action) { - ev = NULL; + REQUIRE_RVAL(action->param.string != NULL, 0); cmd_write(action->param.string, strlen(action->param.string)); return 1; + ev = NULL; } unsigned char action_handle_echo(event_t *ev, action_t *action) { - ev = NULL; + REQUIRE_RVAL(action->param.string != NULL, 0); tt_write(action->param.string, strlen(action->param.string)); return 1; + ev = NULL; } unsigned char diff --git a/src/command.c b/src/command.c index b044e7d..cca54f8 100644 --- a/src/command.c +++ b/src/command.c @@ -51,6 +51,9 @@ static const char cvs_ident[] = "$Id$"; #ifdef HAVE_SYS_IOCTL_H # include #endif +#ifdef HAVE_UNISTD_H +# include +#endif #include #include @@ -106,8 +109,6 @@ static const char cvs_ident[] = "$Id$"; #if defined(linux) # include /* For strsep(). -vendu */ #endif -/* I don't know why this doesn't seem to grab setresgid -mandrake */ -#include /* Eterm-specific Headers */ #include "command.h" @@ -133,14 +134,6 @@ static const char cvs_ident[] = "$Id$"; #endif #include "windows.h" -#ifdef HAVE_SETRESGID -int setresgid(gid_t rgid, gid_t egid, gid_t sgid); -#endif - -#ifdef HAVE_SETRESUID -int setresuid(uid_t ruid, uid_t euid, uid_t suid); -#endif - /* local variables */ int my_ruid, my_euid, my_rgid, my_egid; char initial_dir[PATH_MAX + 1]; diff --git a/src/e.c b/src/e.c index 2dc4a21..0ede64a 100644 --- a/src/e.c +++ b/src/e.c @@ -331,7 +331,8 @@ void eterm_ipc_send(char *str) { - str = NULL; + return; + str = NULL; } char * diff --git a/src/options.c b/src/options.c index f93e5b7..d030349 100644 --- a/src/options.c +++ b/src/options.c @@ -1284,7 +1284,7 @@ char * builtin_version(char *param) { - if(param) { + if (param) { D_PARSE(("builtin_version(%s) called\n", param)); } @@ -1295,7 +1295,7 @@ char * builtin_appname(char *param) { - if(param) { + if (param) { D_PARSE(("builtin_appname(%s) called\n", param)); } @@ -3430,7 +3430,7 @@ save_config(char *path) print_error("Unable to save configuration to file \"%s\" -- %s\n", path, strerror(errno)); return errno; } - strftime(dt_stamp, 50, "%x at %X", cur_tm); + strftime(dt_stamp, 50, "%Y/%m/%d at %X", cur_tm); fprintf(fp, "<" APL_NAME "-" VERSION ">\n"); fprintf(fp, "# Eterm Configuration File\n"); fprintf(fp, "# Automatically generated by " APL_NAME "-" VERSION " on %s\n", dt_stamp); diff --git a/src/screen.c b/src/screen.c index 18394ad..947189d 100644 --- a/src/screen.c +++ b/src/screen.c @@ -1521,6 +1521,7 @@ set_multichar_encoding(const char *str) } } #else + return; str = NULL; #endif /* MULTI_CHARSET */ } @@ -1923,7 +1924,7 @@ scr_refresh(int type) #endif /* single stepping - `normal' mode */ for (; ++col < ncols - 1;) { - if ((unsigned int)rend != srp[col]) + if ((unsigned int) rend != srp[col]) break; if ((stp[col] == dtp[col]) && (srp[col] == drp[col])) break; @@ -3072,11 +3073,11 @@ mouse_report(XButtonEvent * ev) void mouse_tracking(int report, int x, int y, int firstrow, int lastrow) { - report = 0; - x = 0; - y = 0; - firstrow = 0; - lastrow = 0; + report = 0; + x = 0; + y = 0; + firstrow = 0; + lastrow = 0; /* TODO */ } @@ -3086,8 +3087,8 @@ mouse_tracking(int report, int x, int y, int firstrow, int lastrow) void debug_PasteIt(unsigned char *data, int nitems) { - data = NULL; - nitems = 0; + data = NULL; + nitems = 0; /* TODO */ } diff --git a/utils/Esetroot.c b/utils/Esetroot.c index 02fbbbb..c8acbcd 100644 --- a/utils/Esetroot.c +++ b/utils/Esetroot.c @@ -23,6 +23,8 @@ static const char cvs_ident[] = "$Id$"; #include #include +void set_pixmap_property(Pixmap p); + Display *Xdisplay; Screen *scr; Window Xroot; @@ -31,7 +33,6 @@ unsigned char debug = 0; #define Xdepth (DefaultDepth(Xdisplay, screen)) -void set_pixmap_property(Pixmap p); void set_pixmap_property(Pixmap p) {