"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/init.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.

init.c  (tin-2.4.4.tar.xz):init.c  (tin-2.4.5.tar.xz)
/* /*
* Project : tin - a Usenet reader * Project : tin - a Usenet reader
* Module : init.c * Module : init.c
* Author : I. Lea * Author : I. Lea
* Created : 1991-04-01 * Created : 1991-04-01
* Updated : 2019-08-20 * Updated : 2020-09-28
* Notes : * Notes :
* *
* Copyright (c) 1991-2020 Iain Lea <iain@bricbrac.de> * Copyright (c) 1991-2021 Iain Lea <iain@bricbrac.de>
* 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 801 skipping to change at line 801
joinpath(news_active_file, sizeof(news_active_file), libdir, get_ val("TIN_ACTIVEFILE", ACTIVE_FILE)); joinpath(news_active_file, sizeof(news_active_file), libdir, get_ val("TIN_ACTIVEFILE", ACTIVE_FILE));
if (!*active_times_file) if (!*active_times_file)
joinpath(active_times_file, sizeof(active_times_file), libdir, AC TIVE_TIMES_FILE); joinpath(active_times_file, sizeof(active_times_file), libdir, AC TIVE_TIMES_FILE);
if (!*newsgroups_file) if (!*newsgroups_file)
joinpath(newsgroups_file, sizeof(newsgroups_file), libdir, NEWSGR OUPS_FILE); joinpath(newsgroups_file, sizeof(newsgroups_file), libdir, NEWSGR OUPS_FILE);
if (!*subscriptions_file) if (!*subscriptions_file)
joinpath(subscriptions_file, sizeof(subscriptions_file), libdir, SUBSCRIPTIONS_FILE); joinpath(subscriptions_file, sizeof(subscriptions_file), libdir, SUBSCRIPTIONS_FILE);
if (!*overviewfmt_file) if (!*overviewfmt_file)
joinpath(overviewfmt_file, sizeof(overviewfmt_file), libdir, OVER VIEW_FMT); joinpath(overviewfmt_file, sizeof(overviewfmt_file), libdir, OVER VIEW_FMT);
if (!*default_organization) { if (!*default_organization) {
char buf[LEN];
joinpath(tmp, sizeof(tmp), libdir, "organization"); joinpath(tmp, sizeof(tmp), libdir, "organization");
if ((fp = fopen(tmp, "r")) != NULL) { if ((fp = fopen(tmp, "r")) != NULL) {
char buf[LEN];
if (fgets(buf, (int) sizeof(buf), fp) != NULL) { if (fgets(buf, (int) sizeof(buf), fp) != NULL) {
ptr = strrchr(buf, '\n'); ptr = strrchr(buf, '\n');
if (ptr != NULL) if (ptr != NULL)
*ptr = '\0'; *ptr = '\0';
} }
fclose(fp); fclose(fp);
my_strncpy(default_organization, buf, sizeof(default_orga nization) - 1); my_strncpy(default_organization, buf, sizeof(default_orga nization) - 1);
} }
} }
skipping to change at line 910 skipping to change at line 910
joinpath(lock_file, sizeof(lock_file), TMPDIR, tmp); joinpath(lock_file, sizeof(lock_file), TMPDIR, tmp);
#ifdef NNTP_ABLE #ifdef NNTP_ABLE
nntp_tcp_port = (unsigned short) atoi(get_val("NNTPPORT", NNTP_TCP_PORT)) ; nntp_tcp_port = (unsigned short) atoi(get_val("NNTPPORT", NNTP_TCP_PORT)) ;
#endif /* NNTP_ABLE */ #endif /* NNTP_ABLE */
if ((fp = fopen(posted_info_file, "a")) != NULL) { if ((fp = fopen(posted_info_file, "a")) != NULL) {
if (!fstat(fileno(fp), &sb)) { if (!fstat(fileno(fp), &sb)) {
if (sb.st_size == 0) { if (sb.st_size == 0) {
fprintf(fp, "%s", _(txt_posted_info_file)); fprintf(fp, "%s", _(txt_posted_info_file));
#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(posted_info_file, (mode_t) (S_IRUSR|S_IWUSR
));
# endif /* HAVE_CHMOD */
#endif /* HAVE_FCHMOD */
} }
} }
fclose(fp); fclose(fp);
} }
init_postinfo(); init_postinfo();
snprintf(txt_help_bug_report, sizeof(txt_help_bug_report), _(txt_help_bug ), bug_addr); snprintf(txt_help_bug_report, sizeof(txt_help_bug_report), _(txt_help_bug ), bug_addr);
#ifdef HAVE_PGP_GPG #ifdef HAVE_PGP_GPG
init_pgp(); init_pgp();
 End of changes. 6 change blocks. 
4 lines changed or deleted 11 lines changed or added

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