summaryrefslogtreecommitdiff
path: root/ledit.c
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2020-05-20 20:34:56 +0000
committerIan C <ianc@noddybox.co.uk>2020-05-20 20:34:56 +0000
commitd71fef04f16e0d3fa901a0201d0b1b538a12ec1b (patch)
tree36e2a970e5726acbb41148217642aa15d330517f /ledit.c
parent44eec17db0d83b99ccaeb39c3dcdcc0825a7a04c (diff)
Fixed warnings.
Diffstat (limited to 'ledit.c')
-rw-r--r--ledit.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/ledit.c b/ledit.c
index 145f78e..99fcc7a 100644
--- a/ledit.c
+++ b/ledit.c
@@ -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);
}