diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/GridText.c | 6 | ||||
-rw-r--r-- | src/LYCookie.c | 4 | ||||
-rw-r--r-- | src/LYCurses.h | 14 | ||||
-rw-r--r-- | src/LYJump.c | 2 | ||||
-rw-r--r-- | src/LYMain.c | 2 | ||||
-rw-r--r-- | src/LYNews.c | 2 | ||||
-rw-r--r-- | src/LYStrings.c | 4 | ||||
-rw-r--r-- | src/LYUtils.c | 8 |
8 files changed, 17 insertions, 25 deletions
diff --git a/src/GridText.c b/src/GridText.c index af7d2422..4562103c 100644 --- a/src/GridText.c +++ b/src/GridText.c @@ -8014,7 +8014,7 @@ PUBLIC BOOLEAN HTreparse_document NOARGS } CTRACE((tfp, " Content type is \"%s\"\n", format->name)); - fp = fopen(HTMainAnchor->source_cache_file, TXT_R); + fp = fopen(HTMainAnchor->source_cache_file, "r"); if (!fp) { CTRACE((tfp, " Cannot read file %s\n", HTMainAnchor->source_cache_file)); LYRemoveTemp(HTMainAnchor->source_cache_file); @@ -12035,7 +12035,7 @@ PUBLIC int HText_ExtEditForm ARGS1( return 0; } - fp = fopen (ed_temp, TXT_R); + fp = fopen (ed_temp, "r"); size = fread (ebuf, 1, size, fp); LYCloseInput (fp); ebuf[size] = '\0'; /* Terminate! - kw */ @@ -12425,7 +12425,7 @@ PUBLIC int HText_InsertFile ARGS1( */ LYGetFileInfo(fn, 0, 0, 0, 0, 0, &file_cs); - fp = fopen (fn, TXT_R); + fp = fopen (fn, "r"); if (!fp) { free(fbuf); free(fn); diff --git a/src/LYCookie.c b/src/LYCookie.c index 163b84c4..b9a77f3d 100644 --- a/src/LYCookie.c +++ b/src/LYCookie.c @@ -678,7 +678,7 @@ PRIVATE char * scan_cookie_sublist ARGS6( host_matches(hostname, co->domain), path, co->path, (co->pathlen > 0) - ? !is_prefix(path, co->path) + ? !is_prefix(co->path, path) : 0, (co->flags & COOKIE_FLAG_SECURE) ? " secure" @@ -700,7 +700,7 @@ PRIVATE char * scan_cookie_sublist ARGS6( */ if (((co != NULL) && host_matches(hostname, co->domain)) && - (co->pathlen == 0 || is_prefix(path, co->path))) { + (co->pathlen == 0 || is_prefix(co->path, path))) { /* * Skip if the secure flag is set and we don't have * a secure connection. HTTP.c presently treats only diff --git a/src/LYCurses.h b/src/LYCurses.h index ff38908f..5a25d102 100644 --- a/src/LYCurses.h +++ b/src/LYCurses.h @@ -183,14 +183,10 @@ typedef struct { # ifdef HAVE_JCURSES_H # include <jcurses.h> /* sony_news */ # else -# ifdef PDCURSES -# include <pdcurses.h> /* for PDCurses */ +# ifdef HAVE_XCURSES +# include <xcurses.h> /* PDCurses' UNIX port */ # else -# ifdef HAVE_XCURSES -# include <xcurses.h> /* PDCurses' UNIX port */ -# else -# include <curses.h> /* default */ -# endif +# include <curses.h> /* default */ # endif # endif # endif @@ -218,12 +214,8 @@ typedef struct { #else # if defined(VMS) && defined(__GNUC__) # include <LYGCurses.h> -# else -# ifdef PDCURSES /* 1999/07/15 (Thu) 08:27:48 */ -# include <pdcurses.h> /* for PDCurses */ # else # include <curses.h> /* everything else */ -# endif /* not PDCURSES */ # endif /* VMS && __GNUC__ */ #endif /* HAVE_CONFIG_H */ diff --git a/src/LYJump.c b/src/LYJump.c index d28468dc..478ddfc9 100644 --- a/src/LYJump.c +++ b/src/LYJump.c @@ -387,7 +387,7 @@ PRIVATE unsigned LYRead_Jumpfile ARGS1(struct JumpTable *,jtp) if (st.st_fab_rfm != (char)FAB$C_STMLF) { /** It's a record-oriented file. **/ IsStream_LF = FALSE; - if ((fp = fopen(jtp->file, TXT_R, "mbc=32")) == NULL) { + if ((fp = fopen(jtp->file, "r", "mbc=32")) == NULL) { HTAlert(CANNOT_OPEN_JUMP_FILE); FREE(mp); return 0; diff --git a/src/LYMain.c b/src/LYMain.c index e93f1894..177384c6 100644 --- a/src/LYMain.c +++ b/src/LYMain.c @@ -2205,7 +2205,7 @@ PUBLIC void reload_read_cfg NOARGS /* * Process the temporary RC file. */ - rcfp = fopen(tempfile, TXT_R); + rcfp = fopen(tempfile, "r"); read_rc(rcfp); LYRemoveTemp(tempfile); FREE(tempfile); /* done with it - kw */ diff --git a/src/LYNews.c b/src/LYNews.c index 0755d17f..23906a44 100644 --- a/src/LYNews.c +++ b/src/LYNews.c @@ -36,7 +36,7 @@ PRIVATE BOOLEAN message_has_content ARGS2( *nonspaces = FALSE; - if (!filename || (fp = fopen(filename, TXT_R)) == NULL) { + if (!filename || (fp = fopen(filename, "r")) == NULL) { CTRACE((tfp, "Failed to open file %s for reading!\n", NONNULL(filename))); return FALSE; diff --git a/src/LYStrings.c b/src/LYStrings.c index ac164295..fa9927a3 100644 --- a/src/LYStrings.c +++ b/src/LYStrings.c @@ -1245,7 +1245,7 @@ PRIVATE int read_keymap_file NOARGS LYAddPathToHome(file, sizeof(file), FNAME_LYNX_KEYMAPS); - if ((fp = fopen (file, TXT_R)) == 0) + if ((fp = fopen (file, "r")) == 0) return 0; linenum = 0; @@ -1593,7 +1593,7 @@ re_read: if (new_fd >= 0) { FILE *frp; close(new_fd); - frp = freopen(term_name, TXT_R, stdin); + frp = freopen(term_name, "r", stdin); CTRACE((tfp, "nozap: freopen(%s,\"r\",stdin) returned %p, stdin is now %p with fd %d.\n", term_name, frp, stdin, fileno(stdin))); diff --git a/src/LYUtils.c b/src/LYUtils.c index b6d01ab8..f3bcc1e0 100644 --- a/src/LYUtils.c +++ b/src/LYUtils.c @@ -2262,7 +2262,7 @@ PUBLIC int HTCheckForInterrupt NOARGS int c; int cmd; #ifndef VMS /* UNIX stuff: */ -#if !defined(USE_SLANG) && defined(UNIX) +#if !defined(USE_SLANG) && (defined(UNIX) || defined(__DJGPP__)) struct timeval socket_timeout; int ret = 0; fd_set readfds; @@ -3197,7 +3197,7 @@ PUBLIC BOOLEAN LYCloseOutput ARGS1( PUBLIC BOOLEAN LYCanWriteFile ARGS1( CONST char*, filename) { - if (LYCloseOutput(fopen(filename, TXT_W))) { + if (LYCloseOutput(fopen(filename, "w"))) { remove(filename); return TRUE; } else { @@ -3214,7 +3214,7 @@ PUBLIC BOOLEAN LYCanReadFile ARGS1( { FILE *fp; - if ((fp = fopen(filename, TXT_R)) != 0) { + if ((fp = fopen(filename, "r")) != 0) { return LYCloseInput(fp); } return FALSE; @@ -3259,7 +3259,7 @@ PUBLIC BOOLEAN inlocaldomain NOARGS if ((cp = ttyname(0))) mytty = strrchr(cp, '/'); - if (mytty && (fp = fopen(UTMP_FILE, TXT_R)) != NULL) { + if (mytty && (fp = fopen(UTMP_FILE, "r")) != NULL) { mytty++; do { n = fread((char *) &me, sizeof(struct utmp), 1, fp); |