[pan2: 43/268] Merge branch 'tmp' into experimental



commit ba74ae6ee506b5b7615165e0d96a58ca80b75273
Merge: d9c273c 6dffb39
Author: Heinrich MÃller <sphemuel stud informatik uni-erlangen de>
Date:   Mon May 30 13:25:12 2011 +0200

    Merge branch 'tmp' into experimental
    
    Conflicts:
    	configure.in
    	pan/data-impl/data-impl.cc
    	pan/data-impl/data-impl.h
    	pan/data-impl/groups.cc
    	pan/data-impl/headers.cc
    	pan/data-impl/server.cc
    	pan/data/Makefile.am
    	pan/data/data.h
    	pan/data/server-info.h
    	pan/general/file-util.cc
    	pan/general/file-util.h
    	pan/gui/Makefile.am
    	pan/gui/actions.cc
    	pan/gui/body-pane.cc
    	pan/gui/dl-headers-ui.cc
    	pan/gui/e-charset-combo-box.c
    	pan/gui/e-charset-dialog.c
    	pan/gui/group-pane.cc
    	pan/gui/group-prefs-dialog.cc
    	pan/gui/gui.cc
    	pan/gui/gui.h
    	pan/gui/header-pane.cc
    	pan/gui/pan-ui.h
    	pan/gui/pan.cc
    	pan/gui/pan.ui.h
    	pan/gui/post-ui.cc
    	pan/gui/post-ui.h
    	pan/gui/post.ui.h
    	pan/gui/prefs-ui.cc
    	pan/gui/profiles-dialog.cc
    	pan/gui/save-ui.cc
    	pan/gui/score-add-ui.cc
    	pan/gui/score-view-ui.cc
    	pan/gui/score-view-ui.h
    	pan/gui/server-ui.cc
    	pan/gui/task-pane.cc
    	pan/gui/task-pane.h
    	pan/tasks/Makefile.am
    	pan/tasks/decoder.cc
    	pan/tasks/nntp.cc
    	pan/tasks/nntp.h
    	pan/tasks/nzb.cc
    	pan/tasks/nzb.h
    	pan/tasks/queue.cc
    	pan/tasks/queue.h
    	pan/tasks/task-article.cc
    	pan/tasks/task-weak-ordering.h
    	pan/tasks/task.cc
    	pan/tasks/task.h
    	pan/usenet-utils/message-check.cc
    	pan/usenet-utils/message-check.h
    	pan/usenet-utils/mime-utils.cc
    	pan/usenet-utils/mime-utils.h
    	pan/usenet-utils/text-massager-test.cc
    	pan/usenet-utils/text-massager.cc
    	pan/usenet-utils/text-massager.h
    	pan/usenet-utils/url-find-test.cc
    	pan/usenet-utils/url-find.cc
    	po/da.po
    	po/de.po
    	uulib/uudeview.h
    	uulib/uuencode.c

 .gitattributes                                     |    1 +
 .gitignore                                         |   19 +
 README.windows                                     |   15 +
 configure.in                                       |  171 ---
 pan/data-impl/data-impl.cc                         |    4 +-
 pan/data-impl/data-impl.h                          |   13 +
 pan/data-impl/groups.cc                            |    3 +
 pan/data-impl/headers.cc                           |   16 +-
 pan/data/decode-test-cache/apostrophe.msg          |   13 +
 pan/data/decode-test-cache/collision.msg           |   23 +
 pan/data/decode-test-cache/micro.msg               |   12 +
 pan/data/decode-test-cache/noisy_1_2.msg           |  668 +++++++++++
 pan/data/decode-test-cache/noisy_2_2.msg           |  124 ++
 pan/data/decode-test-cache/penguin_1_2.msg         |  332 ++++++
 pan/data/decode-test-cache/penguin_2_2.msg         |   41 +
 .../decode-test-cache/two_mime_attachments.msg     |  671 +++++++++++
 pan/data/decode-test-cache/two_uu_attachments.msg  |   18 +
 pan/data/decode-test-cache/xuuencode.msg           |  447 +++++++
 pan/data/decode-test-cache/yenc.msg                |  Bin 0 -> 2795 bytes
 pan/data/decode-test-cache/yenc_1_2.msg            |  103 ++
 pan/data/decode-test-cache/yenc_2_2.msg            |   78 ++
 pan/gui/Makefile.am                                |    1 +
 pan/gui/actions.cc                                 |    1 +
 pan/gui/body-pane.cc                               |   56 +-
 pan/gui/e-charset-combo-box.c                      |   10 +-
 pan/gui/e-charset-dialog.c                         |    2 +-
 pan/gui/group-pane.cc                              |    1 +
 pan/gui/group-prefs-dialog.cc                      |   22 +-
 pan/gui/gtk_compat.h                               |  118 ++
 pan/gui/gui.cc                                     |   22 +-
 pan/gui/gui.h                                      |    9 +-
 pan/gui/header-pane.cc                             |   27 +-
 pan/gui/pan-ui.h                                   |    1 -
 pan/gui/pan.cc                                     |    6 +-
 pan/gui/pan.ui.h                                   |    4 +
 pan/gui/post-ui.cc                                 |   54 +-
 pan/gui/post-ui.h                                  |    3 +-
 pan/gui/post.ui.h                                  |    3 +-
 pan/gui/prefs-ui.cc                                |   30 +-
 pan/gui/profiles-dialog.cc                         |    6 +-
 pan/gui/save-ui.cc                                 |   10 +-
 pan/gui/score-add-ui.cc                            |    9 +-
 pan/gui/score-view-ui.cc                           |    3 +-
 pan/gui/score-view-ui.h                            |    2 +-
 pan/gui/server-ui.cc                               |    1 +
 pan/gui/task-pane.cc                               |    2 +-
 pan/gui/task-pane.h                                |    2 +-
 pan/tasks/decoder.cc                               |    4 +-
 pan/usenet-utils/text-massager-test.cc             |  645 ++++++-----
 pan/usenet-utils/text-massager.cc                  |  221 +++--
 pan/usenet-utils/text-massager.h                   |    4 +-
 pan/usenet-utils/url-find-test.cc                  |   19 +-
 pan/usenet-utils/url-find.cc                       |   65 +-
 po/da.po                                           |  436 ++++----
 po/de.po                                           | 1251 ++++++++++++++------
 uulib/uuencode.c                                   |  158 ++--
 56 files changed, 4673 insertions(+), 1307 deletions(-)
