"Fossies" - the Fresh Open Source Software Archive  

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

save.c  (tin-2.4.4.tar.xz):save.c  (tin-2.4.5.tar.xz)
/* /*
* Project : tin - a Usenet reader * Project : tin - a Usenet reader
* Module : save.c * Module : save.c
* Author : I. Lea & R. Skrenta * Author : I. Lea & R. Skrenta
* Created : 1991-04-01 * Created : 1991-04-01
* Updated : 2019-06-05 * Updated : 2020-04-23
* Notes : * Notes :
* *
* Copyright (c) 1991-2020 Iain Lea <iain@bricbrac.de>, Rich Skrenta <skrenta@pb m.com> * Copyright (c) 1991-2021 Iain Lea <iain@bricbrac.de>, Rich Skrenta <skrenta@pb m.com>
* 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 996 skipping to change at line 996
case END: case END:
default: default:
break; break;
} /* switch (state) */ } /* switch (state) */
if (state == END) { if (state == END) {
/* set the mode after getting rid of dangerous bi ts */ /* set the mode after getting rid of dangerous bi ts */
if (!(mode &= ~(S_ISUID|S_ISGID|S_ISVTX))) if (!(mode &= ~(S_ISUID|S_ISGID|S_ISVTX)))
mode = (S_IRUSR|S_IWUSR); mode = (S_IRUSR|S_IWUSR);
#ifdef HAVE_FCHMOD
fchmod(fileno(fp_out), mode); fchmod(fileno(fp_out), mode);
#else
# ifdef HAVE_CHMOD
chmod(path, mode);
# endif /* HAVE_CHMOD */
#endif /* HAVE_FCHMOD */
fclose(fp_out); fclose(fp_out);
fp_out = NULL; fp_out = NULL;
my_printf(_(txt_uu_success), filename); my_printf(_(txt_uu_success), filename);
my_printf(cCRLF); my_printf(cCRLF);
sum_file(path, filename); sum_file(path, filename);
if (curr_group->attribute->post_process_view) if (curr_group->attribute->post_process_view)
view_file(path, filename); view_file(path, filename);
state = INITIAL; state = INITIAL;
skipping to change at line 1327 skipping to change at line 1333
default: default:
fputs(buf, fp); fputs(buf, fp);
} }
} }
fclose(fp); fclose(fp);
/* /*
* View the attachment * View the attachment
*/ */
if ((postproc && curr_group->attribute->post_process_view) || !curr_group ->attribute->ask_for_metamail) { if ((postproc && curr_group->attribute->post_process_view) || !curr_group ->attribute->ask_for_metamail) {
start_viewer(part, savepath); start_viewer(part, savepath);
my_printf(cCRLF); my_printf(cCRLF);
} else { } else {
snprintf(buf, sizeof(buf), _(txt_view_attachment), savepath, cont ent_types[part->type], part->subtype); snprintf(buf, sizeof(buf), _(txt_view_attachment), savepath, cont ent_types[part->type], part->subtype);
if ((i = prompt_yn(buf, TRUE)) == 1) if ((i = prompt_yn(buf, TRUE)) == 1)
start_viewer(part, savepath); start_viewer(part, savepath);
else if (i == -1) { /* Skip rest of attachments */ else if (i == -1) { /* Skip rest of attachments */
unlink(savepath); unlink(savepath);
free(savepath); free(savepath);
return FALSE; return FALSE;
} }
} }
skipping to change at line 1506 skipping to change at line 1512
break; break;
} }
} }
/* /*
* TYPE_MULTIPART is an envelope type, don't process it. * TYPE_MULTIPART is an envelope type, don't process it.
* If we had an UUE part, the "surrounding" text/plain plays * If we had an UUE part, the "surrounding" text/plain plays
* the role of a multipart part. Check to see if we want to * the role of a multipart part. Check to see if we want to
* save text and if not, skip this part. * save text and if not, skip this part.
*/ */
/* check_save_mime_type() is done in decode_save_one() and the c heck for ptr->uue must be done unconditionally */ /* check_save_mime_type() is done in decode_save_one() and the ch eck for ptr->uue must be done unconditionally */
if (ptr->type == TYPE_MULTIPART || (NULL != ptr->uue /* && !check _save_mime_type(ptr, curr_group->attribute->mime_types_to_save) */ )) if (ptr->type == TYPE_MULTIPART || (NULL != ptr->uue /* && !check _save_mime_type(ptr, curr_group->attribute->mime_types_to_save) */ ))
continue; continue;
if (!(decode_save_one(ptr, art->raw, postproc))) if (!(decode_save_one(ptr, art->raw, postproc)))
break; break;
} }
} }
/* /*
* Attachment menu * Attachment menu
 End of changes. 6 change blocks. 
5 lines changed or deleted 11 lines changed or added

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