"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/nrctbl.c" between
tin-2.4.4.tar.xz and tin-2.4.5.tar.xz

About: TIN is a threaded NNTP and spool based UseNet newsreader.

nrctbl.c  (tin-2.4.4.tar.xz):nrctbl.c  (tin-2.4.5.tar.xz)
/* /*
* Project : tin - a Usenet reader * Project : tin - a Usenet reader
* Module : nrctbl.c * Module : nrctbl.c
* Author : Sven Paulus <sven@tin.org> * Author : Sven Paulus <sven@tin.org>
* Created : 1996-10-06 * Created : 1996-10-06
* Updated : 2019-07-08 * Updated : 2020-04-23
* Notes : This module does the NNTP server name lookup in * Notes : This module does the NNTP server name lookup in
* ~/.tin/newsrctable and returns the real hostname * ~/.tin/newsrctable and returns the real hostname
* and the name of the newsrc file for a given * and the name of the newsrc file for a given
* alias of the server. * alias of the server.
* *
* Copyright (c) 1996-2020 Sven Paulus <sven@tin.org> * Copyright (c) 1996-2021 Sven Paulus <sven@tin.org>
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
* *
* 1. Redistributions of source code must retain the above copyright notice, * 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer. * this list of conditions and the following disclaimer.
* *
* 2. Redistributions in binary form must reproduce the above copyright * 2. Redistributions in binary form must reproduce the above copyright
skipping to change at line 72 skipping to change at line 72
static void static void
write_newsrctable_file( write_newsrctable_file(
void) void)
{ {
FILE *fp; FILE *fp;
if ((fp = fopen(local_newsrctable_file, "w")) == NULL) if ((fp = fopen(local_newsrctable_file, "w")) == NULL)
return; return;
fprintf(fp, _(txt_nrctbl_info), PRODUCT, VERSION); fprintf(fp, _(txt_nrctbl_info), PRODUCT, VERSION);
#ifdef HAVE_FCHMOD
fchmod(fileno(fp), (mode_t) (S_IRUSR|S_IWUSR)); fchmod(fileno(fp), (mode_t) (S_IRUSR|S_IWUSR));
#else
# ifdef HAVE_CHMOD
chmod(local_newsrctable_file, (mode_t) (S_IRUSR|S_IWUSR));
# endif /* HAVE_CHMOD */
#endif /* HAVE_FCHMOD */
fclose(fp); fclose(fp);
} }
#ifdef NNTP_ABLE #ifdef NNTP_ABLE
/* /*
* get_nntpserver() * get_nntpserver()
* returns the FQDN of NNTP server by looking up a given * returns the FQDN of NNTP server by looking up a given
* nickname or alias in the newsrctable * nickname or alias in the newsrctable
* ---> extend to allow nameserver-lookups, if search in table * ---> extend to allow nameserver-lookups, if search in table
* failed * failed
 End of changes. 4 change blocks. 
2 lines changed or deleted 8 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)