Author: vlendec
Date: 2007-07-01 19:40:04 +0000 (Sun, 01 Jul 2007)
New Revision: 23671

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23671

Log:
Remove unused code -- 16416 bytes of bss space...

Modified:
   branches/SAMBA_3_0/source/include/intl.h
   branches/SAMBA_3_0/source/intl/lang_tdb.c
   branches/SAMBA_3_0_26/source/include/intl.h
   branches/SAMBA_3_0_26/source/intl/lang_tdb.c


Changeset:
Modified: branches/SAMBA_3_0/source/include/intl.h
===================================================================
--- branches/SAMBA_3_0/source/include/intl.h    2007-07-01 19:11:40 UTC (rev 
23670)
+++ branches/SAMBA_3_0/source/include/intl.h    2007-07-01 19:40:04 UTC (rev 
23671)
@@ -21,5 +21,4 @@
 
 /* ideally we would have a static mapping, but that precludes
    dynamic loading. This is a reasonable compromise */
-#define _(x) lang_msg_rotate(x)
 #define N_(x) (x)

Modified: branches/SAMBA_3_0/source/intl/lang_tdb.c
===================================================================
--- branches/SAMBA_3_0/source/intl/lang_tdb.c   2007-07-01 19:11:40 UTC (rev 
23670)
+++ branches/SAMBA_3_0/source/intl/lang_tdb.c   2007-07-01 19:40:04 UTC (rev 
23671)
@@ -231,32 +231,6 @@
        free((void *)msgstr);
 }
 
-
-/*
-  when the _() translation macro is used there is no obvious place to free
-  the resulting string and there is no easy way to give a static pointer.
-  All we can do is rotate between some static buffers and hope a single 
d_printf() 
-  doesn't have more calls to _() than the number of buffers 
-*/
-const char *lang_msg_rotate(const char *msgid)
-{
-#define NUM_LANG_BUFS 16
-       char *msgstr;
-       static pstring bufs[NUM_LANG_BUFS];
-       static int next;
-
-       msgstr = (char *)lang_msg(msgid);
-       if (!msgstr) return msgid;
-
-       pstrcpy(bufs[next], msgstr);
-       msgstr = bufs[next];
-
-       next = (next+1) % NUM_LANG_BUFS;
-       
-       return msgstr;
-}
-
-
 /* 
    return the current language - needed for language file mappings 
 */

Modified: branches/SAMBA_3_0_26/source/include/intl.h
===================================================================
--- branches/SAMBA_3_0_26/source/include/intl.h 2007-07-01 19:11:40 UTC (rev 
23670)
+++ branches/SAMBA_3_0_26/source/include/intl.h 2007-07-01 19:40:04 UTC (rev 
23671)
@@ -21,5 +21,4 @@
 
 /* ideally we would have a static mapping, but that precludes
    dynamic loading. This is a reasonable compromise */
-#define _(x) lang_msg_rotate(x)
 #define N_(x) (x)

Modified: branches/SAMBA_3_0_26/source/intl/lang_tdb.c
===================================================================
--- branches/SAMBA_3_0_26/source/intl/lang_tdb.c        2007-07-01 19:11:40 UTC 
(rev 23670)
+++ branches/SAMBA_3_0_26/source/intl/lang_tdb.c        2007-07-01 19:40:04 UTC 
(rev 23671)
@@ -231,32 +231,6 @@
        free((void *)msgstr);
 }
 
-
-/*
-  when the _() translation macro is used there is no obvious place to free
-  the resulting string and there is no easy way to give a static pointer.
-  All we can do is rotate between some static buffers and hope a single 
d_printf() 
-  doesn't have more calls to _() than the number of buffers 
-*/
-const char *lang_msg_rotate(const char *msgid)
-{
-#define NUM_LANG_BUFS 16
-       char *msgstr;
-       static pstring bufs[NUM_LANG_BUFS];
-       static int next;
-
-       msgstr = (char *)lang_msg(msgid);
-       if (!msgstr) return msgid;
-
-       pstrcpy(bufs[next], msgstr);
-       msgstr = bufs[next];
-
-       next = (next+1) % NUM_LANG_BUFS;
-       
-       return msgstr;
-}
-
-
 /* 
    return the current language - needed for language file mappings 
 */

Reply via email to