dtfile: Remove define MULTIBYTE which is always on for CDE
authorPeter Howkins <flibble@users.sf.net>
Mon, 25 Jun 2018 00:24:31 +0000 (01:24 +0100)
committerPeter Howkins <flibble@users.sf.net>
Mon, 25 Jun 2018 00:24:31 +0000 (01:24 +0100)
cde/programs/dtfile/Directory.c
cde/programs/dtfile/File.c
cde/programs/dtfile/Imakefile
cde/programs/dtfile/Main.c

index 1351ba4ce3a43508871c7be4c4abff381899dd50..2f9fbb6c14d717726dde059ac482269f57a6536a 100644 (file)
@@ -3612,10 +3612,8 @@ GetLongName(
    {
 #define ELLIPSIS " (...) "
 #define NAME_PRECISION 28
-#ifdef MULTIBYTE
      if (! is_multibyte)
      {
-#endif
        int len = strlen( file_data->file_name );
        if( len > NAME_PRECISION )
        {
@@ -3647,7 +3645,6 @@ GetLongName(
                  user_name, group_name,
                  link_path );
        }
-#ifdef MULTIBYTE
      } else {
        /* MULTIBYTE
        *
@@ -3710,7 +3707,6 @@ GetLongName(
                user_name, group_name,
                link_path );
      } /* is_multibyte */
-#endif  /* MULTIBYTE */
    }
 
    return (long_name);
index 228be51b628b67bcda93e47d800925d4e7249865..34e541db666383457bd1ec144df4a6bfc85fdf13 100644 (file)
@@ -3142,27 +3142,17 @@ GetInsertPosition( int x1, int x2, XmFontList fontList, char * name )
   int i, width, stringWidth;
   char * tmp;
   char savedChar;
-#ifdef MULTIBYTE
   int len;
-#endif /* MULTIBYTE */
 
   width = x2 - x1;
 
-#ifdef MULTIBYTE
   i = 0;
   tmp = name;
   while ((len = mblen(tmp, MB_CUR_MAX)) > 0)
-#else /* MULTIBYTE */
-  for( tmp = name + 1, i = 0;
-       *tmp != 0x0;
-       ++tmp, ++i )
-#endif /* MULTIBYTE */
   {
     XmString string;
 
-#ifdef MULTIBYTE
     tmp += len;
-#endif /* MULTIBYTE */
 
     savedChar = *tmp;
     *tmp = 0x0;
@@ -3172,10 +3162,8 @@ GetInsertPosition( int x1, int x2, XmFontList fontList, char * name )
     *tmp = savedChar;
     if( stringWidth > width )
       break;
-#ifdef MULTIBYTE
     else
       i++;
-#endif /* MULTIBYTE */
   }
 
   return( i );
@@ -6357,13 +6345,8 @@ EstimateIconSize(
    if (file_view_data == NULL) {
       label_len = 1;
    } else {
-#ifdef MULTIBYTE
       label_len = DtCharCount(file_view_data->label == NULL ?
                        file_view_data->file_data->file_name : file_view_data->label);
-#else
-      label_len = strlen(file_view_data->label == NULL ?
-                       file_view_data->file_data->file_name : file_view_data->label);
-#endif
    }
 
    if (layout_data->pixmap_position == XmPIXMAP_TOP)
index bfb3fc6847cde7388aa3a1980fd8f6d7ce4591df..70a939d5104743cb7285fcd6559fa1860a43e59c 100644 (file)
@@ -14,7 +14,7 @@ XINLIB = -lDtXinerama -lXinerama
 #endif
 
 DEPEND_DEFINES = $(DEPENDDEFINES)
-DEFINES = -DMULTIBYTE -DSHAPE -D_ILS_MACROS -DSUN_PERF \
+DEFINES = -DSHAPE -D_ILS_MACROS -DSUN_PERF \
        -DCDE_INSTALLATION_TOP=\"$(CDE_INSTALLATION_TOP)\" \
        -DCDE_CONFIGURATION_TOP=\"$(CDE_CONFIGURATION_TOP)\" \
        -DKORNSHELL=\"$(KORNSHELL)\" $(XINOPT)
index e384acfe178a4aa36086af5528149716fe98a5d7..217364c5b0085d64a348a139a5de684d07d1b0f4 100644 (file)
@@ -5434,7 +5434,6 @@ static unsigned char
 {
     unsigned char *pchR = pchIn;
     register int   i;
-#ifdef MULTIBYTE
     register int   chlen;
 
     for (i = 0; ((chlen = mblen ((char *)pchIn, MB_CUR_MAX)) > 0); i++)
@@ -5447,19 +5446,8 @@ static unsigned char
         pchIn += chlen;
     }
 
-#else
-    for (i = 0; *pchIn && !isspace (*pchIn); i++, pchIn++)
-    /* find end of word */
-    {
-    }
-#endif
-
     /* skip to next word */
-#ifdef MULTIBYTE
     while (pchIn && (mblen ((char *)pchIn, MB_CUR_MAX) == 1) && isspace (*pchIn))
-#else
-    while (pchIn && isspace (*pchIn))
-#endif
     {
         *pchIn++;
     }