diff -urN golded+.orig/GNUmakef.prg golded+.nsf8/GNUmakef.prg
--- golded+.orig/GNUmakef.prg	2001-02-24 21:37:27.000000000 +0300
+++ golded+.nsf8/GNUmakef.prg	2009-06-02 13:15:57.000000000 +0400
@@ -14,7 +14,7 @@
 
 $(TOP)/$(BIN)/$(SHORTTARGET)$(PLATFORM)$(EXEEXT): $(OBJS) $(FGLIBS) $(ADDS)
 	@echo -n Linking $(TARGET)...
-	@$(CXX) $(LNKFLAGS) -o $@ $(FOBJPATH)/*$(OBJEXT) $(ADDS) $(LIBS) -L$(FLIBPATH)
+	@$(CXX) $(CFLAGS) $(LNKFLAGS) -o $@ $(FOBJPATH)/*$(OBJEXT) $(ADDS) $(LIBS) -L$(FLIBPATH)
 	@echo done
 
 $(FGLIBS): $(GLIBS)
diff -urN golded+.orig/golded3/gccfgg0.cpp golded+.nsf8/golded3/gccfgg0.cpp
--- golded+.orig/golded3/gccfgg0.cpp	2007-06-21 23:03:17.000000000 +0400
+++ golded+.nsf8/golded3/gccfgg0.cpp	2009-06-03 05:56:45.000000000 +0400
@@ -283,6 +283,7 @@
     case CRC_DISPATTACHSIZE   :  CfgDispattachsize   ();  break;
     case CRC_DISPHDRDATESET   :  CfgDisphdrdateset   ();  break;
     case CRC_DISPHDRLOCATION  :  CfgDisphdrlocation  ();  break;
+    case CRC_DISPHDRFGHIURL   :  CfgDisphdrfghiurl   ();  break;
     case CRC_DISPHDRNAMESET   :  CfgDisphdrnameset   ();  break;
     case CRC_DISPHDRNODESET   :  CfgDisphdrnodeset   ();  break;
     case CRC_DISPLISTCURSOR   :  CfgDisplistcursor   ();  break;
@@ -345,6 +346,7 @@
     case CRC_FIDOUSERLIST     :  CfgFidouserlist     ();  break;
     case CRC_FIDOUSERNO       :  CfgFidouserno       ();  break;
     case CRC_FILEALIAS        :  CfgFilealias        ();  break;
+    case CRC_FGHIREVERSESEARCH:  CfgFghireversesearch();  break;
     case CRC_FORCETEMPLATE    :  CfgForcetemplate    ();  break;
     case CRC_FRQEXT           :  CfgFrqext           ();  break;
     case CRC_FRQNODEMAP       :  CfgFrqnodemap       ();  break;
@@ -535,6 +537,7 @@
     case CRC_SCREENPALETTE    :  CfgScreenpalette    ();  break;
     case CRC_SCREENSIZE       :  CfgScreensize       ();  break;
     case CRC_SEARCHFOR        :  CfgSearchfor        ();  break;
+    case CRC_SEARCHURLFOR     :  CfgSearchURLfor     ();  break;
     case CRC_SEMAPHORE        :  CfgSemaphore        ();  break;
     case CRC_SEQDIR           :  CfgSeqDir           ();  break;
     case CRC_SEQMSGID         :  CfgSeqMsgId         ();  break;
@@ -588,6 +591,7 @@
 SwitchU:
   switch(crc) {
     case CRC_UNPACKER         :  CfgUnpacker         ();  break;
+    case CRC_URLBRACKETS      :  CfgUrlbrackets      ();  break;
     case CRC_URLHANDLER       :  CfgUrlhandler       ();  break;
     case CRC_URLSCHEME        :  CfgUrlscheme        ();  break;
     case CRC_USEAREA          :  CfgUsearea          ();  break;
diff -urN golded+.orig/golded3/gccfgg2.cpp golded+.nsf8/golded3/gccfgg2.cpp
--- golded+.orig/golded3/gccfgg2.cpp	2006-01-13 17:26:30.000000000 +0300
+++ golded+.nsf8/golded3/gccfgg2.cpp	2009-06-03 04:17:01.000000000 +0400
@@ -487,6 +487,7 @@
 
 void CfgDisphdrlocation()
 {
+/*
   char* key;
   getkeyval(&key, &val);
 
@@ -494,11 +495,26 @@
 
   if (CFG->disphdrlocation != NO)
   {
-    if (strieql("CENTER", val))
+*/
+	if (strieql("CENTER", val))
       CFG->disphdrlocation = CFG->disphdrlocation + (TCENTER << 16);
-    else
+	else if (strieql("YES", val))
       CFG->disphdrlocation = CFG->disphdrlocation + (TRIGHT << 16);
-  }
+    else
+      CFG->disphdrlocation = 0;
+//  }
+}
+
+//  ------------------------------------------------------------------
+
+void CfgDisphdrfghiurl()
+{
+  if (strieql("SHORT", val))
+    CFG->disphdrfghiurl = TSHORT;
+  else if (strieql("YES", val))
+    CFG->disphdrfghiurl = YES;
+  else
+    CFG->disphdrfghiurl = 0;
 }
 
 //  ------------------------------------------------------------------
diff -urN golded+.orig/golded3/gccfgg4.cpp golded+.nsf8/golded3/gccfgg4.cpp
--- golded+.orig/golded3/gccfgg4.cpp	2007-01-08 12:48:18.000000000 +0300
+++ golded+.nsf8/golded3/gccfgg4.cpp	2009-06-03 04:17:01.000000000 +0400
@@ -234,6 +234,14 @@
 
 //  ------------------------------------------------------------------
 
