/[man-db]/man-db/src/man.c
ViewVC logotype

Diff of /man-db/src/man.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.104 by cjwatson, Sun Sep 14 15:58:58 2003 UTC revision 1.105 by cjwatson, Wed Sep 17 06:17:49 2003 UTC
# Line 1654  static char *make_roff_command (const ch Line 1654  static char *make_roff_command (const ch
1654                   * in the path.                   * in the path.
1655                   */                   */
1656                  if (!troff) {                  if (!troff) {
1657                          const char *source_encoding, *roff_encoding;                          const char *page_encoding, *source_encoding,
1658                                       *roff_encoding;
1659                          const char *cat_charset;                          const char *cat_charset;
1660    
1661  #define STRC(s, otherwise) ((s) ? (s) : (otherwise))  #define STRC(s, otherwise) ((s) ? (s) : (otherwise))
1662    
1663                            page_encoding = get_page_encoding (lang);
1664                          source_encoding = get_source_encoding (lang);                          source_encoding = get_source_encoding (lang);
1665                          if (debug)                          if (debug) {
1666                                    fprintf (stderr, "page_encoding = %s\n",
1667                                             page_encoding);
1668                                  fprintf (stderr, "source_encoding = %s\n",                                  fprintf (stderr, "source_encoding = %s\n",
1669                                           source_encoding);                                           source_encoding);
1670                            }
1671    
1672                          cat_charset = get_standard_output_encoding (lang);                          cat_charset = get_standard_output_encoding (lang);
1673                          locale_charset = get_locale_charset ();                          locale_charset = get_locale_charset ();
# Line 1695  static char *make_roff_command (const ch Line 1700  static char *make_roff_command (const ch
1700                                                   STRC (roff_device, "NULL"));                                                   STRC (roff_device, "NULL"));
1701                          }                          }
1702    
1703                          roff_encoding = get_roff_encoding (roff_device);                          roff_encoding = get_roff_encoding (roff_device,
1704                                                               source_encoding);
1705                          if (debug)                          if (debug)
1706                                  fprintf (stderr, "roff_encoding = %s\n",                                  fprintf (stderr, "roff_encoding = %s\n",
1707                                           STRC (roff_encoding, "NULL"));                                           roff_encoding);
1708    
1709                          /* We may need to recode:                          /* We may need to recode:
1710                           *   from source_encoding to roff_encoding on input;                           *   from page_encoding to roff_encoding on input;
1711                           *   from output_encoding to locale_charset on output.                           *   from output_encoding to locale_charset on output.
1712                           */                           */
1713                          if (roff_encoding &&                          if (roff_encoding &&
1714                              !STREQ (source_encoding, roff_encoding))                              !STREQ (page_encoding, roff_encoding))
1715                                  command = strappend (command,                                  command = strappend (command,
1716                                                       " | iconv -c -f ",                                                       " | iconv -c -f ",
1717                                                       source_encoding, " -t ",                                                       page_encoding, " -t ",
1718                                                       roff_encoding, NULL);                                                       roff_encoding, NULL);
1719    
1720                          output_encoding = get_output_encoding (roff_device);                          output_encoding = get_output_encoding (roff_device);

Legend:
Removed from v.1.104  
changed lines
  Added in v.1.105

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26