1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

dtfile: Remove define MULTIBYTE which is always on for CDE

This commit is contained in:
Peter Howkins 2018-06-25 01:24:31 +01:00
parent 115c1a25d8
commit bcb6aa9fa9
4 changed files with 1 additions and 34 deletions

View file

@ -3612,10 +3612,8 @@ GetLongName(
{ {
#define ELLIPSIS " (...) " #define ELLIPSIS " (...) "
#define NAME_PRECISION 28 #define NAME_PRECISION 28
#ifdef MULTIBYTE
if (! is_multibyte) if (! is_multibyte)
{ {
#endif
int len = strlen( file_data->file_name ); int len = strlen( file_data->file_name );
if( len > NAME_PRECISION ) if( len > NAME_PRECISION )
{ {
@ -3647,7 +3645,6 @@ GetLongName(
user_name, group_name, user_name, group_name,
link_path ); link_path );
} }
#ifdef MULTIBYTE
} else { } else {
/* MULTIBYTE /* MULTIBYTE
* *
@ -3710,7 +3707,6 @@ GetLongName(
user_name, group_name, user_name, group_name,
link_path ); link_path );
} /* is_multibyte */ } /* is_multibyte */
#endif /* MULTIBYTE */
} }
return (long_name); return (long_name);

View file

@ -3142,27 +3142,17 @@ GetInsertPosition( int x1, int x2, XmFontList fontList, char * name )
int i, width, stringWidth; int i, width, stringWidth;
char * tmp; char * tmp;
char savedChar; char savedChar;
#ifdef MULTIBYTE
int len; int len;
#endif /* MULTIBYTE */
width = x2 - x1; width = x2 - x1;
#ifdef MULTIBYTE
i = 0; i = 0;
tmp = name; tmp = name;
while ((len = mblen(tmp, MB_CUR_MAX)) > 0) while ((len = mblen(tmp, MB_CUR_MAX)) > 0)
#else /* MULTIBYTE */
for( tmp = name + 1, i = 0;
*tmp != 0x0;
++tmp, ++i )
#endif /* MULTIBYTE */
{ {
XmString string; XmString string;
#ifdef MULTIBYTE
tmp += len; tmp += len;
#endif /* MULTIBYTE */
savedChar = *tmp; savedChar = *tmp;
*tmp = 0x0; *tmp = 0x0;
@ -3172,10 +3162,8 @@ GetInsertPosition( int x1, int x2, XmFontList fontList, char * name )
*tmp = savedChar; *tmp = savedChar;
if( stringWidth > width ) if( stringWidth > width )
break; break;
#ifdef MULTIBYTE
else else
i++; i++;
#endif /* MULTIBYTE */
} }
return( i ); return( i );
@ -6357,13 +6345,8 @@ EstimateIconSize(
if (file_view_data == NULL) { if (file_view_data == NULL) {
label_len = 1; label_len = 1;
} else { } else {
#ifdef MULTIBYTE
label_len = DtCharCount(file_view_data->label == NULL ? label_len = DtCharCount(file_view_data->label == NULL ?
file_view_data->file_data->file_name : file_view_data->label); 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) if (layout_data->pixmap_position == XmPIXMAP_TOP)

View file

@ -14,7 +14,7 @@ XINLIB = -lDtXinerama -lXinerama
#endif #endif
DEPEND_DEFINES = $(DEPENDDEFINES) 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_INSTALLATION_TOP=\"$(CDE_INSTALLATION_TOP)\" \
-DCDE_CONFIGURATION_TOP=\"$(CDE_CONFIGURATION_TOP)\" \ -DCDE_CONFIGURATION_TOP=\"$(CDE_CONFIGURATION_TOP)\" \
-DKORNSHELL=\"$(KORNSHELL)\" $(XINOPT) -DKORNSHELL=\"$(KORNSHELL)\" $(XINOPT)

View file

@ -5434,7 +5434,6 @@ static unsigned char
{ {
unsigned char *pchR = pchIn; unsigned char *pchR = pchIn;
register int i; register int i;
#ifdef MULTIBYTE
register int chlen; register int chlen;
for (i = 0; ((chlen = mblen ((char *)pchIn, MB_CUR_MAX)) > 0); i++) for (i = 0; ((chlen = mblen ((char *)pchIn, MB_CUR_MAX)) > 0); i++)
@ -5447,19 +5446,8 @@ static unsigned char
pchIn += chlen; pchIn += chlen;
} }
#else
for (i = 0; *pchIn && !isspace (*pchIn); i++, pchIn++)
/* find end of word */
{
}
#endif
/* skip to next word */ /* skip to next word */
#ifdef MULTIBYTE
while (pchIn && (mblen ((char *)pchIn, MB_CUR_MAX) == 1) && isspace (*pchIn)) while (pchIn && (mblen ((char *)pchIn, MB_CUR_MAX) == 1) && isspace (*pchIn))
#else
while (pchIn && isspace (*pchIn))
#endif
{ {
*pchIn++; *pchIn++;
} }