+void CfgFghireversesearch()
+{
+  bool flag = make_bool(GetYesno(val));
+  CFG->fghireversesearch = flag;
+}
+
+//  ------------------------------------------------------------------
+
 void CfgForcetemplate() {
 
   bool flag = make_bool(GetYesno(val));
diff -urN golded+.orig/golded3/gccfgg7.cpp golded+.nsf8/golded3/gccfgg7.cpp
--- golded+.orig/golded3/gccfgg7.cpp	2006-12-26 05:05:23.000000000 +0300
+++ golded+.nsf8/golded3/gccfgg7.cpp	2009-06-03 05:57:16.000000000 +0400
@@ -353,6 +353,18 @@
 
 //  ------------------------------------------------------------------
 
+void CfgSearchURLfor() {
+
+  INam buf;
+  strxcpy(buf, StripQuotes(val), sizeof(buf));
+  if(cfgingroup)
+    CFG->grp.AddItm(GRP_SEARCHURLFOR, buf, strlen(buf)+1);
+  else
+    strcpy(CFG->searchurlfor, buf);
+}
+
+//  ------------------------------------------------------------------
+
 #define CRC_NETSCAN            0xEC12
 #define CRC_ECHOSCAN           0x6E6D
 #define CRC_EXPORTLIST         0x1B14
diff -urN golded+.orig/golded3/gccfgg8.cpp golded+.nsf8/golded3/gccfgg8.cpp
--- golded+.orig/golded3/gccfgg8.cpp	2007-06-21 23:03:17.000000000 +0400
+++ golded+.nsf8/golded3/gccfgg8.cpp	2009-06-03 04:17:01.000000000 +0400
@@ -370,6 +370,16 @@
 
 //  ------------------------------------------------------------------
 
+void CfgUrlbrackets()
+{
+  bool flag = make_bool(GetYesno(val));
+/*  if(cfgingroup)
+    CFG->grp.AddItm(GRP_AREAREPLYDIRECT, flag);
+  else
+*/    CFG->urlbrackets = flag;
+}
+//  ------------------------------------------------------------------
+
 void CfgUsearea() {
 
   bool flag = make_bool(GetYesno(val));
diff -urN golded+.orig/golded3/gccfgg.cpp golded+.nsf8/golded3/gccfgg.cpp
--- golded+.orig/golded3/gccfgg.cpp	2007-06-21 23:03:17.000000000 +0400
+++ golded+.nsf8/golded3/gccfgg.cpp	2009-06-03 05:56:11.000000000 +0400
@@ -685,6 +685,7 @@
   strcpy(quotestring, " FL> ");
   strcpy(quotestops, "<\"\'-");
   *searchfor = 0;
+  *searchurlfor = 0;
   strcpy(stylecodepunct, " !?\"$%&()+,.:;<=>@[\\]^`{|}~\n\r\t");
   *stylecodestops = 0;
   gsprintf(PRINTF_DECLARE_BUFFER(tasktitle), "%s%s%s%s", __gver_prename__,
@@ -726,6 +727,7 @@
   dispareano = true;
   dispattachsize = ATTACH_KBYTES;
   disphdrlocation = NO;
+  disphdrfghiurl = NO;
   displistcursor = NO;
   dispmargin = 0;
   dispmsgsize = DISPMSGSIZE_BYTES;
@@ -737,6 +739,7 @@
   ezycomuserno = 0;
   fidomsgtype = "OPUS";
   fidouserno = 0;
+  fghireversesearch = true;
   forcetemplate = false;
   frqoptions = FREQ_FROMTOP;
   peekurloptions = PEEK_FROMTOP;
@@ -806,6 +809,7 @@
   templatematch = false;
   timeout = 0;
   twitmode = TWIT_BLANK;
+  urlbrackets = NO;
   usearea = true;
   usecharset = true;
   usefwd = NO;
diff -urN golded+.orig/golded3/gccfgg.h golded+.nsf8/golded3/gccfgg.h
--- golded+.orig/golded3/gccfgg.h	2007-06-21 23:03:17.000000000 +0400
+++ golded+.nsf8/golded3/gccfgg.h	2009-06-03 06:22:04.000000000 +0400
@@ -127,6 +127,7 @@
 const word CRC_DISPAUTONEXT     = 0x52D9;
 const word CRC_DISPHDRDATESET   = 0x65A5;
 const word CRC_DISPHDRLOCATION  = 0x8EF6;
+const word CRC_DISPHDRFGHIURL   = 0x020E;
 const word CRC_DISPHDRNAMESET   = 0xFEF9;
 const word CRC_DISPHDRNODESET   = 0xC232;
 const word CRC_DISPLISTCURSOR   = 0x8B82;
@@ -189,6 +190,7 @@
 const word CRC_FIDOUSERNO       = 0x903A;
 const word CRC_FILEALIAS        = 0xEC23;
 const word CRC_FILELISTPAGEBAR  = 0x58AA;
+const word CRC_FGHIREVERSESEARCH= 0xC3BB;
 const word CRC_FORCETEMPLATE    = 0xC8FB;
 const word CRC_FORMFEEDSEPARATOR= 0xDBD6;
 const word CRC_FREEAREA         = 0x93CF;
@@ -337,6 +339,7 @@
 const word CRC_SCREENUSEANSI    = 0x7A70;
 const word CRC_SCREENUSEBIOS    = 0x43DE;
 const word CRC_SEARCHFOR        = 0x9FA6;
+const word CRC_SEARCHURLFOR     = 0xA0EA;
 const word CRC_SEMAPHORE        = 0x02FB;
 const word CRC_SERIALNO         = 0x6EDE;
 const word CRC_SEQDIR           = 0x6426;
@@ -388,6 +391,7 @@
 const word CRC_UNPACKER         = 0x5691;
 const word CRC_URLHANDLER       = 0x688E;
 const word CRC_URLSCHEME        = 0x89FC;
+const word CRC_URLBRACKETS      = 0xC19E;
 const word CRC_USEAREA          = 0x2FD4;
 const word CRC_USECHARSET       = 0xE1B9;
 const word CRC_USEFLAGS         = 0xE2B6;
diff -urN golded+.orig/golded3/gckeys.cpp golded+.nsf8/golded3/gckeys.cpp
--- golded+.orig/golded3/gckeys.cpp	2006-06-16 09:38:23.000000000 +0400
+++ golded+.nsf8/golded3/gckeys.cpp	2009-06-03 04:17:01.000000000 +0400
@@ -446,6 +446,7 @@
   { CRC_HEADERTOGGLEHUBHOST    , KK_HeaderToggleHubhost  , KT_H }, // 0x2505
   { CRC_K_CPGUP                , Key_C_PgUp              ,    0 }, // 0x2603
   { CRC_READGOTOPREVUNREAD     , KK_ReadGotoPrevUnread   , KT_R }, // 0x27EA
+  { CRC_READFINDURLS           , KK_ReadFindURLs         , KT_R }, // 0x29DA
   { CRC_READTOGGLEREALMSGNO    , KK_ReadToggleRealMsgno  , KT_R }, // 0x2A3B
   { CRC_ADDRESSBOOKPACK        , KK_AddressbookPack      , KT_B }, // 0x2C5C
   { CRC_HEADERTOGGLERETRECREQ  , KK_HeaderToggleRetrecreq, KT_H }, // 0x2CF1
diff -urN golded+.orig/golded3/gckeys.h golded+.nsf8/golded3/gckeys.h
--- golded+.orig/golded3/gckeys.h	2006-06-16 09:38:23.000000000 +0400
+++ golded+.nsf8/golded3/gckeys.h	2009-06-03 04:17:01.000000000 +0400
@@ -271,6 +271,7 @@
 const word CRC_READNEWAREA          = 0xAB5E;
 const word CRC_READNEWMSG           = 0x30CA;
 const word CRC_READPEEKURLS         = 0x07BA;
+const word CRC_READFINDURLS         = 0x29DA;
 const word CRC_READQUITNOW          = 0xAC15;
 const word CRC_READQUOTEBUF         = 0x49EE;
 const word CRC_READQUOTEMSG         = 0xBE00;
diff -urN golded+.orig/golded3/gclang.cpp golded+.nsf8/golded3/gclang.cpp
--- golded+.orig/golded3/gclang.cpp	2007-04-03 23:17:42.000000000 +0400
+++ golded+.nsf8/golded3/gclang.cpp	2009-06-03 05:54:00.000000000 +0400
@@ -215,6 +215,7 @@
   { CRC_HD_TO                 , NULL  , " To   : " },
   { CRC_HD_SUBJ               , NULL  , " Subj : " },
   { CRC_HD_FILE               , NULL  , " File : " },
+  { CRC_HD_NOMSGID            , NULL  , " Message doesn't contain the msgid " },
   { CRC_MS_EMPTYMSG           , NULL  , "\r" },
   { CRC_MS_AUTOATTACHMSG      , NULL  , "\r" },
   { CRC_MS_AUTOREQUESTMSG     , NULL  , "\r" },
@@ -231,8 +232,9 @@
   { CRC_MS_HIDINGTWIT         , NULL  , "This is a Twit Message - Press <Home> to read."},
   { CRC_HD_VIA                , NULL  , "via" },
   { CRC_WT_CHANGEATTRS        , NULL  , "Change Message Attributes" },
-  { CRC_WT_HEADERTEXT         , NULL  , " Enter Searchstring (Header+Text) " },
-  { CRC_WT_HEADERONLY         , NULL  , " Enter Searchstring (Header Only) " },
+  { CRC_WT_HEADERTEXT         , NULL  , " Enter Search string (Header+Text) " },
+  { CRC_WT_HEADERONLY         , NULL  , " Enter Search string (Header Only) " },
+  { CRC_WT_URLTEXT            , NULL  , " Enter URL for processing " },
   { CRC_WT_NEWAREA            , NULL  , ">>Pick New Area: " },
   { CRC_WT_REPLYAREA          , NULL  , ">>Answer In Area: " },
   { CRC_WT_COPYAREA           , NULL  , ">>Copy To Area: " },
@@ -468,6 +470,7 @@
   { CRC_WT_ADDRESSBOOK        , NULL  , " Addressbook " },
   { CRC_WT_ADVANCEDSEARCH     , NULL  , " Advanced Search " },
   { CRC_IL_NOMOREMATCHES      , NULL  , " No more matches found " },
+  { CRC_IL_NOAREAFOUND        , NULL  , " Area %s not found " },
   { CRC_WT_HEADEREDITHELP_1   , NULL  , " Shift-F10: Nodelist " },
   { CRC_WT_HEADEREDITHELP_2   , NULL  , " F10: Addressbook " },
   { CRC_WT_THREADLISTTITLE    , NULL  , " Message Thread List " },
diff -urN golded+.orig/golded3/gclang.h golded+.nsf8/golded3/gclang.h
--- golded+.orig/golded3/gclang.h	2007-01-19 20:38:41.000000000 +0300
+++ golded+.nsf8/golded3/gclang.h	2009-06-03 05:43:15.000000000 +0400
@@ -208,6 +208,7 @@
 const word CRC_HD_TO                = 0x8A51;
 const word CRC_HD_SUBJ              = 0xD621;
 const word CRC_HD_FILE              = 0xF715;
+const word CRC_HD_NOMSGID           = 0x5072;
 const word CRC_MS_EMPTYMSG          = 0xF2BA;
 const word CRC_MS_TEMPLATE          = 0x6B5A;
 const word CRC_MS_AUTOATTACHMSG     = 0xA68A;
@@ -233,6 +234,7 @@
 const word CRC_WT_CHANGEATTRS       = 0x03C1;
 const word CRC_WT_HEADERTEXT        = 0x7C39;
 const word CRC_WT_HEADERONLY        = 0x06D6;
+const word CRC_WT_URLTEXT           = 0xD60E;
 const word CRC_WT_NEWAREA           = 0x44F6;
 const word CRC_WT_REPLYAREA         = 0x2EB5;
 const word CRC_WT_COPYAREA          = 0x7DF5;
@@ -479,6 +481,7 @@
 const word CRC_WT_ADDRESSBOOK       = 0xFEF8;
 const word CRC_WT_ADVANCEDSEARCH    = 0xA8C9;
 const word CRC_IL_NOMOREMATCHES     = 0xD6CC;
+const word CRC_IL_NOAREAFOUND       = 0x83A5;
 const word CRC_WT_HEADEREDITHELP_1  = 0x27A8;
 const word CRC_WT_HEADEREDITHELP_2  = 0x27AB;
 const word CRC_WT_THREADLISTTITLE   = 0x07CF;
diff -urN golded+.orig/golded3/gcprot.h golded+.nsf8/golded3/gcprot.h
--- golded+.orig/golded3/gcprot.h	2007-06-21 23:03:18.000000000 +0400
+++ golded+.nsf8/golded3/gcprot.h	2009-06-03 05:58:23.000000000 +0400
@@ -125,6 +125,7 @@
 void CfgDispautonext     ();
 void CfgDisphdrdateset   ();
 void CfgDisphdrlocation  ();
+void CfgDisphdrfghiurl   ();
 void CfgDisphdrnameset   ();
 void CfgDisphdrnodeset   ();
 void CfgDisplistcursor   ();
@@ -185,6 +186,7 @@
 void CfgFidouserno       ();
 void CfgFilealias        ();
 void CfgFilelistpagebar  ();
+void CfgFghireversesearch();
 void CfgFollowupto       ();
 void CfgForcetemplate    ();
 void CfgFrqext           ();
@@ -320,6 +322,7 @@
 void CfgScreensize       ();
 void CfgScreenusebios    ();
 void CfgSearchfor        ();
+void CfgSearchURLfor     ();
 void CfgSemaphore        ();
 void CfgSeqDir           ();
 void CfgSeqMsgId         ();
@@ -368,6 +371,7 @@
 void CfgUnpacker         ();
 void CfgUrlhandler       ();
 void CfgUrlscheme        ();
+void CfgUrlbrackets      ();
 void CfgUsearea          ();
 void CfgUsecharset       ();
 void CfgUseflags         ();
diff -urN golded+.orig/golded3/gecfgg.h golded+.nsf8/golded3/gecfgg.h
--- golded+.orig/golded3/gecfgg.h	2007-06-21 23:03:18.000000000 +0400
+++ golded+.nsf8/golded3/gecfgg.h	2009-06-03 06:11:17.000000000 +0400
@@ -291,6 +291,7 @@
   int         dispareano;
   int         dispattachsize;
   int         disphdrlocation;
+  int         disphdrfghiurl;
   PosLen      disphdrdateset;
   PosLen      disphdrnameset;
   PosLen      disphdrnodeset;
@@ -311,6 +312,7 @@
   Path        fidouserlist;
   int         fidouserno;           // lastreaduser;
   std::vector<FileAlias> filealias;
+  bool        fghireversesearch;
   bool        forcetemplate;
   gstrarray   frqext;
   std::vector<FrqNodeMap> frqnodemap;
@@ -411,6 +413,7 @@
   int         screenpalette[17];
   int         screensize;
   INam        searchfor;
+  INam        searchurlfor;
   Semaphore   semaphore;
   Path        seqdir;
   int         seqmsgid;
@@ -453,6 +456,7 @@
   gstrarray   twitsubj;
   std::vector< std::pair<std::string, std::string> > unpacker;
   std::vector<UrlHandler> urlhandler;
+  bool        urlbrackets;
   bool        usearea;
   bool        usecharset;
   int         usefwd;
diff -urN golded+.orig/golded3/gectnr.cpp golded+.nsf8/golded3/gectnr.cpp
--- golded+.orig/golded3/gectnr.cpp	2006-01-13 17:26:30.000000000 +0300
+++ golded+.nsf8/golded3/gectnr.cpp	2009-06-03 04:17:01.000000000 +0400
@@ -72,6 +72,10 @@
     return ptr+5;
   if(strnieql(ptr, "ed2k://", 7))
     return ptr+7;
+  if(strnieql(ptr, "area://", 7))
+    return ptr+7;
+  if(strnieql(ptr, "area:", 5))
+    return ptr+5;
   return NULL;
 }
 
@@ -161,7 +165,9 @@
 
         if(((begin = url_begin(ptr)) != NULL) and
            ((ptr == text) or (not isxalnum(ptr[-1]) and (ptr[-1] != '@')))) {
-          const char *end = begin+strcspn(begin, " \t\"\'<>()[]");
+          const char *end;
+          if (CFG->urlbrackets) end = begin+strcspn(begin, " \t\"\'<>[]");
+          else end = begin+strcspn(begin, " \t\"\'<>()[]");
 
           if(ispunct(end[-1]) and (end[-1] != '/'))
             --end;
diff -urN golded+.orig/golded3/gefind.cpp golded+.nsf8/golded3/gefind.cpp
--- golded+.orig/golded3/gefind.cpp	2006-05-14 15:45:05.000000000 +0400
+++ golded+.nsf8/golded3/gefind.cpp	2009-06-03 06:13:57.000000000 +0400
@@ -56,6 +56,14 @@
   }
 }
 
+void FindURL(GMsg* msg, int& topline, int& keyok) {
+
+      if(edit_string(CFG->searchurlfor, sizeof(INam), LNG->URLText, H_FindURLString)) {
+		  GotoURL(msg,CFG->searchurlfor);
+	      keyok = true;
+	  }
+}
+
 
 //  ------------------------------------------------------------------
 
diff -urN golded+.orig/golded3/geglob.h golded+.nsf8/golded3/geglob.h
--- golded+.orig/golded3/geglob.h	2006-05-14 18:33:21.000000000 +0400
+++ golded+.nsf8/golded3/geglob.h	2009-06-03 04:49:26.000000000 +0400
@@ -94,6 +94,7 @@
 extern int reader_keyok;
 extern int reader_direction;
 extern int reader_rcv_noise;
+extern bool reader_url;
 extern gkey reader_keycode;
 extern GMsgHeaderView *HeaderView;
 extern GMsgBodyView *BodyView;
diff -urN golded+.orig/golded3/gehelp.h golded+.nsf8/golded3/gehelp.h
--- golded+.orig/golded3/gehelp.h	2006-05-14 18:33:21.000000000 +0400
+++ golded+.nsf8/golded3/gehelp.h	2009-06-03 04:17:01.000000000 +0400
@@ -82,6 +82,7 @@
 #define H_ReadExternUtil    3017
 #define H_PeekURL           3018
 #define H_MainMenu          3019
+#define H_FindURLString     3020
 
 
 //  ------------------------------------------------------------------
diff -urN golded+.orig/golded3/gekeys.h golded+.nsf8/golded3/gekeys.h
--- golded+.orig/golded3/gekeys.h	2006-06-16 09:38:23.000000000 +0400
+++ golded+.nsf8/golded3/gekeys.h	2009-06-03 04:17:01.000000000 +0400
@@ -279,7 +279,7 @@
 const gkey KK_ReadChangeAka        = 0xFF52;
 const gkey KK_ReadChangeAttrs      = 0xFF53;
                                 // = 0xFE54;
-                                // = 0xFE55;
+const gkey KK_ReadFindURLs         = 0xFE55;
 const gkey KK_ReadChangeMsg        = 0xFF56;
 const gkey KK_ReadChangeOrigin     = 0xFF57;
 const gkey KK_ReadChangeTagline    = 0xFF58;
diff -urN golded+.orig/golded3/gelang.h golded+.nsf8/golded3/gelang.h
--- golded+.orig/golded3/gelang.h	2007-01-19 20:38:41.000000000 +0300
+++ golded+.nsf8/golded3/gelang.h	2009-06-03 05:23:47.000000000 +0400
@@ -201,6 +201,7 @@
   char*  To;                 // HD_TO
   char*  Subj;               // HD_SUBJ
   char*  File;               // HD_FILE
+  char*  NoMsgid;            // HD_NOMSGID
   char*  EmptyMsg;           // MS_EMPTYMSG
   char*  AutoAttachMsg;      // MS_AUTOATTACHMSG
   char*  AutoRequestMsg;     // MS_AUTOREQUESTMSG
@@ -219,6 +220,7 @@
   char*  ChangeAttrs;        // WT_CHANGEATTRS
   char*  HeaderText;         // WT_HEADERTEXT
   char*  HeaderOnly;         // WT_HEADERONLY
+  char*  URLText;            // WT_URLTEXT
   char*  NewArea;            // WT_NEWAREA
   char*  ReplyArea;          // WT_REPLYAREA
   char*  CopyArea;           // WT_COPYAREA
@@ -454,6 +456,7 @@
   char*  Addressbook;        // WT_ADDRESSBOOK
   char*  AdvancedSearch;     // WT_ADVANCEDSEARCH
   char*  NoMoreMatches;      // IL_NOMOREMATCHES
+  char*  NoAreaFound;        // IL_NOAREAFOUND
   char*  HeaderEditHelp1;    // WT_HEADEREDITHELP_1
   char*  HeaderEditHelp2;    // WT_HEADEREDITHELP_2
   char*  ThreadlistTitle;    // WT_THREADLISTTITLE
diff -urN golded+.orig/golded3/geline.cpp golded+.nsf8/golded3/geline.cpp
--- golded+.orig/golded3/geline.cpp	2009-04-04 13:51:04.000000000 +0400
+++ golded+.nsf8/golded3/geline.cpp	2009-06-03 04:17:01.000000000 +0400
@@ -510,6 +510,8 @@
 static void KludgeMSGID(GMsg* msg, const char* ptr) {
 
   strxcpy(msg->msgids, ptr, sizeof(msg->msgids));
+  strxcpy(msg->msgidsfghi, ptr, sizeof(msg->msgids));
+  strchg(msg->msgidsfghi,' ','+');
   msg->msgid.reset(msg->msgids, msg->odom);
 }
 
diff -urN golded+.orig/golded3/gemlst.cpp golded+.nsf8/golded3/gemlst.cpp
--- golded+.orig/golded3/gemlst.cpp	2007-02-21 16:48:42.000000000 +0300
+++ golded+.nsf8/golded3/gemlst.cpp	2009-06-03 04:17:01.000000000 +0400
@@ -243,7 +243,15 @@
     int disphdrlocation = CFG->disphdrlocation;
     if ((CFG->disphdrlocation & 0xFFFF) == YES)
       CFG->disphdrlocation = NO;
-
+/*
+    int disphdrfghiurl = CFG->disphdrfghiurl;
+    if ((CFG->disphdrfghiurl & 0xFFFF) == YES)
+      CFG->disphdrfghiurl = NO;
+
+    int urlbrackets = CFG->urlbrackets;
+    if ((CFG->urlbrackets & 0xFFFF) == YES)
+      CFG->urlbrackets = NO;
+*/
     ReadMlst(index);
     AA->LoadMsg(&msg, mlst[index]->msgno, CFG->dispmargin-(int)CFG->switches.get(disppagebar));
     mlst[index]->goldmark = goldmark;
@@ -257,6 +265,7 @@
     wactiv_(mlstwh);
 
     CFG->disphdrlocation = disphdrlocation;
+//    CFG->disphdrfghiurl = disphdrfghiurl;
   }
 
   if(CFG->switches.get(msglistviewsubj)) {
@@ -747,6 +756,10 @@
     if ((CFG->disphdrlocation & 0xFFFF) == YES)
       CFG->disphdrlocation = NO;
 
+/*    int disphdrfghiurl = CFG->disphdrfghiurl;
+    if ((CFG->disphdrfghiurl & 0xFFFF) == YES)
+      CFG->disphdrfghiurl = NO;
+*/
     AA->LoadMsg(&msg, treeEntryList[index].msgno, CFG->dispmargin-(int)CFG->switches.get(disppagebar));
     for(std::vector<Node>::iterator x = CFG->username.begin(); x != CFG->username.end(); x++) {
       if(strieql(msg.By(), x->name)) {
@@ -765,6 +778,7 @@
     wactiv_(mlstwh);
 
     CFG->disphdrlocation = disphdrlocation;
+//    CFG->disphdrfghiurl = disphdrfghiurl;
   }
 
   if(CFG->switches.get(msglistviewsubj)) {
diff -urN golded+.orig/golded3/gemsgs.cpp golded+.nsf8/golded3/gemsgs.cpp
--- golded+.orig/golded3/gemsgs.cpp	2007-02-04 21:06:33.000000000 +0300
+++ golded+.nsf8/golded3/gemsgs.cpp	2009-06-03 05:50:56.000000000 +0400
@@ -249,6 +249,9 @@
       if (tokenxchg(input, dst, "@omsgid", *msg->replys ? msg->replys : ""))
         continue;
 
+	  if (tokenxchg(input, dst, "@ofghiurl", (strlen(oldmsg->msgidsfghi)) > 0 ? (gsprintf(PRINTF_DECLARE_BUFFER(buf),"area://%s?msgid=%s",origareaid,oldmsg->msgidsfghi), buf) : strbtrim(LNG->NoMsgid)))
+        continue;
+
       if (tokenxchg(input, dst, "@dname", strbtrim(strtmp(oldmsg->To())), 34, 3,
          (int)msg->to_me(), (int)msg->to_you(), (int)oldmsg->to_all()))
         continue;
diff -urN golded+.orig/golded3/geprot.h golded+.nsf8/golded3/geprot.h
--- golded+.orig/golded3/geprot.h	2008-01-20 17:45:51.000000000 +0300
+++ golded+.nsf8/golded3/geprot.h	2009-06-03 04:17:01.000000000 +0400
@@ -143,6 +143,7 @@
 bool FindString(GMsg* msg, const char* prompt, int what);
 void FindAll(GMsg* msg, int& topline, int& keyok);
 void FindHdr(GMsg* msg, int& topline, int& keyok);
+void FindURL(GMsg* msg, int& topline, int& keyok);
 bool SearchHighlight(const Line* line, int row, int width, vattr highlight_color);
 void SearchExit();
 void AdvancedSearch(GMsg* msg, int& topline, int& keyok);
@@ -361,6 +362,7 @@
 void UpdateArea(GMsg* msg);
 int ExternUtil(GMsg* msg, uint32_t utilno);
 void ExternUtilMenu(GMsg* msg);
+void GotoURL(GMsg* msg, std::string url);
 void ReadPeekURLs(GMsg* msg);
 uint next_msg(int direction);
 
diff -urN golded+.orig/golded3/gerand.cpp golded+.nsf8/golded3/gerand.cpp
--- golded+.orig/golded3/gerand.cpp	2007-04-03 23:17:42.000000000 +0400
+++ golded+.nsf8/golded3/gerand.cpp	2009-06-03 06:05:12.000000000 +0400
@@ -177,6 +177,8 @@
 #endif
   if(*CFG->searchfor)
     strcpy(adat->searchfor, CFG->searchfor);
+  if(*CFG->searchurlfor)
+    strcpy(adat->searchurlfor, CFG->searchurlfor);
   strcpy(adat->tagline, CFG->tagline.empty() ? "" : CFG->tagline[CFG->taglineno].c_str());
   adat->taglinechar = CFG->taglinechar;
   adat->taglinesupport = CFG->taglinesupport;
@@ -356,6 +358,7 @@
 #endif
 
     CFG->grp.GetItm(GRP_SEARCHFOR, adat->searchfor, sizeof(adat->searchfor));
+    CFG->grp.GetItm(GRP_SEARCHURLFOR, adat->searchurlfor, sizeof(adat->searchurlfor));
 
     if(CFG->grp.GetItm(GRP_TAGLINE, buf, sizeof(buf)))
       strxcpy(adat->tagline, buf, sizeof(adat->tagline));
diff -urN golded+.orig/golded3/geread2.cpp golded+.nsf8/golded3/geread2.cpp
--- golded+.orig/golded3/geread2.cpp	2007-01-14 03:52:45.000000000 +0300
+++ golded+.nsf8/golded3/geread2.cpp	2009-06-03 06:30:44.000000000 +0400
@@ -31,7 +31,7 @@
 #include <gftnall.h>
 #define PROTOTYPES
 #include <uudeview.h>
-
+#include <gfghi.h>
 
 //  ------------------------------------------------------------------
 //  Global data from GEREAD
@@ -703,6 +703,88 @@
   return stricmp(a.c_str(), b.c_str()) < 0;
 }
 
+void GotoURL(GMsg* msg, std::string url) {
+	  FGHIUrl* fghi = NULL;
+	  fghi = new FGHIUrl();
+  	  fghi->FGHIUrlParse(strtrim(strltrim(url)));
+	  if (strcmp(fghi->Scheme,"area") == 0) {
+		if (strlen(fghi->EchoName) == 0) {
+			reader_keycode = KK_ReadNewArea;
+			NewArea();
+			reader_url = true;
+			reader_done = true;
+		}
+		else if (AL.AreaEchoToNo(fghi->EchoName)!=-1)
+		{
+			AA->Close();
+			int currentarea = AA->areaid();
+			AL.SetActiveAreaNo(AL.AreaEchoToNo(fghi->EchoName));
+			AA->Open();
+			if (strlen(fghi->Msgid)>0)
+			{
+				char smsgid[GMAXPATH];
+				sprintf(smsgid,"%s%%\"MSGID: %s\"",(CFG->fghireversesearch ? "-" : "+"),fghi->Msgid);
+				int currentmsginarea = AA->lastread();
+				AA->set_lastread((CFG->fghireversesearch ? AA->Msgn.Count() : 1));
+				if (!FindString(msg,smsgid,reader_keyok))
+				{
+					AA->set_lastread(currentmsginarea);
+					AA->Close();
+					AL.SetActiveAreaId(currentarea);
+					AA->Open();
+				}
+			} else if(AA->lastread() == 0) AA->set_lastread(1);
+			if(LoadMessage(msg, CFG->dispmargin-(int)CFG->switches.get(disppagebar))) {
+				if (AA->Msglistfirst() && (kbput(KK_ReadMessageList) != -1))
+					reader_msglistfirst = true;
+				else
+					reader_msglistfirst = false;
+ 				}
+		} else {
+			 char error[GMAXPATH];
+			 sprintf(error,LNG->NoAreaFound,fghi->EchoName);
+			 w_info(error);
+			 waitkeyt(5000);
+	         w_info(NULL);
+		}
+	  } else if (url_begin(url.c_str())) {
+      std::vector<UrlHandler>::iterator it = CFG->urlhandler.begin();
+      std::vector<UrlHandler>::iterator end = CFG->urlhandler.end();
+#if 0   // will be implemented later
+      for (; it != end; it++)
+      {
+        if (it->scheme.match(Listi[n].c_str(), gregex::extended | gregex::icase))
+          break;
+      }
+#else
+      it = end;
+#endif
+
+      if (it == end) it = CFG->urlhandler.begin();
+		std::string cmdline = it->handler.cmdline;
+		std::string buf = "\"" + strtrim(strltrim(url)) + "\"";
+		strischg(cmdline, "@url", buf.c_str());
+      
+		buf = CFG->goldpath;
+		strchg(buf, GOLD_WRONG_SLASH_CHR, GOLD_SLASH_CHR);
+		strischg(cmdline, "@path", buf.c_str());
+
+		TokenXlat(MODE_NEW, cmdline, msg, msg, CurrArea);
+
+		int pauseval = 0;
+		if (it->handler.options & EXTUTIL_PAUSEONERROR)
+			pauseval = -1;
+
+		if (it->handler.options & EXTUTIL_PAUSE)
+			pauseval = 1;
+
+		ShellToDos(cmdline.c_str(), "",
+			it->handler.options & EXTUTIL_CLS ? LGREY_|_BLACK : BLACK_|_BLACK,
+			it->handler.options & EXTUTIL_CURSOR,
+				pauseval
+		);
+	  }
+}
 
 //  ------------------------------------------------------------------
 
@@ -727,13 +809,16 @@
       const char *urlBegin = url_begin(ptr);
       if (urlBegin and not strneql(ptr, "mailto:", 7))
       {
-        const char *urlEnd = urlBegin + strcspn(urlBegin, " \t\"\'<>()[]");
+		const char *urlEnd;
+		if (CFG->urlbrackets) urlEnd = urlBegin + strcspn(urlBegin, " \t\"\'<>[]");
+		else urlEnd = urlBegin + strcspn(urlBegin, " \t\"\'<>()[]");
         if (ispunct(urlEnd[-1]) and (urlEnd[-1] != '/'))
           --urlEnd;
 
         if (urlBegin < urlEnd)
         {
-          char* bufurl=(char*)throw_malloc(urlEnd - ptr + 3);
+          char* bufurl;
+          bufurl= new char [urlEnd - ptr + 3];
           bufurl[0] = ' ';
           strxcpy(bufurl + 1, ptr, (urlEnd - ptr) + 1);
           strcat(bufurl, " ");
@@ -748,8 +833,6 @@
 
           if (it == end)
             urls.push_back(bufurl);
-          else
-            throw_free(bufurl);
 
           ptr = urlEnd - 1;
         }
@@ -785,44 +868,9 @@
     whelpop();
 
     if(n != -1)
-    {
-      std::vector<UrlHandler>::iterator it = CFG->urlhandler.begin();
-      std::vector<UrlHandler>::iterator end = CFG->urlhandler.end();
-#if 0   // will be implemented later
-      for (; it != end; it++)
-      {
-        if (it->scheme.match(Listi[n].c_str(), gregex::extended | gregex::icase))
-          break;
-      }
-#else
-      it = end;
-#endif
-
-      if (it == end) it = CFG->urlhandler.begin();
-
-      std::string cmdline = it->handler.cmdline;
-      std::string buf = "\"" + strtrim(strltrim(Listi[n])) + "\"";
-      strischg(cmdline, "@url", buf.c_str());
-      
-      buf = CFG->goldpath;
-      strchg(buf, GOLD_WRONG_SLASH_CHR, GOLD_SLASH_CHR);
-      strischg(cmdline, "@path", buf.c_str());
-
-      TokenXlat(MODE_NEW, cmdline, msg, msg, CurrArea);
-
-      int pauseval = 0;
-      if (it->handler.options & EXTUTIL_PAUSEONERROR)
-        pauseval = -1;
-
-      if (it->handler.options & EXTUTIL_PAUSE)
-        pauseval = 1;
-
-      ShellToDos(cmdline.c_str(), "",
-        it->handler.options & EXTUTIL_CLS ? LGREY_|_BLACK : BLACK_|_BLACK,
-        it->handler.options & EXTUTIL_CURSOR,
-        pauseval
-      );
-    }
+	{
+		GotoURL(msg,Listi[n]);
+	}
   }
   else
   {
diff -urN golded+.orig/golded3/geread.cpp golded+.nsf8/golded3/geread.cpp
--- golded+.orig/golded3/geread.cpp	2007-10-30 00:33:07.000000000 +0300
+++ golded+.nsf8/golded3/geread.cpp	2009-06-03 04:56:36.000000000 +0400
@@ -44,6 +44,7 @@
 int reader_keyok;
 int reader_direction;
 int reader_rcv_noise = 0;
+bool reader_url = false;
 gkey reader_keycode;
 gkey reader_lastcode = 0;
 bool reader_msglistfirst = false;
@@ -954,6 +955,13 @@
                 reader_keyok = true;
                 break;
 
+              case KK_ReadFindURLs:
+                AA->set_findfirst(true);
+                AA->set_findtype(1);
+                FindURL(msg, reader_topline, reader_keyok);
+                reader_keyok = true;
+                break;
+
               case KK_ReadAddressbookAdd:
                 {
                   GMenuDomarks MenuDomarks;
@@ -1020,7 +1028,8 @@
                   reader_keyok = true;
                 }
             }
-          } while(reader_keyok);
+          } while(reader_keyok && not reader_url);
+          reader_url = false;
         }
 
         if(gkbd.quitall)
