Minor fixes in 1998/dlowe

The program (both main and alt versions) had main()'s return type as
void. To make it more portable, like another entry (that I was asked to
make this same change), I changed it to int.
This commit is contained in:
Cody Boone Ferguson committed 2023-11-13 08:13:59 -08:00
1 parent f9f057daf1
commit aa1427f18e
3 files changed
+7 -4

No files matched your search

+2 -2
View File
@@ -2,7 +2,7 @@
#define PO(o,t)\
(((o>64)&&(o<91))?(((t>96)&&(t<123))?(t-32):(t)):(((t>64)&&(t<91))?(t+32):(t)))
void main() { char *poo="poot",
int main() { char *poo="poot",
*Poo="pootpoot" ,O[9],o;int t, T;(t=0)|| (*O='\0');while(
(o= getc( stdin ))!=( EOF))if (((o> 64)&&
(o< 91)) ||(( o>96 )&&(o <123 ))) (
@@ -14,5 +14,5 @@
("%c", PO(*(O
+T),*( poo+T)
) ); printf( "%c", o ) ; } else printf("%s%c", O, o); ( t =0) || (*O='\0'); } }
) ); printf( "%c", o ) ; } else printf("%s%c", O, o); ( t =0) || (*O='\0'); } return 0;}
+2 -2
View File
@@ -2,7 +2,7 @@
#define PO(o,t)\
(((o>64)&&(o<91))?(((t>96)&&(t<123))?(t-32):(t)):(((t>64)&&(t<91))?(t+32):(t)))
void main() { char *poo= "poot",
int main() { char *poo= "poot",
*Poo="pootpoot" ,O[9];int o,t,T,p;(t=p =0)||(*O='\0');while
((o= getc( stdin ))!=( EOF))if ((p== 0)&& (((o>64 )&& (
o<91 )) || ((o> 96 ) &&(o< 123) ))) (
@@ -15,4 +15,4 @@
+T),*( poo+T)
) ) ; printf( "%c" , o ) ; } else printf ( "%s%c" , O , o ) ; ( t = 0 ) || (
* O = '\0' ) ; ( o == 60 ) && ( ++p ) ; ( o == 62 ) && (p!=0) && ( --p ) ; } }
* O = '\0' ) ; ( o == 60 ) && ( ++p ) ; ( o == 62 ) && (p!=0) && ( --p ) ; } return 0;}
+3
View File
@@ -2061,6 +2061,9 @@ done in modern systems) to be `_int`.
## [1998/dlowe](1998/dlowe/dlowe.c) ([README.md](1998/dlowe/README.md]))
Cody made the program more portable by changing the void return type of `main()`
to be `int` (in both versions).
Cody added the scripts [try.sh](1998/dlowe/try.sh),
[pootify.sh](1998/dlowe/pootify.sh) and
[pootify.cgi.sh](1998/dlowe/pootify.cgi.sh) for a fun example use of the