diff options
author | ache <ache@FreeBSD.org> | 2007-06-26 19:49:51 +0800 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2007-06-26 19:49:51 +0800 |
commit | b1d21c634a6cc20e7671dd1277eff62af9293427 (patch) | |
tree | 0ff7f5456bfacc000e08f05f578860ef471d13e0 /misc | |
parent | 53d670f43e67ec2f239988e2d49e754dafabd9ff (diff) | |
download | freebsd-ports-graphics-b1d21c634a6cc20e7671dd1277eff62af9293427.tar.gz freebsd-ports-graphics-b1d21c634a6cc20e7671dd1277eff62af9293427.tar.zst freebsd-ports-graphics-b1d21c634a6cc20e7671dd1277eff62af9293427.zip |
Allow 8bit chars be read from file
Diffstat (limited to 'misc')
-rw-r--r-- | misc/astrolog/Makefile | 2 | ||||
-rw-r--r-- | misc/astrolog/files/patch-ac | 13 | ||||
-rw-r--r-- | misc/astrolog/files/patch-io.c | 34 |
3 files changed, 46 insertions, 3 deletions
diff --git a/misc/astrolog/Makefile b/misc/astrolog/Makefile index c739ee3a2f6..d7bd005366e 100644 --- a/misc/astrolog/Makefile +++ b/misc/astrolog/Makefile @@ -10,7 +10,7 @@ PORTNAME= astrolog PORTVERSION= 5.40 -PORTREVISION= 7 +PORTREVISION= 8 CATEGORIES= misc MASTER_SITES= http://www.astrolog.org/ftp/ephem/:ephem \ http://www.astrolog.org/ftp/:dist diff --git a/misc/astrolog/files/patch-ac b/misc/astrolog/files/patch-ac index 3b5a728a634..48b0f839bf0 100644 --- a/misc/astrolog/files/patch-ac +++ b/misc/astrolog/files/patch-ac @@ -1,5 +1,5 @@ ---- astrolog.c.orig 1998-12-23 23:29:07.000000000 +0300 -+++ astrolog.c 2007-06-23 18:07:49.000000000 +0400 +--- astrolog.c.orig 1998-12-23 23:29:03.000000000 +0300 ++++ astrolog.c 2007-06-26 15:44:04.000000000 +0400 @@ -35,6 +35,7 @@ ** Last code change made 12/20/1998. */ @@ -8,6 +8,15 @@ #include "astrolog.h" +@@ -234,7 +235,7 @@ + char *pch = szLine; + + /* Split the entered line up into its individual switch strings. */ +- while (*pch >= ' ' || *pch == chTab) { ++ while (!iscntrl((_char)*pch) || *pch == chTab) { + if (*pch == ' ' || *pch == chTab) { + if (fSpace) + /* Skip over the current run of spaces between strings. */ @@ -1146,8 +1147,18 @@ case 'z': if (ch1 == '0') { diff --git a/misc/astrolog/files/patch-io.c b/misc/astrolog/files/patch-io.c new file mode 100644 index 00000000000..4c882681c1a --- /dev/null +++ b/misc/astrolog/files/patch-io.c @@ -0,0 +1,34 @@ +--- io.c.orig 1998-12-23 23:29:21.000000000 +0300 ++++ io.c 2007-06-26 15:35:03.000000000 +0400 +@@ -35,6 +35,7 @@ + ** Last code change made 12/20/1998. + */ + ++#include <ctype.h> + #include "astrolog.h" + + +@@ -139,12 +140,12 @@ + } + + loop { +- while (!feof(file) && (ch = getc(file)) < ' ') ++ while (!feof(file) && iscntrl((_char)(ch = getc(file)))) + ; + if (feof(file)) + break; + for (szLine[0] = ch, i = 1; i < cchSzMax && !feof(file) && +- (szLine[i] = getc(file)) >= ' '; i++) ++ !iscntrl((_char)(szLine[i] = getc(file))); i++) + ; + szLine[i] = chNull; + argc = NParseCommandLine(szLine, argv); +@@ -675,7 +676,7 @@ + /* them. Be prepared to skip over them in old files for compatibility. */ + + if (i == oVtx) { +- while (getc(file) >= ' ') ++ while (!iscntrl((_char)getc(file))) + ; + if ((ch = getc(file)) != 'H') + i = cuspHi; |