diff -urN golded+.orig/golded3/geview.cpp golded+.nsf8/golded3/geview.cpp
--- golded+.orig/golded3/geview.cpp	2006-04-21 23:57:29.000000000 +0400
+++ golded+.nsf8/golded3/geview.cpp	2009-06-03 05:49:11.000000000 +0400
@@ -362,10 +362,21 @@
     {
       loc += " ";
       int pos = window.width() - loc.length();
-      pos = ((CFG->disphdrlocation >> 16) == TCENTER) ? pos/2 : pos-1;
+      pos = ((CFG->disphdrlocation >> 16) == TCENTER && !CFG->disphdrfghiurl) ? pos/2 : pos-1;
       window.prints(5, pos, location_color, loc.c_str());
     }
   }
+
+  if (CFG->disphdrfghiurl && !_in_editor && !AA->isnet())
+  {
+	{
+      char fghiurl[256];
+	  if (strlen(msg->msgidsfghi)>0) sprintf(fghiurl, (CFG->disphdrfghiurl == TSHORT ? " area:%s?mid=%s " : " area://%s?msgid=%s "), area->echoid(), msg->msgidsfghi);
+	  else sprintf(fghiurl, LNG->NoMsgid);
+      int pos = window.width();
+	  window.prints(5, 7, location_color, fghiurl);
+    }
+  }
 }
 
 
