diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2001-04-02 01:02:30 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2001-04-02 01:02:30 -0400 |
commit | 8c68f693cc82e6650afff52fe478c0ccde4bc015 (patch) | |
tree | 395cb6842d38654cda008ac0524564f59d959392 /WWW/Library/Implementation/HTNews.c | |
parent | 4bb52da7b05bb0a4331325010be89a0c630f671c (diff) | |
download | lynx-snapshots-8c68f693cc82e6650afff52fe478c0ccde4bc015.tar.gz |
snapshot of project "lynx", label v2-8-4dev_20
Diffstat (limited to 'WWW/Library/Implementation/HTNews.c')
-rw-r--r-- | WWW/Library/Implementation/HTNews.c | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/WWW/Library/Implementation/HTNews.c b/WWW/Library/Implementation/HTNews.c index b404733b..19be48c8 100644 --- a/WWW/Library/Implementation/HTNews.c +++ b/WWW/Library/Implementation/HTNews.c @@ -209,7 +209,7 @@ PRIVATE BOOL initialize NOARGS HTNewsHost)); } else { char server_name[256]; - FILE* fp = fopen(SERVER_FILE, "r"); + FILE* fp = fopen(SERVER_FILE, TXT_R); if (fp) { if (fscanf(fp, "%s", server_name)==1) { StrAllocCopy(HTNewsHost, server_name); @@ -407,8 +407,7 @@ PRIVATE NNTPAuthResult HTHandleAuthInfo ARGS1( /* ** Store the accepted username and no password. - FM */ - if ((auth = - (NNTPAuth *)calloc(1, sizeof(NNTPAuth))) != NULL) { + if ((auth = typecalloc(NNTPAuth)) != NULL) { StrAllocCopy(auth->host, host); auth->user = UserName; HTList_appendObject(NNTP_AuthInfo, auth); @@ -515,8 +514,7 @@ PRIVATE NNTPAuthResult HTHandleAuthInfo ARGS1( auth->pass = PassWord; } } else { - if ((auth = - (NNTPAuth *)calloc(1, sizeof(NNTPAuth))) != NULL) { + if ((auth = typecalloc(NNTPAuth)) != NULL) { StrAllocCopy(auth->host, host); auth->user = UserName; auth->pass = PassWord; @@ -847,12 +845,7 @@ PRIVATE void post_article ARGS1( ** Open the temporary file with the ** nntp headers and message body. - FM */ -#ifdef DOSPATH - if ((fd = fopen((postfile ? postfile : ""), "rt")) == NULL) -#else - if ((fd = fopen((postfile ? postfile : ""), "r")) == NULL) -#endif - { + if ((fd = fopen((postfile ? postfile : ""), TXT_R)) == NULL) { HTAlert(FAILED_CANNOT_OPEN_POST); return; } @@ -970,12 +963,6 @@ void debug_print(unsigned char *p) } #endif -#ifdef NOTUSED_CHARTRANS -static char *decode_mime(char *str) -{ - return HTmmdecode(str, str); -} -#else static char *decode_mime(char *str) { char temp[LINE_LENGTH]; /* FIXME: what determines the actual size? */ @@ -1006,17 +993,12 @@ static char *decode_mime(char *str) return str; } -#endif /* NOTUSED_CHARTRANS */ #else /* !SH_EX */ static char *decode_mime ARGS1(char *, str) { -#ifdef NOTUSED_CHARTRANS - return HTmmdecode(str, str); -#else HTmmdecode(str, str); HTrjis(str, str); return str; -#endif } #endif |