diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2009-09-05 15:58:10 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2009-09-05 15:58:10 +0000 |
commit | 0bfe30f1f8426d3e7c82459bca752530d6a1e469 (patch) | |
tree | 2e494b4882bc80ad74f39181476d95b64a340dfa /app/xterm/main.c | |
parent | 7e6bbbf222239c48377c748a99a9996f66fe68ac (diff) |
update to xterm 246. Has been in snapshots for some time.
Diffstat (limited to 'app/xterm/main.c')
-rw-r--r-- | app/xterm/main.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/app/xterm/main.c b/app/xterm/main.c index 9552cb816..98dd9228a 100644 --- a/app/xterm/main.c +++ b/app/xterm/main.c @@ -1,4 +1,4 @@ -/* $XTermId: main.c,v 1.589 2009/01/24 16:08:01 tom Exp $ */ +/* $XTermId: main.c,v 1.593 2009/08/07 23:14:47 tom Exp $ */ /* * W A R N I N G @@ -1351,9 +1351,9 @@ Syntax(char *badOption) ProgramName, badOption); fprintf(stderr, "usage: %s", ProgramName); - col = 8 + strlen(ProgramName); + col = 8 + (int) strlen(ProgramName); for (opt = list; opt->opt; opt++) { - int len = 3 + strlen(opt->opt); /* space [ string ] */ + int len = 3 + (int) strlen(opt->opt); /* space [ string ] */ if (col + len > 79) { fprintf(stderr, "\r\n "); /* 3 spaces */ col = 3; @@ -1531,7 +1531,7 @@ my_pty_id(char *device) char *leaf = x_basename(name); if (name == leaf) { /* no '/' in the name */ - int len = strlen(leaf); + int len = (int) strlen(leaf); if (PTYCHARLEN < len) leaf = leaf + (len - PTYCHARLEN); } @@ -1572,7 +1572,7 @@ ParseSccn(char *option) if (leaf - option > 0 && isdigit(CharOf(*leaf)) && sscanf(leaf, "%d", &am_slave) == 1) { - size_t len = leaf - option - 1; + size_t len = (size_t) (leaf - option - 1); /* * If we have a slash, we only care about the part after the slash, * which is a file-descriptor. The part before the slash can be @@ -1813,7 +1813,7 @@ main(int argc, char *argv[]ENVP_ARG) TRACE_ARGV("Before XtOpenApplication", argv); if (argc > 1) { int n; - unsigned unique = 2; + size_t unique = 2; Bool quit = True; for (n = 1; n < argc; n++) { @@ -2242,10 +2242,10 @@ main(int argc, char *argv[]ENVP_ARG) int n; char **c; for (n = 0, c = command_to_exec; *c; n++, c++) ; - c = TypeMallocN(char *, n + 3 + u); + c = TypeMallocN(char *, (unsigned) (n + 3 + u)); if (c == NULL) SysError(ERROR_LUMALLOC); - memcpy(c + 2 + u, command_to_exec, (n + 1) * sizeof(char *)); + memcpy(c + 2 + u, command_to_exec, (unsigned) (n + 1) * sizeof(char *)); c[0] = term->misc.localefilter; if (u) { c[1] = "-encoding"; @@ -2416,7 +2416,7 @@ main(int argc, char *argv[]ENVP_ARG) TekRun(); else #endif - VTRun(); + VTRun(term); } } @@ -3246,7 +3246,7 @@ spawnXTerm(XtermWidget xw) False); if (!TEK4014_ACTIVE(xw)) - VTInit(); /* realize now so know window size for tty driver */ + VTInit(xw); /* realize now so know window size for tty driver */ #if defined(TIOCCONS) || defined(SRIOCSREDIR) if (Console) { /* @@ -4096,7 +4096,7 @@ spawnXTerm(XtermWidget xw) { if (tslot > 0 && pw && !resource.utmpInhibit && (i = open(etc_utmp, O_WRONLY)) >= 0) { - bzero((char *) &utmp, sizeof(utmp)); + memset(&utmp, 0, sizeof(utmp)); (void) strncpy(utmp.ut_line, my_pty_name(ttydev), sizeof(utmp.ut_line)); @@ -4146,7 +4146,7 @@ spawnXTerm(XtermWidget xw) #ifdef USE_LASTLOGX if (xw->misc.login_shell) { - bzero((char *) &lastlogx, sizeof(lastlogx)); + memset(&lastlogx, 0, sizeof(lastlogx)); (void) strncpy(lastlogx.ll_line, my_pty_name(ttydev), sizeof(lastlogx.ll_line)); @@ -4162,7 +4162,7 @@ spawnXTerm(XtermWidget xw) size_t size = sizeof(struct lastlog); off_t offset = (screen->uid * size); - bzero((char *) &lastlog, size); + memset(&lastlog, 0, size); (void) strncpy(lastlog.ll_line, my_pty_name(ttydev), sizeof(lastlog.ll_line)); @@ -4644,7 +4644,7 @@ Exit(int n) TRACE_IDS; #endif if ((wfd = open(etc_utmp, O_WRONLY)) >= 0) { - bzero((char *) &utmp, sizeof(utmp)); + memset(&utmp, 0, sizeof(utmp)); lseek(wfd, (long) (tslot * sizeof(utmp)), 0); write(wfd, (char *) &utmp, sizeof(utmp)); close(wfd); @@ -4756,14 +4756,14 @@ resize_termcap(XtermWidget xw, char *newtc) } ptr1 += 3; ptr2 += 3; - strncpy(newtc, oldtc, i = ptr1 - oldtc); + strncpy(newtc, oldtc, i = (size_t) (ptr1 - oldtc)); temp = newtc + i; sprintf(temp, "%d", (li_first ? MaxRows(screen) : MaxCols(screen))); temp += strlen(temp); ptr1 = strchr(ptr1, ':'); - strncpy(temp, ptr1, i = ptr2 - ptr1); + strncpy(temp, ptr1, i = (size_t) (ptr2 - ptr1)); temp += i; sprintf(temp, "%d", (li_first ? MaxCols(screen) |