diff options
author | Ian C <ianc@noddybox.co.uk> | 2020-05-20 20:34:56 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2020-05-20 20:34:56 +0000 |
commit | d71fef04f16e0d3fa901a0201d0b1b538a12ec1b (patch) | |
tree | 36e2a970e5726acbb41148217642aa15d330517f /ledit.c | |
parent | 44eec17db0d83b99ccaeb39c3dcdcc0825a7a04c (diff) |
Fixed warnings.
Diffstat (limited to 'ledit.c')
-rw-r--r-- | ledit.c | 17 |
1 files changed, 11 insertions, 6 deletions
@@ -169,7 +169,7 @@ XFuncControl Key(Window w,XPressRelease m, XEvent *e) KeySym k; if (m==XPRESS) - return; + return XFUNCCONT; switch(k=XLookupKeysym((XKeyEvent*)e,ShiftMapIndex)) { @@ -264,7 +264,7 @@ XFuncControl Mouse(Window w, XPressRelease m, int b, int x, int y) int mapx,mapy; if ((m==XPRESS)||(cur==-1)) - return (XFUNCCONT); + return XFUNCCONT; switch(b) { @@ -400,10 +400,15 @@ char *GetLine(FILE *fp) { static char s[1204]; - fgets(s,1024,fp); - - if (s[strlen(s)-1]=='\n') - s[strlen(s)-1]='\0'; + if (fgets(s,1024,fp)) + { + if (s[strlen(s)-1]=='\n') + s[strlen(s)-1]='\0'; + } + else + { + s[0] = 0; + } return(s); } |