---
diff --cc README.windows
index 0000000,0000000..f5f7ca2
new file mode 100644
--- /dev/null
+++ b/README.windows
@@@ -1,0 -1,0 +1,15 @@@
++
++   http://pan.rebelbase.com/download/releases/0.134/
++   has a full list of changes since the previous release.
++
++   On Windows, Pan requires GTK 2.16.0 or higher, which can be found
++   at <http://gtk-win.sourceforge.net/home/index.php/en/Downloads>.
++
++   Found a bug?  Have a suggestion?
++   Send feedback to the pan-users nongnu org mailing list.
++
++   Information on building Pan on Windows can be found in README.mingw.
++
++   See the following page for more information on Pan builds for Windows:
++   <http://pan.rebelbase.com/download/>.
++
diff --cc pan/gui/group-prefs-dialog.cc
index 70fd3f5,be50369..f336522
--- a/pan/gui/group-prefs-dialog.cc
+++ b/pan/gui/group-prefs-dialog.cc
@@@ -39,15 -40,8 +40,8 @@@ namespac
    {
      delete static_cast<GroupPrefsDialog*>(castme);
    }
- 
- #if !GTK_CHECK_VERSION(2,18,0)
-   bool gtk_widget_get_sensitive( GtkWidget *w)
-   {
-     return GTK_WIDGET_SENSITIVE(w);
-   }
- #endif
  }
 -  
 +
  void
  GroupPrefsDialog :: save_from_gui ()
  {
diff --cc pan/gui/gui.cc
index 5350434,2494a19..0c41a53
--- a/pan/gui/gui.cc
+++ b/pan/gui/gui.cc
@@@ -603,12 -593,13 +600,12 @@@ void GUI :: do_save_articles_to_nzb (
        std::string emptystring;
        foreach_const (std::vector<Article>, copies, it)
          tasks.push_back (new TaskArticle (_data, _data, *it, _cache, _data, 0, TaskArticle::RAW,emptystring));
 -    
 -          // write them to a file
 -          std::ofstream tmp(file.c_str());
 +
 +      // write them to a file
 +      std::ofstream tmp(file.c_str());
-       if (tmp.good())
+           if (tmp.good()) {
 -            NZB :: nzb_to_xml_file (tmp, tasks); 
 -            tmp.close();
 -          }
 +        NZB :: nzb_to_xml_file (tmp, tasks);
 +      tmp.close();
      }
  }
  
