Tue Apr 22 11:12:26 2003 Michael Jennings (mej)

Fixed a couple minor type issues on 64-bit systems.

Cleaned up all the warnings in libscream.c and Esetroot.c.

Updated the spec file to depend on imlib2 and the JPEG/PNG loaders.
I hate to do that, but it seems necessary.


SVN revision: 6874
This commit is contained in:
Michael Jennings 2003-04-22 15:14:20 +00:00
parent e796f1d447
commit 7408857d22
5 changed files with 62 additions and 8 deletions

View File

@ -5025,3 +5025,12 @@ Mon Mar 31 19:00:00 2003 Simon Horman (horms)
Fixed compilation problem with XIM support which resulted Fixed compilation problem with XIM support which resulted
in Eterm segfaulting if the XIM server (kinput2) exited. in Eterm segfaulting if the XIM server (kinput2) exited.
---------------------------------------------------------------------- ----------------------------------------------------------------------
Tue Apr 22 11:12:26 2003 Michael Jennings (mej)
Fixed a couple minor type issues on 64-bit systems.
Cleaned up all the warnings in libscream.c and Esetroot.c.
Updated the spec file to depend on imlib2 and the JPEG/PNG loaders.
I hate to do that, but it seems necessary.
----------------------------------------------------------------------

View File

@ -4,9 +4,10 @@
Summary: Enlightened terminal emulator Summary: Enlightened terminal emulator
Name: Eterm Name: Eterm
Version: 0.9.2 Version: 0.9.2
Release: 2 Release: 3
Copyright: BSD Copyright: BSD
Group: User Interface/X Group: User Interface/X
Requires: imlib2, imlib2-loader_jpeg, imlib2-loader_png
%if %{bzip} %if %{bzip}
Source0: ftp://ftp.eterm.org/pub/Eterm/%{name}-%{version}.tar.bz2 Source0: ftp://ftp.eterm.org/pub/Eterm/%{name}-%{version}.tar.bz2
Source1: ftp://ftp.eterm.org/pub/Eterm/%{name}-bg-%{version}.tar.bz2 Source1: ftp://ftp.eterm.org/pub/Eterm/%{name}-bg-%{version}.tar.bz2

View File