diff -urN golded+.orig/golded3/gfghi.cpp golded+.nsf8/golded3/gfghi.cpp
--- golded+.orig/golded3/gfghi.cpp	1970-01-01 03:00:00.000000000 +0300
+++ golded+.nsf8/golded3/gfghi.cpp	2009-06-03 17:52:51.000000000 +0400
@@ -0,0 +1,88 @@
+
+//  ------------------------------------------------------------------
+//  GoldED+
+//  Copyright (C) 2008 Konstantin Kuzov
+//  ------------------------------------------------------------------
+//  This program is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU General Public License as
+//  published by the Free Software Foundation; either version 2 of the
+//  License, or (at your option) any later version.
+//
+//  This program 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
+//  General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+//  MA 02111-1307 USA
+//  ------------------------------------------------------------------
+//  $Id: gfghi.cpp,v 1.00 2008/08/14 15:52:21 NoSFeRaTU Exp $
+//  ------------------------------------------------------------------
+//  FGHI URL parser.
+//  ------------------------------------------------------------------
+
+#include <golded.h>
+#include <gfghi.h>
+
+void FGHIUrl::FGHIUrlParse(std::string url)
+{
+	std::string buffer = "";
+	char *tempbuffer;
+	int len = url.length();
+
+	for (int i = 0; i < len; i++) {
+		int j = i ;
+		char ch = url.at(j);
+		if (ch == '%' && j+2 < url.size()) {
+			char tmpstr[] = "0x0__";
+			int chnum;
+			tmpstr[3] = url.at(j+1);
+			tmpstr[4] = url.at(j+2);
+			chnum = strtol(tmpstr, NULL, 16);	  
+			buffer += chnum;
+			i += 2;
+		} else {
+			buffer += ch;
+		}
+	}
+	strcpy(this->Url,buffer.c_str());
+	tempbuffer = new char [256];
+
+	strcpy(this->RequiredPart,strtok((char*)buffer.c_str(),"?"));
+	if (tempbuffer=strtok(NULL,"?"))
+	{
+		strcpy(this->OptionalPart,tempbuffer);
+	}
+    gstrarray optionalparameters;
+	TCHAR *token = strtok(FGHIUrl::OptionalPart, "&");
+	while (token)
+	{
+		optionalparameters.push_back(token);
+		token = strtok(NULL, "&");
+    }
+	if (strlen(this->RequiredPart)>4 ) {
+		tempbuffer = new char [256];
+		strcpy(tempbuffer,this->RequiredPart);
+		strcpy(this->Scheme,strtok((char*)tempbuffer,":"));
+	}
+	if (strcmp(Scheme,"area") == 0) {
+		  for (int aa = 0; aa!=optionalparameters.size(); aa++)
+		  {
+			char *tempid = strtok((char*)optionalparameters[aa].c_str(), "=");
+			char *tempvalue = strtok(NULL, "=");
+			if (!stricmp(tempid,"msgid") || !stricmp(tempid,"mid")) {
+				std::string temp;
+				strcpy(this->Msgid, tempvalue);
+				strchg(this->Msgid, '+', ' ');
+				temp=this->Msgid;
+			}
+			else if (stricmp(tempid,"year")) FGHIUrl::Year;
+		  }
+		  buffer = this->RequiredPart;
+          std::string buf3 = (strnieql(buffer.c_str(), "area://", 7) ? buffer.substr(7,buffer.size()-7) : buffer.substr(5,buffer.size()-5));
+		  if (buf3.size()>0 && stricmp(buf3.substr(buf3.size()-1,1).c_str(),"/")==0) buf3=buf3.substr(0,buf3.size()-1);
+		  strcpy(this->EchoName, buf3.c_str());
+	  }
+}
\ В конце файла нет новой строки
diff -urN golded+.orig/golded3/gfghi.h golded+.nsf8/golded3/gfghi.h
--- golded+.orig/golded3/gfghi.h	1970-01-01 03:00:00.000000000 +0300
+++ golded+.nsf8/golded3/gfghi.h	2009-06-03 04:17:01.000000000 +0400
@@ -0,0 +1,45 @@
+
+//  ------------------------------------------------------------------
+//  GoldED+
+//  Copyright (C) 2008 Konstantin Kuzov
+//  ------------------------------------------------------------------
+//  This program is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU General Public License as
+//  published by the Free Software Foundation; either version 2 of the
+//  License, or (at your option) any later version.
+//
+//  This program 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
+//  General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+//  MA 02111-1307 USA
+//  ------------------------------------------------------------------
+//  $Id: gfghi.h,v 1.00 2008/08/14 15:52:21 NoSFeRaTU Exp $
+//  ------------------------------------------------------------------
+//  FGHI URL parser.
+//  ------------------------------------------------------------------
+
+class FGHIUrl
+{
+public:
+	char Msgid[64];
+	char Url[256];
+	char Year[16];
+	char Scheme[256];
+	char SchemeSpecificPart[256];
+	char RequiredPart[256];
+	char OptionalPart[256];
+	char EchoName[64];
+	char OptionalParam[256];
+	char Station[256];
+	char Request[256];
+	char ObjectPath[256];
+	char ObjectPathPart[256];
+	char Error[64];
+
+	void FGHIUrlParse(std::string url);
+};
diff -urN golded+.orig/golded3/gmarea.h golded+.nsf8/golded3/gmarea.h
--- golded+.orig/golded3/gmarea.h	2007-01-08 15:09:42.000000000 +0300
+++ golded+.nsf8/golded3/gmarea.h	2009-06-03 06:06:18.000000000 +0400
@@ -329,6 +329,7 @@
     memset(netname, 0, sizeof(netname));
     memset(organization, 0, sizeof(organization));
     memset(searchfor, 0, sizeof(searchfor));
