"Fossies" - the Fresh Open Source Software Archive  

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

thread.c  (tin-2.4.4.tar.xz):thread.c  (tin-2.4.5.tar.xz)
/* /*
* Project : tin - a Usenet reader * Project : tin - a Usenet reader
* Module : thread.c * Module : thread.c
* Author : I. Lea * Author : I. Lea
* Created : 1991-04-01 * Created : 1991-04-01
* Updated : 2017-03-28 * Updated : 2020-06-10
* 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 760 skipping to change at line 760
#endif /* HAVE_COLOR */ #endif /* HAVE_COLOR */
case GLOBAL_QUIT: /* return to prev ious level */ case GLOBAL_QUIT: /* return to prev ious level */
ret_code = GRP_EXIT; ret_code = GRP_EXIT;
break; break;
case GLOBAL_QUIT_TIN: /* quit */ case GLOBAL_QUIT_TIN: /* quit */
ret_code = GRP_QUIT; ret_code = GRP_QUIT;
break; break;
case THREAD_TAG_PARTS: /* tag/untag arti
cle */
/* Find index of current article */
if ((n = find_response(thread_basenote, thdmenu.c
urr)) < 0)
break;
else {
int old_num = num_of_tagged_arts;
if (tag_multipart(n) != 0) {
update_thread_page();
if (old_num < num_of_tagged_arts)
info_message(_(txt_info_a
ll_parts_tagged));
else
info_message(_(txt_info_a
ll_parts_untagged));
}
}
break;
case THREAD_TAG: /* tag/untag arti cle */ case THREAD_TAG: /* tag/untag arti cle */
/* Find index of current article */ /* Find index of current article */
if ((n = find_response(thread_basenote, thdmenu.c urr)) < 0) if ((n = find_response(thread_basenote, thdmenu.c urr)) < 0)
break; break;
else { else {
t_bool tagged; t_bool tagged;
if ((tagged = tag_article(n))) if ((tagged = tag_article(n)))
mark_screen(thdmenu.curr, mark_of fset - 2, tin_ltoa((&arts[n])->tagged, 3)); mark_screen(thdmenu.curr, mark_of fset - 2, tin_ltoa((&arts[n])->tagged, 3));
else else
skipping to change at line 1042 skipping to change at line 1060
/* /*
* Given an index into base[], find the number of responses for * Given an index into base[], find the number of responses for
* that basenote * that basenote
*/ */
int int
num_of_responses( num_of_responses(
int n) int n)
{ {
int i; int i;
int oldi = -3;
int sum = 0; int sum = 0;
#ifndef NDEBUG
int oldi = -3;
assert(n < grpmenu.max && n >= 0); assert(n < grpmenu.max && n >= 0);
#endif /* !NDEBUG */
for_each_art_in_thread(i, n) { for_each_art_in_thread(i, n) {
#ifndef NDEBUG
assert(i != ART_EXPIRED); assert(i != ART_EXPIRED);
assert(i != oldi); assert(i != oldi);
oldi = i; oldi = i;
#endif /* !NDEBUG */
sum++; sum++;
} }
return sum - 1; return sum - 1;
} }
/* /*
* Calculating the score of a thread has been extracted from stat_thread() * Calculating the score of a thread has been extracted from stat_thread()
* because we need it also in art.c to sort base[]. * because we need it also in art.c to sort base[].
* get_score_of_thread expects the number of the first article of a thread. * get_score_of_thread expects the number of the first article of a thread.
 End of changes. 8 change blocks. 
3 lines changed or deleted 29 lines changed or added

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