mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-13 19:52:20 +00:00
dtfile: Remove 97 compiler warnings
This commit is contained in:
parent
ef67cebea5
commit
764a0c7e72
19 changed files with 102 additions and 99 deletions
|
@ -670,7 +670,7 @@ ProcessMoveCopyLink (
|
|||
Widget drop_window)
|
||||
|
||||
{
|
||||
unsigned int modifiers = NULL;
|
||||
unsigned int modifiers = 0;
|
||||
int numFiles, i;
|
||||
char ** file_set = NULL;
|
||||
char ** host_set = NULL;
|
||||
|
@ -727,7 +727,7 @@ ProcessMoveCopyLink (
|
|||
else if (strcmp(command, "FILESYSTEM_LINK") == 0)
|
||||
modifiers = ShiftMask;
|
||||
else
|
||||
modifiers = NULL;
|
||||
modifiers = 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -896,7 +896,7 @@ ProcessBufferDropOnFolder (
|
|||
Widget drop_window)
|
||||
|
||||
{
|
||||
unsigned int modifiers = NULL;
|
||||
unsigned int modifiers = 0;
|
||||
int num_of_buffers, i;
|
||||
char ** file_set = NULL;
|
||||
char ** host_set = NULL;
|
||||
|
@ -1262,7 +1262,7 @@ MoveCopyLinkHandler(
|
|||
char *files = NULL;
|
||||
char ** file_set = NULL;
|
||||
char ** host_set = NULL;
|
||||
unsigned int modifiers = NULL;
|
||||
unsigned int modifiers = 0;
|
||||
int file_count = 0;
|
||||
int file_set_size = 0;
|
||||
int errorCount = 0;
|
||||
|
@ -1328,7 +1328,7 @@ MoveCopyLinkHandler(
|
|||
|
||||
/* Set up the modifier key's */
|
||||
if( opType == MOVE_FILE)
|
||||
modifiers = NULL;
|
||||
modifiers = 0;
|
||||
else if ( opType == COPY_FILE)
|
||||
modifiers = ControlMask;
|
||||
else
|
||||
|
|
|
@ -198,7 +198,7 @@ VFTextChangeSpace(
|
|||
currentDirectoryText = GetRestrictedDirectory(text);
|
||||
|
||||
/* Extract the path */
|
||||
path[0] = NULL;
|
||||
path[0] = '\0';
|
||||
|
||||
if(currentDirectoryText == NULL)
|
||||
{
|
||||
|
|
|
@ -762,7 +762,7 @@ MakeDesktopWindow(
|
|||
XtSetValues (desktopWindow->shell, args, 4);
|
||||
|
||||
/* force the Window Manager to map it where I want it */
|
||||
if (XtWindow(desktopWindow->shell) != NULL)
|
||||
if (XtWindow(desktopWindow->shell) != 0)
|
||||
{
|
||||
XGetNormalHints(XtDisplay(desktopWindow->shell),
|
||||
XtWindow(desktopWindow->shell), &wmSizeHints);
|
||||
|
@ -2042,7 +2042,7 @@ ProcessMoveCopyLinkDT (
|
|||
DesktopRec *desktopWindow,
|
||||
DtDndDropCallbackStruct *drop_parameters)
|
||||
{
|
||||
unsigned int modifiers = NULL;
|
||||
unsigned int modifiers = 0;
|
||||
int numFiles, i;
|
||||
char ** file_set;
|
||||
char ** host_set;
|
||||
|
@ -2079,7 +2079,7 @@ ProcessMoveCopyLinkDT (
|
|||
else if (strcmp(command, "FILESYSTEM_LINK") == 0)
|
||||
modifiers = ShiftMask;
|
||||
else
|
||||
modifiers = NULL;
|
||||
modifiers = 0;
|
||||
}
|
||||
|
||||
/*************************************************************/
|
||||
|
@ -2532,7 +2532,7 @@ PutOnDTCB (
|
|||
|
||||
XmUpdateDisplay (w);
|
||||
|
||||
if((int)client_data != NULL)
|
||||
if((int)client_data != 0)
|
||||
mbar = XtParent(w);
|
||||
else
|
||||
mbar = XmGetPostedFromWidget(XtParent(w));
|
||||
|
@ -3125,7 +3125,7 @@ SetupDesktopWindow (
|
|||
if(openDirType == NEW)
|
||||
ForceMyIconOpen(desktopWindow->host, NULL);
|
||||
|
||||
if( checkBrokenLink != 0 && checkBrokenLinkTimerId == NULL )
|
||||
if( checkBrokenLink != 0 && checkBrokenLinkTimerId == 0 )
|
||||
{
|
||||
checkBrokenLinkTimerId = XtAppAddTimeOut(
|
||||
XtWidgetToApplicationContext( toplevel ),
|
||||
|
@ -4384,7 +4384,7 @@ PutOnWorkspaceHandler(
|
|||
|
||||
XtFree( workspace );
|
||||
|
||||
if( checkBrokenLink != 0 && checkBrokenLinkTimerId == NULL )
|
||||
if( checkBrokenLink != 0 && checkBrokenLinkTimerId == 0 )
|
||||
{
|
||||
checkBrokenLinkTimerId = XtAppAddTimeOut(
|
||||
XtWidgetToApplicationContext( toplevel ),
|
||||
|
|
|
@ -390,13 +390,13 @@ static struct TreePx {
|
|||
Pixmap px[3]; /* small, medium, and large pixmap */
|
||||
} TreePxTab[tpxN] =
|
||||
{
|
||||
{ "Dttvnor", NULL },
|
||||
{ "Dttverr", NULL },
|
||||
{ "Dttvmor", NULL },
|
||||
{ "Dttvlss", NULL },
|
||||
{ "Dttvbth", NULL },
|
||||
{ "Dttvemp", NULL },
|
||||
{ "Dttvnil", NULL },
|
||||
{ "Dttvnor", 0 },
|
||||
{ "Dttverr", 0 },
|
||||
{ "Dttvmor", 0 },
|
||||
{ "Dttvlss", 0 },
|
||||
{ "Dttvbth", 0 },
|
||||
{ "Dttvemp", 0 },
|
||||
{ "Dttvnil", 0 },
|
||||
};
|
||||
|
||||
static char *TreePxSuffix[3] = { ".s", ".m", ".l" };
|
||||
|
@ -1859,7 +1859,7 @@ GetDragIcon(
|
|||
Pixmap dragPixmap;
|
||||
Pixmap dragMask;
|
||||
|
||||
dragPixmap = _DtIconDraw (w, NULL, 0, 0, False);
|
||||
dragPixmap = _DtIconDraw (w, 0, 0, 0, False);
|
||||
|
||||
XGetGeometry (XtDisplay(w), dragPixmap,
|
||||
(Window *) &junk, /* returned root window */
|
||||
|
@ -2117,7 +2117,7 @@ DragFinishCB(Widget w, XtPointer client, XtPointer call)
|
|||
{
|
||||
DtDndDragFinishCallback cb = (DtDndDragFinishCallback) call;
|
||||
int i;
|
||||
static Window root = NULL;
|
||||
static Window root = 0;
|
||||
|
||||
DPRINTF(("DragFinishCB: dragActive -> False\n"));
|
||||
|
||||
|
@ -2633,7 +2633,7 @@ SetFileSelected(
|
|||
if (file_view_data->file_data->link == NULL)
|
||||
SetToSelectColors (file_view_data->widget,
|
||||
(Widget)((FileMgrRec *)file_mgr_data->file_mgr_rec)->file_window,
|
||||
NULL);
|
||||
0);
|
||||
else
|
||||
SetToSelectColors (file_view_data->widget,
|
||||
(Widget)((FileMgrRec *)file_mgr_data->file_mgr_rec)->file_window,
|
||||
|
@ -2670,7 +2670,7 @@ SetFileUnselected(
|
|||
SetToNormalColors (file_view_data->widget,
|
||||
((FileMgrRec *)(file_mgr_data->file_mgr_rec))->file_window,
|
||||
((FileMgrRec *)(file_mgr_data->file_mgr_rec))->main,
|
||||
NULL);
|
||||
0);
|
||||
|
||||
if (PositioningEnabledInView(file_mgr_data))
|
||||
RedrawOneGadget(file_view_data->widget, NULL, NULL);
|
||||
|
@ -3516,7 +3516,7 @@ RestorePositionalData (
|
|||
}
|
||||
xrm_name[i++] = XrmStringToQuark(name);
|
||||
xrm_name[i] = XrmStringToQuark("num_positions");
|
||||
xrm_name[i+1] = NULL;
|
||||
xrm_name[i+1] = '\0';
|
||||
|
||||
/* Find out how many objects there are to be loaded */
|
||||
file_mgr_data->object_positions = NULL;
|
||||
|
@ -5200,7 +5200,7 @@ FreeLayoutData(XtPointer p)
|
|||
|
||||
layout_data = (IconLayoutData *)p;
|
||||
|
||||
if (layout_data->work_id != NULL)
|
||||
if (layout_data->work_id != 0)
|
||||
{
|
||||
DPRINTF(("FreeLayoutData: removing workproc\n"));
|
||||
XtRemoveWorkProc(layout_data->work_id);
|
||||
|
@ -7157,7 +7157,7 @@ CommitWorkProcUpdates(
|
|||
}
|
||||
|
||||
/* if work proc no longer active, everything should already be commited */
|
||||
if (layout_data->work_id == NULL)
|
||||
if (layout_data->work_id == 0)
|
||||
return;
|
||||
|
||||
/* manage new children */
|
||||
|
@ -7332,7 +7332,7 @@ DisplayWorkProc(
|
|||
{
|
||||
/* all work is done; all icons are up-to-date */
|
||||
file_mgr_data->newSize = False;
|
||||
layout_data->work_id = NULL;
|
||||
layout_data->work_id = 0;
|
||||
XmDropSiteEndUpdate(layout_data->drop_site_w);
|
||||
|
||||
DPRINTF(("DisplayWorkProc: all done.\n"));
|
||||
|
@ -7848,7 +7848,7 @@ layout_done:
|
|||
*/
|
||||
layout_data->visible_done = False;
|
||||
layout_data->all_done = False;
|
||||
if (layout_data->work_id == NULL)
|
||||
if (layout_data->work_id == 0)
|
||||
{
|
||||
XtAppContext app_context =
|
||||
XtWidgetToApplicationContext(file_mgr_rec->shell);
|
||||
|
|
|
@ -189,7 +189,7 @@ ShowRenameFileDialog(
|
|||
|
||||
XmUpdateDisplay (w);
|
||||
|
||||
if((int)client_data != NULL)
|
||||
if((int)client_data != 0)
|
||||
{
|
||||
file_view_data = (FileViewData *)client_data;
|
||||
mbar = XtParent(w);
|
||||
|
@ -221,7 +221,7 @@ ShowRenameFileDialog(
|
|||
XtSetArg (args[n], XmNallowShellResize, True); n++;
|
||||
|
||||
/* Ignore accelerators when we're insensitive */
|
||||
if((int)client_data == NULL)
|
||||
if((int)client_data == 0)
|
||||
{
|
||||
if ((file_mgr_rec->menuStates & RENAME) == 0)
|
||||
return;
|
||||
|
@ -298,7 +298,7 @@ ShowCopyFileDialog(
|
|||
|
||||
XmUpdateDisplay (w);
|
||||
|
||||
if((int)client_data != NULL)
|
||||
if((int)client_data != 0)
|
||||
{
|
||||
file_view_data = (FileViewData *)client_data;
|
||||
mbar = XtParent(w);
|
||||
|
@ -431,7 +431,7 @@ ShowCopyFileDialog(
|
|||
|
||||
|
||||
/* Adjust the colors of the icon */
|
||||
SetToNormalColors (file_type, form, file_mgr_rec->main, NULL);
|
||||
SetToNormalColors (file_type, form, file_mgr_rec->main, 0);
|
||||
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
|
@ -769,7 +769,7 @@ ShowMoveFileDialog(
|
|||
|
||||
XmUpdateDisplay (w);
|
||||
|
||||
if((int)client_data != NULL)
|
||||
if((int)client_data != 0)
|
||||
{
|
||||
file_view_data = (FileViewData *)client_data;
|
||||
mbar = XtParent(w);
|
||||
|
@ -1094,7 +1094,7 @@ ShowLinkFileDialog(
|
|||
|
||||
XmUpdateDisplay (w);
|
||||
|
||||
if((int)client_data != NULL)
|
||||
if((int)client_data != 0)
|
||||
{
|
||||
file_view_data = (FileViewData *)client_data;
|
||||
mbar = XtParent(w);
|
||||
|
@ -1221,7 +1221,7 @@ ShowLinkFileDialog(
|
|||
|
||||
|
||||
/* Adjust the colors of the icon */
|
||||
SetToNormalColors (file_type, form, file_mgr_rec->main, NULL);
|
||||
SetToNormalColors (file_type, form, file_mgr_rec->main, 0);
|
||||
|
||||
n = 0;
|
||||
XtSetArg (args[n], XmNrightAttachment, XmATTACH_WIDGET); n++;
|
||||
|
@ -2118,7 +2118,7 @@ ShowMakeFileDialog(
|
|||
|
||||
|
||||
/* Adjust the colors of the icon */
|
||||
SetToNormalColors (file_type, form, file_mgr_rec->main, NULL);
|
||||
SetToNormalColors (file_type, form, file_mgr_rec->main, 0);
|
||||
|
||||
/* The data sent to the Text, Ok and Cancel callbacks */
|
||||
|
||||
|
|
|
@ -228,7 +228,7 @@ FileOperationError(
|
|||
else
|
||||
{
|
||||
message_buf = XtMalloc(strlen(message1) + 1);
|
||||
(void) sprintf(message_buf,message1);
|
||||
(void) sprintf(message_buf, "%s", message1);
|
||||
}
|
||||
|
||||
/* Display an error dialog */
|
||||
|
@ -880,7 +880,7 @@ FileManip(
|
|||
char message_buf[512];
|
||||
char * tmpStr;
|
||||
|
||||
message_buf[0] = NULL;
|
||||
message_buf[0] = '\0';
|
||||
tmpStr = (GETMESSAGE(11,30, "Cannot move or rename the folder %s.\nAll File Manager views displayed for a folder or its sub-folders\nmust be closed before a folder can be moved or renamed."));
|
||||
sprintf (message_buf, tmpStr, from);
|
||||
(*errorHandler) (w, message_buf, NULL);
|
||||
|
@ -1299,7 +1299,7 @@ FileManip(
|
|||
break;
|
||||
default:
|
||||
unknown = True;
|
||||
sprintf(errnoMsg, GETMESSAGE(11,56, "(Unknown):"));
|
||||
sprintf(errnoMsg, "%s", GETMESSAGE(11,56, "(Unknown):"));
|
||||
strerrormsg = strerror(errno);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -566,7 +566,7 @@ Create(
|
|||
static Boolean first = True;
|
||||
FileMgrRec * file_mgr_rec;
|
||||
Widget shell;
|
||||
Widget main;
|
||||
Widget mainWidget;
|
||||
Widget menu;
|
||||
Widget header_frame;
|
||||
Widget header_separator;
|
||||
|
@ -656,9 +656,9 @@ Create(
|
|||
XmAddWMProtocolCallback (shell, delete_window, (XtCallbackProc)SystemClose,
|
||||
(XtPointer)file_mgr_rec);
|
||||
|
||||
file_mgr_rec->main = main = XmCreateMainWindow (shell, "main", args, 1);
|
||||
XtManageChild (main);
|
||||
XtAddCallback(main, XmNhelpCallback, (XtCallbackProc)HelpRequestCB,
|
||||
file_mgr_rec->main = mainWidget = XmCreateMainWindow (shell, "main", args, 1);
|
||||
XtManageChild (mainWidget);
|
||||
XtAddCallback(mainWidget, XmNhelpCallback, (XtCallbackProc)HelpRequestCB,
|
||||
HELP_FILE_MANAGER_VIEW_STR);
|
||||
|
||||
|
||||
|
@ -666,9 +666,9 @@ Create(
|
|||
|
||||
XtSetArg (args[0], XmNbackground, &background);
|
||||
XtSetArg (args[1], XmNcolormap, &colormap);
|
||||
XtGetValues (main, args, 2);
|
||||
XtGetValues (mainWidget, args, 2);
|
||||
|
||||
XmGetColors (XtScreen (main), colormap, background,
|
||||
XmGetColors (XtScreen (mainWidget), colormap, background,
|
||||
&foreground, &top_shadow, &bottom_shadow, &select);
|
||||
|
||||
/* Create the menu. */
|
||||
|
@ -676,8 +676,8 @@ Create(
|
|||
|
||||
if(TrashView)
|
||||
{
|
||||
file_mgr_rec->menuStates = NULL;
|
||||
file_mgr_rec->menu = menu = CreateTrashMenu (main, file_mgr_rec);
|
||||
file_mgr_rec->menuStates = 0;
|
||||
file_mgr_rec->menu = menu = CreateTrashMenu (mainWidget, file_mgr_rec);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -687,7 +687,7 @@ Create(
|
|||
CLEAN_UP | MOVE_UP |
|
||||
HOME | CHANGE_DIR | TERMINAL);
|
||||
|
||||
file_mgr_rec->menu = menu = CreateMenu (main, file_mgr_rec);
|
||||
file_mgr_rec->menu = menu = CreateMenu (mainWidget, file_mgr_rec);
|
||||
}
|
||||
|
||||
/* Create the work area frame. */
|
||||
|
@ -696,7 +696,7 @@ Create(
|
|||
XtSetArg (args[1], XmNshadowType, XmSHADOW_OUT);
|
||||
XtSetArg (args[2], XmNmarginWidth, 5);
|
||||
XtSetArg (args[3], XmNmarginHeight, 5);
|
||||
work_frame = XmCreateFrame (main, "work_frame", args, 4);
|
||||
work_frame = XmCreateFrame (mainWidget, "work_frame", args, 4);
|
||||
XtManageChild (work_frame);
|
||||
|
||||
|
||||
|
@ -709,7 +709,7 @@ Create(
|
|||
XtSetArg (args[n], XmNmarginHeight, 1); n++;
|
||||
XtSetArg (args[n], XmNtextTranslations, trans_table); n++;
|
||||
file_mgr_rec->header_frame = header_frame =
|
||||
XmCreateForm (main, "header_frame", args, n);
|
||||
XmCreateForm (mainWidget, "header_frame", args, n);
|
||||
|
||||
XtAddCallback(header_frame, XmNhelpCallback,
|
||||
(XtCallbackProc)HelpRequestCB,
|
||||
|
@ -924,7 +924,7 @@ Create(
|
|||
XtSetArg (args[n], XmNshadowType, XmSHADOW_OUT); n++;
|
||||
XtSetArg (args[n], XmNmarginWidth, 5); n++;
|
||||
XtSetArg (args[n], XmNmarginHeight, 1); n++;
|
||||
status_form = XmCreateForm (main, "status_form", args, n);
|
||||
status_form = XmCreateForm (mainWidget, "status_form", args, n);
|
||||
XtManageChild (status_form);
|
||||
|
||||
n = 0;
|
||||
|
@ -939,10 +939,10 @@ Create(
|
|||
/* Associate the menu and frames with the appropriate */
|
||||
/* areas of the main windows. */
|
||||
|
||||
XmMainWindowSetAreas (main, menu, file_mgr_rec->header_frame,
|
||||
XmMainWindowSetAreas (mainWidget, menu, file_mgr_rec->header_frame,
|
||||
NULL, NULL, work_frame);
|
||||
XtSetArg (args[0], XmNmessageWindow, status_form);
|
||||
XtSetValues(main, args, 1);
|
||||
XtSetValues(mainWidget, args, 1);
|
||||
|
||||
/* Create the Scrolled Window for the file display area and */
|
||||
/* set the scrollbars colors correctly. */
|
||||
|
@ -1047,7 +1047,7 @@ Create(
|
|||
|
||||
/* Set the return values for the dialog widget and dialog instance. */
|
||||
|
||||
*return_widget = (Widget) main;
|
||||
*return_widget = (Widget) mainWidget;
|
||||
*dialog = (XtPointer) file_mgr_rec;
|
||||
}
|
||||
|
||||
|
@ -1787,7 +1787,7 @@ SetValues(
|
|||
{
|
||||
/* Set the current directory icon to normal colors */
|
||||
SetToNormalColors (file_mgr_rec->current_directory_icon,
|
||||
file_mgr_rec->file_window, file_mgr_rec->main, NULL);
|
||||
file_mgr_rec->file_window, file_mgr_rec->main, 0);
|
||||
|
||||
|
||||
/* Update the Change Directory host name */
|
||||
|
@ -2337,7 +2337,7 @@ ActivateClist(
|
|||
#ifdef __osf__
|
||||
sscanf( params[0], "%lx", &fileMgrRec );
|
||||
#else
|
||||
sscanf( params[0], "%p", &fileMgrRec );
|
||||
sscanf( params[0], "%p", (void **) &fileMgrRec );
|
||||
#endif
|
||||
_DtMessage(toplevel, title, message, NULL, HelpRequestCB);
|
||||
XtFree( title );
|
||||
|
@ -2656,7 +2656,7 @@ StringToBranchList(
|
|||
current = DtStrchr (start, ',');
|
||||
if (current != NULL)
|
||||
{
|
||||
*current = NULL;
|
||||
*current = '\0';
|
||||
current += 2;
|
||||
}
|
||||
|
||||
|
@ -2716,7 +2716,7 @@ StringToSelectionList(
|
|||
current = DtStrchr (start, ',');
|
||||
if (current != NULL)
|
||||
{
|
||||
*current = NULL;
|
||||
*current = '\0';
|
||||
current += 2;
|
||||
}
|
||||
|
||||
|
@ -6388,7 +6388,7 @@ FMInput(
|
|||
#ifdef __osf__
|
||||
sscanf( params[0], "%lx", &fileMgrRec );
|
||||
#else
|
||||
sscanf( params[0], "%p", &fileMgrRec );
|
||||
sscanf( params[0], "%p", (void **) &fileMgrRec );
|
||||
#endif
|
||||
FileWindowInputCallback( wid, (XtPointer)fileMgrRec, (XtPointer)&cb );
|
||||
}
|
||||
|
|
|
@ -1959,7 +1959,7 @@ FileOpPipeCB(
|
|||
if( strcmp( cb_data->updates[i].directory, "/" ) == 0 )
|
||||
tmpDir[0] = 0x0;
|
||||
else
|
||||
sprintf( tmpDir, cb_data->updates[i].directory );
|
||||
sprintf( tmpDir, "%s", cb_data->updates[i].directory );
|
||||
}
|
||||
|
||||
if( cb_data->updates[i].host )
|
||||
|
@ -3323,7 +3323,7 @@ MakeFilesFromBuffers(
|
|||
{
|
||||
return _FileMoveCopy ((XtPointer)file_mgr_data, NULL, directory, host,
|
||||
host_set, file_set, buffer_set, num_of_buffers,
|
||||
NULL, NULL, finish_callback, callback_data);
|
||||
0, NULL, finish_callback, callback_data);
|
||||
}
|
||||
|
||||
|
||||
|
@ -3342,7 +3342,7 @@ MakeFilesFromBuffersDT(
|
|||
return _FileMoveCopy ((XtPointer)file_view_data, NULL, directory,
|
||||
home_host_name,
|
||||
host_set, file_set, buffer_set, num_of_buffers,
|
||||
NULL, desktopWindow, finish_callback, callback_data);
|
||||
0, desktopWindow, finish_callback, callback_data);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1632,7 +1632,7 @@ SelectAllFilter(
|
|||
{
|
||||
FilterRec * filterRec;
|
||||
|
||||
sscanf( params[0], "%p", &filterRec );
|
||||
sscanf( params[0], "%p", (void **) &filterRec );
|
||||
SelectAllFileTypes( w, (XtPointer)filterRec, NULL );
|
||||
return ;
|
||||
}
|
||||
|
@ -1646,7 +1646,7 @@ DeselectAllFilter(
|
|||
{
|
||||
FilterRec * filterRec;
|
||||
|
||||
sscanf( params[0], "%p", &filterRec );
|
||||
sscanf( params[0], "%p", (void **) &filterRec );
|
||||
UnselectAllFileTypes( w, (XtPointer)filterRec, NULL );
|
||||
return ;
|
||||
}
|
||||
|
|
|
@ -2158,7 +2158,7 @@ AlternateInputHandler(
|
|||
|
||||
if (offset > 0)
|
||||
{
|
||||
buf[offset] = NULL;
|
||||
buf[offset] = '\0';
|
||||
buf = (String) DtEliminateDots (buf);
|
||||
|
||||
if ((stat (buf, &stat_data) == 0) ||
|
||||
|
@ -2310,7 +2310,7 @@ AlternateInputHandler2(
|
|||
|
||||
if (offset > 0)
|
||||
{
|
||||
buf[offset] = NULL;
|
||||
buf[offset] = '\0';
|
||||
buf = (String) DtEliminateDots (buf);
|
||||
|
||||
if ((stat (buf, &stat_data) == 0) ||
|
||||
|
@ -2429,7 +2429,7 @@ AlternateInputHandler3(
|
|||
|
||||
if (offset > 0)
|
||||
{
|
||||
buf[offset] = NULL;
|
||||
buf[offset] = '\0';
|
||||
buf = (String) DtEliminateDots (buf);
|
||||
|
||||
if ((stat (buf, &stat_data) == 0) ||
|
||||
|
|
|
@ -663,7 +663,7 @@ ProcessItemHelp(
|
|||
Widget selectedWidget;
|
||||
int returnVal;
|
||||
|
||||
returnVal = DtHelpReturnSelectedWidgetId(shell, NULL, &selectedWidget);
|
||||
returnVal = DtHelpReturnSelectedWidgetId(shell, 0, &selectedWidget);
|
||||
switch(returnVal)
|
||||
{
|
||||
case DtHELP_SELECT_VALID:
|
||||
|
|
|
@ -2618,8 +2618,8 @@ DrawShadowTh (
|
|||
XRectangle rect[10];
|
||||
DtIconGadget g = (DtIconGadget)w;
|
||||
XmManagerWidget mgr = (XmManagerWidget)XtParent(w);
|
||||
Boolean s_out = NULL,
|
||||
s_etched = NULL;
|
||||
Boolean s_out = False,
|
||||
s_etched = False;
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -112,6 +112,7 @@
|
|||
|
||||
#include <sys/types.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/stat.h>
|
||||
#include <signal.h>
|
||||
|
||||
|
@ -958,9 +959,9 @@ extern XtInputId ProcessToolTalkInputId;
|
|||
extern void sigchld_handler(int);
|
||||
#endif /* __osf__ */
|
||||
|
||||
void
|
||||
int
|
||||
main(
|
||||
unsigned int argc,
|
||||
int argc,
|
||||
char **argv )
|
||||
{
|
||||
#ifdef DT_PERFORMANCE
|
||||
|
@ -1319,7 +1320,7 @@ _DtPerfChkpntMsgSend("Begin XtInitialize");
|
|||
/* Default action: Open up pwd or home dir */
|
||||
GetPWD(current_directory);
|
||||
|
||||
if (current_directory[0] != NULL)
|
||||
if (current_directory[0] != '\0')
|
||||
{
|
||||
msg = tttk_message_create( 0, TT_REQUEST, TT_SESSION, 0,
|
||||
"DtFolder_Show",
|
||||
|
@ -1471,7 +1472,7 @@ _DtPerfChkpntMsgSend("Begin XtInitialize");
|
|||
/* Get users pwd so we can set the restricted dir to it */
|
||||
GetPWD(current_directory);
|
||||
|
||||
if (current_directory[0] != NULL)
|
||||
if (current_directory[0] != '\0')
|
||||
special_restricted = XtNewString(current_directory);
|
||||
else
|
||||
special_restricted = XtNewString("~");
|
||||
|
@ -1633,7 +1634,7 @@ _DtPerfChkpntMsgSend("Begin XtInitialize");
|
|||
special_restricted = _DtChangeTildeToHome(special_restricted);
|
||||
ptr = strrchr(special_restricted, '/');
|
||||
ptr1 = ptr + 1;
|
||||
if(ptr1[0] == NULL)
|
||||
if(ptr1[0] == '\0')
|
||||
*ptr = '\0';
|
||||
}
|
||||
|
||||
|
@ -1755,7 +1756,7 @@ _DtPerfChkpntMsgSend("Begin XtInitialize");
|
|||
/* Get users pwd so we can create a fileviewer window of it */
|
||||
GetPWD(current_directory);
|
||||
|
||||
if (current_directory[0] != NULL)
|
||||
if (current_directory[0] != '\0')
|
||||
{
|
||||
if (!GetNewView (home_host_name, current_directory, NULL, NULL, 0))
|
||||
ViewHomeDirectoryHandler (0);
|
||||
|
@ -1804,6 +1805,8 @@ _DtPerfChkpntMsgSend("Begin XtInitialize");
|
|||
if (event.type != 0)
|
||||
XtDispatchEvent(&event);
|
||||
}
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1922,7 +1925,7 @@ Usage(
|
|||
template = (GETMESSAGE(18,23, message_string1));
|
||||
fprintf (stderr, template, argv[0]);
|
||||
template = (GETMESSAGE(18,24, message_string2));
|
||||
fprintf (stderr, template);
|
||||
fprintf (stderr, "%s", template);
|
||||
|
||||
exit (0);
|
||||
}
|
||||
|
@ -3018,7 +3021,7 @@ RestoreSession(
|
|||
/* first find out if it should show the file system */
|
||||
xrm_name [0] = XrmStringToQuark (DTFILE_CLASS_NAME);
|
||||
xrm_name [1] = XrmStringToQuark ("showFilesystem");
|
||||
xrm_name [2] = NULL;
|
||||
xrm_name [2] = 0;
|
||||
if (XrmQGetResource (db, xrm_name, xrm_name, &rep_type, &value))
|
||||
{
|
||||
if ((temp = (char *) value.addr) != NULL &&
|
||||
|
@ -3035,7 +3038,7 @@ RestoreSession(
|
|||
/* find out if it should be in restricted mode */
|
||||
xrm_name [0] = XrmStringToQuark (DTFILE_CLASS_NAME);
|
||||
xrm_name [1] = XrmStringToQuark ("restrictMode");
|
||||
xrm_name [2] = NULL;
|
||||
xrm_name [2] = 0;
|
||||
if (XrmQGetResource (db, xrm_name, xrm_name, &rep_type, &value))
|
||||
{
|
||||
if ((temp = (char *) value.addr) != NULL &&
|
||||
|
@ -3052,7 +3055,7 @@ RestoreSession(
|
|||
/* find out openFolder mode */
|
||||
xrm_name [0] = XrmStringToQuark (DTFILE_CLASS_NAME);
|
||||
xrm_name [1] = XrmStringToQuark ("openFolder");
|
||||
xrm_name [2] = NULL;
|
||||
xrm_name [2] = 0;
|
||||
if (XrmQGetResource (db, xrm_name, xrm_name, &rep_type, &value))
|
||||
{
|
||||
if ((temp = (char *) value.addr) != NULL &&
|
||||
|
@ -3069,7 +3072,7 @@ RestoreSession(
|
|||
|
||||
xrm_name [0] = XrmStringToQuark (DTFILE_CLASS_NAME);
|
||||
xrm_name [1] = XrmStringToQuark ("view_count");
|
||||
xrm_name [2] = NULL;
|
||||
xrm_name [2] = 0;
|
||||
|
||||
/* Load standard dtfile views */
|
||||
if (XrmQGetResource (db, xrm_name, xrm_name, &rep_type, &value))
|
||||
|
@ -3089,7 +3092,7 @@ RestoreSession(
|
|||
xrm_name [1] = XrmStringToQuark (WS_LOAD_RES_HEADER);
|
||||
xrm_name [2] = XrmStringToQuark (wsNum);
|
||||
xrm_name [3] = XrmStringToQuark (SEC_LOAD_HELP_RES_HEADER);
|
||||
xrm_name [4] = NULL;
|
||||
xrm_name [4] = 0;
|
||||
|
||||
/* Load standard dtfile views */
|
||||
if (XrmQGetResource (db, xrm_name, xrm_name, &rep_type, &value))
|
||||
|
@ -3318,7 +3321,7 @@ LoadViews (
|
|||
/* and set the property for the view just created */
|
||||
|
||||
xrm_name [2] = XrmStringToQuark ("workspace");
|
||||
xrm_name [3] = NULL;
|
||||
xrm_name [3] = 0;
|
||||
|
||||
if (XrmQGetResource (db, xrm_name, xrm_name, &rep_type, &value))
|
||||
{
|
||||
|
@ -3334,7 +3337,7 @@ LoadViews (
|
|||
/* Get and set whether the view is iconic */
|
||||
|
||||
xrm_name [2] = XrmStringToQuark ("iconify");
|
||||
xrm_name [3] = NULL;
|
||||
xrm_name [3] = 0;
|
||||
|
||||
if (XrmQGetResource (db, xrm_name, xrm_name, &rep_type, &value))
|
||||
{
|
||||
|
@ -3427,7 +3430,7 @@ GetPWD(
|
|||
}
|
||||
}
|
||||
(void) pclose (pwd_file);
|
||||
current_directory[i] = NULL;
|
||||
current_directory[i] = '\0';
|
||||
|
||||
}
|
||||
|
||||
|
@ -3457,7 +3460,7 @@ OpenDirectories(
|
|||
{
|
||||
separator = DtStrchr (directory_set, ',');
|
||||
if (separator != NULL)
|
||||
*separator = NULL;
|
||||
*separator = '\0';
|
||||
|
||||
_DtPathFromInput(directory_set, NULL, &host, &path);
|
||||
|
||||
|
@ -4162,7 +4165,7 @@ ViewSessionHandler(
|
|||
char current_directory[MAX_PATH];
|
||||
|
||||
GetPWD(current_directory);
|
||||
if (current_directory[0] != NULL)
|
||||
if (current_directory[0] != '\0')
|
||||
{
|
||||
if (!GetNewView
|
||||
(home_host_name, current_directory, NULL, NULL, 0))
|
||||
|
|
|
@ -170,7 +170,7 @@ CreateMenu(
|
|||
mainMenu[i].helpData = NULL;
|
||||
mainMenu[i].activateCallback = NULL;
|
||||
mainMenu[i].activateData = NULL;
|
||||
mainMenu[i].maskBit = NULL;
|
||||
mainMenu[i].maskBit = 0;
|
||||
mainMenu[i].isHelpBtn = False;
|
||||
mainMenu[i].label = NULL;
|
||||
mainMenu[i].mnemonic = NULL;
|
||||
|
@ -1005,7 +1005,7 @@ TrashFiles(
|
|||
|
||||
XmUpdateDisplay (w);
|
||||
|
||||
if((int)client_data == NULL)
|
||||
if((int)client_data == 0)
|
||||
mbar = XmGetPostedFromWidget(XtParent(w));
|
||||
else
|
||||
mbar = XtParent(w);
|
||||
|
|
|
@ -1245,7 +1245,7 @@ SetValues(
|
|||
|
||||
/* Adjust the colors of the icon */
|
||||
SetToNormalColors (modAttr_rec->fileType, modAttr_rec->bboard,
|
||||
modAttr_data->main_widget, NULL);
|
||||
modAttr_data->main_widget, 0);
|
||||
|
||||
/* Verify that we are allowed to change the attributes */
|
||||
if (modAttr_data->owner)
|
||||
|
|
|
@ -133,7 +133,7 @@ ShowModAttrDialog(
|
|||
|
||||
XmUpdateDisplay (w);
|
||||
|
||||
if((int)client_data != NULL)
|
||||
if((int)client_data != 0)
|
||||
mbar = XtParent(w);
|
||||
else
|
||||
mbar = XmGetPostedFromWidget(XtParent(w));
|
||||
|
|
|
@ -327,7 +327,7 @@ _DtStringsAreEquivalent(
|
|||
return(False);
|
||||
|
||||
/* Are we at the end of the string? */
|
||||
if (c1 == NULL)
|
||||
if (c1 == '\0')
|
||||
return(True);
|
||||
|
||||
/* Keep comparing */
|
||||
|
@ -752,7 +752,7 @@ _DtCheckAndFreePixmapData(
|
|||
if (pixmapData->instanceIconName)
|
||||
{
|
||||
|
||||
if(! pixmapData->iconFileName && iconGadget->icon.pixmap == NULL)
|
||||
if(! pixmapData->iconFileName && iconGadget->icon.pixmap == 0)
|
||||
{ /* Try to get pixmap name
|
||||
*/
|
||||
char * tmp, * ptr;
|
||||
|
@ -789,9 +789,9 @@ _DtCheckAndFreePixmapData(
|
|||
|
||||
DtDtsFreeAttributeValue(pixmapData->instanceIconName);
|
||||
|
||||
if (iconGadget->icon.pixmap == NULL ||
|
||||
iconGadget->icon.pixmap_width == NULL ||
|
||||
iconGadget->icon.pixmap_height == NULL ||
|
||||
if (iconGadget->icon.pixmap == 0 ||
|
||||
iconGadget->icon.pixmap_width == 0 ||
|
||||
iconGadget->icon.pixmap_height == 0 ||
|
||||
(Dimension)iconGadget->icon.pixmap_width > (Dimension)instanceWidth ||
|
||||
(Dimension)iconGadget->icon.pixmap_height > (Dimension)instanceHeight)
|
||||
{
|
||||
|
@ -1710,7 +1710,7 @@ _DtPathFromInput(
|
|||
/* Strip off trailing '/' */
|
||||
dir_len = strlen(true_path);
|
||||
if (dir_len > 1 && *(true_path + dir_len - 1) == '/')
|
||||
*(true_path + dir_len - 1) = NULL;
|
||||
*(true_path + dir_len - 1) = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -758,7 +758,7 @@ CreateTrashMenu(
|
|||
trashMenu[i].helpData = NULL;
|
||||
trashMenu[i].activateCallback = NULL;
|
||||
trashMenu[i].activateData = NULL;
|
||||
trashMenu[i].maskBit = NULL;
|
||||
trashMenu[i].maskBit = 0;
|
||||
trashMenu[i].isHelpBtn = False;
|
||||
trashMenu[i].label = NULL;
|
||||
trashMenu[i].mnemonic = NULL;
|
||||
|
|
|
@ -656,7 +656,7 @@ _DtCopyPathFromInput(input_string, current_dir)
|
|||
/* Strip off trailing '/' */
|
||||
dir_len = strlen(path);
|
||||
if (dir_len > 1 && *(path + dir_len - 1) == '/')
|
||||
*(path + dir_len - 1) = NULL;
|
||||
*(path + dir_len - 1) = '\0';
|
||||
return path;
|
||||
}
|
||||
char *
|
||||
|
|
Loading…
Reference in a new issue