Make my fix to 2001/coupard more like original
In linux clang does not support implicit int and it's an error. I ended up adding 'int' but to make it more like the original I added to the CSILENCE -Wno-implicit-int instead. Thus the code is the original and only the Makefile is different. The thanks file was updated for this but also other entries (nothing changed in the entries themselves, just changes in the description in the thanks file).
This commit is contained in:
1 parent
b022c51f1e
commit
d8b2ed49c1
3 files changed
+48
-49
No files matched your search
+4
-34
@@ -38,7 +38,7 @@ include ../../var.mk
|
||||
|
||||
# Common C compiler warnings to silence
|
||||
#
|
||||
CSILENCE= -Wno-empty-body -Wno-pointer-sign -Wno-return-type -Wno-deprecated-non-prototype
|
||||
CSILENCE= -Wno-empty-body -Wno-pointer-sign -Wno-return-type -Wno-deprecated-non-prototype -Wno-implicit-int
|
||||
|
||||
# Common C compiler warning flags
|
||||
#
|
||||
@@ -124,8 +124,7 @@ ALT_TARGET=
|
||||
all: data ${TARGET}
|
||||
@${TRUE}
|
||||
|
||||
.PHONY: all alt data everything diff_orig_prog diff_prog_orig \
|
||||
diff_alt_prog diff_prog_alt diff_orig_alt diff_alt_orig \
|
||||
.PHONY: all alt data everything orig_prog_diff alt_prog_diff \
|
||||
clean clobber install love haste waste maker easter_egg \
|
||||
sandwich supernova deep_magic magic charon pluto
|
||||
|
||||
@@ -147,47 +146,18 @@ data: ${DATA}
|
||||
everything: all alt
|
||||
@${TRUE}
|
||||
|
||||
|
||||
#####################
|
||||
# make a difference #
|
||||
#####################
|
||||
#
|
||||
# diff orig source and source
|
||||
#
|
||||
diff_orig_prog: ${PROG}.orig.c ${PROG}.c
|
||||
orig_prog_diff: ${PROG}.orig.c ${PROG}.c
|
||||
@-${DIFF} -u ${PROG}.orig.c ${PROG}.c
|
||||
|
||||
# diff source and orig source
|
||||
#
|
||||
diff_prog_orig: ${PROG}.c ${PROG}.orig.c
|
||||
@-${DIFF} -u ${PROG}.c ${PROG}.orig.c
|
||||
|
||||
# diff alt source and source
|
||||
#
|
||||
diff_alt_prog: ${PROG}.c
|
||||
alt_prog_diff: ${PROG}.c
|
||||
@-if [[ -e ${PROG}.alt.c ]]; then \
|
||||
${DIFF} -u ${PROG}.alt.c ${PROG}.c; \
|
||||
fi
|
||||
|
||||
# diff source and alt source
|
||||
#
|
||||
diff_prog_alt: ${PROG}.c
|
||||
@-if [[ -e ${PROG}.alt.c ]]; then \
|
||||
${DIFF} -u ${PROG}.c ${PROG}.alt.c; \
|
||||
fi
|
||||
|
||||
# diff orig and alt
|
||||
#
|
||||
diff_orig_alt: ${PROG}.orig.c
|
||||
@-if [[ -e ${PROG}.alt.c ]]; then \
|
||||
${DIFF} -u ${PROG}.orig.c ${PROG}.alt.c; \
|
||||
fi
|
||||
|
||||
diff_alt_orig:
|
||||
@-if [[ -e ${PROG}.alt.c ]]; then \
|
||||
${DIFF} -u ${PROG}.alt.c ${PROG}.orig.c; \
|
||||
fi
|
||||
|
||||
|
||||
###############
|
||||
# utility rules
|
||||
|
||||
@@ -28,7 +28,7 @@ $",p[6789];
|
||||
|
||||
int o[]={145,1145,1745,2545,3045,4045,4345,5145,5745,6369},i=0,j=0,l=0;
|
||||
|
||||
void e(int n,int h){
|
||||
void e(n,h){
|
||||
for(j=0;n>0;n-=!(p[j++]^9));
|
||||
for(;!n&&j[p]^9;j++)write(1,p+p[j][o],o[p[j]+1]-p[j][o]);
|
||||
for(i=0;i<h[o];i++)write(1,d+7,1);}
|
||||
|
||||
Reference in new issue
Block a user