+    memset(searchurlfor, 0, sizeof(searchurlfor));
     memset(tearline, 0, sizeof(tearline));
     memset(xlatexport, 0, sizeof(xlatexport));
     memset(xlatimport, 0, sizeof(xlatimport));
@@ -406,6 +407,7 @@
   Path   inputfile;
   Path   outputfile;
   INam   searchfor;
+  INam   searchurlfor;
   int    twitmode;
   bool   inittwit;
   std::vector<Node> twitname;
@@ -658,6 +660,7 @@
   const int    Replyre() const          { return adat->replyre; }
         bool   StripHTML() const        { return adat->striphtml; }
   const char*  Searchfor() const        { return adat->searchfor; }
+  const char*  SearchURLfor() const     { return adat->searchurlfor; }
   const char*  Tagline() const          { return adat->tagline; }
         char   Taglinechar() const      { return adat->taglinechar; }
         bool   Taglinesupport() const   { return adat->taglinesupport; }
@@ -685,6 +688,7 @@
   const char*  SetOrigin(const char* o)       { return strxcpy(adat->origin, o, sizeof(adat->origin)); }
   const char*  SetOutputfile(const char* o)   { return strxcpy(adat->outputfile, o, sizeof(adat->outputfile)); }
   const char*  SetSearchfor(const char* s)    { return strxcpy(adat->searchfor, s, sizeof(adat->searchfor)); }
