diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2008-01-07 23:51:16 -0500 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2008-01-07 23:51:16 -0500 |
commit | 92e120361baf8d55566015fe7bf09ac91f06a6e6 (patch) | |
tree | f39737c1ee6ee1c7e174df97e978b33c11c78238 /src | |
parent | 297adfacb3d8f416878b4abff8db35df6366aaa8 (diff) | |
download | lynx-snapshots-92e120361baf8d55566015fe7bf09ac91f06a6e6.tar.gz |
snapshot of project "lynx", label v2-8-7dev_7c
Diffstat (limited to 'src')
-rw-r--r-- | src/LYMain.c | 14 | ||||
-rw-r--r-- | src/LYUtils.c | 4 | ||||
-rw-r--r-- | src/LYrcFile.c | 10 | ||||
-rw-r--r-- | src/UCAuto.c | 3 | ||||
-rw-r--r-- | src/chrtrans/makeuctb.c | 15 |
5 files changed, 21 insertions, 25 deletions
diff --git a/src/LYMain.c b/src/LYMain.c index 15b635e9..1f0502ec 100644 --- a/src/LYMain.c +++ b/src/LYMain.c @@ -1,4 +1,4 @@ -/* $LynxId: LYMain.c,v 1.176 2008/01/03 00:41:55 Joey.Schulze Exp $ */ +/* $LynxId: LYMain.c,v 1.177 2008/01/06 18:55:37 tom Exp $ */ #include <HTUtils.h> #include <HTTP.h> #include <HTParse.h> @@ -61,14 +61,6 @@ #include <LYexit.h> #include <LYLeaks.h> -#ifdef FNAMES_8_3 -#define COOKIE_FILE "cookies" -#define TRACE_FILE "LY-TRACE.LOG" -#else -#define COOKIE_FILE ".lynx_cookies" -#define TRACE_FILE "Lynx.trace" -#endif /* FNAMES_8_3 */ - /* ahhhhhhhhhh!! Global variables :-< */ #ifdef SOCKS BOOLEAN socks_flag = TRUE; @@ -1379,7 +1371,7 @@ int main(int argc, * Set up the TRACE log path, and logging if appropriate. - FM */ if ((cp = LYGetEnv("LYNX_TRACE_FILE")) == 0) - cp = TRACE_FILE; + cp = FNAME_LYNX_TRACE; LYTraceLogPath = typeMallocn(char, LY_MAXPATH); LYAddPathToHome(LYTraceLogPath, LY_MAXPATH, cp); @@ -1697,7 +1689,7 @@ int main(int argc, if (LYCookieFile == NULL) { LYCookieFile = typeMallocn(char, LY_MAXPATH); - LYAddPathToHome(LYCookieFile, LY_MAXPATH, COOKIE_FILE); + LYAddPathToHome(LYCookieFile, LY_MAXPATH, FNAME_LYNX_COOKIES); } else { LYTildeExpand(&LYCookieFile, FALSE); } diff --git a/src/LYUtils.c b/src/LYUtils.c index e2ef3e0f..df8a516a 100644 --- a/src/LYUtils.c +++ b/src/LYUtils.c @@ -1,4 +1,4 @@ -/* $LynxId: LYUtils.c,v 1.164 2007/11/12 00:54:18 tom Exp $ */ +/* $LynxId: LYUtils.c,v 1.165 2008/01/06 18:31:26 Thorsten.Glaser Exp $ */ #include <HTUtils.h> #include <HTTCP.h> #include <HTParse.h> @@ -5903,7 +5903,7 @@ static BOOL IsOurSymlink(const char *name) if (cutoff != 0) { HTSprintf0(&clone, "%.*s%s%s", - cutoff - name, + (int) (cutoff - name), name, PATHSEP_STR, buffer); FREE(buffer); buffer = clone; diff --git a/src/LYrcFile.c b/src/LYrcFile.c index b50bc416..06a5e913 100644 --- a/src/LYrcFile.c +++ b/src/LYrcFile.c @@ -1,4 +1,4 @@ -/* $LynxId: LYrcFile.c,v 1.68 2007/05/23 00:22:06 tom Exp $ */ +/* $LynxId: LYrcFile.c,v 1.71 2008/01/06 18:51:40 tom Exp $ */ #include <HTUtils.h> #include <HTFTP.h> #include <LYUtils.h> @@ -13,12 +13,6 @@ #include <LYLeaks.h> -#ifdef FNAMES_8_3 -#define FNAME_LYNXRC "lynx.rc" -#else -#define FNAME_LYNXRC ".lynxrc" -#endif /* FNAMES_8_3 */ - #define MSG_ENABLE_LYNXRC N_("Normally disabled. See ENABLE_LYNXRC in lynx.cfg\n") #define putBool(value) ((value) ? "on" : "off") /* *INDENT-OFF* */ @@ -358,7 +352,7 @@ settings made here.\n\ #ifdef USE_PERSISTENT_COOKIES PARSE_STR(RC_COOKIE_FILE, LYCookieFile, N_("\ cookie_file specifies the file from which to read persistent cookies.\n\ -The default is ~/.lynx_cookies.\n\ +The default is ~/" FNAME_LYNX_COOKIES ".\n\ ")), #endif PARSE_STR(RC_COOKIE_LOOSE_INVALID_DOMAINS, LYCookieLooseCheckDomains, N_("\ diff --git a/src/UCAuto.c b/src/UCAuto.c index 26d6bda8..92378f9c 100644 --- a/src/UCAuto.c +++ b/src/UCAuto.c @@ -1,4 +1,6 @@ /* + * $LynxId: UCAuto.c,v 1.37 2008/01/07 23:51:16 tom Exp $ + * * This file contains code for changing the Linux console mode. * Currently some names for font files are hardwired in here. * You have to change this code if it needs accommodation for your @@ -29,6 +31,7 @@ #ifdef EXP_CHARTRANS_AUTOSWITCH #include <HTFile.h> +#include <www_wait.h> #ifdef LINUX #include <sysexits.h> /* EX_DATAERR, etc. */ diff --git a/src/chrtrans/makeuctb.c b/src/chrtrans/makeuctb.c index 43110496..24372894 100644 --- a/src/chrtrans/makeuctb.c +++ b/src/chrtrans/makeuctb.c @@ -1,5 +1,5 @@ /* - * $LynxId: makeuctb.c,v 1.35 2007/07/31 20:32:32 Tim.Larson Exp $ + * $LynxId: makeuctb.c,v 1.36 2008/01/06 18:23:33 tom Exp $ * * makeuctb.c, derived from conmakehash.c - kw * @@ -294,7 +294,7 @@ int main(int argc, char **argv) FILE *ctbl; char buffer[65536]; - char outname[256]; + char *outname = 0; unsigned n; int fontlen; int i, nuni, nent; @@ -327,12 +327,15 @@ int main(int argc, char **argv) } else if (ctbl == stdin) { chdr = stdout; hdrname = "stdout"; - } else { + } else if ((outname = malloc(strlen(tblname) + 3)) != 0) { strcpy(outname, tblname); hdrname = outname; if ((p = strrchr(outname, '.')) == 0) p = outname + strlen(outname); strcpy(p, ".h"); + } else { + perror("malloc"); + done(EX_NOINPUT); } if (chdr == 0) { @@ -541,7 +544,11 @@ int main(int argc, char **argv) continue; } - tbuf = (char *) malloc(4 * strlen(p)); + /* + * Allocate a string large enough for the worst-case use in the + * loop using sprintf. + */ + tbuf = (char *) malloc(5 * strlen(p)); if (!(p1 = tbuf)) { fprintf(stderr, "%s: Out of memory\n", tblname); |