Remove #if 0-commented code, except FIXMEs
authorReuben Thomas <rrt@sc3d.org>
Sat, 13 Jan 2018 17:21:04 +0000 (17:21 +0000)
committerReuben Thomas <rrt@sc3d.org>
Sun, 14 Jan 2018 20:45:31 +0000 (20:45 +0000)
.gitignore
doc/recode.texi
src/Makefile.am
src/main.c
src/outer.c
src/request.c
src/task.c

index 9b31899eb016ed7d095e9d981942a3705c77f97c..626f938d744d4fc5d5d99c7cb82003b2294c9974 100644 (file)
@@ -36,7 +36,6 @@ html/
 /src/.libs/
 /src/charname.h
 /src/fr-charname.h
-/src/freeze.c
 /src/iconvdecl.h
 /src/merged.c
 /src/recode
index b9feda8cc33a8fbbc4b1f065d2724972e8add89a..1f0367fc29fa84f2c366741dba27ee318a456167 100644 (file)
@@ -3766,11 +3766,6 @@ The first command use the charset prior to @w{RFC 1345} introduction.
 Both methods give different recodings.  These differences are annoying,
 the fuzziness will have to be explained and settle down one day.
 
-@cindex Recode, a Macintosh port
-As a side note, some people ask if there is a Macintosh port of Recode.
-I'm not aware of any.  I presume that if the tool
-fills a need for Macintosh users, someone will port it one of these days?
-
 @node AtariST,  , Apple-Mac, Micros
 @section Atari ST code
 
index 12b3f74b5c0b8dc99873e7bc3b863d08140faf77..fec887ce468d34dafb422c9f43ce497a3592fc8d 100644 (file)
@@ -50,7 +50,7 @@ H_SURFACES = base64.h
 C_SURFACES = base64.c dump.c endline.c permut.c quoted.c
 L_SURFACES =
 
-recode_SOURCES = main.c freeze.c mixed.c
+recode_SOURCES = main.c mixed.c
 recode_LDADD = librecode.la ../lib/libgnu.la
 
 librecode_la_SOURCES = charname.c combine.c fr-charname.c iconv.c \
index 5874cb117dfb3ddddd27342b1c86b59d92e0493f..eba5168d6c23e5f5b1f8296e58fa879197187faf 100644 (file)
@@ -41,9 +41,6 @@ static int show_version = 0;
 /* If true, show a list of one or all known charsets, then exit.  */
 static bool show_symbols = false;
 
-/* If true, dump all tables as a big C module.  */
-static bool freeze_tables = false;
-
 /* If true, check all charsets for subsets, then exit.  */
 static bool find_subsets = false;
 
@@ -87,19 +84,8 @@ static bool strict_mapping = false;
 /* The following charset name will be ignored, if given.  */
 static const char *ignored_name = NULL;
 
-#if 0
-/* Unabridged names of BEFORE and AFTER charsets, even if still aliases.
-   These are used for naming the array in produced C code.  */
-static const char *before_full_name;
-static const char *after_full_name;
-#endif
-
 /* Ordinals of list, BEFORE and AFTER charset.  */
 static RECODE_SYMBOL list_charset;
-#if 0
-static RECODE_SYMBOL before_charset;
-static RECODE_SYMBOL after_charset;
-#endif
 
 /* Flag telling usage that we are decoding charsets.  */
 bool decoding_charset_flag = false;
@@ -169,10 +155,6 @@ setup_signals (void)
 #ifdef SIGPIPE
   signal (SIGPIPE, signal_handler);
 #endif
-#if 0
-  signal (SIGINT, signal_handler);
-  signal (SIGTERM, signal_handler);
-#endif
 }
 \f
 /* Main control.  */
@@ -232,7 +214,6 @@ Listings:\n\
   -l, --list[=FORMAT]        list one or all known charsets and aliases\n\
   -k, --known=PAIRS          restrict charsets according to known PAIRS list\n\
   -h, --header[=[LN/]NAME]   write table NAME on stdout using LN, then exit\n\
-  -F, --freeze-tables        write out a C module holding all tables\n\
   -T, --find-subsets         report all charsets being subset of others\n\
   -C, --copyright            display Copyright and copying conditions\n\
       --help                 display this help and exit\n\
@@ -326,7 +307,6 @@ static const struct option long_options[] =
   {"diacritics", no_argument, NULL, 'd'},
   {"find-subsets", no_argument, NULL, 'T'},
   {"force", no_argument, NULL, 'f'},
-  {"freeze-tables", no_argument, NULL, 'F'},
   {"header", optional_argument, NULL, 'h'},
   {"help", no_argument, &show_help, 1},
   {"ignore", required_argument, NULL, 'x'},
@@ -430,10 +410,6 @@ main (int argc, char *const *argv)
        print_copyright ();
        exit (EXIT_SUCCESS);
 