diff --cc pan/gui/pan.cc
index 4c31ff8,117cb03..25c349e
--- a/pan/gui/pan.cc
+++ b/pan/gui/pan.cc
@@@ -109,7 -108,7 +109,8 @@@ namespac
      Queue * queue;
    };
  
 +  void add_grouplist_task (GtkObject *, gpointer user_data)
+   void add_grouplist_task (GtkWidget *, gpointer user_data)
    {
      DataAndQueue * foo (static_cast<DataAndQueue*>(user_data));
      const quarks_t new_servers (foo->data->get_servers());
diff --cc pan/gui/post-ui.cc
index 18a4ea2,ad4b754..96f96b6
--- a/pan/gui/post-ui.cc
+++ b/pan/gui/post-ui.cc
@@@ -424,8 -320,23 +425,23 @@@ PostUI :: rot13_selection (
      gtk_text_buffer_insert (_body_buf, &start, str, strlen(str));
      g_free (str);
    }
 -} 
 +}
  
+ void
+ PostUI :: wrap_selection ()
+ {
+   GtkTextIter start, end;
+   if (gtk_text_buffer_get_selection_bounds (_body_buf, &start, &end))
+   {
+     char * str (gtk_text_buffer_get_text (_body_buf, &start, &end, false));
+     std::string s(str);
+     s = _tm.fill(s);
+     gtk_text_buffer_delete (_body_buf, &start, &end);
+     gtk_text_buffer_insert (_body_buf, &start, s.c_str(), s.length() );
+     g_free (str);
+   }
+ }
+ 
  namespace
  {
    gboolean delete_event_cb (GtkWidget*, GdkEvent*, gpointer user_data)
@@@ -690,17 -587,12 +707,12 @@@ PostUI :: on_progress_finished (Progres
    _post_task->remove_listener (this);
    gtk_widget_destroy (_post_dialog);
  
-   if (_file_queue_empty) {
-     GMimeMessage * message (((TaskPost*)_post_task)->get_message ());
+   GMimeMessage * message (_post_task->get_message ());
 -  if (status != OK) // error posting.. stop.
 -    done_sending_message (message, false);
 -  else
 -    maybe_mail_message (message);
 -}
 +    if (status != OK) // error posting.. stop.
 +      done_sending_message (message, false);
 +    else
 +      maybe_mail_message (message);
 +  }
- }
  
  void
  PostUI :: on_progress_error (Progress&, const StringView& message)