+  const char*  SetSearchURLfor(const char* s) { return strxcpy(adat->searchurlfor, s, sizeof(adat->searchurlfor)); }
   const char*  SetTagline(const char* t)      { return strxcpy(adat->tagline, t, sizeof(adat->tagline)); }
   const char*  SetTpl(const char* t)          { return strxcpy(adat->tpl, t, sizeof(adat->tpl)); }
         int    SetTwitmode(int m)             { adat->twitmode = m; return adat->twitmode; }
diff -urN golded+.orig/golded3/golded3.all golded+.nsf8/golded3/golded3.all
--- golded+.orig/golded3/golded3.all	2006-05-14 05:19:15.000000000 +0400
+++ golded+.nsf8/golded3/golded3.all	2009-06-03 04:17:01.000000000 +0400
@@ -78,6 +78,7 @@
 geutil   cpp all nov bcd bco bcx djg emx lnx rsx wcn wco wcx cyg be sun
 geutil2  cpp all ovl bcd bco bcx djg emx lnx rsx wcn wco wcx cyg be sun
 geview   cpp all ovl bcd bco bcx djg emx lnx rsx wcn wco wcx cyg be sun
+gfghi    cpp all ovl bcd bco bcx djg emx lnx rsx wcn wco wcx cyg be sun
 gmarea   cpp all ovl bcd bco bcx djg emx lnx rsx wcn wco wcx cyg be sun
 gehtml   cpp all nov bcd bco bcx djg emx lnx rsx wcn wco wcx cyg be sun
 golded3  cpp all nov bcd bco bcx djg emx lnx rsx wcn wco wcx cyg be sun
