diff -Nru lusernet.app-0.4.2/ChangeLog lusernet.app-0.4.3/ChangeLog --- lusernet.app-0.4.2/ChangeLog 1970-01-01 00:00:00.000000000 +0000 +++ lusernet.app-0.4.3/ChangeLog 2015-03-13 19:17:43.000000000 +0000 @@ -0,0 +1,106 @@ +2015-03-13 Riccardo Mottola + + * NNTPServer.m + Fix signeddess problems. + +2015-03-11 Riccardo Mottola + + * ComposeWindowController.m + Setting the content of a message requres a NSString encoded in NSData, not just a string. + +2014-07-30 Riccardo Mottola + + * GNUMakefile + link with crypto + + * NNTPServer.h + Fix warning. + + * MsgDB.m + Fix warning through proper cast. + +2014-06-13 Riccardo Mottola + + * ComposeWindowController.h + Expose posedArticle in header. + +2014-06-12 Riccardo Mottola + + * main.h + * main.m + Use CWMessage instead of Message. + +2014-01-08 Riccardo Mottola + + * NNTPSource.m + Fix headers. + +2012-05-15 Riccardo Mottola + + * MessageViewController.m + Use isKindOfClass ! + +2012-05-15 Riccardo Mottola + + * MsgDB.m: + Update to new tunrime objc_lookUpClass + + * MessageViewController.m + * Pref_MessageViewing.m + * FolderListController.m + * main.m + Fix warnings and imports. + + * GNUmakefile: + Use GUI_LIBS + + * FolderWindowController.m + Add missing import. + +2012-04-13 Riccardo Mottola + + * MsgDB.m, + * Pref_Posting.m: + Fixed missing imports. + +2006-09-19 Sergey V. Golovin + + * main.m ([AppDelegate -changeEncoding:]): post + DefaultEncodingChangedNotification when done + + * main.m: new notification DefaultEncodingChangedNotification + + * ComposeWindowController.m: "DefaultEncoding" now influences all + messages that going to be posted (Yavor Doganov ) + + * NNTPSourceGUI.m ([NNTPSourcePropertiesController + -initWithNNTPSource:]): the NNTPSourcePropertiesController is + responsible for releasing its window ([win release] removed from + end of -initWithNNTPSource:) + + * MessageViewController.m ([MessageViewController -getData]): + - The "DefaultEncoding" should influence only such messages that + have no the content type header + - All normal messages are displayed with their charsets + + * MessageViewController.m ([MessageViewController -encodingChanged:]): added + ([MessageViewController -initWithMsgDB:textView:scrollView:]): now it + waits for DefaultEncodingChangedNotification to redisplay + immediately a message if it is needed. + +2006-09-04 Sergey Golovin + + * Pref_MessageViewing.m ([Pref_MessageViewing -willShow]): added + a pop-up button for charset selection + ([Pref_MessageViewing -changeEncoding:]): added + +2006-09-02 Sergey Golovin + + * MessageViewController.m ([MessageViewController -getData]): + - added from user defaults a charset header when a raw message has + no one + - added from user defaults a content type header when a raw + message has no one + + * synchronized with Pantomime 1.2 + diff -Nru lusernet.app-0.4.2/ComposeWindowController.h lusernet.app-0.4.3/ComposeWindowController.h --- lusernet.app-0.4.2/ComposeWindowController.h 2004-03-02 23:58:37.000000000 +0000 +++ lusernet.app-0.4.3/ComposeWindowController.h 2014-06-13 11:08:57.000000000 +0000 @@ -6,7 +6,7 @@ #define ComposeWindowController_h @class NSString,NSDictionary; -@class Message; +@class CWMessage; @class NSTextView,NSTextField,NSButton; @interface ComposeWindowController : NSWindowController @@ -25,7 +25,9 @@ - initWithHeaders: (NSDictionary *)headers quoteContent: (NSString *)content; - initWithHeaders: (NSDictionary *)headers; -- initWithFollowupToMessage: (Message *)msg; +- initWithFollowupToMessage: (CWMessage *)msg; + +-(void) postedArticle: (BOOL)success; @end diff -Nru lusernet.app-0.4.2/ComposeWindowController.m lusernet.app-0.4.3/ComposeWindowController.m --- lusernet.app-0.4.2/ComposeWindowController.m 2004-03-02 23:58:37.000000000 +0000 +++ lusernet.app-0.4.3/ComposeWindowController.m 2015-03-10 23:13:43.000000000 +0000 @@ -1,5 +1,6 @@ /* copyright 2002 Alexander Malmberg + 2015 Riccardo Mottola */ #include @@ -13,19 +14,23 @@ #include #include #include +#include #include #include +#include + #include "ComposeWindowController.h" #include "main.h" #include "KeyWindow.h" #include "Pref_Posting.h" +#include "Pref_MessageViewing.h" -#include -#include -#include -#include +#include +#include +#include +#include @implementation ComposeWindowController @@ -33,7 +38,7 @@ -(void) post: (id)sender { - Message *m=[[Message alloc] init]; + CWMessage *m=[[CWMessage alloc] init]; NSMutableDictionary *md; NSEnumerator *e; NSString *header,*value; @@ -64,7 +69,7 @@ if ([header isEqualToString: @"From"]) { - InternetAddress *ia=[[InternetAddress alloc] initWithString: value]; + CWInternetAddress *ia=[[CWInternetAddress alloc] initWithString: value]; [m setFrom: ia]; DESTROY(ia); } @@ -79,9 +84,21 @@ [m setContentType: @"text/plain"]; [m setContentTransferEncoding: PantomimeEncoding8bit]; [m setFormat: PantomimeFormatFlowed]; - [m setContent: [text string]]; - [m setCharset: [MimeUtility charsetForString: [text string]]]; + if(![Pref_MessageViewing defaultEncoding]) + { + NSLog(@"No default encoding, enconding message in UTF8"); + [m setCharset: @"utf-8"]; + [m setContent: [[text string] dataUsingEncoding:NSUTF8StringEncoding]]; + } + else + { + // FIXME we are getting back a charset + NSLog(@"encoding message with charset: %@", [Pref_MessageViewing defaultEncoding]); + [m setCharset: [Pref_MessageViewing defaultEncoding]]; + [m setContent: [[text string] dataUsingEncodingWithCharset:[Pref_MessageViewing defaultEncoding]]]; + } + state=1; d=[m dataValue]; @@ -386,7 +403,7 @@ } /* TODO: handle attributation, followup to sender, followup, etc. */ -- initWithFollowupToMessage: (Message *)msg +- initWithFollowupToMessage: (CWMessage *)msg { NSDictionary *headers; NSString *subject,*references; diff -Nru lusernet.app-0.4.2/.cvsignore lusernet.app-0.4.3/.cvsignore --- lusernet.app-0.4.2/.cvsignore 2002-02-19 21:54:49.000000000 +0000 +++ lusernet.app-0.4.3/.cvsignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -LuserNET.app -shared_obj -ChangeLog -group_list.txt -news.gdt -news.gpr - diff -Nru lusernet.app-0.4.2/debian/changelog lusernet.app-0.4.3/debian/changelog --- lusernet.app-0.4.2/debian/changelog 2019-01-22 23:44:05.000000000 +0000 +++ lusernet.app-0.4.3/debian/changelog 2019-01-25 08:13:43.000000000 +0000 @@ -1,44 +1,38 @@ -lusernet.app (0.4.2-7build7) disco; urgency=medium +lusernet.app (0.4.3-1) unstable; urgency=medium - * No-change rebuild against libpantomime1.3 - - -- Steve Langasek Tue, 22 Jan 2019 23:44:05 +0000 - -lusernet.app (0.4.2-7build6) disco; urgency=medium - - * No-change rebuild against libpantomime1.3 - - -- Steve Langasek Tue, 22 Jan 2019 17:58:07 +0000 - -lusernet.app (0.4.2-7build5) disco; urgency=medium - - * No-change rebuild for gnustep soname changes. - - -- Matthias Klose Thu, 17 Jan 2019 19:51:20 +0000 - -lusernet.app (0.4.2-7build4) bionic; urgency=medium - - * No-change rebuild for gnustep-gui soname change. - - -- Matthias Klose Tue, 30 Jan 2018 05:47:23 +0000 - -lusernet.app (0.4.2-7build3) bionic; urgency=medium - - * No-change rebuild for gnustep-base soname change. - - -- Matthias Klose Tue, 07 Nov 2017 08:26:02 +0000 - -lusernet.app (0.4.2-7build2) yakkety; urgency=medium - - * No-change rebuild for gnustep-gui 0.25 - - -- Matthias Klose Thu, 01 Sep 2016 21:11:55 +0000 - -lusernet.app (0.4.2-7build1) utopic; urgency=medium - - * Rebuild against libgnustep-gui0.24. + * New upstream release. + * Remove patches applied upstream: + - missing-includes.patch; + - link-order.patch; + - modern-objc-api.patch. + * debian/patches/pantomime1.2.patch: Remove most hunks which were + applied upstream. Retain only two which were skipped but are still + important; see #489879. Fix memory leaks there. + * debian/patches/gcc-warnings.patch: Remove hunks applied upstream; fix + another warning. + * debian/patches/spelling-fixes.patch: New; self-explanatory. + * debian/patches/no-crypto.patch: New; don't link with libcrypto. + * debian/patches/series: Update: + * debian/menu: Delete as per current Policy requirement. + * debian/compat: Bump to 12. + * debian/control (Build-Depends): Drop imagemagick. Replace + libpantomime1.2-dev with libpantomime-dev. Bump debhelper requirement + to match the compat level. Add gnustep-make >= 2.7.0-4 for proper + support for "terse" in DEB_BUILD_OPTIONS. + (Depends): Drop $(gnustep:Depends}; obsolete. + (Homepage): Set to the GNUstep wiki article. + (Vcs-Git, Vcs-Browser): Update following the migration to Salsa. + (Standards-Version): Claim compliance with 4.3.0 as of this release. + * debian/rules: Don't convert and install an .xpm icon for the menu. + Switch to modern dh; enable all hardening. Install upstream Changes + file as NEWS as it contains user-visible changes. + * debian/watch: Switch to Savannah. + * debian/changelog: Whitespace cleanup. + * debian/copyright: Add copyright/license notice for the icon; thanks + Paul Gevers. Update copyright years; add more copyright holders. + Switch to HTTPS; update source location. - -- Colin Watson Thu, 28 Aug 2014 11:17:03 -0700 + -- Yavor Doganov Fri, 25 Jan 2019 10:13:43 +0200 lusernet.app (0.4.2-7) unstable; urgency=medium @@ -87,7 +81,7 @@ lusernet.app (0.4.2-6) unstable; urgency=medium * debian/patches/07_missing-includes.dpatch: Update to fix FTBFS with - gnustep-base/1.20.1 (Closes: #593048). + gnustep-base/1.20.1 (Closes: #593048). * debian/control (Standards-Version): Set to 3.9.1 (no changes needed). -- Yavor Doganov Tue, 24 Aug 2010 18:39:30 +0300 @@ -170,13 +164,13 @@ * debian/menu: Updated for the new policy -- changed from `Apps/Net' to `Applications/Network/Communication'. * debian/preinst: Deleted; upgrades from Etch should work flawlessly. - + -- Yavor Doganov Sat, 20 Oct 2007 17:15:19 +0300 lusernet.app (0.4.2-2) unstable; urgency=low * To properly move the Resources dir to /usr/share, include a preinst - script which Hubert Chan wrote originally for gnumail.app. + script which Hubert Chan wrote originally for gnumail.app. * Remove the lintian override, it is not necessary anymore. * debian/patches: + 05_pantomime1.2.dpatch: Removed a useless space at the shebang line. @@ -254,4 +248,3 @@ * Initial Release. (Closes: #179093) -- Gürkan Sengün Tue, 30 Dec 2003 21:55:44 +0100 - diff -Nru lusernet.app-0.4.2/debian/compat lusernet.app-0.4.3/debian/compat --- lusernet.app-0.4.2/debian/compat 2014-07-07 19:13:17.000000000 +0000 +++ lusernet.app-0.4.3/debian/compat 2019-01-25 06:57:26.000000000 +0000 @@ -1 +1 @@ -7 +12 diff -Nru lusernet.app-0.4.2/debian/control lusernet.app-0.4.3/debian/control --- lusernet.app-0.4.2/debian/control 2019-01-22 17:58:07.000000000 +0000 +++ lusernet.app-0.4.3/debian/control 2019-01-25 08:13:06.000000000 +0000 @@ -1,22 +1,21 @@ Source: lusernet.app Section: gnustep Priority: optional -Maintainer: Ubuntu Developers -XSBC-Original-Maintainer: Debian GNUstep maintainers +Maintainer: Debian GNUstep maintainers Uploaders: Yavor Doganov -Build-Depends: debhelper (>= 7), +Build-Depends: debhelper (>= 12), + gnustep-make (>= 2.7.0-4), libgnustep-gui-dev, - libpantomime1.2-dev, - imagemagick -Standards-Version: 3.9.5 -Vcs-Git: git://anonscm.debian.org/pkg-gnustep/lusernet.app.git -Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-gnustep/lusernet.app.git + libpantomime-dev +Standards-Version: 4.3.0 +Vcs-Git: https://salsa.debian.org/gnustep-team/lusernet.app.git +Vcs-Browser: https://salsa.debian.org/gnustep-team/lusernet.app +Homepage: http://wiki.gnustep.org/index.php/LuserNET.app Package: lusernet.app Architecture: any Depends: ${shlibs:Depends}, - ${misc:Depends}, - ${gnustep:Depends} + ${misc:Depends} Provides: news-reader Description: News reader for GNUstep LuserNET is an NNTP based news reader for GNUstep. Although it's at diff -Nru lusernet.app-0.4.2/debian/copyright lusernet.app-0.4.3/debian/copyright --- lusernet.app-0.4.2/debian/copyright 2014-07-07 19:48:07.000000000 +0000 +++ lusernet.app-0.4.3/debian/copyright 2019-01-25 07:37:12.000000000 +0000 @@ -1,14 +1,37 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: LuserNET -Source: http://w1.423.telia.com/~u42308495/alex/LuserNET/LuserNET.html - (it is being moved at http://gna.org/projects/gnustep-nonfsf) +Source: http://download.savannah.nongnu.org/releases/gnustep-nonfsf/ Files: * -Copyright: 2001-2002 Alexander Malmberg +Copyright: 2001-2002 Alexander Malmberg + 2012 Free Software Foundation + 2014 The GNUstep team + 2012-2015 Riccardo Mottola License: GPL-2+ +Files: News.app.tiff +Copyright: 2000 Andrew Lindesay +License: LGPL-2.1+ + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + . + This library is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + . + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. + . + On Debian systems, the complete text of the GNU Lesser General Public + License 2.1 can be found in `/usr/share/common-licenses/LGPL-2.1'. + Files: debian/* -Copyright: 2003-2014 Debian GNUstep maintainers +Copyright: 2003-2019 Debian GNUstep maintainers License: GPL-2+ License: GPL-2+ diff -Nru lusernet.app-0.4.2/debian/menu lusernet.app-0.4.3/debian/menu --- lusernet.app-0.4.2/debian/menu 2014-07-07 19:13:17.000000000 +0000 +++ lusernet.app-0.4.3/debian/menu 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -?package(lusernet.app):needs="X11" \ - section="Applications/Network/Communication" \ - title="LuserNET" command="/usr/bin/LuserNET" \ - icon="/usr/share/pixmaps/News.app.xpm" \ - longtitle="News reader for GNUstep" diff -Nru lusernet.app-0.4.2/debian/patches/gcc-warnings.patch lusernet.app-0.4.3/debian/patches/gcc-warnings.patch --- lusernet.app-0.4.2/debian/patches/gcc-warnings.patch 2014-07-07 19:13:17.000000000 +0000 +++ lusernet.app-0.4.3/debian/patches/gcc-warnings.patch 2019-01-24 21:33:30.000000000 +0000 @@ -6,20 +6,20 @@ conflicting types for '-foo' 'Foo' may not respond to '-bar' passing argument N of 'foo:' from distinct Objective-C type + passing argument N of ‘foo:’ from incompatible pointer type '-foo' not found in protocol(s) @interface of class 'Foo' not found no '-foo' method found - format '%i' expects argument of type 'int', but argument N has type 'size_t' ignoring return value of 'foo', declared with attribute warn_unused_result Author: Yavor Doganov Bug-Debian: http://bugs.debian.org/749758 Forwarded: no -Last-Update: 2014-06-11 +Last-Update: 2019-01-24 --- --- lusernet.app.orig/NNTPServer.m +++ lusernet.app/NNTPServer.m -@@ -589,9 +589,9 @@ +@@ -590,9 +590,9 @@ int i,count=[runmodes count]; for (i=0;ireg_write && !c->write_pending && c->sock>=0) { for (i=0;ireg_write=0; } -@@ -618,7 +618,7 @@ +@@ -619,7 +619,7 @@ if (!c->reg_write && c->write_pending && c->sock>=0) { for (i=0;ireg_write=1; } -@@ -683,11 +683,11 @@ +@@ -684,11 +684,11 @@ int i,count=[runmodes count]; for (i=0;iresp_msg,b,c-b); - cn->resp_msg[c-b]=0; - } -- cn->resp_code=atoi(cn->resp_buf); -+ cn->resp_code=atoi((char *)cn->resp_buf); - c+=2; - if (c==e) - cn->resp_buf_len=0; -@@ -828,7 +828,7 @@ - { - if (*b=='\n') - { -- list[num++]=d; -+ list[num++]=(char *)d; - d=b+1; - *b=0; - } -@@ -955,11 +955,11 @@ +@@ -956,11 +956,11 @@ close(c->sock); for (i=0;isock=-1; -@@ -1047,7 +1047,7 @@ - c->write_pending=NULL; - - c->write_len=length; -- c->write_pending=data; -+ c->write_pending=(char *)data; - c->write_pending_ofs=0; - - #ifdef DEBUG_SOCKET -@@ -1066,7 +1066,7 @@ +@@ -1067,7 +1067,7 @@ con_t *c; int i,j; // printf("--- got event %i type %i extra %p\n",(int)data,type,extra); @@ -115,65 +88,25 @@ for (i=0,c=cons;isock==j) break; -@@ -1253,7 +1253,7 @@ - { - char **list; - int num; -- char *b,*d,*e; -+ unsigned char *b,*d,*e; - - num=0; - list=malloc(sizeof(char *)*(q->d.range.h-q->d.range.l+1)); -@@ -1263,7 +1263,7 @@ - { - if (*b=='\n') - { -- list[num++]=d; -+ list[num++]=(char *)d; - d=b+1; - *b=0; - } ---- lusernet.app.orig/ComposeWindowController.h -+++ lusernet.app/ComposeWindowController.h -@@ -26,7 +26,7 @@ - - initWithHeaders: (NSDictionary *)headers quoteContent: (NSString *)content; - - initWithHeaders: (NSDictionary *)headers; - - initWithFollowupToMessage: (CWMessage *)msg; -- -+- (void) postedArticle: (BOOL)success; - @end - - #endif ---- lusernet.app.orig/NNTPServer.h -+++ lusernet.app/NNTPServer.h -@@ -108,7 +108,7 @@ - -(void) enableConnect: (int)should_connect; - -(void) enableTimeout: (int)should_connect; - ---(void) setReceiver: (id)arec; -+-(void) setReceiver: (id)arec; - - -(void) closeAllConnections; - -(void) killAllConnections; --- lusernet.app.orig/NNTPSource.m +++ lusernet.app/NNTPSource.m -@@ -11,6 +11,7 @@ - #include - #include - #include +@@ -16,6 +16,7 @@ + #import + #import + #import +#import - #include "MsgDB.h" + #import "MsgDB.h" -@@ -19,6 +20,7 @@ - #include "NNTPSourceGUI.h" +@@ -24,6 +25,7 @@ + #import "NNTPSourceGUI.h" - #include "NNTPServer.h" + #import "NNTPServer.h" +#import "ComposeWindowController.h" typedef struct nntpsource_group_s group_t; -@@ -346,7 +348,7 @@ +@@ -351,7 +353,7 @@ -(void) nntp_postArticle: (BOOL)success qid: (unsigned int)qid { NSNumber *n=[[NSNumber alloc] initWithInt: qid]; @@ -209,29 +142,6 @@ int data_length; unsigned int src_get_id; -@@ -669,19 +676,19 @@ - fprintf(f,"%i\n",num_meta_headers); - for (i=0;inum_mhs,strlen(m->message_id)); -+ fprintf(f,"%i %zu ",m->num_mhs,strlen(m->message_id)); - fwrite(m->message_id,1,strlen(m->message_id),f); - fputc('\n',f); - for (j=0;jnum_mhs;j++) - { -- fprintf(f,"%i %i ",m->mhs[j].mhid,strlen(m->mhs[j].value)); -+ fprintf(f,"%i %zu ",m->mhs[j].mhid,strlen(m->mhs[j].value)); - fwrite(m->mhs[j].value,1,strlen(m->mhs[j].value),f); - fputc('\n',f); - } @@ -726,36 +733,43 @@ mhidx[i]=-1; for (i=0;iobject); else NSMapInsert(cur_options,l->object,(void *)1); -@@ -822,7 +822,7 @@ +@@ -833,7 +833,7 @@ { if (!cur_options) return YES; @@ -348,102 +258,109 @@ NSMapRemove(cur_options,l->object); else NSMapInsert(cur_options,l->object,(void *)2); -@@ -837,7 +837,7 @@ - NSData *d; - NSString *filename; +--- lusernet.app.orig/main.m ++++ lusernet.app/main.m +@@ -27,6 +27,7 @@ + #import "FolderWindowController.h" + #import "FolderListController.h" + #import "ComposeWindowController.h" ++#import "NNTPSource.h" -- if ([l->object isKindOf: [NSString class]]) -+ if ([l->object isKindOfClass: [NSString class]]) - { - NSString *s=(NSString *)l->object; - NSRange r; -@@ -1179,7 +1179,7 @@ - NSBeep(); - return; - } -- [app_delegate composeFollowupToMessage: (Message *)cur_message]; -+ [app_delegate composeFollowupToMessage: (CWMessage *)cur_message]; + + #import "main.h" +@@ -88,9 +89,9 @@ } - -(void) encodingChanged: (NSNotification *)n ---- lusernet.app.orig/main.h -+++ lusernet.app/main.h -@@ -9,7 +9,7 @@ - @class NSApplication,NSMutableDictionary; - @class FolderListController,LogWindowController,PreferencesWindowController; --@class Message; -+@class CWMessage; +--(void) postArticleFrom: (id)sender : (const unsigned char *)data : (int)length ++-(void) postArticleFrom: (id)sender : (unsigned char *)data : (int)length + { /* TODO */ +- NSObject *src; ++ id src; - extern NSString *DefaultEncodingChangedNotification; + // fprintf(stderr,"post article %@\n",sender); + src=[[mdb sources] objectAtIndex: 0]; +--- lusernet.app.orig/FolderWindowController.m ++++ lusernet.app/FolderWindowController.m +@@ -56,7 +56,7 @@ + #define SORT_R_ORDER 9 + #define SORT_MAX 9 -@@ -29,7 +29,7 @@ - -(void) openMessageWindow: (msg_id_t)mid; +-static int sort_subject(NSNumber *n1,NSNumber *n2,FolderThreader *ft) ++static NSComparisonResult sort_subject(NSNumber *n1,NSNumber *n2,FolderThreader *ft) + { + NSString *s1,*s2; + s1=[ft subjectForMessage: [n1 unsignedIntValue]]; +@@ -64,7 +64,7 @@ + return [s1 localizedCaseInsensitiveCompare: s2]; + } - -(void) composeArticle: (NSDictionary *)headers; ---(void) composeFollowupToMessage: (Message *)msg; -+-(void) composeFollowupToMessage: (CWMessage *)msg; +-static int sort_from(NSNumber *n1,NSNumber *n2,FolderThreader *ft) ++static NSComparisonResult sort_from(NSNumber *n1,NSNumber *n2,FolderThreader *ft) + { + NSString *s1,*s2; + s1=[ft fromForMessage: [n1 unsignedIntValue]]; +@@ -72,7 +72,7 @@ + return [s1 localizedCaseInsensitiveCompare: s2]; + } +-static int sort_date(NSNumber *n1,NSNumber *n2,FolderThreader *ft) ++static NSComparisonResult sort_date(NSNumber *n1,NSNumber *n2,FolderThreader *ft) + { + NSDate *d1,*d2; + d1=[ft dateForMessage: [n1 unsignedIntValue]]; +@@ -82,23 +82,23 @@ + } - -(void) postArticleFrom: (id)sender : (const unsigned char *)data : (int)length; /* TODO */ ---- lusernet.app.orig/main.m -+++ lusernet.app/main.m -@@ -22,6 +22,7 @@ - #include "FolderWindowController.h" - #include "FolderListController.h" - #include "ComposeWindowController.h" -+#import "NNTPSource.h" +-static int sort_r_subject(NSNumber *n1,NSNumber *n2,FolderThreader *ft) ++static NSComparisonResult sort_r_subject(NSNumber *n1,NSNumber *n2,FolderThreader *ft) + { + return -sort_subject(n1,n2,ft); + } - #include "main.h" -@@ -71,7 +72,7 @@ - [[[ComposeWindowController alloc] initWithHeaders: headers] showWindow: self]; +-static int sort_r_from(NSNumber *n1,NSNumber *n2,FolderThreader *ft) ++static NSComparisonResult sort_r_from(NSNumber *n1,NSNumber *n2,FolderThreader *ft) + { + return -sort_from(n1,n2,ft); } ---(void) composeFollowupToMessage: (Message *)msg -+-(void) composeFollowupToMessage: (CWMessage *)msg +-static int sort_r_date(NSNumber *n1,NSNumber *n2,FolderThreader *ft) ++static NSComparisonResult sort_r_date(NSNumber *n1,NSNumber *n2,FolderThreader *ft) { - [[[ComposeWindowController alloc] initWithFollowupToMessage: msg] showWindow: self]; + return -sort_date(n1,n2,ft); } -@@ -83,9 +84,9 @@ + + +-static int sort_order(NSNumber *n1,NSNumber *n2,FolderThreader *ft) ++static NSComparisonResult sort_order(NSNumber *n1,NSNumber *n2,FolderThreader *ft) + { + if (ft->msgs[[n1 unsignedIntValue]].midmsgs[[n2 unsignedIntValue]].mid) + return NSOrderedAscending; +@@ -106,7 +106,7 @@ + return NSOrderedDescending; } +-static int sort_r_order(NSNumber *n1,NSNumber *n2,FolderThreader *ft) ++static NSComparisonResult sort_r_order(NSNumber *n1,NSNumber *n2,FolderThreader *ft) + { + if (ft->msgs[[n1 unsignedIntValue]].mid>ft->msgs[[n2 unsignedIntValue]].mid) + return NSOrderedAscending; +@@ -115,7 +115,7 @@ + } ---(void) postArticleFrom: (id)sender : (const unsigned char *)data : (int)length -+-(void) postArticleFrom: (id)sender : (unsigned char *)data : (int)length - { /* TODO */ -- NSObject *src; -+ id src; - // fprintf(stderr,"post article %@\n",sender); - src=[[mdb sources] objectAtIndex: 0]; ---- lusernet.app.orig/FolderListController.m -+++ lusernet.app/FolderListController.m -@@ -6,6 +6,7 @@ - #include - #include - #include -+#import - #include - #include - #include ---- lusernet.app.orig/FolderWindowController.m -+++ lusernet.app/FolderWindowController.m -@@ -20,6 +20,7 @@ - #include - #include - #include -+#import - - #include - ---- lusernet.app.orig/Pref_MessageViewing.m -+++ lusernet.app/Pref_MessageViewing.m -@@ -6,6 +6,7 @@ - #include - #include - #include -+#import +-static int (*(sort_funcs[SORT_MAX+1]))(NSNumber *,NSNumber *,FolderThreader *ft)= ++static NSComparisonResult (*(sort_funcs[SORT_MAX+1]))(NSNumber *,NSNumber *,FolderThreader *ft)= + {NULL,NULL, + sort_subject,sort_from,sort_date,sort_order, + sort_r_subject,sort_r_from,sort_r_date,sort_r_order}; +@@ -424,7 +424,7 @@ + [idx release]; + } + } +- [sorted_msgs sortUsingFunction: (int(*)(id,id,void *))sort_funcs[sort_mode] context: ft]; ++ [sorted_msgs sortUsingFunction: (NSComparisonResult(*)(id,id,void *))sort_funcs[sort_mode] context: ft]; + } - #include - #include + [list reloadData]; diff -Nru lusernet.app-0.4.2/debian/patches/link-order.patch lusernet.app-0.4.3/debian/patches/link-order.patch --- lusernet.app-0.4.2/debian/patches/link-order.patch 2014-07-07 19:13:17.000000000 +0000 +++ lusernet.app-0.4.3/debian/patches/link-order.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -Description: Fix build with 'ld --as-needed'. - Put -lPantomime in LuserNET_GUI_LIBS rather than LuserNET_LDFLAGS. -Author: Colin Watson -Bug-Debian: http://bugs.debian.org/633556 -Bug-Ubuntu: http://bugs.launchpad.net/ubuntu/+source/lusernet.app/+bug/771011 -Forwarded: no -Last-Update: 2013-06-03 ---- - ---- lusernet.app.orig/GNUmakefile -+++ lusernet.app/GNUmakefile -@@ -44,7 +44,7 @@ - - MAKE_STRINGS_OPTIONS = --aggressive-match --aggressive-remove - --LuserNET_LDFLAGS += -lPantomime -+LuserNET_GUI_LIBS += -lPantomime - #-lMime - - include $(GNUSTEP_MAKEFILES)/application.make diff -Nru lusernet.app-0.4.2/debian/patches/missing-includes.patch lusernet.app-0.4.3/debian/patches/missing-includes.patch --- lusernet.app-0.4.2/debian/patches/missing-includes.patch 2014-07-07 19:13:17.000000000 +0000 +++ lusernet.app-0.4.3/debian/patches/missing-includes.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,125 +0,0 @@ -Description: Add missing #include's fixing FTBFS with current GNUstep. -Author: Yavor Doganov -Bug-Debian: http://bugs.debian.org/593048 -Bug-Debian: http://bugs.debian.org/581956 -Bug-Debian: http://bugs.debian.org/489696 -Forwarded: no -Last-Update: 2010-08-24 ---- - ---- lusernet.app.orig/ComposeWindowController.m -+++ lusernet.app/ComposeWindowController.m -@@ -2,19 +2,9 @@ - copyright 2002 Alexander Malmberg - */ - --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include -+#import -+#import -+#import - - #include "ComposeWindowController.h" - ---- lusernet.app.orig/FolderListController.m -+++ lusernet.app/FolderListController.m -@@ -5,6 +5,7 @@ - #include - #include - #include -+#include - #include - #include - #include ---- lusernet.app.orig/FolderWindowController.m -+++ lusernet.app/FolderWindowController.m -@@ -19,6 +19,7 @@ - #include - #include - #include -+#include - - #include - ---- lusernet.app.orig/MessageViewController.m -+++ lusernet.app/MessageViewController.m -@@ -13,6 +13,8 @@ - #include - #include - #include -+#include -+#include - - #include "MessageViewController.h" - ---- lusernet.app.orig/MsgDB.m -+++ lusernet.app/MsgDB.m -@@ -18,6 +18,8 @@ - #include - #include - #include -+#include -+#include - - #include "MsgDB.h" - ---- lusernet.app.orig/NNTPSource.m -+++ lusernet.app/NNTPSource.m -@@ -9,7 +9,7 @@ - #include - #include - #include -- -+#include - #include - - #include "MsgDB.h" ---- lusernet.app.orig/Pref_MessageViewing.m -+++ lusernet.app/Pref_MessageViewing.m -@@ -13,6 +13,7 @@ - #include - #include - #include -+#include - - #include - ---- lusernet.app.orig/Pref_Posting.m -+++ lusernet.app/Pref_Posting.m -@@ -2,9 +2,7 @@ - copyright 2002 Alexander Malmberg - */ - --#include --#include --#include -+#include - #include - #include - #include ---- lusernet.app.orig/main.m -+++ lusernet.app/main.m -@@ -7,9 +7,12 @@ - #include - #include - #include -+#include -+#include - #include - #include - #include -+#include - - #include - diff -Nru lusernet.app-0.4.2/debian/patches/modern-objc-api.patch lusernet.app-0.4.3/debian/patches/modern-objc-api.patch --- lusernet.app-0.4.2/debian/patches/modern-objc-api.patch 2014-07-07 19:13:17.000000000 +0000 +++ lusernet.app-0.4.3/debian/patches/modern-objc-api.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ -Description: Use the modern GNU Objective-C API. -Author: Colin Watson -Bug-Debian: http://bugs.debian.org/633557 -Forwarded: no -Last-Update: 2013-06-03 ---- - ---- lusernet.app.orig/MsgDB.m -+++ lusernet.app/MsgDB.m -@@ -342,7 +342,7 @@ - - // fprintf(stderr,"got '%s' type '%s'\n",buf,[self msg_getMetaHeader: "Type" : mid]); - -- c=objc_lookup_class([self msg_getMetaHeader: "Type" : mid]); -+ c=objc_lookUpClass([self msg_getMetaHeader: "Type" : mid]); - n=[[NSNumber alloc] initWithInt: i]; - src=[[c alloc] initWithMsg: mid db: self]; - [sources setObject: src forKey: n]; diff -Nru lusernet.app-0.4.2/debian/patches/no-crypto.patch lusernet.app-0.4.3/debian/patches/no-crypto.patch --- lusernet.app-0.4.2/debian/patches/no-crypto.patch 1970-01-01 00:00:00.000000000 +0000 +++ lusernet.app-0.4.3/debian/patches/no-crypto.patch 2019-01-25 08:07:12.000000000 +0000 @@ -0,0 +1,17 @@ +Description: Don't link with libcrypto; completely unnecessary. +Author: Yavor Doganov +Forwarded: https://savannah.nongnu.org/bugs/index.php?55568 +Last-Update: 2019-01-25 +--- + +--- lusernet.app.orig/GNUmakefile ++++ lusernet.app/GNUmakefile +@@ -44,7 +44,7 @@ + + MAKE_STRINGS_OPTIONS = --aggressive-match --aggressive-remove + +-LuserNET_GUI_LIBS += -lPantomime -lcrypto ++LuserNET_GUI_LIBS += -lPantomime + #-lMime + + include $(GNUSTEP_MAKEFILES)/application.make diff -Nru lusernet.app-0.4.2/debian/patches/pantomime1.2.patch lusernet.app-0.4.3/debian/patches/pantomime1.2.patch --- lusernet.app-0.4.2/debian/patches/pantomime1.2.patch 2014-07-07 19:13:17.000000000 +0000 +++ lusernet.app-0.4.3/debian/patches/pantomime1.2.patch 2019-01-24 21:36:24.000000000 +0000 @@ -1,142 +1,14 @@ Description: Port to Pantomime 1.2. -Author: Sergey Golovin + A large portion of this patch has been applied upstream in 0.4.3. Author: Yavor Doganov Bug-Debian: http://bugs.debian.org/489879 Forwarded: no -Last-Update: 2008-07-09 +Last-Update: 2019-01-24 --- ---- /dev/null -+++ lusernet.app/ChangeLog -@@ -0,0 +1,41 @@ -+2006-09-19 Sergey V. Golovin -+ -+ * main.m ([AppDelegate -changeEncoding:]): post -+ DefaultEncodingChangedNotification when done -+ -+ * main.m: new notification DefaultEncodingChangedNotification -+ -+ * ComposeWindowController.m: "DefaultEncoding" now influences all -+ messages that going to be posted (Yavor Doganov ) -+ -+ * NNTPSourceGUI.m ([NNTPSourcePropertiesController -+ -initWithNNTPSource:]): the NNTPSourcePropertiesController is -+ responsible for releasing its window ([win release] removed from -+ end of -initWithNNTPSource:) -+ -+ * MessageViewController.m ([MessageViewController -getData]): -+ - The "DefaultEncoding" should influence only such messages that -+ have no the content type header -+ - All normal messages are displayed with their charsets -+ -+ * MessageViewController.m ([MessageViewController -encodingChanged:]): added -+ ([MessageViewController -initWithMsgDB:textView:scrollView:]): now it -+ waits for DefaultEncodingChangedNotification to redisplay -+ immediately a message if it is needed. -+ -+2006-09-04 Sergey Golovin -+ -+ * Pref_MessageViewing.m ([Pref_MessageViewing -willShow]): added -+ a pop-up button for charset selection -+ ([Pref_MessageViewing -changeEncoding:]): added -+ -+2006-09-02 Sergey Golovin -+ -+ * MessageViewController.m ([MessageViewController -getData]): -+ - added from user defaults a charset header when a raw message has -+ no one -+ - added from user defaults a content type header when a raw -+ message has no one -+ -+ * synchronized with Pantomime 1.2 -+ ---- lusernet.app.orig/ComposeWindowController.h -+++ lusernet.app/ComposeWindowController.h -@@ -6,7 +6,7 @@ - #define ComposeWindowController_h - - @class NSString,NSDictionary; --@class Message; -+@class CWMessage; - @class NSTextView,NSTextField,NSButton; - - @interface ComposeWindowController : NSWindowController -@@ -25,7 +25,7 @@ - - - initWithHeaders: (NSDictionary *)headers quoteContent: (NSString *)content; - - initWithHeaders: (NSDictionary *)headers; --- initWithFollowupToMessage: (Message *)msg; -+- initWithFollowupToMessage: (CWMessage *)msg; - - @end - --- lusernet.app.orig/ComposeWindowController.m +++ lusernet.app/ComposeWindowController.m -@@ -21,11 +21,12 @@ - #include "main.h" - #include "KeyWindow.h" - #include "Pref_Posting.h" -+#include "Pref_MessageViewing.h" - --#include --#include --#include --#include -+#include -+#include -+#include -+#include - - - @implementation ComposeWindowController -@@ -33,7 +34,7 @@ - - -(void) post: (id)sender - { -- Message *m=[[Message alloc] init]; -+ CWMessage *m=[[CWMessage alloc] init]; - NSMutableDictionary *md; - NSEnumerator *e; - NSString *header,*value; -@@ -64,7 +65,7 @@ - - if ([header isEqualToString: @"From"]) - { -- InternetAddress *ia=[[InternetAddress alloc] initWithString: value]; -+ CWInternetAddress *ia=[[CWInternetAddress alloc] initWithString: value]; - [m setFrom: ia]; - DESTROY(ia); - } -@@ -79,9 +80,17 @@ - [m setContentType: @"text/plain"]; - [m setContentTransferEncoding: PantomimeEncoding8bit]; - [m setFormat: PantomimeFormatFlowed]; -- [m setContent: [text string]]; -+ NSData *td = [[text string] dataUsingEncoding: NSUTF8StringEncoding]; -+ [m setContent: td]; - -- [m setCharset: [MimeUtility charsetForString: [text string]]]; -+ if(![Pref_MessageViewing defaultEncoding]) -+ { -+ [m setCharset: @"utf-8"]; -+ } -+ else -+ { -+ [m setCharset: [Pref_MessageViewing defaultEncoding]]; -+ } - - state=1; - d=[m dataValue]; -@@ -386,7 +395,7 @@ - } - - /* TODO: handle attributation, followup to sender, followup, etc. */ --- initWithFollowupToMessage: (Message *)msg -+- initWithFollowupToMessage: (CWMessage *)msg - { - NSDictionary *headers; - NSString *subject,*references; -@@ -431,9 +440,11 @@ +@@ -448,10 +448,13 @@ else [str appendString: [NSString stringWithFormat: @"%@ wrote:\n",[[msg from] address]]]; @@ -144,202 +16,17 @@ + if ([[msg content] isKindOfClass: [NSData class]]) { - NSString *content=(NSString *)[msg content]; -+ NSString *content = [[NSString alloc] -+ initWithData: (NSData *)[msg content] -+ encoding: NSUTF8StringEncoding]; ++ NSString *content=[[NSString alloc] ++ initWithData: (NSData *)[msg content] ++ encoding: NSUTF8StringEncoding]; str=[self _quoteString: content to: str]; ++ [content release]; } else ---- lusernet.app.orig/FolderThreader.m -+++ lusernet.app/FolderThreader.m -@@ -9,7 +9,7 @@ - - #include "FolderThreader.h" - --#include -+#include - - - static NSDate *parse_date(const char *date_header) -@@ -544,7 +544,7 @@ - return @""; - - d=[[NSData alloc] initWithBytes: c length: strlen(c)]; -- s2=[MimeUtility decodeHeader: d charset: nil]; -+ s2=[CWMIMEUtility decodeHeader: d charset: nil]; - [d release]; - return s2; - } -@@ -586,7 +586,7 @@ - else - { - d=[[NSData alloc] initWithBytes: c length: strlen(c)]; -- s2=[MimeUtility decodeHeader: d charset: nil]; -+ s2=[CWMIMEUtility decodeHeader: d charset: nil]; - [d release]; - h->subject=[s2 retain]; - } -@@ -595,7 +595,7 @@ - if (c) - { - d=[[NSData alloc] initWithBytes: c length: strlen(c)]; -- s2=[MimeUtility decodeHeader: d charset: nil]; -+ s2=[CWMIMEUtility decodeHeader: d charset: nil]; - [d release]; - h->from=[s2 retain]; - } ---- lusernet.app.orig/FolderWindowController.m -+++ lusernet.app/FolderWindowController.m -@@ -20,7 +20,7 @@ - #include - #include - --#include -+#include - - #include "MsgDB.h" - ---- lusernet.app.orig/MessageViewController.h -+++ lusernet.app/MessageViewController.h -@@ -6,7 +6,7 @@ - #define MessageViewController_h - - @class NSTextView,NSScrollView,NSMutableDictionary; --@class Message; -+@class CWMessage; - - #include "MsgDB.h" - -@@ -17,7 +17,7 @@ - - MsgDB *mdb; - msg_id_t mid; -- Message *cur_message; -+ CWMessage *cur_message; - - /* actually an NSMapTable */ - void *cur_options; -@@ -48,6 +48,8 @@ - - -(void) messageSave; - -+-(void) encodingChanged: (NSNotification *)n; -+ - @end - - #endif + [str appendString: @"> (currently) unquoteable content\n"]; --- lusernet.app.orig/MessageViewController.m +++ lusernet.app/MessageViewController.m -@@ -21,11 +21,11 @@ - - #include "GUISource.h" - --#include --#include --#include --#include --#include -+#include -+#include -+#include -+#include -+#include - - //#define USE_MIME_STUFF - -@@ -89,7 +89,7 @@ - - - @interface MessageViewController (private) ---(void) _renderContent:(id)p parent:(Part *)parent to:(NSMutableAttributedString *)str; -+-(void) _renderContent:(id)p parent:(CWPart *)parent to:(NSMutableAttributedString *)str; - -(void) _renderPart:(id)p to:(NSMutableAttributedString *)str; - - -(void) displayMessage; -@@ -212,10 +212,10 @@ - } - - ---(void) _render_multipart: (MimeMultipart *)mp type: (NSString *)ct -+-(void) _render_multipart: (CWMIMEMultipart *)mp type: (NSString *)ct - to: (NSMutableAttributedString *)str - { -- Part *bp; -+ CWPart *bp; - int i; - - if ([ct isEqual: @"multipart/alternative"]) -@@ -227,14 +227,14 @@ - else - disp=[mp count]-1; - -- bp=[mp bodyPartAtIndex: disp]; -+ bp=[mp partAtIndex: disp]; - append(str,header_bold_dict,_(@"Currently shown:")); - append(str,header_dict,@" %@\n",[bp contentType]); - append(str,header_bold_dict,_(@"Alternatives:")); - for (i=0;i<[mp count];i++) - { - appendLink(str,LINK_MULTIPART_ALTERNATIVE,mp,i+1,@" %@", -- [[mp bodyPartAtIndex: i] contentType]); -+ [[mp partAtIndex: i] contentType]); - } - append(str,nil,@"\n"); - -@@ -249,7 +249,7 @@ - - for (i=0;i<[mp count];i++) - { -- bp=[mp bodyPartAtIndex: i]; -+ bp=[mp partAtIndex: i]; - append(str,header_bold_dict,_(@"\nPart:")); - append(str,header_dict,@" %i %@\n",i,[bp contentType]); - [self _renderPart:bp to:str]; -@@ -264,8 +264,6 @@ - NSDictionary *fd; - NSFont *f; - -- NSRange r; -- - if (cur_font) - f=[Pref_MessageViewing font2]; - else -@@ -276,7 +274,7 @@ - - #if 0 /* TODO: need to update with new Pantomime interface */ - /* TODO: this should probably be optional */ -- r=[MimeUtility rangeOfUUEncodedStringFromString: text -+ r=[CWMIMEUtility rangeOfUUEncodedStringFromString: text - range: NSMakeRange(0,[text length])]; - - if (r.location==NSNotFound) -@@ -291,7 +289,7 @@ - appendPlainText(str,fd,[text substringWithRange: NSMakeRange(0,r.location)]); - - /* TODO: this is inefficient */ -- fw=[MimeUtility fileWrapperFromUUEncodedString: [text substringWithRange: r]]; -+ fw=[CWMIMEUtility fileWrapperFromUUEncodedString: [text substringWithRange: r]]; - - append(str,header_bold_dict,_(@"UUEncoded file:")); - append(str,header_dict,@" %@ ",[fw preferredFilename]); -@@ -312,7 +310,7 @@ - } - - ---(void) _renderContent:(id)p parent:(Part *)parent -+-(void) _renderContent:(id)p parent:(CWPart *)parent - to:(NSMutableAttributedString *)str - { - NSString *ct=[parent contentType]; -@@ -340,19 +338,21 @@ - - - /* Some content classes/types we handle internally. */ -- if ([p isKindOfClass: [MimeMultipart class]]) -+ if ([p isKindOfClass: [CWMIMEMultipart class]]) - { -- [self _render_multipart: (MimeMultipart *)p type: ct to: str]; -+ [self _render_multipart: (CWMIMEMultipart *)p type: ct to: str]; +@@ -356,9 +356,12 @@ return; } @@ -347,314 +34,10 @@ + if ([p isKindOfClass: [NSData class]] && [ct isEqual: @"text/plain"]) { - [self _render_article_text: (NSString *)p to: str]; -- return; -+ NSString *pt = [[NSString alloc] initWithData: p -+ encoding: NSUTF8StringEncoding]; -+ [self _render_article_text: pt to: str]; -+ return; - } - -- if ([p isKindOfClass: [Part class]]) -+ if ([p isKindOfClass: [CWPart class]]) - { - [self _renderPart: p to: str]; - return; -@@ -553,13 +553,13 @@ - - -(void) _renderPart:(id)p to:(NSMutableAttributedString *)str - { -- if ([p isKindOfClass: [Message class]]) -+ if ([p isKindOfClass: [CWMessage class]]) - { -- Message *m=(Message *)p; -+ CWMessage *m=(CWMessage *)p; - append(str,header_bold_dict,_(@"Subject:")); - append(str,header_dict,@" %@\n",[m subject]); - append(str,header_bold_dict,_(@"From:")); -- append(str,header_dict,@" %@\n",[[m from] unicodeStringValue]); -+ append(str,header_dict,@" %@\n",[[m from] stringValue]); - append(str,header_bold_dict,_(@"Newsgroups:")); - append(str,header_dict,@" %@\n",[m headerValueForName: @"Newsgroups"]); - append(str,header_bold_dict,_(@"Date:")); -@@ -569,9 +569,9 @@ - append(str,nil,@"\n"); - [self _renderContent:[m content] parent: m to:str]; - } -- else if ([p isKindOfClass: [Part class]]) -+ else if ([p isKindOfClass: [CWPart class]]) - { /* handles MimeBodyPart and any extensions */ -- [self _renderContent:[(Part *)p content] parent: (Part *)p to:str]; -+ [self _renderContent:[(CWPart *)p content] parent: (CWPart *)p to:str]; - } - else - { -@@ -655,7 +655,27 @@ - NSData *d; - - d=[[NSData alloc] initWithBytes: data length: length]; -- cur_message=[(Message *)[Message alloc] initWithData: d]; -+ if([mdb msg_getHeader: "ContentType" : mid]) -+ { -+ cur_message=[(CWMessage *)[CWMessage alloc] initWithData: d]; -+ } -+ else -+ { -+ cur_message=[(CWMessage *)[CWMessage alloc] initWithData: d -+ charset:[Pref_MessageViewing defaultEncoding]]; -+ } -+ if(![cur_message contentType]) -+ { -+ [cur_message setContentType:@"text/plain"]; -+ } -+ else -+ { -+ ASSIGN( -+ cur_message, -+ [(CWMessage *)[CWMessage alloc] initWithData: d -+ charset:[cur_message charset]] -+ ); -+ } - [d release]; - - { -@@ -819,17 +839,17 @@ - { - NSString *s=(NSString *)l->object; - NSRange r; -- UUFile *fw; -- r=[MimeUtility rangeOfUUEncodedStringFromString: s -+ CWUUFile *fw; -+ r=[CWUUFile rangeOfUUEncodedStringFromString: s - range: NSMakeRange(0,[s length])]; - -- fw=[MimeUtility fileFromUUEncodedString: [s substringWithRange: r]]; -+ fw=[CWUUFile fileFromUUEncodedString: [s substringWithRange: r]]; - filename=AUTORELEASE(RETAIN([fw name])); - d=AUTORELEASE(RETAIN([fw data])); - } - else - { -- Part *p=(Part *)l->object; -+ CWPart *p=(CWPart *)l->object; - d=(NSData *)[p content]; - filename=[p filename]; - } -@@ -926,6 +946,12 @@ - - mid=0; - -+ [[NSNotificationCenter defaultCenter] -+ addObserver: self -+ selector: @selector(encodingChanged:) -+ name: DefaultEncodingChangedNotification -+ object: nil]; -+ - return self; - } - -@@ -1151,9 +1177,14 @@ - NSBeep(); ++ NSString *pt=[[NSString alloc] initWithData: p ++ encoding: NSUTF8StringEncoding]; ++ [self _render_article_text: pt to: str]; ++ [pt release]; return; } -- [app_delegate composeFollowupToMessage: cur_message]; -+ [app_delegate composeFollowupToMessage: (Message *)cur_message]; - } - -+-(void) encodingChanged: (NSNotification *)n -+{ -+ [self getData]; -+ [self displayMessage]; -+} - - @end - ---- lusernet.app.orig/NNTPSourceGUI.m -+++ lusernet.app/NNTPSourceGUI.m -@@ -347,7 +347,6 @@ - [win setTitle: _(@"NNTPSource properties")]; - [win setDelegate: self]; - [win autoSetupKeyViewChain]; -- [win release]; - - return self; - } ---- lusernet.app.orig/Pref_MessageViewing.h -+++ lusernet.app/Pref_MessageViewing.h -@@ -27,6 +27,7 @@ - - +(NSFont *) font1; - +(NSFont *) font2; -++(NSString *) defaultEncoding; - - @end - ---- lusernet.app.orig/Pref_MessageViewing.m -+++ lusernet.app/Pref_MessageViewing.m -@@ -8,11 +8,14 @@ - #include - - #include -+#include - #include - #include - #include - #include - -+#include -+ - #include "Pref_MessageViewing.h" - - -@@ -192,6 +195,7 @@ - { - NSTextField *f; - NSButton *b; -+ NSPopUpButton *pop; - GSHbox *hb; - - hb=[[GSHbox alloc] init]; -@@ -289,6 +293,49 @@ - - [top addView: hb enablingYResizing: NO]; - DESTROY(hb); -+ -+ [top addSeparator]; -+ -+ hb=[[GSHbox alloc] init]; -+ [hb setDefaultMinXMargin: 4]; -+ [hb setAutoresizingMask: NSViewWidthSizable]; -+ -+ f=[[NSTextField alloc] init]; -+ [f setStringValue: _(@"Default encoding ")]; -+ [f setEditable: NO]; -+ [f setDrawsBackground: NO]; -+ [f setBordered: NO]; -+ [f setBezeled: NO]; -+ [f setSelectable: NO]; -+ [f sizeToFit]; -+ [f setAutoresizingMask: 0]; -+ [hb addView: f enablingXResizing: NO]; -+ DESTROY(f); -+ -+ pop = [[NSPopUpButton alloc] init]; -+ [pop setPullsDown:NO]; -+ NSDictionary *charsets = [CWCharset allCharsets]; -+ NSEnumerator *en = [[charsets allValues] objectEnumerator]; -+ NSString *encoding; -+ while((encoding = [en nextObject])) -+ { -+ [pop addItemWithTitle:encoding]; -+ } -+ [pop selectItemWithTitle: -+ [charsets -+ objectForKey: -+ [sd objectForKey:@"DefaultEncoding"]]]; -+ [pop synchronizeTitleAndSelectedItem]; -+ [pop setTarget: self]; -+ [pop setAction: @selector(changeEncoding:)]; -+ [pop sizeToFit]; -+ [hb addView: pop enablingXResizing: NO]; -+ DESTROY(pop); -+ -+ -+ [top addView: hb enablingYResizing: NO]; -+ DESTROY(hb); -+ - } - - [self revert]; -@@ -334,5 +381,23 @@ - [f_cur setFont: f]; - } - -+-(void) changeEncoding:(id)sender -+{ -+ NSDictionary *charsets = [CWCharset allCharsets]; -+ sd=[NSUserDefaults standardUserDefaults]; -+ -+ [sender selectItemWithTitle:[sender titleOfSelectedItem]]; -+ [sender synchronizeTitleAndSelectedItem]; -+ -+ [sd setObject: -+ [[charsets allKeysForObject:[sender titleOfSelectedItem]] objectAtIndex:0] -+ forKey:@"DefaultEncoding"]; -+} -+ -++(NSString *) defaultEncoding -+{ -+ return [sd stringForKey:@"DefaultEncoding"]; -+} -+ - @end - ---- lusernet.app.orig/main.h -+++ lusernet.app/main.h -@@ -11,6 +11,8 @@ - @class FolderListController,LogWindowController,PreferencesWindowController; - @class Message; - -+extern NSString *DefaultEncodingChangedNotification; -+ - @interface AppDelegate : NSObject - { - NSApplication *app; ---- lusernet.app.orig/main.m -+++ lusernet.app/main.m -@@ -11,6 +11,8 @@ - #include - #include - -+#include -+ - #include "MsgDB.h" - - #include "LogWindowController.h" -@@ -36,6 +38,7 @@ - - #define LocationKey @"MessageDatabaseLocation" - -+NSString *DefaultEncodingChangedNotification = @"DefaultEncodingChangedNotification"; - - @interface NSMenu (im_lazy) - -(id ) addItemWithTitle: (NSString *)s; -@@ -209,6 +212,21 @@ - #endif - } - -+-(void) changeEncoding:(id)sender -+{ -+ NSDictionary *charsets = [CWCharset allCharsets]; -+ -+ // [sender selectItemWithTitle:[sender title]]; -+ // [sender synchronizeTitleAndSelectedItem]; -+ -+ [[NSUserDefaults standardUserDefaults] setObject: -+ [[charsets allKeysForObject:[sender title]] objectAtIndex:0] -+ forKey:@"DefaultEncoding"]; -+ -+ [[NSNotificationCenter defaultCenter] -+ postNotificationName: DefaultEncodingChangedNotification -+ object: nil]; -+} - -(void) applicationWillFinishLaunching: (NSNotification *)n - { -@@ -307,6 +325,18 @@ - m=[[NSMenu alloc] init]; - /* [m addItemWithTitle: _(@"Open") - action: @selector(openMessage:)];*/ -+ m2=[[NSMenu alloc] init]; -+ -+ NSDictionary *charsets = [CWCharset allCharsets]; -+ NSEnumerator *en = [[charsets allValues] objectEnumerator]; -+ NSString *encoding; -+ while((encoding = [en nextObject])) -+ { -+ [m2 addItemWithTitle: encoding -+ action: @selector(changeEncoding:)]; -+ } -+ -+ [m setSubmenu: m2 forItem: [m addItemWithTitle: _(@"Change encoding...")]]; - [m addItemWithTitle: _(@"Toggle read/unread") - action: @selector(messageToggleRead:) - keyEquivalent: @"m"]; diff -Nru lusernet.app-0.4.2/debian/patches/series lusernet.app-0.4.3/debian/patches/series --- lusernet.app-0.4.2/debian/patches/series 2014-07-07 19:13:17.000000000 +0000 +++ lusernet.app-0.4.3/debian/patches/series 2019-01-25 07:52:25.000000000 +0000 @@ -1,7 +1,6 @@ pantomime1.2.patch -missing-includes.patch mark-string-as-translatable.patch bg-translation.patch -link-order.patch -modern-objc-api.patch gcc-warnings.patch +spelling-fixes.patch +no-crypto.patch diff -Nru lusernet.app-0.4.2/debian/patches/spelling-fixes.patch lusernet.app-0.4.3/debian/patches/spelling-fixes.patch --- lusernet.app-0.4.2/debian/patches/spelling-fixes.patch 1970-01-01 00:00:00.000000000 +0000 +++ lusernet.app-0.4.3/debian/patches/spelling-fixes.patch 2019-01-25 07:21:04.000000000 +0000 @@ -0,0 +1,17 @@ +Description: Fix trivial spelling error. +Author: Yavor Doganov +Forwarded: https://savannah.nongnu.org/bugs/index.php?55567 +Last-Update: 2019-01-25 +--- + +--- lusernet.app.orig/ComposeWindowController.m ++++ lusernet.app/ComposeWindowController.m +@@ -87,7 +87,7 @@ + + if(![Pref_MessageViewing defaultEncoding]) + { +- NSLog(@"No default encoding, enconding message in UTF8"); ++ NSLog(@"No default encoding, encoding message in UTF8"); + [m setCharset: @"utf-8"]; + [m setContent: [[text string] dataUsingEncoding:NSUTF8StringEncoding]]; + } diff -Nru lusernet.app-0.4.2/debian/rules lusernet.app-0.4.3/debian/rules --- lusernet.app-0.4.2/debian/rules 2014-07-07 19:33:15.000000000 +0000 +++ lusernet.app-0.4.3/debian/rules 2019-01-25 06:57:56.000000000 +0000 @@ -6,80 +6,28 @@ #export DH_VERBOSE=1 include /usr/share/GNUstep/debian/config.mk -include /usr/share/dpkg/buildflags.mk - -export GNUSTEP_MAKEFILES := $(GS_MAKE_DIR) - +export DEB_BUILD_MAINT_OPTIONS = hardening=+all +export DEB_LDFLAGS_MAINT_APPEND = -Wl,--no-undefined -Wl,--as-needed d_app := $(CURDIR)/debian/lusernet.app -LDFLAGS += -Wl,-z,defs -Wl,--as-needed -TIFFICON = News.app.tiff -XPMICON = $(TIFFICON:.tiff=.xpm) - -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) -optim := debug=yes -endif - -build: build-arch build-indep -build-arch: build-stamp +%: + dh $@ -build-stamp: - dh_testdir - $(MAKE) $(optim) CPPFLAGS="$(CPPFLAGS)" OBJCFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" messages=yes - convert $(TIFFICON) -resize 32x32 xpm:$(XPMICON) - touch build-stamp +override_dh_auto_build: + dh_auto_build -- $(verbose) $(optim) \ + $(shell dpkg-buildflags --export=cmdline) -build-indep: ; - -clean: - dh_testdir - dh_testroot - $(RM) $(XPMICON) - $(MAKE) distclean - dh_clean +override_dh_installdocs: + dh_installdocs + mv $(d_app)/usr/share/doc/lusernet.app/Changes \ + $(d_app)/usr/share/doc/lusernet.app/NEWS -install: build - dh_testdir - dh_testroot - dh_prep - $(MAKE) install DESTDIR=$(d_app) GNUSTEP_INSTALLATION_DOMAIN=SYSTEM - rm $(CURDIR)/debian/*.app/usr/lib/GNUstep/Applications/*.app/Resources/*.desktop +override_dh_link: + rm $(d_app)$(GNUSTEP_SYSTEM_APPS)/*.app/Resources/*.desktop install -D -m 644 debian/LuserNET.desktop \ $(d_app)/usr/share/applications/LuserNET.desktop - - -# Build architecture-independent files here. -binary-indep: build install -# We have nothing to do by default. - -# Build architecture-dependent files here. -binary-arch: build install - dh_testdir - dh_testroot - dh_installchangelogs ChangeLog - dh_installdocs - mv $(d_app)/usr/share/doc/lusernet.app/Changes \ - $(d_app)/usr/share/doc/lusernet.app/changelog.old - gsdh_gnustep - dh_install $(XPMICON) /usr/share/pixmaps - dh_installmenu - dh_installman -ifeq ($(GS_USE_FHS),yes) dh_installdirs usr/share/GNUstep mv $(d_app)$(GNUSTEP_SYSTEM_APPS)/LuserNET.app/Resources \ $(d_app)/usr/share/GNUstep/LuserNET.app dh_link usr/share/GNUstep/LuserNET.app \ $(GNUSTEP_SYSTEM_APPS)/LuserNET.app/Resources -endif - dh_strip - dh_compress - dh_fixperms - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install diff -Nru lusernet.app-0.4.2/debian/watch lusernet.app-0.4.3/debian/watch --- lusernet.app-0.4.2/debian/watch 2014-07-07 19:13:17.000000000 +0000 +++ lusernet.app-0.4.3/debian/watch 2019-01-24 14:07:09.000000000 +0000 @@ -1,2 +1,3 @@ -version=3 -http://download.gna.org/gnustep-nonfsf/LuserNET-(.*)\.tar\.gz +version=4 +https://download.savannah.nongnu.org/releases/gnustep-nonfsf/ \ + LuserNET@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate diff -Nru lusernet.app-0.4.2/FolderListController.m lusernet.app-0.4.3/FolderListController.m --- lusernet.app-0.4.2/FolderListController.m 2004-03-02 23:58:37.000000000 +0000 +++ lusernet.app-0.4.3/FolderListController.m 2012-05-15 14:18:47.000000000 +0000 @@ -1,20 +1,27 @@ /* -copyright 2002 Alexander Malmberg -*/ + * + * Copyright 2002 Alexander Malmberg + * 2012 The Free Software Foundation + * + * Authors: Alexander Malmberg + * Riccardo Mottola + * + */ -#include -#include -#include -#include -#include -#include -#include -#include +#import +#import +#import +#import +#import +#import +#import +#import +#import -#include "FolderListController.h" +#import "FolderListController.h" -#include "MsgDB.h" -#include "main.h" +#import "MsgDB.h" +#import "main.h" @implementation FolderListController diff -Nru lusernet.app-0.4.2/FolderThreader.m lusernet.app-0.4.3/FolderThreader.m --- lusernet.app-0.4.2/FolderThreader.m 2004-03-02 23:58:37.000000000 +0000 +++ lusernet.app-0.4.3/FolderThreader.m 2012-04-13 15:53:27.000000000 +0000 @@ -9,7 +9,7 @@ #include "FolderThreader.h" -#include +#include static NSDate *parse_date(const char *date_header) @@ -544,7 +544,7 @@ return @""; d=[[NSData alloc] initWithBytes: c length: strlen(c)]; - s2=[MimeUtility decodeHeader: d charset: nil]; + s2=[CWMIMEUtility decodeHeader: d charset: nil]; [d release]; return s2; } @@ -586,7 +586,7 @@ else { d=[[NSData alloc] initWithBytes: c length: strlen(c)]; - s2=[MimeUtility decodeHeader: d charset: nil]; + s2=[CWMIMEUtility decodeHeader: d charset: nil]; [d release]; h->subject=[s2 retain]; } @@ -595,7 +595,7 @@ if (c) { d=[[NSData alloc] initWithBytes: c length: strlen(c)]; - s2=[MimeUtility decodeHeader: d charset: nil]; + s2=[CWMIMEUtility decodeHeader: d charset: nil]; [d release]; h->from=[s2 retain]; } diff -Nru lusernet.app-0.4.2/FolderWindowController.m lusernet.app-0.4.3/FolderWindowController.m --- lusernet.app-0.4.2/FolderWindowController.m 2004-03-02 23:58:37.000000000 +0000 +++ lusernet.app-0.4.3/FolderWindowController.m 2012-05-15 14:44:51.000000000 +0000 @@ -1,38 +1,47 @@ /* -copyright 2002 Alexander Malmberg -*/ + * + * Copyright 2002 Alexander Malmberg + * 2012 The Free Software Foundation + * + * Authors: Alexander Malmberg + * Riccardo Mottola + * + */ #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "MsgDB.h" - -#include "FolderWindowController.h" - -#include "FolderThreader.h" - -#include "KeyWindow.h" -#include "MessageViewController.h" -#include "main.h" +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + +#import + +#import "MsgDB.h" + +#import "FolderWindowController.h" + +#import "FolderThreader.h" + +#import "KeyWindow.h" +#import "MessageViewController.h" +#import "main.h" -#include "Pref_ReadAhead.h" +#import "Pref_ReadAhead.h" #define SORT_THREAD 0 diff -Nru lusernet.app-0.4.2/GNUmakefile lusernet.app-0.4.3/GNUmakefile --- lusernet.app-0.4.2/GNUmakefile 2004-03-03 00:01:26.000000000 +0000 +++ lusernet.app-0.4.3/GNUmakefile 2015-03-10 19:43:27.000000000 +0000 @@ -4,8 +4,8 @@ include VERSION PACKAGE_NAME = LuserNET -CVS_OPTIONS = -d/opt/cvsroot -CVS_MODULE_NAME = news +SVN_BASE_URL = svn+ssh://svn.gna.org/svn/gnustep-nonfsf/apps +SVN_MODULE_NAME = lusernet ADDITIONAL_OBJCFLAGS = -Wall -O2 -g @@ -44,7 +44,7 @@ MAKE_STRINGS_OPTIONS = --aggressive-match --aggressive-remove -LuserNET_LDFLAGS += -lPantomime +LuserNET_GUI_LIBS += -lPantomime -lcrypto #-lMime include $(GNUSTEP_MAKEFILES)/application.make diff -Nru lusernet.app-0.4.2/LuserNETInfo.plist lusernet.app-0.4.3/LuserNETInfo.plist --- lusernet.app-0.4.2/LuserNETInfo.plist 2002-03-09 15:56:58.000000000 +0000 +++ lusernet.app-0.4.3/LuserNETInfo.plist 2015-02-14 09:27:58.000000000 +0000 @@ -1,8 +1,10 @@ { + ApplicationName = "LuserNET"; ApplicationDescription = "News reader"; Authors = ("Alexander Malmberg "); - Copyright = "Copyright 2002 Alexander Malmberg (icon by Andrew Lindesay)"; + Copyright = "Copyright 2002 Alexander Malmberg\n2014-2015 others"; CopyrightDescription = "GNU General Public License"; URL = "http://w1.423.telia.com/~u42308495/alex/LuserNET/LuserNET.html"; + ApplicationRelease = "0.4.3"; } diff -Nru lusernet.app-0.4.2/main.h lusernet.app-0.4.3/main.h --- lusernet.app-0.4.2/main.h 2004-03-02 23:58:37.000000000 +0000 +++ lusernet.app-0.4.3/main.h 2014-06-12 00:03:56.000000000 +0000 @@ -9,7 +9,9 @@ @class NSApplication,NSMutableDictionary; @class FolderListController,LogWindowController,PreferencesWindowController; -@class Message; +@class CWMessage; + +extern NSString *DefaultEncodingChangedNotification; @interface AppDelegate : NSObject { @@ -27,7 +29,7 @@ -(void) openMessageWindow: (msg_id_t)mid; -(void) composeArticle: (NSDictionary *)headers; --(void) composeFollowupToMessage: (Message *)msg; +-(void) composeFollowupToMessage: (CWMessage *)msg; -(void) postArticleFrom: (id)sender : (const unsigned char *)data : (int)length; /* TODO */ @@ -37,7 +39,7 @@ @interface AppDelegate (prefs) -(void) openPreferences: (id)sender; @end - + extern AppDelegate *app_delegate; diff -Nru lusernet.app-0.4.2/main.m lusernet.app-0.4.3/main.m --- lusernet.app-0.4.2/main.m 2004-03-02 23:58:37.000000000 +0000 +++ lusernet.app-0.4.3/main.m 2014-06-12 00:03:56.000000000 +0000 @@ -1,25 +1,35 @@ /* -copyright 2002 Alexander Malmberg -*/ + * + * Copyright 2002 Alexander Malmberg + * 2012 The Free Software Foundation + * + * Authors: Alexander Malmberg + * Riccardo Mottola + * + */ + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + +#import + +#import "MsgDB.h" + +#import "LogWindowController.h" +#import "FolderWindowController.h" +#import "FolderListController.h" +#import "ComposeWindowController.h" -#include -#include -#include -#include -#include -#include -#include -#include - -#include "MsgDB.h" - -#include "LogWindowController.h" -#include "FolderWindowController.h" -#include "FolderListController.h" -#include "ComposeWindowController.h" - -#include "main.h" +#import "main.h" #include "VERSION" @@ -36,6 +46,7 @@ #define LocationKey @"MessageDatabaseLocation" +NSString *DefaultEncodingChangedNotification = @"DefaultEncodingChangedNotification"; @interface NSMenu (im_lazy) -(id ) addItemWithTitle: (NSString *)s; @@ -65,7 +76,7 @@ [[[ComposeWindowController alloc] initWithHeaders: headers] showWindow: self]; } --(void) composeFollowupToMessage: (Message *)msg +-(void) composeFollowupToMessage: (CWMessage *)msg { [[[ComposeWindowController alloc] initWithFollowupToMessage: msg] showWindow: self]; } @@ -209,6 +220,21 @@ #endif } +-(void) changeEncoding:(id)sender +{ + NSDictionary *charsets = [CWCharset allCharsets]; + + // [sender selectItemWithTitle:[sender title]]; + // [sender synchronizeTitleAndSelectedItem]; + + [[NSUserDefaults standardUserDefaults] setObject: + [[charsets allKeysForObject:[sender title]] objectAtIndex:0] + forKey:@"DefaultEncoding"]; + + [[NSNotificationCenter defaultCenter] + postNotificationName: DefaultEncodingChangedNotification + object: nil]; +} -(void) applicationWillFinishLaunching: (NSNotification *)n { @@ -307,6 +333,18 @@ m=[[NSMenu alloc] init]; /* [m addItemWithTitle: _(@"Open") action: @selector(openMessage:)];*/ + m2=[[NSMenu alloc] init]; + + NSDictionary *charsets = [CWCharset allCharsets]; + NSEnumerator *en = [[charsets allValues] objectEnumerator]; + NSString *encoding; + while((encoding = [en nextObject])) + { + [m2 addItemWithTitle: encoding + action: @selector(changeEncoding:)]; + } + + [m setSubmenu: m2 forItem: [m addItemWithTitle: _(@"Change encoding...")]]; [m addItemWithTitle: _(@"Toggle read/unread") action: @selector(messageToggleRead:) keyEquivalent: @"m"]; diff -Nru lusernet.app-0.4.2/MessageViewController.h lusernet.app-0.4.3/MessageViewController.h --- lusernet.app-0.4.2/MessageViewController.h 2002-03-08 00:39:34.000000000 +0000 +++ lusernet.app-0.4.3/MessageViewController.h 2012-04-13 15:53:27.000000000 +0000 @@ -6,7 +6,7 @@ #define MessageViewController_h @class NSTextView,NSScrollView,NSMutableDictionary; -@class Message; +@class CWMessage; #include "MsgDB.h" @@ -17,7 +17,7 @@ MsgDB *mdb; msg_id_t mid; - Message *cur_message; + CWMessage *cur_message; /* actually an NSMapTable */ void *cur_options; @@ -48,6 +48,8 @@ -(void) messageSave; +-(void) encodingChanged: (NSNotification *)n; + @end #endif diff -Nru lusernet.app-0.4.2/MessageViewController.m lusernet.app-0.4.3/MessageViewController.m --- lusernet.app-0.4.2/MessageViewController.m 2004-03-02 23:58:37.000000000 +0000 +++ lusernet.app-0.4.3/MessageViewController.m 2012-05-15 14:56:05.000000000 +0000 @@ -1,36 +1,46 @@ /* -copyright 2002 Alexander Malmberg -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "MessageViewController.h" - -#include "Pref_MessageViewing.h" -#include "main.h" - -#include "GUISource.h" - -#include -#include -#include -#include -#include + * + * Copyright 2002 Alexander Malmberg + * 2012 The Free Software Foundation + * + * Authors: Alexander Malmberg + * Riccardo Mottola + * + */ + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + +#import "MessageViewController.h" + +#import "Pref_MessageViewing.h" +#import "main.h" + +#import "GUISource.h" + +#import +#import +#import +#import +#import //#define USE_MIME_STUFF #ifdef USE_MIME_STUFF -#include +#import static MimeManager *mime_manager; #endif @@ -89,7 +99,7 @@ @interface MessageViewController (private) --(void) _renderContent:(id)p parent:(Part *)parent to:(NSMutableAttributedString *)str; +-(void) _renderContent:(id)p parent:(CWPart *)parent to:(NSMutableAttributedString *)str; -(void) _renderPart:(id)p to:(NSMutableAttributedString *)str; -(void) displayMessage; @@ -212,10 +222,10 @@ } --(void) _render_multipart: (MimeMultipart *)mp type: (NSString *)ct +-(void) _render_multipart: (CWMIMEMultipart *)mp type: (NSString *)ct to: (NSMutableAttributedString *)str { - Part *bp; + CWPart *bp; int i; if ([ct isEqual: @"multipart/alternative"]) @@ -227,14 +237,14 @@ else disp=[mp count]-1; - bp=[mp bodyPartAtIndex: disp]; + bp=[mp partAtIndex: disp]; append(str,header_bold_dict,_(@"Currently shown:")); append(str,header_dict,@" %@\n",[bp contentType]); append(str,header_bold_dict,_(@"Alternatives:")); for (i=0;i<[mp count];i++) { appendLink(str,LINK_MULTIPART_ALTERNATIVE,mp,i+1,@" %@", - [[mp bodyPartAtIndex: i] contentType]); + [[mp partAtIndex: i] contentType]); } append(str,nil,@"\n"); @@ -249,7 +259,7 @@ for (i=0;i<[mp count];i++) { - bp=[mp bodyPartAtIndex: i]; + bp=[mp partAtIndex: i]; append(str,header_bold_dict,_(@"\nPart:")); append(str,header_dict,@" %i %@\n",i,[bp contentType]); [self _renderPart:bp to:str]; @@ -264,7 +274,7 @@ NSDictionary *fd; NSFont *f; - NSRange r; + // NSRange r; if (cur_font) f=[Pref_MessageViewing font2]; @@ -276,7 +286,7 @@ #if 0 /* TODO: need to update with new Pantomime interface */ /* TODO: this should probably be optional */ - r=[MimeUtility rangeOfUUEncodedStringFromString: text + r=[CWMIMEUtility rangeOfUUEncodedStringFromString: text range: NSMakeRange(0,[text length])]; if (r.location==NSNotFound) @@ -291,7 +301,7 @@ appendPlainText(str,fd,[text substringWithRange: NSMakeRange(0,r.location)]); /* TODO: this is inefficient */ - fw=[MimeUtility fileWrapperFromUUEncodedString: [text substringWithRange: r]]; + fw=[CWMIMEUtility fileWrapperFromUUEncodedString: [text substringWithRange: r]]; append(str,header_bold_dict,_(@"UUEncoded file:")); append(str,header_dict,@" %@ ",[fw preferredFilename]); @@ -312,7 +322,7 @@ } --(void) _renderContent:(id)p parent:(Part *)parent +-(void) _renderContent:(id)p parent:(CWPart *)parent to:(NSMutableAttributedString *)str { NSString *ct=[parent contentType]; @@ -340,9 +350,9 @@ /* Some content classes/types we handle internally. */ - if ([p isKindOfClass: [MimeMultipart class]]) + if ([p isKindOfClass: [CWMIMEMultipart class]]) { - [self _render_multipart: (MimeMultipart *)p type: ct to: str]; + [self _render_multipart: (CWMIMEMultipart *)p type: ct to: str]; return; } @@ -352,7 +362,7 @@ return; } - if ([p isKindOfClass: [Part class]]) + if ([p isKindOfClass: [CWPart class]]) { [self _renderPart: p to: str]; return; @@ -553,13 +563,13 @@ -(void) _renderPart:(id)p to:(NSMutableAttributedString *)str { - if ([p isKindOfClass: [Message class]]) + if ([p isKindOfClass: [CWMessage class]]) { - Message *m=(Message *)p; + CWMessage *m=(CWMessage *)p; append(str,header_bold_dict,_(@"Subject:")); append(str,header_dict,@" %@\n",[m subject]); append(str,header_bold_dict,_(@"From:")); - append(str,header_dict,@" %@\n",[[m from] unicodeStringValue]); + append(str,header_dict,@" %@\n",[[m from] stringValue]); append(str,header_bold_dict,_(@"Newsgroups:")); append(str,header_dict,@" %@\n",[m headerValueForName: @"Newsgroups"]); append(str,header_bold_dict,_(@"Date:")); @@ -569,9 +579,9 @@ append(str,nil,@"\n"); [self _renderContent:[m content] parent: m to:str]; } - else if ([p isKindOfClass: [Part class]]) + else if ([p isKindOfClass: [CWPart class]]) { /* handles MimeBodyPart and any extensions */ - [self _renderContent:[(Part *)p content] parent: (Part *)p to:str]; + [self _renderContent:[(CWPart *)p content] parent: (CWPart *)p to:str]; } else { @@ -655,7 +665,27 @@ NSData *d; d=[[NSData alloc] initWithBytes: data length: length]; - cur_message=[(Message *)[Message alloc] initWithData: d]; + if([mdb msg_getHeader: "ContentType" : mid]) + { + cur_message=[(CWMessage *)[CWMessage alloc] initWithData: d]; + } + else + { + cur_message=[(CWMessage *)[CWMessage alloc] initWithData: d + charset:[Pref_MessageViewing defaultEncoding]]; + } + if(![cur_message contentType]) + { + [cur_message setContentType:@"text/plain"]; + } + else + { + ASSIGN( + cur_message, + [(CWMessage *)[CWMessage alloc] initWithData: d + charset:[cur_message charset]] + ); + } [d release]; { @@ -815,21 +845,21 @@ NSData *d; NSString *filename; - if ([l->object isKindOf: [NSString class]]) + if ([l->object isKindOfClass: [NSString class]]) { NSString *s=(NSString *)l->object; NSRange r; - UUFile *fw; - r=[MimeUtility rangeOfUUEncodedStringFromString: s + CWUUFile *fw; + r=[CWUUFile rangeOfUUEncodedStringFromString: s range: NSMakeRange(0,[s length])]; - fw=[MimeUtility fileFromUUEncodedString: [s substringWithRange: r]]; + fw=[CWUUFile fileFromUUEncodedString: [s substringWithRange: r]]; filename=AUTORELEASE(RETAIN([fw name])); d=AUTORELEASE(RETAIN([fw data])); } else { - Part *p=(Part *)l->object; + CWPart *p=(CWPart *)l->object; d=(NSData *)[p content]; filename=[p filename]; } @@ -926,6 +956,12 @@ mid=0; + [[NSNotificationCenter defaultCenter] + addObserver: self + selector: @selector(encodingChanged:) + name: DefaultEncodingChangedNotification + object: nil]; + return self; } @@ -1154,6 +1190,11 @@ [app_delegate composeFollowupToMessage: cur_message]; } +-(void) encodingChanged: (NSNotification *)n +{ + [self getData]; + [self displayMessage]; +} @end diff -Nru lusernet.app-0.4.2/MsgDB.m lusernet.app-0.4.3/MsgDB.m --- lusernet.app-0.4.2/MsgDB.m 2004-03-02 23:58:37.000000000 +0000 +++ lusernet.app-0.4.3/MsgDB.m 2014-07-30 16:56:27.000000000 +0000 @@ -1,5 +1,6 @@ /* copyright 2002 Alexander Malmberg + 2012 Riccardo Mottola */ /* @@ -18,6 +19,7 @@ #include #include #include +#import #include "MsgDB.h" @@ -340,7 +342,7 @@ // fprintf(stderr,"got '%s' type '%s'\n",buf,[self msg_getMetaHeader: "Type" : mid]); - c=objc_lookup_class([self msg_getMetaHeader: "Type" : mid]); + c=objc_lookUpClass([self msg_getMetaHeader: "Type" : mid]); n=[[NSNumber alloc] initWithInt: i]; src=[[c alloc] initWithMsg: mid db: self]; [sources setObject: src forKey: n]; @@ -667,20 +669,20 @@ fprintf(f,"%i\n",num_meta_headers); for (i=0;inum_mhs,strlen(m->message_id)); + fprintf(f,"%i %i ",m->num_mhs,(int)strlen(m->message_id)); fwrite(m->message_id,1,strlen(m->message_id),f); fputc('\n',f); for (j=0;jnum_mhs;j++) { - fprintf(f,"%i %i ",m->mhs[j].mhid,strlen(m->mhs[j].value)); - fwrite(m->mhs[j].value,1,strlen(m->mhs[j].value),f); + fprintf(f,"%i %i ",m->mhs[j].mhid,(int)strlen(m->mhs[j].value)); + fwrite(m->mhs[j].value,1,strlen(m->mhs[j].value),f); fputc('\n',f); } } diff -Nru lusernet.app-0.4.2/NNTPServer.h lusernet.app-0.4.3/NNTPServer.h --- lusernet.app-0.4.2/NNTPServer.h 2004-03-02 23:58:37.000000000 +0000 +++ lusernet.app-0.4.3/NNTPServer.h 2014-07-30 16:56:27.000000000 +0000 @@ -108,7 +108,7 @@ -(void) enableConnect: (int)should_connect; -(void) enableTimeout: (int)should_connect; --(void) setReceiver: (id)arec; +-(void) setReceiver: (id)arec; -(void) closeAllConnections; -(void) killAllConnections; diff -Nru lusernet.app-0.4.2/NNTPServer.m lusernet.app-0.4.3/NNTPServer.m --- lusernet.app-0.4.2/NNTPServer.m 2004-03-02 23:58:37.000000000 +0000 +++ lusernet.app-0.4.3/NNTPServer.m 2015-03-13 19:17:43.000000000 +0000 @@ -1,5 +1,6 @@ /* copyright 2001-2002 Alexander Malmberg + 2015 Riccardo Mottola */ #include @@ -740,7 +741,7 @@ memcpy(cn->resp_msg,b,c-b); cn->resp_msg[c-b]=0; } - cn->resp_code=atoi(cn->resp_buf); + cn->resp_code=atoi((const char *)(cn->resp_buf)); c+=2; if (c==e) cn->resp_buf_len=0; @@ -813,13 +814,13 @@ { if (cn->resp_data_len>48*1024) { - char **list; + unsigned char **list; int num; unsigned char *b,*d,*e; num=0; /* TODO: this will be excessively large almost all the time */ - list=malloc(sizeof(char *)*(cn->cur.d.range.h-cn->cur.d.range.l+1)); + list=malloc(sizeof(unsigned char *)*(cn->cur.d.range.h-cn->cur.d.range.l+1)); d=b=cn->resp_buf; /* always leave at least one byte so there will be a final non-partial call to nntp_headerRange:... */ @@ -843,10 +844,10 @@ #endif [rec nntp_headerRange: - cn->cur.d.range.group : - cn->cur.d.range.l : cn->cur.d.range.h : num : list - partial: YES - qid: cn->cur.qid]; + cn->cur.d.range.group : + cn->cur.d.range.l : cn->cur.d.range.h : num : (char **)list + partial: YES + qid: (unsigned int)cn->cur.qid]; free(list); @@ -1047,7 +1048,7 @@ c->write_pending=NULL; c->write_len=length; - c->write_pending=data; + c->write_pending=(char *)data; c->write_pending_ofs=0; #ifdef DEBUG_SOCKET @@ -1251,9 +1252,9 @@ break; case S_HEADER_RANGE2: { - char **list; + unsigned char **list; int num; - char *b,*d,*e; + unsigned char *b,*d,*e; num=0; list=malloc(sizeof(char *)*(q->d.range.h-q->d.range.l+1)); @@ -1279,9 +1280,9 @@ { [rec nntp_headerRange: q->d.range.group : - q->d.range.l : q->d.range.h : num : list + q->d.range.l : q->d.range.h : num : (char **)list partial: NO - qid: q->qid]; + qid: (unsigned int)q->qid]; } free(list); diff -Nru lusernet.app-0.4.2/NNTPSourceGUI.m lusernet.app-0.4.3/NNTPSourceGUI.m --- lusernet.app-0.4.2/NNTPSourceGUI.m 2004-03-02 23:58:37.000000000 +0000 +++ lusernet.app-0.4.3/NNTPSourceGUI.m 2012-04-13 15:53:27.000000000 +0000 @@ -347,7 +347,6 @@ [win setTitle: _(@"NNTPSource properties")]; [win setDelegate: self]; [win autoSetupKeyViewChain]; - [win release]; return self; } diff -Nru lusernet.app-0.4.2/NNTPSource.m lusernet.app-0.4.3/NNTPSource.m --- lusernet.app-0.4.2/NNTPSource.m 2004-03-02 23:58:37.000000000 +0000 +++ lusernet.app-0.4.3/NNTPSource.m 2014-01-08 11:33:27.000000000 +0000 @@ -1,24 +1,29 @@ /* copyright 2002 Alexander Malmberg -*/ - -#include + 2014 The GNUstep team -#include -#include -#include -#include -#include +Authors: Alexander Malmberg + Riccardo Mottola -#include +*/ -#include "MsgDB.h" +#include -#include "NNTPSource.h" -#include "GUISource.h" -#include "NNTPSourceGUI.h" +#import +#import +#import +#import +#import +#import +#import + +#import "MsgDB.h" + +#import "NNTPSource.h" +#import "GUISource.h" +#import "NNTPSourceGUI.h" -#include "NNTPServer.h" +#import "NNTPServer.h" typedef struct nntpsource_group_s group_t; diff -Nru lusernet.app-0.4.2/Pref_MessageViewing.h lusernet.app-0.4.3/Pref_MessageViewing.h --- lusernet.app-0.4.2/Pref_MessageViewing.h 2002-03-11 00:06:46.000000000 +0000 +++ lusernet.app-0.4.3/Pref_MessageViewing.h 2012-04-13 15:53:27.000000000 +0000 @@ -27,6 +27,7 @@ +(NSFont *) font1; +(NSFont *) font2; ++(NSString *) defaultEncoding; @end diff -Nru lusernet.app-0.4.2/Pref_MessageViewing.m lusernet.app-0.4.3/Pref_MessageViewing.m --- lusernet.app-0.4.2/Pref_MessageViewing.m 2004-03-02 23:58:37.000000000 +0000 +++ lusernet.app-0.4.3/Pref_MessageViewing.m 2012-05-15 14:18:47.000000000 +0000 @@ -1,19 +1,30 @@ /* -copyright 2002 Alexander Malmberg -*/ + * + * Copyright 2002 Alexander Malmberg + * 2012 The Free Software Foundation + * + * Authors: Alexander Malmberg + * Riccardo Mottola + * + */ + +#import +#import +#import +#import +#import + +#import +#import +#import +#import +#import +#import +#import -#include -#include -#include -#include - -#include -#include -#include -#include -#include +#import -#include "Pref_MessageViewing.h" +#import "Pref_MessageViewing.h" #define ColorMessagesKey @"ColorMessages" @@ -192,6 +203,7 @@ { NSTextField *f; NSButton *b; + NSPopUpButton *pop; GSHbox *hb; hb=[[GSHbox alloc] init]; @@ -289,6 +301,49 @@ [top addView: hb enablingYResizing: NO]; DESTROY(hb); + + [top addSeparator]; + + hb=[[GSHbox alloc] init]; + [hb setDefaultMinXMargin: 4]; + [hb setAutoresizingMask: NSViewWidthSizable]; + + f=[[NSTextField alloc] init]; + [f setStringValue: _(@"Default encoding ")]; + [f setEditable: NO]; + [f setDrawsBackground: NO]; + [f setBordered: NO]; + [f setBezeled: NO]; + [f setSelectable: NO]; + [f sizeToFit]; + [f setAutoresizingMask: 0]; + [hb addView: f enablingXResizing: NO]; + DESTROY(f); + + pop = [[NSPopUpButton alloc] init]; + [pop setPullsDown:NO]; + NSDictionary *charsets = [CWCharset allCharsets]; + NSEnumerator *en = [[charsets allValues] objectEnumerator]; + NSString *encoding; + while((encoding = [en nextObject])) + { + [pop addItemWithTitle:encoding]; + } + [pop selectItemWithTitle: + [charsets + objectForKey: + [sd objectForKey:@"DefaultEncoding"]]]; + [pop synchronizeTitleAndSelectedItem]; + [pop setTarget: self]; + [pop setAction: @selector(changeEncoding:)]; + [pop sizeToFit]; + [hb addView: pop enablingXResizing: NO]; + DESTROY(pop); + + + [top addView: hb enablingYResizing: NO]; + DESTROY(hb); + } [self revert]; @@ -334,5 +389,23 @@ [f_cur setFont: f]; } +-(void) changeEncoding:(id)sender +{ + NSDictionary *charsets = [CWCharset allCharsets]; + sd=[NSUserDefaults standardUserDefaults]; + + [sender selectItemWithTitle:[sender titleOfSelectedItem]]; + [sender synchronizeTitleAndSelectedItem]; + + [sd setObject: + [[charsets allKeysForObject:[sender titleOfSelectedItem]] objectAtIndex:0] + forKey:@"DefaultEncoding"]; +} + ++(NSString *) defaultEncoding +{ + return [sd stringForKey:@"DefaultEncoding"]; +} + @end diff -Nru lusernet.app-0.4.2/Pref_Posting.m lusernet.app-0.4.3/Pref_Posting.m --- lusernet.app-0.4.2/Pref_Posting.m 2004-03-02 23:58:37.000000000 +0000 +++ lusernet.app-0.4.3/Pref_Posting.m 2012-04-13 15:53:27.000000000 +0000 @@ -1,10 +1,12 @@ /* copyright 2002 Alexander Malmberg + 2012 Riccardo Mottola */ #include #include #include +#import #include #include #include diff -Nru lusernet.app-0.4.2/VERSION lusernet.app-0.4.3/VERSION --- lusernet.app-0.4.2/VERSION 2004-03-03 00:01:31.000000000 +0000 +++ lusernet.app-0.4.3/VERSION 2015-02-14 09:27:58.000000000 +0000 @@ -1,4 +1,4 @@ -#define VERSION "0.4.2" /* -VERSION = 0.4.2 +#define VERSION "0.4.3" /* +VERSION = 0.4.3 # */