argv@island.uu.net (Dan Heller) (04/06/89)
Submitted-by: Ps Cheung <po@volta.ece.utexas.edu> Posting-number: Volume 3, Issue 67 Archive-name: xdbx.patch/part03 #!/bin/sh echo x - xdbx.patch.3 sed 's/^X//' > xdbx.patch.3 <<'+END+OF+xdbx.patch.3' X Xdiff -c xdbx1.0/global.h xdbx1.1/global.h X*** xdbx1.0/global.h Fri Mar 24 01:18:38 1989 X--- xdbx1.1/global.h Sun Apr 2 17:48:44 1989 X*************** X*** 25,35 **** X extern void source_init(); /* init routine */ X extern void CreateSourceWindow(); X extern char *QueryFile(); /* get dbx file variable */ X! extern FileRec *LoadFile(); /* display source file */ X X /* command.c */ X X extern void CreateCommandPanel(); X X /* dialog.c */ X X--- 25,38 ---- X extern void source_init(); /* init routine */ X extern void CreateSourceWindow(); X extern char *QueryFile(); /* get dbx file variable */ X! extern int LoadFile(); /* display source file */ X! extern char *GetPathname(); /* get full path name of file */ X! extern void MakeDirList(); /* maintain list of dirs */ X X /* command.c */ X X extern void CreateCommandPanel(); X+ extern char *dbxpwd(); /* get working dir of dbx */ X X /* dialog.c */ X X*************** X*** 57,63 **** X extern void parser_init(); /* compile patterns */ X extern void parse(); /* parse dbx output */ X extern void filter(); /* modify dbx output */ X! extern int QueryDbx(); /* ask dbx for info */ X X /* handler.c */ X X--- 60,66 ---- X extern void parser_init(); /* compile patterns */ X extern void parse(); /* parse dbx output */ X extern void filter(); /* modify dbx output */ X! extern char *QueryDbx(); /* ask dbx for info */ X X /* handler.c */ X X*************** X*** 71,79 **** X extern void file_handler(); /* display file */ X extern void debug_handler(); /* debug program */ X extern void cd_handler(); /* change directory */ X X /* dbx.c */ X! extern void DisplayInit(); /* initial source display */ X extern XtInputCallbackProc readDbx(); /* get data from dbx */ X X /* calldbx.c */ X--- 74,83 ---- X extern void file_handler(); /* display file */ X extern void debug_handler(); /* debug program */ X extern void cd_handler(); /* change directory */ X+ extern void use_handler(); /* update use directory list */ X X /* dbx.c */ X! extern void DebugInit(); /* initial source display */ X extern XtInputCallbackProc readDbx(); /* get data from dbx */ X X /* calldbx.c */ X*************** X*** 85,91 **** X /* utils.c */ X X extern void writeDbx(); /* send data to dbx */ X- extern char *dbxpwd(); /* get working dir of dbx */ X extern XtTextPosition TextGetLastPos(); /* get last pos of text */ X extern void AppendDialogText(); /* append text to buffer */ X extern Line TextPositionToLine(); /* convert line # to text pos */ X--- 89,94 ---- X*************** X*** 102,125 **** X X extern XdbxResources app_resources; /* application resources */ X extern char *xdbxinit; /* temporary init filename */ X! extern Boolean Homedir; /* .dbxinit or ~/.dbxinit */ X X extern XtTextPosition StartPos; /* start pos of inserted text */ X extern FileRec *displayedFile; /* pointer to current file info */ X- extern Tokens token; /* token structure */ X X extern Boolean Echo; /* echo dbx output onto window ? */ X extern Boolean EnterCommand; /* command or program input ? */ X! extern int outputsize; /* size of buffer for dbx output */ X extern int nfiles; /* number of files in file menu */ X extern int dbxpid; /* dbx process id */ X- extern int dbxInputId; /* input id for input procedure */ X extern FILE *dbxfp; /* file pointer to dbx process */ X X extern char DialogText[]; /* buffer for dialog window widget */ X- extern char *output; /* buffer for dbx output */ X extern char Command[]; /* string for xdbx command entered */ X- extern char *filelist[]; /* list of files in file menu */ X X extern Arrow arrow; /* arrow widget and mapped info */ X extern Updown updown; /* updown widget and mapped info */ X--- 105,124 ---- X X extern XdbxResources app_resources; /* application resources */ X extern char *xdbxinit; /* temporary init filename */ X! extern int Homedir; /* .dbxinit or ~/.dbxinit */ X X extern XtTextPosition StartPos; /* start pos of inserted text */ X extern FileRec *displayedFile; /* pointer to current file info */ X X extern Boolean Echo; /* echo dbx output onto window ? */ X extern Boolean EnterCommand; /* command or program input ? */ X! extern Boolean FalseSignal; /* real/false signal ? */ X extern int nfiles; /* number of files in file menu */ X extern int dbxpid; /* dbx process id */ X extern FILE *dbxfp; /* file pointer to dbx process */ X X extern char DialogText[]; /* buffer for dialog window widget */ X extern char Command[]; /* string for xdbx command entered */ X X extern Arrow arrow; /* arrow widget and mapped info */ X extern Updown updown; /* updown widget and mapped info */ Xdiff -c xdbx1.0/handler.c xdbx1.1/handler.c X*** xdbx1.0/handler.c Fri Mar 24 01:18:39 1989 X--- xdbx1.1/handler.c Sun Apr 2 17:45:54 1989 X*************** X*** 93,99 **** X UpdateUpdown(displayedFile); X UpdateMessageWindow("Ready for execution"); X if (displayedFile == NULL) return; X! sprintf(command, "file %s\n", displayedFile->filename); X QueryDbx(command, FALSE); X return; X } X--- 93,99 ---- X UpdateUpdown(displayedFile); X UpdateMessageWindow("Ready for execution"); X if (displayedFile == NULL) return; X! sprintf(command, "file %s\n", displayedFile->pathname); X QueryDbx(command, FALSE); X return; X } X*************** X*** 103,115 **** X */ X if (token->func == NULL || token->line == 0) X return; X- if (token->file) X- displayedFile = LoadFile(token->file); X UpdateMessageWindow(token->mesg); X arrow.line = token->line; /* update arrow sign position */ X updown.line = 0; /* remove updown, if any */ X if (displayedFile) X! strcpy(arrow.filename, displayedFile->filename); X AdjustText(sourceWindow, token->line); X if (displayedFile) { X XtTextSetInsertionPoint(sourceWindow, displayedFile->linepos[token->line]); X--- 103,116 ---- X */ X if (token->func == NULL || token->line == 0) X return; X UpdateMessageWindow(token->mesg); X+ if (token->file) X+ LoadFile(token->file); X arrow.line = token->line; /* update arrow sign position */ X+ strcpy(arrow.func, token->func); X updown.line = 0; /* remove updown, if any */ X if (displayedFile) X! strcpy(arrow.file, displayedFile->pathname); X AdjustText(sourceWindow, token->line); X if (displayedFile) { X XtTextSetInsertionPoint(sourceWindow, displayedFile->linepos[token->line]); X*************** X*** 127,135 **** X if (token->stop == 0 || token->line == 0 || displayedFile == NULL) X return; X if (token->file == NULL) X! stops[token->stop].filename = displayedFile->filename; X else X! stops[token->stop].filename = token->file; X DisplayStop(displayedFile, token->line); X stops[token->stop].line = token->line; X stops[token->stop].tag = 0; X--- 128,136 ---- X if (token->stop == 0 || token->line == 0 || displayedFile == NULL) X return; X if (token->file == NULL) X! stops[token->stop].file = displayedFile->pathname; X else X! stops[token->stop].file = GetPathname(token->file); X DisplayStop(displayedFile, token->line); X stops[token->stop].line = token->line; X stops[token->stop].tag = 0; X*************** X*** 145,151 **** X void stop_in_handler(token) X Tokens *token; X { X! char command[LINESIZ], s[LINESIZ], *filename; X int stop; X Line line; X X--- 146,152 ---- X void stop_in_handler(token) X Tokens *token; X { X! char command[LINESIZ], s[LINESIZ], *file; X int stop; X Line line; X X*************** X*** 153,160 **** X return; X stop = token->stop; X sprintf(command, "list %s\n", token->func); X! if (QueryDbx(command, TRUE) != O_LIST || token->line <= 0) X! return; X X stops[stop].line = token->line; X nstops = stop; X--- 154,161 ---- X return; X stop = token->stop; X sprintf(command, "list %s\n", token->func); X! QueryDbx(command, TRUE); X! if (token->line <= 0) return; X X stops[stop].line = token->line; X nstops = stop; X*************** X*** 161,176 **** X line = token->line; X X /* check if funcname belongs to another file */ X! if ((filename = QueryFile()) && strcmp(filename, displayedFile->filename)) { X /* new file, record stop */ X! stops[nstops].filename = filename; X X /* restore variable file to original file */ X! sprintf(command, "file %s\n", displayedFile->filename); X QueryDbx(command, FALSE); X } X else { /* same file, display stop */ X! stops[nstops].filename = displayedFile->filename; X DisplayStop(displayedFile, line); X } X } X--- 162,178 ---- X line = token->line; X X /* check if funcname belongs to another file */ X! if ((file = GetPathname(QueryFile())) && X! strcmp(file, displayedFile->pathname)) { X /* new file, record stop */ X! stops[nstops].file = file; X X /* restore variable file to original file */ X! sprintf(command, "file %s\n", displayedFile->pathname); X QueryDbx(command, FALSE); X } X else { /* same file, display stop */ X! stops[nstops].file = displayedFile->pathname; X DisplayStop(displayedFile, line); X } X } X*************** X*** 185,211 **** X void updown_handler(token) X Tokens *token; X { X! char s[LINESIZ], command[LINESIZ]; X X! #ifndef BSD X! displayedFile = LoadFile(QueryFile()); X if (displayedFile) X! token->file = displayedFile->filename; X if (token->line <= 0) token->line = 1; X #endif X X! if (token->line <= 0 || token->func == NULL || token->file == NULL) X return; X! if (token->file && displayedFile && X! strcmp(token->file, displayedFile->filename)) { X! displayedFile = LoadFile(token->file); X! /* set dbx file variable to filename */ X! sprintf(command, "file %s\n", token->file); X QueryDbx(command, FALSE); X } X updown.line = token->line; X if (displayedFile) X! strcpy(updown.filename, displayedFile->filename); X AdjustText(sourceWindow, token->line); X } X X--- 187,215 ---- X void updown_handler(token) X Tokens *token; X { X! char s[LINESIZ], command[LINESIZ], *file; X X! #ifdef BSD X! file = GetPathname(token->file); X! #else X! LoadFile(QueryFile()); X if (displayedFile) X! file = displayedFile->pathname; X if (token->line <= 0) token->line = 1; X #endif X X! if (token->line <= 0 || token->func == NULL || file == NULL) X return; X! if (displayedFile && strcmp(file, displayedFile->pathname)) { X! LoadFile(file); X! /* set dbx file variable to file */ X! sprintf(command, "file %s\n", file); X QueryDbx(command, FALSE); X } X updown.line = token->line; X+ strcpy(updown.func, token->func); X if (displayedFile) X! strcpy(updown.file, displayedFile->pathname); X AdjustText(sourceWindow, token->line); X } X X*************** X*** 227,233 **** X writeDbx("status\n"); X while (fgets(s, LINESIZ, dbxfp) == NULL); X do { X! if (strcmp(s, "(dbx) ") || strcmp(s, "")) { X sscanf(s, BRACKET, &i); X if (i > 0 && i <= nstops && stops[i].line > 0) X stops[i].tag = 1; X--- 231,237 ---- X writeDbx("status\n"); X while (fgets(s, LINESIZ, dbxfp) == NULL); X do { X! if (strcmp(s, PROMPT) || strcmp(s, "")) { X sscanf(s, BRACKET, &i); X if (i > 0 && i <= nstops && stops[i].line > 0) X stops[i].tag = 1; X*************** X*** 242,248 **** X else { X line = stops[i].line; X stops[i].line = 0; X! stops[i].filename = NULL; X if (LineToStop_no(line) == 0) X RemoveStop(line); X } X--- 246,252 ---- X else { X line = stops[i].line; X stops[i].line = 0; X! stops[i].file = NULL; X if (LineToStop_no(line) == 0) X RemoveStop(line); X } X*************** X*** 263,276 **** X if (token->func) { X sprintf(command, "list %s\n", token->func); X QueryDbx(command, TRUE); X! displayedFile = LoadFile(QueryFile()); X AdjustText(sourceWindow, token->line); X } X } X X X! /* X! * File handler first queries the current file set by the user command, X * and then loads the file. X */ X /* ARGSUSED */ X--- 267,279 ---- X if (token->func) { X sprintf(command, "list %s\n", token->func); X QueryDbx(command, TRUE); X! LoadFile(QueryFile()); X AdjustText(sourceWindow, token->line); X } X } X X X! /* File handler first queries the current file set by the user command, X * and then loads the file. X */ X /* ARGSUSED */ X*************** X*** 277,298 **** X void file_handler(token) X Tokens *token; X { X- char *filename; X- X if (token->file) X! displayedFile = LoadFile(QueryFile()); X } X X- X /* ARGSUSED */ X void debug_handler() X { X! DisplayInit(); X } X X- X /* ARGSUSED */ X void cd_handler() X { X UpdateFileMenu(); X } X--- 280,303 ---- X void file_handler(token) X Tokens *token; X { X if (token->file) X! LoadFile(QueryFile()); X } X X /* ARGSUSED */ X void debug_handler() X { X! DebugInit(); X } X X /* ARGSUSED */ X void cd_handler() X { X UpdateFileMenu(); X+ } X+ X+ /* ARGSUSED */ X+ void use_handler() X+ { X+ MakeDirList(QueryDbx("use\n", FALSE)); X } XOnly in xdbx1.0: make.out Xdiff -c xdbx1.0/parser.c xdbx1.1/parser.c X*** xdbx1.0/parser.c Fri Mar 24 01:18:42 1989 X--- xdbx1.1/parser.c Fri Mar 31 04:36:22 1989 X*************** X*** 157,162 **** X--- 157,166 ---- X if (strcmp(output, "") == NULL) X cd_handler(); X break; X+ case C_USE: X+ if (strcmp(output, "") == NULL) X+ use_handler(); X+ break; X } X } X X*************** X*** 179,190 **** X if ((s && strcmp(s, "") == NULL) || strcmp(Command, "") == NULL) X return; X X! #ifndef BSD /* for Sun dbx only */ X if (re_match(command_pattern[C_UPDOWN].buf, Command, strlen(Command), X 0, NULL) > 0) { X if (re_match(output_pattern[O_BELL].buf, s, strlen(s), 0, ®s) < 0) { X! if (strcmp(s+strlen(s)-strlen(PROMPT), PROMPT) == NULL) X! strcpy(s, PROMPT); X else X strcpy(s, ""); X } X--- 183,196 ---- X if ((s && strcmp(s, "") == NULL) || strcmp(Command, "") == NULL) X return; X X! /* for Sun 3.x dbx only */ X! #ifndef BSD X! #ifndef SUNOS4_0 X if (re_match(command_pattern[C_UPDOWN].buf, Command, strlen(Command), X 0, NULL) > 0) { X if (re_match(output_pattern[O_BELL].buf, s, strlen(s), 0, ®s) < 0) { X! if (strcmp(s+strlen(s)-strlen(XPROMPT), XPROMPT) == NULL) X! strcpy(s, XPROMPT); X else X strcpy(s, ""); X } X*************** X*** 191,196 **** X--- 197,203 ---- X return; X } X #endif X+ #endif X X if (re_match(command_pattern[C_EXEC].buf, Command, strlen(Command), X 0, NULL) > 0 X*************** X*** 217,227 **** X /* Sends a command to dbx and read the corresponding output, bypassing the X * Xt input procedure, readDbx. X */ X! int QueryDbx(command, do_match) X char *command; X Boolean do_match; X { X! char s[LINESIZ], *output; X int outputsize; X X Echo = FALSE; X--- 224,234 ---- X /* Sends a command to dbx and read the corresponding output, bypassing the X * Xt input procedure, readDbx. X */ X! char *QueryDbx(command, do_match) X char *command; X Boolean do_match; X { X! char s[LINESIZ], prompt[20], *output; X int outputsize; X X Echo = FALSE; X*************** X*** 241,247 **** X } while (fgets(s, LINESIZ, dbxfp)); X Echo = TRUE; X if (do_match) X! return match(output_pattern, output); X else X! return -1; X } X--- 248,260 ---- X } while (fgets(s, LINESIZ, dbxfp)); X Echo = TRUE; X if (do_match) X! match(output_pattern, output); X! strcpy(prompt, "\n"); X! strcat(prompt, PROMPT); X! if (strcmp(&output[strlen(output)-strlen(prompt)], prompt) == NULL) X! output[strlen(output)-strlen(prompt)] = '\0'; X! if (strcmp(output, "") == NULL) X! return NULL; X else X! return (output); X } Xdiff -c xdbx1.0/patchlevel.h xdbx1.1/patchlevel.h X*** xdbx1.0/patchlevel.h Fri Mar 24 01:18:39 1989 X--- xdbx1.1/patchlevel.h Wed Mar 22 02:06:56 1989 X*************** X*** 1 **** X! #define PATCHLEVEL 0 X--- 1 ---- X! #define PATCHLEVEL 1 Xdiff -c xdbx1.0/regex.c xdbx1.1/regex.c X*** xdbx1.0/regex.c Fri Mar 24 01:18:39 1989 X--- xdbx1.1/regex.c Tue Mar 21 02:45:42 1989 X*************** X*** 108,114 **** X which reads a pattern, describes how it compiles, X then reads a string and searches for it. */ X X! #ifdef sparc X #include <alloca.h> X #endif X X--- 108,114 ---- X which reads a pattern, describes how it compiles, X then reads a string and searches for it. */ X X! #ifdef SUNOS4_0 X #include <alloca.h> X #endif X Xdiff -c xdbx1.0/signals.c xdbx1.1/signals.c X*** xdbx1.0/signals.c Fri Mar 24 01:18:43 1989 X--- xdbx1.1/signals.c Thu Mar 30 17:08:26 1989 X*************** X*** 21,29 **** X #include <stdio.h> X #include <signal.h> X #include <sys/wait.h> X X- extern int dbxpid; X- X /* Kill the dbx child process and then exits. */ X /* ARGSUSED */ X static void kill_handler(sig, code, scp, addr) X--- 21,28 ---- X #include <stdio.h> X #include <signal.h> X #include <sys/wait.h> X+ #include "global.h" X X /* Kill the dbx child process and then exits. */ X /* ARGSUSED */ X static void kill_handler(sig, code, scp, addr) X*************** X*** 31,36 **** X--- 30,39 ---- X struct sigcontext *scp; X char *addr; X { X+ if (FalseSignal) { X+ FalseSignal = FALSE; X+ return; X+ } X kill(dbxpid, SIGKILL); X switch (sig) { X case SIGINT : fprintf(stderr, "Interrupt\n"); break; X*************** X*** 54,60 **** X * exit gracefully. X */ X wait3(&status, WNOHANG|WUNTRACED, NULL); X! if (WIFEXITED(status) && !WIFSTOPPED(status)) { X exit(1); X } X } X--- 57,63 ---- X * exit gracefully. X */ X wait3(&status, WNOHANG|WUNTRACED, NULL); X! if ((WIFEXITED(status) || WIFSIGNALED(status)) && !WIFSTOPPED(status)) { X exit(1); X } X } Xdiff -c xdbx1.0/signs.c xdbx1.1/signs.c X*** xdbx1.0/signs.c Fri Mar 24 01:18:40 1989 X--- xdbx1.1/signs.c Tue Mar 28 02:58:50 1989 X*************** X*** 79,88 **** X } X arrow.i = 0; X arrow.line = 0; X! strcpy(arrow.filename, ""); X updown.i = 0; X updown.line = 0; X! strcpy(updown.filename, ""); X nstops = 0; X } X X--- 79,88 ---- X } X arrow.i = 0; X arrow.line = 0; X! strcpy(arrow.file, ""); X updown.i = 0; X updown.line = 0; X! strcpy(updown.file, ""); X nstops = 0; X } X X*************** X*** 208,214 **** X } X X for (i=1; i<=nstops; i++) X! if (stops[i].filename && !strcmp(stops[i].filename, file->filename) && X (line=stops[i].line) && line >= file->topline && X line <= file->bottomline) { X DisplayStop(file, line); X--- 208,214 ---- X } X X for (i=1; i<=nstops; i++) X! if (stops[i].file && !strcmp(stops[i].file, file->pathname) && X (line=stops[i].line) && line >= file->topline && X line <= file->bottomline) { X DisplayStop(file, line); X*************** X*** 251,257 **** X arrowsign[i].mapped = 0; X } X line = arrow.line; X! if (arrow.filename && !strcmp(arrow.filename, file->filename) && X line >= file->topline && line <= file->bottomline) { X i = line - file->topline; X arrow.i = i; X--- 251,257 ---- X arrowsign[i].mapped = 0; X } X line = arrow.line; X! if (arrow.file && !strcmp(arrow.file, file->pathname) && X line >= file->topline && line <= file->bottomline) { X i = line - file->topline; X arrow.i = i; X*************** X*** 279,288 **** X Line line; X X if (file == NULL) return; X! if (updown.filename && !strcmp(updown.filename, arrow.filename) && X! updown.line == arrow.line) { X updown.line = 0; X! strcpy(updown.filename, ""); X } X i = updown.i; X if (i>=0 && i<file->lines) X--- 279,288 ---- X Line line; X X if (file == NULL) return; X! if (updown.file && !strcmp(updown.file, arrow.file) && X! !strcmp(updown.func, arrow.func)) { X updown.line = 0; X! strcpy(updown.file, ""); X } X i = updown.i; X if (i>=0 && i<file->lines) X*************** X*** 291,297 **** X updownsign[i].mapped = 0; X } X line = updown.line; X! if (updown.filename && !strcmp(updown.filename, file->filename) && X line >= file->topline && line <= file->bottomline) { X i = line - file->topline; X updown.i = i; X--- 291,297 ---- X updownsign[i].mapped = 0; X } X line = updown.line; X! if (updown.file && !strcmp(updown.file, file->pathname) && X line >= file->topline && line <= file->bottomline) { X i = line - file->topline; X updown.i = i; Xdiff -c xdbx1.0/sun_regex.h xdbx1.1/sun_regex.h X*** xdbx1.0/sun_regex.h Fri Mar 24 01:18:43 1989 X--- xdbx1.1/sun_regex.h Fri Mar 31 03:51:06 1989 X*************** X*** 54,63 **** X #define C_FILE 6 X #define C_DEBUG 7 X #define C_CD 8 X X static PatternRec output_pattern[] = { X! {"\\(.*\n\\)*\\(\\(stopped\\|Bus error\\|Segmentation fault\\|Interrupt\\|\ X! signal.*\\) in \\([^ ]+\\) at line \\([0-9]+\\)\\( in file\ X \"\\([^ ]+\\)\"\\)?\\)\n", X NULL, X {2, -1, 4, 5, 7} X--- 54,65 ---- X #define C_FILE 6 X #define C_DEBUG 7 X #define C_CD 8 X+ #define C_USE 9 X X+ X static PatternRec output_pattern[] = { X! {"\\(.*\n\\)*.*\\(\\(stopped\\|Bus error\\|Segmentation fault\\|\ X! Interrupt\\|signal.*\\) in \\([^ ]+\\) at line \\([0-9]+\\)\\( in file\ X \"\\([^ ]+\\)\"\\)?\\)\n", X NULL, X {2, -1, 4, 5, 7} X*************** X*** 102,107 **** X {"[ ]*func[ ]*\\([^ ]+\\)[ ]*\n", NULL, {-1, -1, 1, -1, -1}}, X {"[ ]*file[ ]*\\([^ ]+\\)[ ]*\n", NULL, {-1, -1, -1, -1, 1}}, X {"[ ]*debug[ ]*\\([^ ]+\\)[ ]*\n", NULL, {-1, -1, -1, -1, 1}}, X! {"[ ]*cd[ ]*\\([^ ]+\\)[ ]*\n", NULL, {-1, -1, -1, -1, 1}}, X NULL X }; X--- 104,110 ---- X {"[ ]*func[ ]*\\([^ ]+\\)[ ]*\n", NULL, {-1, -1, 1, -1, -1}}, X {"[ ]*file[ ]*\\([^ ]+\\)[ ]*\n", NULL, {-1, -1, -1, -1, 1}}, X {"[ ]*debug[ ]*\\([^ ]+\\)[ ]*\n", NULL, {-1, -1, -1, -1, 1}}, X! {"[ ]*cd[ ]*\\([^ ]+\\)?[ ]*\n", NULL, {-1, -1, -1, -1, 1}}, X! {"[ ]*use[ ]*.*\n", NULL, {-1, -1, -1, -1, 1}}, X NULL X }; Xdiff -c xdbx1.0/utils.c xdbx1.1/utils.c X*** xdbx1.0/utils.c Fri Mar 24 01:18:43 1989 X--- xdbx1.1/utils.c Tue Mar 28 02:59:33 1989 X*************** X*** 32,56 **** X } X X /* Returns the working directory of dbx (for Sun dbx only). X- */ X char *dbxpwd() X { X! char s[LINESIZ], *dir; X X #ifdef BSD X! return NULL; X #else X! if (dbxfp == NULL) return ("."); X! Echo = FALSE; X! writeDbx("pwd\n"); X! while (fgets(s, LINESIZ, dbxfp) == NULL); X! s[strlen(s)-1] = '\0'; X! dir = XtNewString(s); X! while (fgets(s, LINESIZ, dbxfp)); X! Echo = TRUE; X! return dir; X #endif X } X X X XtTextPosition TextGetLastPos(w) X--- 32,54 ---- X } X X /* Returns the working directory of dbx (for Sun dbx only). X char *dbxpwd() X { X! char *dir, WorkingDir[MAXPATHLEN]; X X #ifdef BSD X! if (strcmp(WorkingDir, ".") == NULL) X! return ((char *) getwd(WorkingDir)); X! else X! return WorkingDir; X #else X! if (dbxfp == NULL) X! return ((char *) getwd(pathname)); X! dir = QueryDbx("pwd\n", FALSE); X! return ((char *) strtok(dir, " \n")); X #endif X } X+ */ X X X XtTextPosition TextGetLastPos(w) X*************** X*** 112,119 **** X int i; X X for (i=1; i <= nstops; i++) X! if (stops[i].line == line && stops[i].filename && displayedFile && X! strcmp(stops[i].filename, displayedFile->filename) == NULL) { X return i; X } X return 0; X--- 110,117 ---- X int i; X X for (i=1; i <= nstops; i++) X! if (stops[i].line == line && stops[i].file && displayedFile && X! strcmp(stops[i].file, displayedFile->pathname) == NULL) { X return i; X } X return 0; Xdiff -c xdbx1.0/windows.c xdbx1.1/windows.c X*** xdbx1.0/windows.c Fri Mar 24 01:18:44 1989 X--- xdbx1.1/windows.c Wed Mar 29 11:54:10 1989 X*************** X*** 158,173 **** X XtSetValues(lineLabel, args, n); X } X X! void UpdateMessageWindow(message) X! char *message; X { X! char string[LINESIZ]; X Arg args[MAXARGS]; X Cardinal n; X X! strcpy(string, " "); X! strcat(string, message); X n = 0; X! XtSetArg(args[n], XtNlabel, (XtArgVal) string); n++; X XtSetValues(messageWindow, args, n); X } X--- 158,174 ---- X XtSetValues(lineLabel, args, n); X } X X! void UpdateMessageWindow(format, arg) X! char *format, *arg; X { X! char message[LINESIZ], string[LINESIZ]; X Arg args[MAXARGS]; X Cardinal n; X X! strcpy(message, " "); X! sprintf(string, format, arg); X! strcat(message, string); X n = 0; X! XtSetArg(args[n], XtNlabel, (XtArgVal) message); n++; X XtSetValues(messageWindow, args, n); X } Xdiff -c xdbx1.0/xdbx.c xdbx1.1/xdbx.c +END+OF+xdbx.patch.3 echo '-rw-rw-r-- 1 argv 24849 Apr 5 23:56 xdbx.patch.3 (as sent)' chmod u=rw,g=rw,o=r xdbx.patch.3 ls -l xdbx.patch.3 exit 0