diff -urN golded+.orig/golded3/golded3.cpp golded+.nsf8/golded3/golded3.cpp
--- golded+.orig/golded3/golded3.cpp	2008-10-12 13:17:01.000000000 +0400
+++ golded+.nsf8/golded3/golded3.cpp	2009-06-03 04:17:01.000000000 +0400
@@ -47,8 +47,8 @@
 //  ------------------------------------------------------------------
 //  Product name.
 
-#define __GVER_NAME__           "GoldED"
-#define __GVER_SHORTNAME__      "GED"
+#define __GVER_NAME__           "NoSFeRaTU's GoldED"
+#define __GVER_SHORTNAME__      "NoSFeRaTU's GED"
 
 
 //  ------------------------------------------------------------------
diff -urN golded+.orig/goldlib/gall/gdefs.h golded+.nsf8/goldlib/gall/gdefs.h
--- golded+.orig/goldlib/gall/gdefs.h	2009-04-04 13:51:04.000000000 +0400
+++ golded+.nsf8/goldlib/gall/gdefs.h	2009-06-03 04:17:01.000000000 +0400
@@ -32,7 +32,9 @@
 
 /*  ------------------------------------------------------------------ */
 #include <stdlib.h>
+#if !defined(__FreeBSD__) && !defined(__APPLE__)
 #include <malloc.h>
+#endif
 #include <string.h>
 #include <limits.h>
 #include <gcmpall.h>
diff -urN golded+.orig/goldlib/gall/gtimall.h golded+.nsf8/goldlib/gall/gtimall.h
--- golded+.orig/goldlib/gall/gtimall.h	2008-11-17 02:36:12.000000000 +0300
+++ golded+.nsf8/goldlib/gall/gtimall.h	2009-06-03 04:17:01.000000000 +0400
@@ -207,7 +207,7 @@
 
 #if defined(__OS2__)
 inline void usleep(long duration) { DosSleep(duration); }
-#elif (defined(__MINGW32__) && __GNUC__*100+__GNUC_MINOR__ < 304) || defined(_MSC_VER)
+#elif (defined(__MINGW32__) && __GNUC__*100+__GNUC_MINOR__ < 403) || defined(_MSC_VER)
 inline void usleep(long duration) { Sleep(duration); }
 #endif
 
diff -urN golded+.orig/goldlib/gall/gutlgrp.h golded+.nsf8/goldlib/gall/gutlgrp.h
--- golded+.orig/goldlib/gall/gutlgrp.h	2006-04-05 19:56:53.000000000 +0400
+++ golded+.nsf8/goldlib/gall/gutlgrp.h	2009-06-03 05:58:54.000000000 +0400
@@ -92,6 +92,7 @@
   GRP_SCHECKERDEFLANG,
 #endif
   GRP_SEARCHFOR,
+  GRP_SEARCHURLFOR,
   GRP_STRIPHTML,
   GRP_TAGLINE,
   GRP_TAGLINECHAR,
diff -urN golded+.orig/goldlib/gall/gutlvers.cpp golded+.nsf8/goldlib/gall/gutlvers.cpp
--- golded+.orig/goldlib/gall/gutlvers.cpp	2007-02-24 17:23:03.000000000 +0300
+++ golded+.nsf8/goldlib/gall/gutlvers.cpp	2009-06-03 19:15:20.000000000 +0400
@@ -43,6 +43,10 @@
 #include <AppFileInfo.h>
 #endif
 
+#if defined(__APPLE__)
+#include <sys/types.h>
+#endif
+
 
 //  ------------------------------------------------------------------
 
@@ -100,7 +104,7 @@
 
 //  ------------------------------------------------------------------
 
