Skip to content

Commit

Permalink
more debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
bill committed Feb 25, 2024
1 parent b7ee118 commit cdf829f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/binaries-linux32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
9 changes: 9 additions & 0 deletions microemacs/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 ;
Expand All @@ -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] == '-')
{
Expand Down Expand Up @@ -2061,6 +2064,7 @@ mesetup(int argc, char *argv[])
}
bufHistNo = obufHistNo + rarg ;
}
printf("HERE: %d\n",__LINE__);

if(noFiles > 0)
{
Expand All @@ -2076,6 +2080,7 @@ mesetup(int argc, char *argv[])
}
}
}
printf("HERE: %d\n",__LINE__);

/* setup to process commands */
lastflag = 0; /* Fake last flags. */
Expand All @@ -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)
{
Expand All @@ -2097,6 +2105,7 @@ mesetup(int argc, char *argv[])
exitEmacs(1,0x30);
}
#endif
printf("HERE: %d\n",__LINE__);
}

#ifndef NDEBUG
Expand Down
16 changes: 16 additions & 0 deletions microemacs/src/unixterm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) ||
Expand All @@ -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 ;
Expand All @@ -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)
Expand All @@ -791,13 +801,15 @@ 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,
* if we have there's nothing we can do other than die.
* This is common when the X-window is destroyed using
* the window manager.
*/
printf("WAIT: %d\n",__LINE__);
#ifdef _USEPOLL
struct pollfd pfds [1];

Expand All @@ -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 */
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit cdf829f

Please sign in to comment.