[packages/sap] - compilation fixes
witekfl
witekfl at pld-linux.org
Sat Jun 13 17:50:01 CEST 2026
commit 88535a271e3caf42664825064bd435edb194cbc9
Author: Witold Filipczyk <witekfl at poczta.onet.pl>
Date: Sat Jun 13 17:48:36 2026 +0200
- compilation fixes
ctype.patch | 8 ++++
format.patch | 29 ++++++++++++++
rettype.patch | 123 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 160 insertions(+)
---
diff --git a/ctype.patch b/ctype.patch
new file mode 100644
index 0000000..006bf82
--- /dev/null
+++ b/ctype.patch
@@ -0,0 +1,8 @@
+diff -up sap-0.2/src/sap.c.old sap-0.2/src/sap.c
+--- sap-0.2/src/sap.c.old 2026-06-13 17:38:28.104402318 +0200
++++ sap-0.2/src/sap.c 2026-06-13 17:39:48.399731193 +0200
+@@ -1,3 +1,4 @@
++#include <ctype.h>
+ #include <langinfo.h>
+ #include <locale.h>
+ #include <stdio.h>
diff --git a/format.patch b/format.patch
new file mode 100644
index 0000000..999f0d8
--- /dev/null
+++ b/format.patch
@@ -0,0 +1,29 @@
+diff -up sap-0.2/src/charfilter.c.old sap-0.2/src/charfilter.c
+--- sap-0.2/src/charfilter.c.old 2026-06-13 17:25:29.506835473 +0200
++++ sap-0.2/src/charfilter.c 2026-06-13 17:31:05.104212693 +0200
+@@ -28,11 +28,11 @@ int alt_fprintf(int asciionly_mode, FILE
+ vsprintf(my_tempy1, given_string, marker);
+ if(asciionly_mode){
+ filter_to_ascii(my_tempy1, my_tempy2, 8192);
+- retcode=fprintf(fd, my_tempy2);
++ retcode=fputs(my_tempy2, fd);
+ }else{
+ #ifdef OS_AMIGAOS
+ filter_fromto_amigapl_iso(my_tempy1, my_tempy2);
+- retcode=fprintf(fd, my_tempy2);
++ retcode=fputs(my_tempy2, fd);
+ #else
+ if (utf8) {
+ char utf8_chars[8192*8];
+@@ -45,9 +45,9 @@ int alt_fprintf(int asciionly_mode, FILE
+ iconv(cd, &buf, &length, &koniec, &length_utf8);
+ iconv_close(cd);
+ *koniec='\0';
+- retcode=fprintf(fd, utf8_chars);
++ retcode=fputs(utf8_chars, fd);
+ } else
+- retcode=fprintf(fd, my_tempy1);
++ retcode=fputs(my_tempy1, fd);
+ #endif
+ }
+ va_end(marker);
diff --git a/rettype.patch b/rettype.patch
new file mode 100644
index 0000000..0312a7d
--- /dev/null
+++ b/rettype.patch
@@ -0,0 +1,123 @@
+diff -up sap-0.2/src/sap.c.old sap-0.2/src/sap.c
+--- sap-0.2/src/sap.c.old 2026-06-13 17:32:24.119537786 +0200
++++ sap-0.2/src/sap.c 2026-06-13 17:36:27.229424401 +0200
+@@ -33,6 +33,7 @@ unsigned char *txt2="A�BC�DE�FGHIJKL�MN�
+
+ int asciionly_mode; /* if true use only base ASCII (<128) chars */
+
++void
+ mk_convt(void)
+ {
+ int i;unsigned char *c1,*c2;
+@@ -44,17 +45,20 @@ mk_convt(void)
+ }
+ }
+
++int
+ is_prt(int c)
+ {
+ return _convtable[c&255];
+ }
+
++int
+ l_tolower(int c)
+ {
+ if (!_convtable[c=(c&255)]) return 0;
+ return _avtable[c];
+ }
+
++int
+ l_compare(char *c1,char *c2)
+ {
+ for (;*c1;c1++,c2++) {
+@@ -66,6 +70,7 @@ l_compare(char *c1,char *c2)
+ return 0;
+ }
+
++int
+ l_match(char *c1,char *c2)
+ {
+ for (;*c1;c1++,c2++) {
+@@ -77,6 +82,7 @@ l_match(char *c1,char *c2)
+ return 0;
+ }
+
++int
+ l_pmatch(char *c1,char *c2)
+ {
+ for (;;) {
+@@ -112,6 +118,7 @@ struct vobel {
+ char body[16384];
+ } vobel[2];
+
++void
+ ReadVobel(char *name,int nr)
+ {
+ char avname[256];
+@@ -179,6 +186,7 @@ zle:
+ exit(21);
+ }
+
++void
+ read_page(nr,np) int nr,np;
+ {
+ if (vobel[nr].actual_page==np) return;
+@@ -258,6 +266,7 @@ char vide[2][32]={"\x1b[33m","\x1b[0m"};
+ char count[2][32]={"\x1b[33m","\x1b[0m"};
+ char header[2][32]={"\x1b[31m","\x1b[0m"};
+
++void
+ parsestr(c) char *c;
+ {
+ char *d;int i,v;
+@@ -269,6 +278,8 @@ parsestr(c) char *c;
+ }
+ *d=0;
+ }
++
++void
+ linetoparam(line) char *line;
+ {
+ char cv1[32],cv2[32],*c,*d;int cx,i;
+@@ -297,6 +308,7 @@ linetoparam(line) char *line;
+ }
+ }
+
++void
+ getsaprc()
+ {
+ char terminal[256],*c,*d;int got;
+@@ -353,7 +365,7 @@ sapok:
+
+
+
+-
++void
+ mksecbuf(hass) char *hass;
+ {
+ char *c,*d;int v,i,mc,cdoll;
+@@ -419,7 +431,7 @@ mksecbuf(hass) char *hass;
+ *d=0;
+ }
+
+-
++void
+ findslowo(slowo,nr,f) char *slowo;int nr;FILE *f;
+ {
+
+@@ -544,6 +556,7 @@ xmatch:
+ }
+ char slowo[32];
+
++void
+ trim(char *c)
+ {
+ char *d;int n;
+@@ -566,6 +579,7 @@ char *helpstring=""
+ "s�owa pasuj�ce do wzorca w kt�rym gwiazdka zast�puje dowolny (r�wnie� pusty)\n"
+ "ci�g znak�w. Ilo�� wypisanych hase� jest ograniczona do 100.\n"
+ "";
++int
+ main(int argc,char *argv[])
+ {
+ int opcja,voc,lmode,vsl;
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/sap.git/commitdiff/3e791437baea0e83991ccc4cd89e287fac993818
More information about the pld-cvs-commit
mailing list