@ -475,7 +475,7 @@ ns_magic_disp(_ns_sess ** s, _ns_disp ** d)
return NS_SUCC; return NS_SUCC;
} else if (s && *s) { } else if (s && *s) {
if (!(*s)->curr) { if (!(*s)->curr) {
if ((*s)->curr = (*s)->dsps) if (((*s)->curr = (*s)->dsps))
return NS_SUCC; return NS_SUCC;
} else } else
return NS_SUCC; return NS_SUCC;
@ -801,6 +801,9 @@ ns_desc_twin(_ns_sess * sess, char *doc)
D_ESCREEN(("%s: twin status (%s) is %d-%s, %d-%s\n", doc, sess->twin_str, D_ESCREEN(("%s: twin status (%s) is %d-%s, %d-%s\n", doc, sess->twin_str,
Tw_Errno(sess->twin), Tw_Errno(sess->twin),
Tw_StrError(sess->twin, Tw_Errno(sess->twin)), Tw_ErrnoDetail(sess->twin), Tw_StrErrorDetail(sess->twin, Tw_Errno(sess->twin), Tw_ErrnoDetail(sess->twin)))); Tw_StrError(sess->twin, Tw_Errno(sess->twin)), Tw_ErrnoDetail(sess->twin), Tw_StrErrorDetail(sess->twin, Tw_Errno(sess->twin), Tw_ErrnoDetail(sess->twin))));
#else
USE_VAR(sess);
USE_VAR(doc);
#endif #endif
} }
@ -994,6 +997,8 @@ ns_make_call(_ns_sess * sess)
ns_free(&tmp); ns_free(&tmp);
return twin; return twin;
} }
#else
USE_VAR(twin);
#endif #endif
/* unless decidedly in other mode... */ /* unless decidedly in other mode... */
if (sess->backend != NS_MODE_SCREEN) if (sess->backend != NS_MODE_SCREEN)
@ -1311,7 +1316,9 @@ ns_attach_by_URL(char *url, char *hop, _ns_efuns ** ef, int *err, void *xd)
} }
} else } else
# endif # endif
; {
NOP;
}
while (*r && (f || *r != ' ')) { while (*r && (f || *r != ' ')) {
if (*r == '\"') if (*r == '\"')
f = 1 - f; f = 1 - f;
@ -1645,7 +1652,6 @@ ns_sbb_disp(_ns_sess * s, int no)
int int
ns_rel_disp(_ns_sess * s, int d) ns_rel_disp(_ns_sess * s, int d)
{ {
int n;
_ns_disp *x; _ns_disp *x;
if (!s) if (!s)
@ -1761,6 +1767,10 @@ ns_mov_disp(_ns_sess * s, int fm, int to)
int int
ns_rsz_disp(_ns_sess * s, int d, int w, int h) ns_rsz_disp(_ns_sess * s, int d, int w, int h)
{ {
USE_VAR(d);
USE_VAR(w);
USE_VAR(h);
if (!s) { if (!s) {
return NS_FAIL; return NS_FAIL;
} }
@ -1775,8 +1785,7 @@ ns_rsz_disp(_ns_sess * s, int d, int w, int h)
int int
ns_rem_disp(_ns_sess * s, int d, int ask) ns_rem_disp(_ns_sess * s, int d, int ask)
{ {
char *i = NULL, *n; char *i = NULL;
size_t l;
int ret = NS_FAIL; int ret = NS_FAIL;
if (!s) { if (!s) {
@ -1878,6 +1887,9 @@ ns_ren_disp(_ns_sess * s, int d, char *name)
int int
ns_log_disp(_ns_sess * s, int d, char *logfile) ns_log_disp(_ns_sess * s, int d, char *logfile)
{ {
USE_VAR(d);
USE_VAR(logfile);
if (!s) { if (!s) {
return NS_FAIL; return NS_FAIL;
} }
@ -1904,6 +1916,7 @@ ns_tog_region(_ns_sess * s, _ns_disp * d)
int int
ns_go2_region(_ns_sess * s, _ns_disp * d, int n) ns_go2_region(_ns_sess * s, _ns_disp * d, int n)
{ {
USE_VAR(n);
return ns_magic_disp(&s, &d); return ns_magic_disp(&s, &d);
} }
@ -1941,6 +1954,9 @@ ns_add_region(_ns_sess * s, _ns_disp * d, int after, char *name)
{ {
int ret = NS_FAIL; int ret = NS_FAIL;
USE_VAR(after);
USE_VAR(name);
if (ns_magic_disp(&s, &d) == NS_FAIL) if (ns_magic_disp(&s, &d) == NS_FAIL)
return NS_FAIL; return NS_FAIL;
@ -1959,6 +1975,10 @@ ns_add_region(_ns_sess * s, _ns_disp * d, int after, char *name)
int int
ns_rsz_region(_ns_sess * s, _ns_disp * d, int r, int w, int h) ns_rsz_region(_ns_sess * s, _ns_disp * d, int r, int w, int h)
{ {
USE_VAR(r);
USE_VAR(w);
USE_VAR(h);
return ns_magic_disp(&s, &d); return ns_magic_disp(&s, &d);
} }
@ -1967,6 +1987,9 @@ ns_rem_region(_ns_sess * s, _ns_disp * d, int r, int ask)
{ {
int ret = NS_FAIL; int ret = NS_FAIL;
USE_VAR(r);
USE_VAR(ask);
if (ns_magic_disp(&s, &d) == NS_FAIL) if (ns_magic_disp(&s, &d) == NS_FAIL)
return NS_FAIL; return NS_FAIL;
@ -1987,6 +2010,8 @@ ns_one_region(_ns_sess * s, _ns_disp * d, int r)
{ {
int ret = NS_FAIL; int ret = NS_FAIL;
USE_VAR(r);
if (ns_magic_disp(&s, &d) == NS_FAIL) if (ns_magic_disp(&s, &d) == NS_FAIL)
return NS_FAIL; return NS_FAIL;
@ -2005,30 +2030,38 @@ ns_one_region(_ns_sess * s, _ns_disp * d, int r)
int int
ns_mov_region(_ns_sess * s, _ns_disp * d, int fm, int to) ns_mov_region(_ns_sess * s, _ns_disp * d, int fm, int to)
{ {
USE_VAR(fm);
USE_VAR(to);
return ns_magic_disp(&s, &d); return ns_magic_disp(&s, &d);
} }
int int
ns_ren_region(_ns_sess * s, _ns_disp * d, int r, char *name) ns_ren_region(_ns_sess * s, _ns_disp * d, int r, char *name)
{ {
USE_VAR(r);
USE_VAR(name);
return ns_magic_disp(&s, &d); return ns_magic_disp(&s, &d);
} }
int int
ns_log_region(_ns_sess * s, _ns_disp * d, int r, char *logfile) ns_log_region(_ns_sess * s, _ns_disp * d, int r, char *logfile)
{ {
USE_VAR(r);
USE_VAR(logfile);
return ns_magic_disp(&s, &d); return ns_magic_disp(&s, &d);
} }
int int
ns_mon_region(_ns_sess * s, _ns_disp * d, int r) ns_mon_region(_ns_sess * s, _ns_disp * d, int r)
{ {
USE_VAR(r);
return ns_magic_disp(&s, &d); return ns_magic_disp(&s, &d);
} }
int int
ns_sbb_region(_ns_sess * s, _ns_disp * d, int r) ns_sbb_region(_ns_sess * s, _ns_disp * d, int r)
{ {
USE_VAR(r);
return ns_magic_disp(&s, &d); return ns_magic_disp(&s, &d);
} }
@ -2044,6 +2077,8 @@ ns_sbb_region(_ns_sess * s, _ns_disp * d, int r)
int int
ns_scroll2x(_ns_sess * s, int x) ns_scroll2x(_ns_sess * s, int x)
{ {
USE_VAR(x);
if (!s) { if (!s) {
return NS_FAIL; return NS_FAIL;
} }
@ -2055,6 +2090,8 @@ ns_scroll2x(_ns_sess * s, int x)
int int
ns_scroll2y(_ns_sess * s, int y) ns_scroll2y(_ns_sess * s, int y)
{ {
USE_VAR(y);
if (!s) { if (!s) {
return NS_FAIL; return NS_FAIL;
} }
@ -2132,6 +2169,8 @@ ns_statement(_ns_sess * s, char *c)
int int
ns_reset(_ns_sess * s, int type) ns_reset(_ns_sess * s, int type)
{ {
USE_VAR(type);
if (!s) { if (!s) {
return NS_FAIL; return NS_FAIL;
} }
@ -2154,6 +2193,8 @@ ns_get_url(_ns_sess * s, int d)
char esc[] = "^_\0"; char esc[] = "^_\0";
char lit[] = "^_\0"; char lit[] = "^_\0";
USE_VAR(d);
if (!s) { if (!s) {
return NULL; return NULL;
} }

View File

@ -2185,7 +2185,7 @@ scr_search_scrollback(char *str)
for (s = strstr(c, str); s; s = strstr(s + 1, str)) { for (s = strstr(c, str); s; s = strstr(s + 1, str)) {
unsigned long j; unsigned long j;
col = (int) s - (int) c; col = (long) s - (long) c;
for (i = screen.rend[row] + col, j = 0; j < len; i++, j++) { for (i = screen.rend[row] + col, j = 0; j < len; i++, j++) {
if (*i & RS_RVid) { if (*i & RS_RVid) {
*i &= ~RS_RVid; *i &= ~RS_RVid;
@ -2202,7 +2202,7 @@ scr_search_scrollback(char *str)
if ((row < rows - 1) && !strncasecmp(s, str, k) && screen.text[row + 1] if ((row < rows - 1) && !strncasecmp(s, str, k) && screen.text[row + 1]
&& !strncasecmp(screen.text[row + 1], str + k, len - k)) { && !strncasecmp(screen.text[row + 1], str + k, len - k)) {
col = (int) s - (int) c; col = (long) s - (long) c;
for (i = &(screen.rend[row][cols - k]), j = 0; j < k; i++, j++) { for (i = &(screen.rend[row][cols - k]), j = 0; j < k; i++, j++) {
(*i & RS_RVid) ? (*i &= ~RS_RVid) : (*i |= RS_RVid); (*i & RS_RVid) ? (*i &= ~RS_RVid) : (*i |= RS_RVid);
} }

View File

@ -18,6 +18,7 @@ static const char cvs_ident[] = "$Id$";
# include <unistd.h> # include <unistd.h>
#endif #endif
#include <errno.h> #include <errno.h>
#include <libast.h>
#ifdef PIXMAP_SUPPORT #ifdef PIXMAP_SUPPORT
#include <X11/Xlib.h> #include <X11/Xlib.h>
@ -267,6 +268,8 @@ main(int argc, char *argv[])
XFlush(Xdisplay); XFlush(Xdisplay);
} }
#else #else
USE_VAR(argc);
USE_VAR(argv);
fprintf(stderr, "Eterm was built without pixmap support, so Esetroot is fairly useless. Sorry.\n"); fprintf(stderr, "Eterm was built without pixmap support, so Esetroot is fairly useless. Sorry.\n");
#endif #endif
return 0; return 0;