@@@ -779,38 -671,31 +791,38 @@@ PostUI :: maybe_post_message (GMimeMess
    /**
    ***  Pop up a ``Posting'' Dialog...
    **/
 -  GtkWidget * d = gtk_dialog_new_with_buttons (_("Posting Article"),
 -                                               GTK_WINDOW(_root),
 -                                               GTK_DIALOG_DESTROY_WITH_PARENT,
 -                                               //GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
 -                                               NULL);
 -  char buf[512];
 -  g_snprintf (buf, sizeof(buf), "<b>%s</b>", _("Posting..."));
 -  GtkWidget * w = GTK_WIDGET (g_object_new (GTK_TYPE_LABEL, "use-markup", TRUE, "label", buf, NULL));
 -  GtkWidget *content = gtk_dialog_get_content_area(GTK_DIALOG(d));
 -  gtk_box_pack_start (GTK_BOX(content), w, false, false, PAD_SMALL);
 -  w = gtk_progress_bar_new ();
 -  gtk_progress_bar_set_pulse_step (GTK_PROGRESS_BAR(w), 0.05);
 -  const guint tag = g_timeout_add (100, pulse_me, w);
 -  gtk_box_pack_start (GTK_BOX(content), w, false, false, PAD_SMALL);
 -  g_object_set_data_full (G_OBJECT(d), "progressbar-timeout-tag", GUINT_TO_POINTER(tag), remove_progress_tag);
 -  _post_dialog = d;
 -  g_signal_connect (_post_dialog, "destroy", G_CALLBACK(gtk_widget_destroyed), &_post_dialog);
 -  gtk_widget_show_all (d);
 -  _post_task = new TaskPost (server, message);
 -  _post_task->add_listener (this);
 -  
 -  _queue.add_task (_post_task, Queue::TOP);
 +  if(_file_queue_empty)
 +  {
 +    GtkWidget * d = gtk_dialog_new_with_buttons (_("Posting Article"),
 +                                                 GTK_WINDOW(_root),
 +                                                 GTK_DIALOG_DESTROY_WITH_PARENT,
 +                                                 //GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
 +                                                 NULL);
 +    char buf[512];
 +    g_snprintf (buf, sizeof(buf), "<b>%s</b>", _("Posting..."));
 +    GtkWidget * w = GTK_WIDGET (g_object_new (GTK_TYPE_LABEL, "use-markup", TRUE, "label", buf, NULL));
 +    GtkWidget *content = gtk_dialog_get_content_area(GTK_DIALOG(d));
 +    gtk_box_pack_start (GTK_BOX(content), w, false, false, PAD_SMALL);
 +    w = gtk_progress_bar_new ();
 +    gtk_progress_bar_set_pulse_step (GTK_PROGRESS_BAR(w), 0.05);
 +    const guint tag = g_timeout_add (100, pulse_me, w);
 +    gtk_box_pack_start (GTK_BOX(content), w, false, false, PAD_SMALL);
 +    g_object_set_data_full (G_OBJECT(d), "progressbar-timeout-tag", GUINT_TO_POINTER(tag), remove_progress_tag);
 +    _post_dialog = d;
 +    g_signal_connect (_post_dialog, "destroy", G_CALLBACK(gtk_widget_destroyed), &_post_dialog);
 +    gtk_widget_show_all (d);
 +
 +    _post_task = new TaskPost (server, message);
 +    _post_task->add_listener (this);
 +    _queue.add_task (_post_task, Queue::TOP);
 +  } else {
 +     foreach_const (tasks_set, _file_queue_tasks, it)
 +        _queue.add_task (*it, Queue::BOTTOM);
 +     close_window(true); // dont wait for the upload queue
 +  }
  
    /**
-   ***  Maybe remember the charsets
+   ***  Maybe remember the charsets.
    **/
    if (remember_charsets) {
      const char * text = gtk_entry_get_text (GTK_ENTRY(_groups_entry));
@@@ -1330,9 -1211,9 +1342,9 @@@ PostUI :: update_profile_combobox (
        sel_index = index;
      ++index;
    }
 - 
 +
    // ensure _something_ is selected...
-   gtk_combo_box_set_active (combo, sel_index);
+   gtk_combo_box_set_active (GTK_COMBO_BOX(combo), sel_index);
  
    // cleanup
    g_free (active_text);
@@@ -1732,8 -1613,10 +1744,10 @@@ PostUI :: set_message (GMimeMessage * m
    s = utf8ize (tmp);
    g_free (tmp);
    if (!s.empty()) {
+     if (_prefs.get_flag ("compose-wrap-enabled", true)) {
 -      s = TextMassager().fill (s);
 -      s += "\n\n";
 +    s = TextMassager().fill (s);
 +    s += "\n\n";
+     }
      gtk_text_buffer_set_text (_body_buf, s.c_str(), s.size());
    }
  
diff --cc pan/gui/post-ui.h
index 1973d68,29d1f7b..af57c66
--- a/pan/gui/post-ui.h
+++ b/pan/gui/post-ui.h
@@@ -44,11 -39,9 +44,11 @@@ namespace pa
    class PostUI: private Progress::Listener
    {
      public:
-       static PostUI* create_window (GtkWidget*, Data&, Queue&, GroupServer&, Profiles&,
+       static PostUI* create_window (GtkWindow*, Data&, Queue&, GroupServer&, Profiles&,
                                      GMimeMessage*, Prefs&, GroupPrefs&);
 -    
 +
 +      void prompt_user_for_queueable_files (tasks_set& queue, GtkWindow * parent, const Prefs& prefs);
 +
      protected:
        PostUI (GtkWindow*, Data&, Queue&, GroupServer&, Profiles&,
                GMimeMessage*, Prefs&, GroupPrefs&);
@@@ -57,9 -50,8 +57,10 @@@
  
      public:
        GtkWidget * root() { return _root; }
 +      GtkWidget * part_select() { return _part_select; }
 +      GtkWidget * parts_store() { return _parts_store; }
        void rot13_selection ();
+       void wrap_selection ();
        void wrap_body ();
        void spawn_editor ();
        void manage_profiles ();
diff --cc pan/usenet-utils/text-massager-test.cc
index 796ecf9,0cd624d..53c85f8
--- a/pan/usenet-utils/text-massager-test.cc
+++ b/pan/usenet-utils/text-massager-test.cc
@@@ -173,92 -261,110 +261,110 @@@ void test_rot13(
  
     /* rot13 2 */
     tm.rot13_inplace (const_cast<char*>(out.c_str()));
-    check (out == in);
+    g_assert_cmpstr( out.c_str(), ==, in.c_str());
  
     /* rot13 3 */
--   in = "here is a line with a à,èut the line should not be truncated.";
++   in = "here is a line with a ï,ï,ï but the line should not be truncated.";
     out = in;
     tm.rot13_inplace (const_cast<char*>(out.c_str()));
--   expected_out = "urer vf n yvar jvgu n à,èhg gur yvar fubhyq abg or gehapngrq.";
-    check (out == expected_out);
++   expected_out = "urer vf n yvar jvgu n ï,ï,ï ohg gur yvar fubhyq abg or gehapngrq.";
+    g_assert_cmpstr( out.c_str(), ==, expected_out.c_str());
+ }
+ 
+ void test_mute()
+ {
+    std::string in;
+    std::string out;
+    std::string expected_out;
+    TextMassager tm;
+ 
+   /* mute quoted test 2 */
+   in =
+     "bill m no spam net wrote:\n"
+     "\n"
+     "> In <bl0D6 3171$Uo2 75315 zwoll1 home nl>, on 04/17/01\n"
+     ">    at 06:56 PM, \"Marcel Pol\" <mpol nospam gmx net> said:\n"
+     "> \n"
+     "> .:.I do like pan a lot.\n"
+     "> .:.It's a gnome/gtk thing though.\n"
+     "> .:.But if you don't care too much about a gtk thing in qyour kde-desktop,\n"
+     "> check .:.out pan.\n"
+     "> \n"
+     "> Is this somewhere in mdk 7.2 (Complete)?\n"
+     "\n"
+     "pan is included with LM 7.2, but only version 0.81 - grab the 0.96 rpm from \n"
+     "the pan website instead.\n"
+     "\n"
+     "Jan Eric";
+   expected_out =
+ 
+     "bill m no spam net wrote:\n"
+     "\n"
+     "> [quoted text muted]\n"
+     "\n"
+     "pan is included with LM 7.2, but only version 0.81 - grab the 0.96 rpm from \n"
+     "the pan website instead.\n"
+     "\n"
+     "Jan Eric";
+   out = tm.mute_quotes (in);
+   g_assert_cmpstr( out.c_str(), ==, expected_out.c_str());
  
-    /* mute quoted test 2 */
-    in =
- "bill m no spam net wrote:\n"
- "\n"
- "> In <bl0D6 3171$Uo2 75315 zwoll1 home nl>, on 04/17/01\n"
- ">    at 06:56 PM, \"Marcel Pol\" <mpol nospam gmx net> said:\n"
- "> \n"
- "> .:.I do like pan a lot.\n"
- "> .:.It's a gnome/gtk thing though.\n"
- "> .:.But if you don't care too much about a gtk thing in qyour kde-desktop,\n"
- "> check .:.out pan.\n"
- "> \n"
- "> Is this somewhere in mdk 7.2 (Complete)?\n"
- "\n"
- "pan is included with LM 7.2, but only version 0.81 - grab the 0.96 rpm from \n"
- "the pan website instead.\n"
- "\n"
- "Jan Eric";
-    expected_out = 
- "bill m no spam net wrote:\n"
- "\n"
- "> [quoted text muted]\n"
- "\n"
- "pan is included with LM 7.2, but only version 0.81 - grab the 0.96 rpm from \n"
- "the pan website instead.\n"
- "\n"
- "Jan Eric";
-    out = tm.mute_quotes (in);
-    check (out == expected_out);
+   // mute quoted test: realworld 2
+   in =
+     "In article <bl0D6 3171$Uo2 75315 zwoll1 home nl>, \"Marcel Pol\"\n"
+     "<mpol nospam gmx net> wrote:\n"
+     "\n"
+     "> Recently \"Unknown\" <bill m no spam net> wrote:\n"
+     ">> Knode is not for me\n"
+     ">>     Question: What are the alternative apps. to Knode - especially in\n"
+     ">>     off-line readers?\n"
+     "> \n"
+     "> I dunno any good kde newsreaders. I do like pan a lot. It's a gnome/gtk\n"
+     "> thing though. But if you don't care too much about a gtk thing in qyour\n"
+     "> kde-desktop, check out pan.\n"
+     "> \n"
+     "> Btw, you can let a kde-theme be applied to gtk programs too.  My gtk\n"
+     "> programs look just like kde, with it's default theme.\n"
+     "> \n"
+     "> \n"
+     "> --\n"
+     "> Marcel Pol mpol mpol dhs org\n"
+     "> \n"
+     "> ...my cow ate the CDs.\n"
+     "\n"
+     "Pan has been going through a lot of modifications recently so make sure\n"
+     "you get the latest version you can run with your distro.";
+   expected_out =
  
-    // mute quoted test: realworld 2
-    in =
- "In article <bl0D6 3171$Uo2 75315 zwoll1 home nl>, \"Marcel Pol\"\n"
- "<mpol nospam gmx net> wrote:\n"
- "\n"
- "> Recently \"Unknown\" <bill m no spam net> wrote:\n"
- ">> Knode is not for me\n"
- ">>     Question: What are the alternative apps. to Knode - especially in\n"
- ">>     off-line readers?\n"
- "> \n"
- "> I dunno any good kde newsreaders. I do like pan a lot. It's a gnome/gtk\n"
- "> thing though. But if you don't care too much about a gtk thing in qyour\n"
- "> kde-desktop, check out pan.\n"
- "> \n"
- "> Btw, you can let a kde-theme be applied to gtk programs too.  My gtk\n"
- "> programs look just like kde, with it's default theme.\n"
- "> \n"
- "> \n"
- "> --\n"
- "> Marcel Pol mpol mpol dhs org\n"
- "> \n"
- "> ...my cow ate the CDs.\n"
- "\n"
- "Pan has been going through a lot of modifications recently so make sure\n"
- "you get the latest version you can run with your distro.";
-    expected_out = 
- "In article <bl0D6 3171$Uo2 75315 zwoll1 home nl>, \"Marcel Pol\"\n"
- "<mpol nospam gmx net> wrote:\n"
- "\n"
- "> [quoted text muted]\n"
- "\n"
- "Pan has been going through a lot of modifications recently so make sure\n"
- "you get the latest version you can run with your distro.";
-    out = tm.mute_quotes (in);
-    check (out == expected_out);
+     "In article <bl0D6 3171$Uo2 75315 zwoll1 home nl>, \"Marcel Pol\"\n"
+     "<mpol nospam gmx net> wrote:\n"
+     "\n"
+     "> [quoted text muted]\n"
+     "\n"
+     "Pan has been going through a lot of modifications recently so make sure\n"
+     "you get the latest version you can run with your distro.";
+   out = tm.mute_quotes (in);
+   g_assert_cmpstr( out.c_str(), ==, expected_out.c_str());
  
-    // mute quoted text
-    in = "> This is a bunch\n> of quoted text\n> which should be trimmed\n\nNot quoted.";
-    expected_out = "> [quoted text muted]\n\nNot quoted.";
-    out = tm.mute_quotes (in);
-    check (out == expected_out);
+   // mute quoted text
+   in = "> This is a bunch\n> of quoted text\n> which should be trimmed\n\nNot quoted.";
+   expected_out = "> [quoted text muted]\n\nNot quoted.";
+   out = tm.mute_quotes (in);
+   g_assert_cmpstr( out.c_str(), ==, expected_out.c_str());
  
-    // mute quoted text
-    in = "This is a bunch\nof nonquoted text\nwhich should be left alone\n\nNot quoted.";
-    expected_out = in;
-    out = tm.mute_quotes (in);
-    check (out == expected_out);
+   // mute quoted text
+   in = "This is a bunch\nof nonquoted text\nwhich should be left alone\n\nNot quoted.";
+   expected_out = in;
+   out = tm.mute_quotes (in);
+   g_assert_cmpstr( out.c_str(), ==, expected_out.c_str());
+ }
+ 
+ void test_subj()
+ {
+    std::string in;
+    std::string out;
+    std::string expected_out;
+    TextMassager tm;
  
     const char *in2, *sep="_";
     in2 = "prefix - one ...__   - two - three";
diff --cc uulib/uuencode.c
index b57e389,a629073..be18bb5
--- a/uulib/uuencode.c
+++ b/uulib/uuencode.c
@@@ -1731,10 -1730,10 +1731,11 @@@ UUE_PrepPartialExt (FILE *outfile, FIL
        crc = crc32(0L, Z_NULL, 0);
      crcptr = &crc;
      if (subject)
+       sprintf (subline, "- %s - %s (%03d/%03d)", oname, subject,
 +      sprintf (subline, "%s \"%s\" (%d/%d)", subject, oname,
  	       partno, numparts);
      else
 -      sprintf (subline, "- %s - (%03d/%03d)", oname,
 +      sprintf (subline, "%s (%d/%d)", oname,
  	       partno, numparts);
    }
    else {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]