Make quine-text multiline string (#111)
This commit is contained in:
parent
1690da3e6b
commit
de4a299899
18
justfile
18
justfile
@ -92,12 +92,26 @@ quine: create
|
||||
diff tmp/gen1.c tmp/gen2.c
|
||||
@echo 'It was a quine!'
|
||||
|
||||
quine-text = 'int printf(const char*, ...); int main() { char *s = "int printf(const char*, ...); int main() { char *s = %c%s%c; printf(s, 34, s, 34); return 0; }"; printf(s, 34, s, 34); return 0; }'
|
||||
quine-text = '
|
||||
int printf(const char*, ...);
|
||||
|
||||
int main() {
|
||||
char *s =
|
||||
"int printf(const char*, ...);"
|
||||
"int main() {"
|
||||
" char *s = %c%s%c;"
|
||||
" printf(s, 34, s, 34);"
|
||||
" return 0;"
|
||||
"}";
|
||||
printf(s, 34, s, 34);
|
||||
return 0;
|
||||
}
|
||||
'
|
||||
|
||||
# create our quine
|
||||
create:
|
||||
mkdir -p tmp
|
||||
echo '{{quine-text}}' > tmp/gen0.c
|
||||
@echo '{{quine-text}}' > tmp/gen0.c
|
||||
|
||||
# clean up
|
||||
clean:
|
||||
|
Loading…
Reference in New Issue
Block a user