-static void cpuname(int family, int model, const char *v_name, char *m_name)
+static void cpuname(int family, int model, int stepping, const char *v_name, char *m_name)
 {
   if (!strcmp("AuthenticAMD", v_name))
   {
@@ -349,9 +353,30 @@
 
 //  ------------------------------------------------------------------
 
+#if defined(__GNUC__) && defined(__i386__) || defined(__GNUC__) && defined(__x86_64__)
+static __inline void
+do_cpuid(u_int ax, u_int *p)
+{
+#if !defined(PIC) && !defined(__PIC__)
+
+	__asm __volatile("cpuid"
+                         : "=a" (p[0]), "=b" (p[1]), "=c" (p[2]), "=d" (p[3])
+                         :  "0" (ax));
+#else
+	__asm __volatile("pushl %%ebx\n\t"
+			 "cpuid\n\t"
+			 "movl %%ebx,%1\n\t"
+			 "popl %%ebx"
+                         : "=a" (p[0]), "=r" (p[1]), "=c" (p[2]), "=d" (p[3])
+                         :  "0" (ax));
+#endif
+}
+#endif
+
 char *gcpuid(char *_cpuname)
 {
-#if defined(__GNUC__) && defined(__i386__) || defined(_MSC_VER)
+#if defined(__GNUC__) && defined(__i386__) || defined(__GNUC__) && defined(__x86_64__) || defined(_MSC_VER)
+  u_int         regs[4];
   static struct scpuid_t
   {
     dword         cpu;           /* x86, where x=cpu */
@@ -394,9 +419,9 @@
   scpuid.model = (CPUInfo[0] >> 4) & 0x0F;
   scpuid.family = (CPUInfo[0] >> 8) & 0x0F;
 
-  cpuname(scpuid.family, scpuid.model, scpuid.vendor, _cpuname);
+  cpuname(scpuid.family, scpuid.model, scpuid.stepping, scpuid.vendor, _cpuname);
 
-#elif defined(__GNUC__) && defined(__i386__)
+#elif defined(__GNUC__) && defined(__i386__) && not defined(__APPLE__)
 
   asm(  /* assembler code is based on code of FreeBSD kernel sources */
         /* uses AT&T assembler notation */
@@ -538,15 +563,43 @@
        "eax", "ebx", "ecx", "edx", "esp"
   );
 
-  cpuname(scpuid.family?scpuid.family:scpuid.cpu, scpuid.model, scpuid.vendor, _cpuname);
+  if ((scpuid.cpu == 0xf) || (scpuid.cpu >= 0x6))
+  {
+	do_cpuid(0x00000001, regs);
+	scpuid.model = (regs[0] >> 4) & 15;
+	if (scpuid.cpu == 0xf)
+		scpuid.cpu += (regs[0] >> 20) & 0xff;
+	if (scpuid.cpu >= 0x6)
+		scpuid.model += ((regs[0] >> 16) & 0xF) << 4;
+  }
+  cpuname(scpuid.family?scpuid.family:scpuid.cpu, scpuid.model, scpuid.stepping, scpuid.vendor, _cpuname);
+#elif defined(__GNUC__) && defined(__x86_64__) || defined(__APPLE__)
+
+	do_cpuid(0, regs);
+	scpuid.cpu_high = regs[0];
+	((u_int *)&scpuid.vendor)[0] = regs[1];
+	((u_int *)&scpuid.vendor)[1] = regs[3];
+	((u_int *)&scpuid.vendor)[2] = regs[2];
+	scpuid.vendor[12] = '\0';
+
+	do_cpuid(0x00000001, regs);
+	scpuid.cpu   = (regs[0] >> 8) & 15;
+	scpuid.model = (regs[0] >> 4) & 15;
+	if (scpuid.cpu == 0xf)
+		scpuid.cpu += (regs[0] >> 20) & 0xff;
+	if (scpuid.cpu >= 0x6)
+		scpuid.model += ((regs[0] >> 16) & 0xF) << 4;
+	scpuid.stepping = (regs[0] & 0xf);
+
+	cpuname(scpuid.family?scpuid.family:scpuid.cpu, scpuid.model, scpuid.stepping, scpuid.vendor, _cpuname);
 
 #else
   #if defined(MSDOS) || defined(DOS) || defined(__MSDOS__) || defined(_DOS) \
    || defined(WIN32) || defined(__WIN32__) || defined(_WIN) || defined(WINNT) \
    || defined(__OS2__) || defined(OS2)
-    cpuname(0, 0, "x86", _cpuname);
+    cpuname(0, 0, 0, "x86", _cpuname);
   #else
-    cpuname(0, 0, "UNKNOWN", _cpuname);
+    cpuname(0, 0, 0, "UNKNOWN", _cpuname);
   #endif
 #endif
 
diff -urN golded+.orig/goldlib/gall/gwinall.h golded+.nsf8/goldlib/gall/gwinall.h
--- golded+.orig/goldlib/gall/gwinall.h	2007-01-08 12:48:18.000000000 +0300
+++ golded+.nsf8/goldlib/gall/gwinall.h	2009-06-03 04:17:01.000000000 +0400
@@ -324,7 +324,7 @@
 #define TCENTER     2   // Centered
 #define TRIGHT      3   // Right justified
 #define TBOTTOM     4   // Bottom border
-
+#define TSHORT      5   // Short Type (For FGHIURL)
 
 //  ------------------------------------------------------------------
 //  Values for the Proportional Bar
diff -urN golded+.orig/goldlib/glibc/Makefile golded+.nsf8/goldlib/glibc/Makefile
--- golded+.orig/goldlib/glibc/Makefile	2001-06-12 21:31:12.000000000 +0400
+++ golded+.nsf8/goldlib/glibc/Makefile	2009-06-03 04:17:01.000000000 +0400
@@ -3,7 +3,7 @@
 TOP=../..
 TARGET=glibc
 INCS=-I$(TOP)/goldlib/glibc -I$(TOP)/goldlib/gall
-CFLAGS=-DHAVE_CONFIG_H
+CFLAGS+=-DHAVE_CONFIG_H
 
 include $(TOP)/GNUmakef.inc
 include $(TOP)/GNUmakef.lib
diff -urN golded+.orig/goldlib/gmb3/gmo_msg.h golded+.nsf8/goldlib/gmb3/gmo_msg.h
--- golded+.orig/goldlib/gmb3/gmo_msg.h	2006-05-15 10:20:57.000000000 +0400
+++ golded+.nsf8/goldlib/gmb3/gmo_msg.h	2009-06-03 04:17:01.000000000 +0400
@@ -319,6 +319,7 @@
 
   ftn_addr    msgid;            // MSGID kludge address
   char        msgids[201];      // MSGID kludge string
+  char        msgidsfghi[201];  // MSGID kludge string
   char        replys[201];      // REPLY kludge string
 
   char        pid[80];          // PID kludge string
diff -urN golded+.orig/goldlib/hunspell/Makefile golded+.nsf8/goldlib/hunspell/Makefile
--- golded+.orig/goldlib/hunspell/Makefile	2006-04-10 23:04:03.000000000 +0400
+++ golded+.nsf8/goldlib/hunspell/Makefile	2009-06-03 04:17:01.000000000 +0400
@@ -3,7 +3,7 @@
 TOP=../..
 TARGET=hunspell
 INCS=-I$(TOP)/goldlib/hunspell -I$(TOP)/goldlib/gall
-CFLAGS=
+CFLAGS+=
 
 include $(TOP)/GNUmakef.inc
 include $(TOP)/GNUmakef.lib
diff -urN golded+.orig/goldlib/smblib/Makefile golded+.nsf8/goldlib/smblib/Makefile
--- golded+.orig/goldlib/smblib/Makefile	2005-10-11 22:25:31.000000000 +0400
+++ golded+.nsf8/goldlib/smblib/Makefile	2009-06-03 04:17:01.000000000 +0400
@@ -3,7 +3,7 @@
 TOP=../..
 TARGET=smblib
 INCS=-I$(TOP)/goldlib/smblib -I$(TOP)/goldlib/gall
-CFLAGS=-x c++
+CFLAGS+=-x c++
 
 include $(TOP)/GNUmakef.inc
 include $(TOP)/GNUmakef.lib
diff -urN golded+.orig/goldlib/uulib/Makefile golded+.nsf8/goldlib/uulib/Makefile
--- golded+.orig/goldlib/uulib/Makefile	2006-12-27 16:36:53.000000000 +0300
+++ golded+.nsf8/goldlib/uulib/Makefile	2009-06-03 04:17:01.000000000 +0400
@@ -6,7 +6,7 @@
 TOP=../..
 TARGET=uulib
 INCS=-I$(TOP)/goldlib/uulib -I$(TOP)/goldlib/gall -I$(TOP)/goldlib/glibc
-CFLAGS=-DHAVE_CONFIG_H -DVERSION=\"$(VERSION)\" -DPATCH=\"$(PATCH)\"
+CFLAGS+=-DHAVE_CONFIG_H -DVERSION=\"$(VERSION)\" -DPATCH=\"$(PATCH)\"
 
 include $(TOP)/GNUmakef.inc
 include $(TOP)/GNUmakef.lib
diff -urN golded+.orig/windows/golded.mak golded+.nsf8/windows/golded.mak
--- golded+.orig/windows/golded.mak	2006-09-24 20:55:57.000000000 +0400
+++ golded+.nsf8/windows/golded.mak	2009-06-02 13:15:57.000000000 +0400
@@ -104,6 +104,7 @@
 	-@erase "$(INTDIR)\geutil.obj"
 	-@erase "$(INTDIR)\geutil2.obj"
 	-@erase "$(INTDIR)\geview.obj"
+	-@erase "$(INTDIR)\gfghi.obj"
 	-@erase "$(INTDIR)\gmarea.obj"
 	-@erase "$(INTDIR)\golded3.obj"
 	-@erase "$(INTDIR)\vc60.idb"
@@ -214,6 +215,7 @@
 	"$(INTDIR)\geutil.obj" \
 	"$(INTDIR)\geutil2.obj" \
 	"$(INTDIR)\geview.obj" \
+	"$(INTDIR)\gfghi.obj" \
 	"$(INTDIR)\gmarea.obj" \
 	"$(INTDIR)\golded3.obj" \
 	"$(INTDIR)\gedcyg.res" \
@@ -303,6 +305,7 @@
 	-@erase "$(INTDIR)\geutil.obj"
 	-@erase "$(INTDIR)\geutil2.obj"
 	-@erase "$(INTDIR)\geview.obj"
+	-@erase "$(INTDIR)\gfghi.obj"
 	-@erase "$(INTDIR)\gmarea.obj"
 	-@erase "$(INTDIR)\golded3.obj"
 	-@erase "$(INTDIR)\vc60.idb"
@@ -414,6 +417,7 @@
 	"$(INTDIR)\geutil.obj" \
 	"$(INTDIR)\geutil2.obj" \
 	"$(INTDIR)\geview.obj" \
+	"$(INTDIR)\gfghi.obj" \
 	"$(INTDIR)\gmarea.obj" \
 	"$(INTDIR)\golded3.obj" \
 	"$(INTDIR)\gedcyg.res" \
@@ -766,6 +770,11 @@
 "$(INTDIR)\geview.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
+SOURCE=..\golded3\gfghi.cpp
+
+"$(INTDIR)\gfghi.obj" : $(SOURCE) "$(INTDIR)"
+       $(CPP) $(CPP_PROJ) $(SOURCE)
+
 
 SOURCE=..\golded3\gmarea.cpp
 
diff -urN golded+.orig/windows/golded.vcproj golded+.nsf8/windows/golded.vcproj
--- golded+.orig/windows/golded.vcproj	2007-01-12 22:58:17.000000000 +0300
+++ golded+.nsf8/windows/golded.vcproj	2009-06-03 05:09:56.000000000 +0400
@@ -3847,6 +3847,10 @@
 					</FileConfiguration>
 				</File>
 				<File
+					RelativePath="..\golded3\gfghi.cpp"
+					>
+				</File>
+				<File
 					RelativePath="..\golded3\gmarea.cpp"
 					>
 					<FileConfiguration
@@ -4048,6 +4052,10 @@
 					>
 				</File>
 				<File
+					RelativePath="..\golded3\gfghi.h"
+					>
+				</File>
+				<File
 					RelativePath="..\golded3\gmarea.h"
 					>
 				</File>
