*** README.old Thu Jun 3 15:12:26 1993 --- README Thu Jun 3 14:28:05 1993 *************** *** 55,57 **** --- 55,65 ---- Preceeding Ramon Santiago posting of 2.6 to provide a usable 2.4 version. + + + Lionel Mallet, June 4, 1993 + + + Bug fixes release (still before 2.6...). Jim Wight + (J.K.Wight@newcastle.ac.uk) has provided hints to make it compile + under A/UX. *** /tmp/T0a09955 Thu Jun 3 15:16:55 1993 --- patchlevel.h Thu Jun 3 15:01:05 1993 *************** *** 27,32 **** * symbolic links. Add support for HP in Imakefile. * Fixed bug with Move when moving a lot of files. * PATCH 408 applied - Fixed bug with frozen help windows for Map and Select. */ ! #define PATCHLEVEL 408 --- 27,41 ---- * symbolic links. Add support for HP in Imakefile. * Fixed bug with Move when moving a lot of files. * PATCH 408 applied - Fixed bug with frozen help windows for Map and Select. + * PATCH 409 applied - Fixed bug with Select All when . or .. are ignored. + * Fixed bug with HP wait() arg. Fixed bug with changing + * directory from "Goto" line. Fixed bug with / appended + * directory in "Goto" line when updating file information + * in Info dialog. Better portability. Pseudo-terminal + * window more independent. New resources bellOnExit and + * bellOnWarn to control bell. + * Fixed bug with Cop/y/Move remaining sensitive after + * Move/Copy is cancelled (no file selected). */ ! #define PATCHLEVEL 409 *** /tmp/T0a09955 Thu Jun 3 15:16:45 1993 --- Changes Thu Jun 3 15:06:52 1993 *************** *** 1,3 **** --- 1,4 ---- + List of changes made since version 1.5 was released to comp.sources.x in April 1991. *************** *** 176,178 **** --- 177,220 ---- + Bug fixed: Map and Select help windows were frozen due to a Non exclusive grab of the Map and Select dialog taking effect over the Help None grab. + + Mar 29 93 **** Released xdtm 2.4.8 + + Apr 28 93 Lionel Mallet + + Bug fixed: SelectAll when . or .. are ignored was + crashing due to Unhighlighting inexistant item. + + Apr 29 93 Lionel Mallet + + Bug fixed: union wait was used instead of int on SYSV + machines (like HP). + + Bug fixed: dialog title of Trash/Move/Copy dialog was + always "Delete Files". + + Enhancement: TermWindow are now considered as + topLevelShell windows instead of transientShell ones. They + can live without Xdtm main window so... + + Portability: some machines don't have B option of tar as + Sun's do, toggling it off. + + Bug fixed: now use different messages when copy fails or + rm fails during a Move. + + May 17 93 Lionel Mallet + + Bug fixed: Allocating insufficient memory when changing + directory from "Goto" line to determine directory name. + + Jun 2 93 Lionel Mallet + + Portability issue: setlinebuf seems to be a BSD function, + on SYSV use setvbuf instead (appman.c). + + Typo: in iconman.c, AppProgram was written ApProgram in + prototype. + + Bug fixed: when updating file information in Info dialog, + a / is added at the end of the current directory (menus.c, + doubleclick.c, dirman.c). + + Jun 3 93 Lionel Mallet + + Bug fixed: buttons remained sensitive when Copy/Move was + cancelled. + + Enhancement: bell ringing totally revisited. Bell is rung + inside alert_dialog when resource BellOnWarn is True. Bell + is rung in child_died when resource BellOnExit is True. + + Jun 4 93 **** Released xdtm 2.4.9 *** help.old Thu Jun 3 15:13:03 1993 --- help Thu Jun 3 14:54:51 1993 *************** *** 645,657 **** --- 645,662 ---- and the directory being updated. In seconds, range 0 to 5. dirOnExit False Refresh dir when a program terminates + bellOnExit True Ring bell when a program terminates scrollOnExit False Rescroll up dir when a program terminates confirmAction True Ask for confirmation when exiting + bellOnWarn True Ring bell in case of error configFile NULL Config filename viewFont 6x10 Font when viewing a file termFont 6x10 Font inside a pseudo-terminal window dmFont *-courier-bold-r-*-120-* Font in directory Manager + + These default values are those specified in the program. Look at the + application default file to know the default values on your system. 12. Regular Expressions ======================= *** Xdtm.ad.tmpl.old Thu Jun 3 15:13:33 1993 --- Xdtm.ad.tmpl Thu Jun 3 12:02:11 1993 *************** *** 28,33 **** --- 28,34 ---- ! Refresh the current directory list when a child exits, but don't ring bell. Xdtm.dirOnExit: True + Xdtm.bellOnExit: False ! Set color scheme *** /tmp/T0a09955 Thu Jun 3 15:16:46 1993 --- appman.c Thu Jun 3 15:00:58 1993 *************** *** 761,767 **** return_list = XedwListShowCurrent(directoryManager); /* extract filenames from rest of data */ tmp = return_list; ! while (tmp != NULL) { /* We have to deal with a great memory leak/bug in Long mode here: just copy the filename part of tmp->string, then free the whole tmp->string, and make it points at the copy of filename part */ --- 761,767 ---- return_list = XedwListShowCurrent(directoryManager); /* extract filenames from rest of data */ tmp = return_list; ! while ((return_list->xedwList_index == XDTM_LIST_NONE) && (tmp != NULL)) { /* We have to deal with a great memory leak/bug in Long mode here: just copy the filename part of tmp->string, then free the whole tmp->string, and make it points at the copy of filename part */ *************** *** 822,828 **** } } else ! XBell(XtDisplay(w), 100); /* Nothing selected - ring bell */ } --- 822,829 ---- } } else ! /* Nothing selected - impossible error, alert user */ ! alert_dialog("Impossible error!", "Please contact authors", NULL); } *************** *** 888,894 **** count++; } if ((status = execute(NULL, "rm", rmstring, True, NULL)) != 0) { - XBell(XtDisplay(w), 100); if (count == 1) alert_dialog("Sorry, you can't remove", "that file", NULL); /* Remove failed */ else --- 889,894 ---- *************** *** 983,991 **** (strlen(copystring) + dstlen + 20)); ! sprintf(copystring, "%s)|(cd %s;tar xmBf -)'", copystring, dstdir); if ((status = execute(NULL, "sh", copystring, True, NULL)) != 0) { - XBell(XtDisplay(w), 100); if (count == 1) alert_dialog("Sorry, that file could","not be copied", NULL); else --- 983,990 ---- (strlen(copystring) + dstlen + 20)); ! sprintf(copystring, "%s)|(cd %s;tar xmf -)'", copystring, dstdir); if ((status = execute(NULL, "sh", copystring, True, NULL)) != 0) { if (count == 1) alert_dialog("Sorry, that file could","not be copied", NULL); else *************** *** 998,1007 **** sleep(app_data.delay); /* refresh directory (clear highlights as a side effect) */ directoryManagerNewDirectory(cwd); ! } else { ! changestate(True); ! } ! XtFree((char *)srcdir); XtFree((char *)dstdir); --- 997,1004 ---- sleep(app_data.delay); /* refresh directory (clear highlights as a side effect) */ directoryManagerNewDirectory(cwd); ! } /* else do nothing, buttons have already been turned insensitive by ! button_selected */ XtFree((char *)srcdir); XtFree((char *)dstdir); *************** *** 1080,1093 **** (strlen(movestring) + dstlen + 20)); ! sprintf(movestring, "%s)|(cd %s;tar xBf -)'", movestring, dstdir); ! if (((status = execute(NULL, "sh", movestring, True, NULL)) != 0) || ! ((status = execute(NULL, "rm", rmstring, True, NULL)) != 0)) { ! XBell(XtDisplay(w), 100); if (count == 1) alert_dialog("Sorry, that file could", "not be moved", NULL); else alert_dialog("Sorry, one or more files", "could not be moved", NULL); } XtFree((char *)movestring); XtFree((char *)rmstring); --- 1077,1095 ---- (strlen(movestring) + dstlen + 20)); ! sprintf(movestring, "%s)|(cd %s;tar xf -)'", movestring, dstdir); ! if ((status = execute(NULL, "sh", movestring, True, NULL)) != 0) { if (count == 1) alert_dialog("Sorry, that file could", "not be moved", NULL); else alert_dialog("Sorry, one or more files", "could not be moved", NULL); + } else if ((status = execute(NULL, "rm", rmstring, True, NULL)) != 0) { + if (count == 1) + alert_dialog("Be aware that that file could not", + "be removed from origin directory", NULL); + else + alert_dialog("Be aware that one or more files could", + "not be removed from origin directory", NULL); } XtFree((char *)movestring); XtFree((char *)rmstring); *************** *** 1097,1105 **** sleep(app_data.delay); /* refresh directory (clear highlights as a side effect) */ directoryManagerNewDirectory(cwd); ! } else { ! changestate(True); ! } XtFree((char *)srcdir); XtFree((char *)dstdir); --- 1099,1106 ---- sleep(app_data.delay); /* refresh directory (clear highlights as a side effect) */ directoryManagerNewDirectory(cwd); ! } /* else do nothing, buttons have already been turned insensitive by ! button_selected */ XtFree((char *)srcdir); XtFree((char *)dstdir); *************** *** 1210,1218 **** * Thanks to David Byers for spotting a bug here in v1.0 */ list = XedwListShowCurrent(w); ! if (list->xedwList_index == XDTM_LIST_NONE) { ! XBell(XtDisplay(w), 100); ! } else { index = list->xedwList_index; node = appselections[appman_selection]->list[index]; if (node->count) --- 1211,1217 ---- * Thanks to David Byers for spotting a bug here in v1.0 */ list = XedwListShowCurrent(w); ! if (list->xedwList_index != XDTM_LIST_NONE) { index = list->xedwList_index; node = appselections[appman_selection]->list[index]; if (node->count) *************** *** 1328,1334 **** FILE *processfp = NULL; /* file pointer to process */ int processpid = 0; /* process id */ String *newargs, strptr, args; ! #if defined(SYSV) && !defined(SVR4_0) && !defined(_POSIX_SOURCE) union wait w_stat; /* I'm not sure about the SYSV bit... */ #else int w_stat; --- 1327,1333 ---- FILE *processfp = NULL; /* file pointer to process */ int processpid = 0; /* process id */ String *newargs, strptr, args; ! #if !defined(SYSV) && !defined(SVR4_0) && !defined(_POSIX_SOURCE) union wait w_stat; /* I'm not sure about the SYSV bit... */ #else int w_stat; *************** *** 1432,1442 **** /* open pseudo-terminal */ if (openMasterAndSlave(&master, &slave)) { ! fprintf(stderr, ! "Error: execution of `%s' failed, no more pty\n", ! fullcmd); ! XBell(XtDisplay(appManager), 100); ! XBell(XtDisplay(appManager), 100); return; } } --- 1431,1438 ---- /* open pseudo-terminal */ if (openMasterAndSlave(&master, &slave)) { ! alert_dialog("Error: execution failed, no more pty!", ! fullcmd, NULL); return; } } *************** *** 1558,1566 **** fcntl(master, F_SETFL, FNDELAY); processfp = fdopen(master, "r+"); ! #ifdef hpux setvbuf(processfp, NULL, _IOLBF, BUFSIZ); ! #else setlinebuf(processfp); #endif AttachProcessToTermWindow(appManager, fullcmd, --- 1554,1562 ---- fcntl(master, F_SETFL, FNDELAY); processfp = fdopen(master, "r+"); ! #if defined(SYSV) || defined(_AUX_SOURCE) setvbuf(processfp, NULL, _IOLBF, BUFSIZ); ! #else /* I assume setlinebuf is defined on non-SYSV and non-A/UX systems */ setlinebuf(processfp); #endif AttachProcessToTermWindow(appManager, fullcmd, *************** *** 1858,1864 **** extern ProcessList *process_list; int pid; ! #if defined(SYSV) && !defined(SVR4_0) && !defined(_POSIX_SOURCE) union wait status; #else int status; --- 1854,1860 ---- extern ProcessList *process_list; int pid; ! #if !defined(SYSV) && !defined(SVR4_0) && !defined(_POSIX_SOURCE) union wait status; #else int status; *************** *** 1882,1888 **** return; } ! XBell(XtDisplay(appManager), 100); XFlush(XtDisplay(appManager)); --- 1878,1884 ---- return; } ! if (app_data.bellonexit) XBell(XtDisplay(appManager), 100); XFlush(XtDisplay(appManager)); *** /tmp/T0a09955 Thu Jun 3 15:16:48 1993 --- buttons.c Thu Jun 3 15:00:58 1993 *************** *** 58,64 **** buttonpopup = XtVaCreatePopupShell( ! "Delete File", transientShellWidgetClass, top, NULL ) ; --- 58,64 ---- buttonpopup = XtVaCreatePopupShell( ! "Trash/Move/Copy", transientShellWidgetClass, top, NULL ) ; *************** *** 223,232 **** --- 223,240 ---- Widget, Boolean, XtPointer #endif ); + private String TrashTitle = "Delete File(s)"; private String TrashLabel1 = "Delete these files"; private String TrashLabel2 = "from current directory?"; private String TrashButtonLabel = "Delete"; + /* dialog title */ + + XtVaSetValues( + buttonpopup, + XtNtitle, TrashTitle, + NULL ) ; + /* label */ XtVaSetValues( *************** *** 275,284 **** --- 283,300 ---- Widget, Boolean, XtPointer #endif ); + private String CopyTitle = "Copy File(s)"; private String CopyLabel1 = "Copy these files"; private String CopyLabel2 = "to current directory?"; private String CopyButtonLabel = "Copy"; + /* dialog title */ + + XtVaSetValues( + buttonpopup, + XtNtitle, CopyTitle, + NULL ) ; + /* label */ XtVaSetValues( *************** *** 325,333 **** --- 341,357 ---- Widget, Boolean, XtPointer #endif ); + private String MoveTitle = "Move File(s)"; private String MoveLabel1 = "Move these files"; private String MoveLabel2 = "to current directory?"; private String MoveButtonLabel = "Move"; + + /* dialog title */ + + XtVaSetValues( + buttonpopup, + XtNtitle, MoveTitle, + NULL ) ; /* label */ *** /tmp/T0a09955 Thu Jun 3 15:16:48 1993 --- dirman.c Thu Jun 3 15:00:59 1993 *************** *** 297,303 **** /* reset cursor */ setCursor((Cursor)NULL); } else ! XBell(XtDisplay(directoryManager), 100); return(result); } --- 297,304 ---- /* reset cursor */ setCursor((Cursor)NULL); } else ! alert_dialog("Error: invalid directory!", newpath, NULL); ! return(result); } *************** *** 491,498 **** /* Use normal stat.. follows symbolic links.. can use on SYSV */ if (stat(fullname, &filestatus) == -1) { - XBell(XtDisplay(w), 100); - XBell(XtDisplay(w), 100); alert_dialog("Sorry, that file does", "not really exist!!", "Cancel"); } else { if ((filestatus.st_mode & S_IFMT) == S_IFDIR) { --- 492,497 ---- *************** *** 519,525 **** XtFree((char *)cwd); cwd=fullname; changestate(False); ! } else XBell(XtDisplay(w), 100); } else { if (opt_pgm) { /* There's a program associated with this type of file */ --- 518,524 ---- XtFree((char *)cwd); cwd=fullname; changestate(False); ! } } else { if (opt_pgm) { /* There's a program associated with this type of file */ *************** *** 527,541 **** } else if ((filestatus.st_mode & S_IFMT) == S_IFREG) { /* Display dialog box to ask whether to display file */ ! ! char path[255], *ptr; ! strcpy(path, fullname); ! ptr = path; while (*ptr++) ; ! while (*--ptr != '/') ; ! *++ptr = '\0'; ! ! doubleclick_dialog(filename, path); ! } else XBell(XtDisplay(w), 100); XtFree((char *)fullname); } } --- 526,534 ---- } else if ((filestatus.st_mode & S_IFMT) == S_IFREG) { /* Display dialog box to ask whether to display file */ ! doubleclick_dialog(filename, cwd); ! } else alert_dialog("Cannot double click", ! "on such file!", NULL); XtFree((char *)fullname); } } *************** *** 602,614 **** /* unhighlight . and .. */ for (i=0; i < icon_list_size && (strcmp(getfilename(icon_list[i]->string), ".") != 0); i++); ! XedwListUnhighlight(w, i); ! for (i=i; i < icon_list_size && (strcmp(getfilename(icon_list[i]->string), "..") != 0); i++); ! XedwListUnhighlight(w, i); setCursor((Cursor)NULL); ! } else ! XBell(XtDisplay(w), 100); /* do buttons */ if (icon_list_size > 2) { --- 595,607 ---- /* unhighlight . and .. */ for (i=0; i < icon_list_size && (strcmp(getfilename(icon_list[i]->string), ".") != 0); i++); ! if (i < icon_list_size) XedwListUnhighlight(w, i); ! for (i= (i < icon_list_size ? i : 0); i < icon_list_size && (strcmp(getfilename(icon_list[i]->string), "..") != 0); i++); ! if (i < icon_list_size) XedwListUnhighlight(w, i); setCursor((Cursor)NULL); ! } else alert_dialog("Cannot select all", "while trying to Copy/Move", NULL); ! /* do buttons */ if (icon_list_size > 2) { *** /tmp/T0a09955 Thu Jun 3 15:16:49 1993 --- display.c Thu Jun 3 15:00:59 1993 *************** *** 267,274 **** XtAddCallback(alertbutton, XtNcallback, (XtCallbackProc)destroy_popup, (XtPointer)alertpopup); ! XBell(XtDisplay(alertpopup), 100); ! realize_dialog(alertpopup, NULL, XtGrabNonexclusive); } --- 267,277 ---- XtAddCallback(alertbutton, XtNcallback, (XtCallbackProc)destroy_popup, (XtPointer)alertpopup); ! if (app_data.bellonwarn) { ! XBell(XtDisplay(alertpopup), 100); ! XBell(XtDisplay(alertpopup), 100); ! } ! realize_dialog(alertpopup, NULL, XtGrabNonexclusive); } *** /tmp/T0a09955 Thu Jun 3 15:16:50 1993 --- doubleclick.c Thu Jun 3 15:01:00 1993 *************** *** 1523,1530 **** strcpy(current->dc_filename, filename); strcpy(current->dc_path, path); ! strcpy(current->dc_fullname,path); strcat(current->dc_fullname,filename); strcpy(current->edit_filename, filename); --- 1523,1532 ---- strcpy(current->dc_filename, filename); strcpy(current->dc_path, path); + if (strcmp(current->dc_path, "/") != 0) + strcat(current->dc_path, "/"); ! strcpy(current->dc_fullname,current->dc_path); strcat(current->dc_fullname,filename); strcpy(current->edit_filename, filename); *************** *** 2061,2067 **** (strcmp(current->laststat.owner, current->oldstat.owner)) || (strcmp(current->laststat.group, current->oldstat.group)) || (current->file_edited && (current_mode.mode != Icons))) ! directoryManagerNewDirectory(current->dc_path); /* We can finally let the main interface go back to the non-busy cursor. */ --- 2063,2078 ---- (strcmp(current->laststat.owner, current->oldstat.owner)) || (strcmp(current->laststat.group, current->oldstat.group)) || (current->file_edited && (current_mode.mode != Icons))) ! { ! char path[255]; ! int len = strlen(current->dc_path); ! ! strcpy(path, current->dc_path); ! ! if ((strcmp(path, "/") != 0) && (path[len-1] == '/')) ! path[len-1] = 0; ! directoryManagerNewDirectory(path); ! } /* We can finally let the main interface go back to the non-busy cursor. */ *************** *** 2102,2108 **** (strcmp(current->laststat.filename, current->oldstat.filename)) || (strcmp(current->laststat.owner, current->oldstat.owner)) || (strcmp(current->laststat.group, current->oldstat.group)) ! ) directoryManagerNewDirectory(current->dc_path); setCursor(left_ptr); --- 2113,2129 ---- (strcmp(current->laststat.filename, current->oldstat.filename)) || (strcmp(current->laststat.owner, current->oldstat.owner)) || (strcmp(current->laststat.group, current->oldstat.group)) ! ) ! { ! char path[255]; ! int len = strlen(current->dc_path); ! ! strcpy(path, current->dc_path); ! ! if ((strcmp(path, "/") != 0) && (path[len-1] == '/')) ! path[len-1] = 0; ! directoryManagerNewDirectory(path); ! } setCursor(left_ptr); *** /tmp/T0a09955 Thu Jun 3 15:16:51 1993 --- fileman.c Thu Jun 3 15:01:01 1993 *************** *** 261,267 **** /* First, create a string containing the command to expand term value. */ ! tmp = XtMalloc((strlen(value)+20)*sizeof(char)); #ifndef ECHO_N sprintf(tmp, "csh -c \"/bin/echo %s \\\\\\c\"", value); #else --- 261,267 ---- /* First, create a string containing the command to expand term value. */ ! tmp = XtMalloc((strlen(value)+30)*sizeof(char)); #ifndef ECHO_N sprintf(tmp, "csh -c \"/bin/echo %s \\\\\\c\"", value); #else *** /tmp/T0a09955 Thu Jun 3 15:16:52 1993 --- main.c Thu Jun 3 15:01:02 1993 *************** *** 110,115 **** --- 110,133 ---- (caddr_t) True, }, { + XtNbellOnExit, + XtCBellOnExit, + XtRBoolean, + sizeof(Boolean), + XtOffset(AppDataPtr, bellonexit), + XtRImmediate, + (caddr_t) True, + }, + { + XtNbellOnWarn, + XtCBellOnWarn, + XtRBoolean, + sizeof(Boolean), + XtOffset(AppDataPtr, bellonwarn), + XtRImmediate, + (caddr_t) True, + }, + { XtNconfigFile, XtCConfigFile, XtRString, *** /tmp/T0a09955 Thu Jun 3 15:16:52 1993 --- menus.c Thu Jun 3 15:01:02 1993 *************** *** 397,408 **** } else { ! char path[255], *ptr; ! strcpy(path, fullname); ! ptr = path; while (*ptr++) ; ! while (*--ptr != '/') ; ! *++ptr = '\0'; ! doubleclick_dialog(filename,path); } XtFree((char *)fullname); } --- 397,403 ---- } else { ! doubleclick_dialog(filename,cwd); } XtFree((char *)fullname); } *** /tmp/T0a09955 Thu Jun 3 15:16:56 1993 --- xdtm.h Thu Jun 3 15:01:07 1993 *************** *** 78,83 **** --- 78,85 ---- Boolean dironexit; Boolean scrollonexit; Boolean confirmaction; + Boolean bellonexit; + Boolean bellonwarn; String mode; String cffile; XFontStruct *dm_font; *************** *** 97,102 **** --- 99,106 ---- #define XtNdirOnExit "dirOnExit" #define XtNscrollOnExit "scrollOnExit" #define XtNconfirmAction "confirmAction" + #define XtNbellOnExit "bellOnExit" + #define XtNbellOnWarn "bellOnWarn" #define XtNconfigFile "configFile" #define XtNdmFont "dmFont" #define XtNdelay "delay" *************** *** 110,115 **** --- 114,121 ---- #define XtCDirOnExit "DirOnExit" #define XtCScrollOnExit "ScrollOnExit" #define XtCConfirmAction "ConfirmAction" + #define XtCBellOnExit "BellOnExit" + #define XtCBellOnWarn "BellOnWarn" #define XtCDelay "Delay" /* Local XedwList structure, has opt and isdir added. */ *** /tmp/T0a10007 Thu Jun 3 15:17:28 1993 --- Ext/iconman.c Thu Jun 3 15:17:28 1993 *************** *** 164,170 **** */ #if NeedFunctionPrototypes ! extern int execute(String, String, String, Boolean, ApProgram *); extern void setCursor(Cursor); #else extern int execute(); --- 164,170 ---- */ #if NeedFunctionPrototypes ! extern int execute(String, String, String, Boolean, AppProgram *); extern void setCursor(Cursor); #else extern int execute(); *** /tmp/T0a10007 Thu Jun 3 15:17:30 1993 --- Ext/termwindow.c Thu Jun 3 15:17:30 1993 *************** *** 400,406 **** /* Create popup */ termWindow = XtCreatePopupShell("termWindow", ! transientShellWidgetClass, father, NULL, 0); --- 400,406 ---- /* Create popup */ termWindow = XtCreatePopupShell("termWindow", ! topLevelShellWidgetClass, father, NULL, 0);