From cdf829f76fdb3d00d8059250aff1cfcae9128343 Mon Sep 17 00:00:00 2001 From: bill Date: Sun, 25 Feb 2024 18:01:41 +0000 Subject: [PATCH] more debugging --- .github/workflows/binaries-linux32.yml | 2 -- microemacs/src/main.c | 9 +++++++++ microemacs/src/unixterm.c | 16 ++++++++++++++++ 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/.github/workflows/binaries-linux32.yml b/.github/workflows/binaries-linux32.yml index 753ec791..cf8dfc7d 100644 --- a/.github/workflows/binaries-linux32.yml +++ b/.github/workflows/binaries-linux32.yml @@ -26,7 +26,6 @@ jobs: - name: Compile mew run: | ./build.sh -t w - ./build.sh -d -t w working-directory: ./microemacs/src - name: Generate docs @@ -42,7 +41,6 @@ jobs: cd ./microemacs/src cp ./.linux32gcc-release-mec/mec ../../binaries-linux32/ cp ./.linux32gcc-release-mew/mew ../../binaries-linux32/ - cp ./.linux32gcc-debug-mew/mew ../../binaries-linux32/mewd cd ../../binaries-linux32/ zip linux32-bin mec mew rm mec mew diff --git a/microemacs/src/main.c b/microemacs/src/main.c index 6295ce3c..2ab66b47 100755 --- a/microemacs/src/main.c +++ b/microemacs/src/main.c @@ -1928,11 +1928,13 @@ mesetup(int argc, char *argv[]) ipipes->bp->scheme = globScheme; #endif #endif + printf("HERE: %d\n",__LINE__); screenUpdateDisabledCount = 0 ; #ifdef _CLIPBRD /* allow interaction with the clipboard now that me has initialized */ clipState &= ~CLIP_DISABLED ; #endif + printf("HERE: %d\n",__LINE__); { meUByte *searchStr=NULL, *cryptStr=NULL ; @@ -1948,6 +1950,7 @@ mesetup(int argc, char *argv[]) /* scan through the command line and get the files to edit */ for(carg=1 ; carg < rarg ; carg++) { + printf("HERE: %d\n",__LINE__); /* if its a switch, process it */ if(argv[carg][0] == '-') { @@ -2061,6 +2064,7 @@ mesetup(int argc, char *argv[]) } bufHistNo = obufHistNo + rarg ; } + printf("HERE: %d\n",__LINE__); if(noFiles > 0) { @@ -2076,6 +2080,7 @@ mesetup(int argc, char *argv[]) } } } + printf("HERE: %d\n",__LINE__); /* setup to process commands */ lastflag = 0; /* Fake last flags. */ @@ -2084,10 +2089,13 @@ mesetup(int argc, char *argv[]) * startup which can screw things up */ sgarbf = meTRUE; /* Erase-page clears */ + printf("HERE: %d\n",__LINE__); carg = decode_fncname((meUByte *)"start-up",1) ; + printf("HERE: %d\n",__LINE__); if(carg >= 0) execFunc(carg,meFALSE,1); + printf("HERE: %d\n",__LINE__); #if MEOPT_EXTENDED if(alarmState & meALARM_PIPED) { @@ -2097,6 +2105,7 @@ mesetup(int argc, char *argv[]) exitEmacs(1,0x30); } #endif + printf("HERE: %d\n",__LINE__); } #ifndef NDEBUG diff --git a/microemacs/src/unixterm.c b/microemacs/src/unixterm.c index 275b42ef..b8a16060 100755 --- a/microemacs/src/unixterm.c +++ b/microemacs/src/unixterm.c @@ -725,9 +725,11 @@ waitForEvent(int mode) fd_set select_set; int pfd ; + printf("WAIT: %d\n",__LINE__); /* While no input keys and ipipe or alarm signals. */ for(;;) { + printf("WAIT: %d\n",__LINE__); if(TTahead() || #ifdef _CLIPBRD (clipState & CLIP_RECEIVED) || @@ -742,11 +744,16 @@ waitForEvent(int mode) #endif (sgarbf == meTRUE)) break ; + printf("WAIT: %d\n",__LINE__); TTdieTest() ; + printf("WAIT: %d\n",__LINE__); FD_ZERO(&select_set); + printf("WAIT: %d\n",__LINE__); FD_SET(meStdin, &select_set); + printf("WAIT: %d\n",__LINE__); pfd = meStdin ; + printf("WAIT: %d\n",__LINE__); #if MEOPT_IPIPES ipipeEvent = 0 ; ipipe = ipipes ; @@ -769,10 +776,13 @@ waitForEvent(int mode) if(ipipeEvent && mode) return ; #endif + printf("WAIT: %d\n",__LINE__); pfd++ ; + printf("WAIT: %d\n",__LINE__); if(select(pfd,&select_set,NULL,NULL,NULL) >= 0) { int ii; + printf("WAIT: %d\n",__LINE__); #if MEOPT_IPIPES ipipe = ipipes ; while(ipipe != NULL) @@ -791,6 +801,7 @@ waitForEvent(int mode) if(ipipeEvent && mode) return ; #endif + printf("WAIT: %d\n",__LINE__); if(FD_ISSET(meStdin,&select_set)) { /* this is a check to see if we've lost stdin, @@ -798,6 +809,7 @@ waitForEvent(int mode) * This is common when the X-window is destroyed using * the window manager. */ + printf("WAIT: %d\n",__LINE__); #ifdef _USEPOLL struct pollfd pfds [1]; @@ -824,6 +836,7 @@ waitForEvent(int mode) ii = ioctl(meStdin, FIORDCHK,0); #endif /* FIONREAD */ #endif /* _USEPOLL */ + printf("WAIT: %d\n",__LINE__); if(!ii) { /* BEGIN: 2013-05-26 */ @@ -862,11 +875,14 @@ waitForEvent(int mode) else lost = 0 ; } + printf("WAIT: %d\n",__LINE__); } else /* Premeture exit - probably a signal for an alarm */ break; + printf("WAIT: %d\n",__LINE__); } + printf("WAIT: %d\n",__LINE__); } #ifdef _ME_CONSOLE