Tue Oct 19 16:34:51 PDT 1999 Michael Jennings <mej@eterm.org>

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);


SVN revision: 886
This commit is contained in:
Michael Jennings 1999-10-19 17:44:02 +00:00
parent 664c44bb96
commit a54e99b6d5
9 changed files with 51 additions and 38 deletions

View File

@ -2587,25 +2587,40 @@ Tue Oct 12 16:24:20 PDT 1999 Michael Jennings <mej@eterm.org>
<namsh@lgic.co.kr>.
-------------------------------------------------------------------------------
Mon Oct 18 19:33:26 PDT 1999 Mandrake <mandrake@mandrake.net>
Mon Oct 18 19:33:26 PDT 1999 Mandrake <mandrake@mandrake.net>
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 <mandrake@mandrake.net>
Mon Oct 18 23:59:17 PDT 1999 Mandrake <mandrake@mandrake.net>
More warning bashing in Esetroot.c
-------------------------------------------------------------------------------
Tue Oct 19 00:13:17 PDT 1999 Mandrake <mandrake@mandrake.net>
Tue Oct 19 00:13:17 PDT 1999 Mandrake <mandrake@mandrake.net>
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 <mej@eterm.org>
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);
-------------------------------------------------------------------------------

View File

@ -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, " ");

View File

@ -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, " ");

View File

@ -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

View File

@ -51,6 +51,9 @@ static const char cvs_ident[] = "$Id$";
#ifdef HAVE_SYS_IOCTL_H
# include <sys/ioctl.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#include <sys/types.h>
#include <limits.h>
@ -106,8 +109,6 @@ static const char cvs_ident[] = "$Id$";
#if defined(linux)
# include <string.h> /* For strsep(). -vendu */
#endif
/* I don't know why this doesn't seem to grab setresgid -mandrake */
#include <unistd.h>
/* 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];

View File

@ -331,7 +331,8 @@ void
eterm_ipc_send(char *str)
{
str = NULL;
return;
str = NULL;
}
char *

View File

@ -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);

View File

@ -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 */
}

View File

@ -23,6 +23,8 @@ static const char cvs_ident[] = "$Id$";
#include <X11/Xos.h>
#include <Imlib.h>
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)
{