-      case 'F':
-       freeze_tables = true;
-       break;
-
       case 'S':
        if (optarg)
          switch (argmatch (optarg, language_strings, NULL, 0))
@@ -626,12 +602,6 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"),
       abort ();
   }
 
-  if (freeze_tables)
-    {
-      recode_freeze_tables (outer);
-      exit (EXIT_SUCCESS);
-    }
-
   /* Set strict mapping.  */
 
   if (strict_mapping)
index 360c7470d49a0912448a94755e4e3f7052e38a37..cd68e9160b1fc2b6e2872cc826eb2ca7398ed89b 100644 (file)
@@ -138,40 +138,6 @@ declare_single (RECODE_OUTER outer,
   return single;
 }
 
-#if 0
-
-/*-------------------------------------------.
-| Create and initialize a new data surface.  |
-`-------------------------------------------*/
-
-bool
-declare_data_surface (RECODE_OUTER outer, const char *name,
-                     struct recode_quality resurfacer_quality,
-                     Recode_init resurfacer_init_routine,
-                     Recode_transform resurfacer_transform_routine,
-                     struct recode_quality unsurfacer_quality,
-                     Recode_init unsurfacer_init_routine,
-                     Recode_transform unsurfacer_transform_routine)
-{
-}
-
-/*-------------------------------------------------.
-| Create and initialize a new structural surface.  |
-`-------------------------------------------------*/
-
-bool
-declare_tree_surface (RECODE_OUTER outer, const char *name,
-                     struct recode_quality resurfacer_quality,
-                     Recode_init resurfacer_init_routine,
-                     Recode_transform resurfacer_transform_routine,
-                     struct recode_quality unsurfacer_quality,
-                     Recode_init unsurfacer_init_routine,
-                     Recode_transform unsurfacer_transform_routine)
-{
-}
-
-#endif
-
 /*---------------------------------------------------------------.
 | Declare a charset available through `iconv', given the NAME of |
 | this charset (which might already exist as an alias), and the  |
@@ -221,34 +187,6 @@ declare_iconv (RECODE_OUTER outer, const char *name, const char *iconv_name)
   return true;
 }
 
-#if 0
-
-/*------------------------------------------------.
-| Save explode data within the symbol structure.  |
-`------------------------------------------------*/
-
-bool register_explode_data
-  (RECODE_OUTER, const char *, const unsigned short *);
-
-bool
-register_explode_data (RECODE_OUTER outer,
-                      const char *name, const unsigned short *data)
-{
-  RECODE_SYMBOL symbol;
-
-  symbol = find_alias (outer, name, SYMBOL_CREATE_CHARSET);
-  if (!symbol)
-    return false;
-
-  assert(symbol->type = RECODE_CHARSET);
-  symbol->data_type = RECODE_EXPLODE_DATA;
-  /* The cast is a way to silently discard the const.  */
-  symbol->data = (void *) data;
-  return true;
-}
-
-#endif
-
 /*--------------------------------------------------------------------------.
 | Associate an explode format DATA structure with charset NAME_COMBINED, an |
 | 8-bit charset.  A NULL value for NAME_EXPLODED implies UCS-2.  Otherwise, |
index c7e5b119c0b6815d164d5264ce5303a09ecd1a40..9c8e46b6900e63dc115e08fdb06edbe710f78f13 100644 (file)
@@ -141,12 +141,6 @@ edit_sequence (RECODE_REQUEST request, bool edit_quality)
                {
                  last_charset_printed = step->before;
                  add_work_string (request, last_charset_printed->name);
-#if 0
-                 if (unsurfacer_start == unsurfacer_end
-                     && last_charset_printed
-                     && last_charset_printed->implied_surfaces)
-                   add_work_character (request, '/');
-#endif
                }
            }
 
@@ -169,14 +163,6 @@ edit_sequence (RECODE_REQUEST request, bool edit_quality)
              last_charset_printed = step->after;
              add_work_string (request, last_charset_printed->name);
              step++;
-#if 0
-             if ((step == request->sequence_array + request->sequence_length
-                  || (step->before != outer->data_symbol
-                      && step->before != outer->tree_symbol))
-                 && last_charset_printed
-                 && last_charset_printed->implied_surfaces)
-               add_work_character (request, '/');
-#endif
            }
          else
            {
index 28e2102eadb72798366c7c18c14f9726a91b8410..f6914deae71b5112421bbc97c6d35d26b693050b 100644 (file)
@@ -648,7 +648,7 @@ perform_pipe_sequence (RECODE_TASK task)
          }
     }
 
-#if FIXME
+#if 0
   if (interrupted)
     /* FIXME: It is not very clear what happened in sub-processes.  */
     if (task->error_so_far < task->fail_level)