cheako / markov3 Goto Github PK
View Code? Open in Web Editor NEWRevised and improved markov3, a Usenet article generator
Revised and improved markov3, a Usenet article generator
lex markov3.l
mv lex.yy.c markov3.c
cc -O -c -o markov3.o markov3.c
markov3.l: In function ‘yylex’:
markov3.l:40:10: warning: implicit declaration of function ‘process_token’ [-Wimplicit-function-declaration]
40 | process_token ("\n> ...\n\n");
| ^~~~~~~~~~~~~
markov3.l: At top level:
markov3.l:66:18: error: conflicting types for ‘malloc’
66 | char *strcpy(), *malloc();
| ^~~~~~
In file included from lex.yy.c:21:
/usr/include/stdlib.h:539:14: note: previous declaration of ‘malloc’ was here
539 | extern void *malloc (size_t __size) __THROW attribute_malloc
| ^~~~~~
markov3.l:115:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
115 | process_token (txt)
| ^~~~~~~~~~~~~
markov3.l: In function ‘process_token’:
markov3.l:126:6: warning: implicit declaration of function ‘insert_pair’ [-Wimplicit-function-declaration]
126 | insert_pair (prev_code, code);
| ^~~~~~~~~~~
markov3.l:129:6: warning: ‘return’ with no value, in function returning non-void
129 | return;
| ^~~~~~
markov3.l:115:1: note: declared here
115 | process_token (txt)
| ^~~~~~~~~~~~~
markov3.l: At top level:
markov3.l:135:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
135 | main (argc, argv)
| ^~~~
markov3.l: In function ‘main’:
markov3.l:171:14: warning: implicit declaration of function ‘time’ [-Wimplicit-function-declaration]
171 | srand ((int)time ((time_t *)0));
| ^~~~
markov3.l:190:2: warning: implicit declaration of function ‘dump_database’ [-Wimplicit-function-declaration]
190 | dump_database (dumpfile);
| ^~~~~~~~~~~~~
markov3.l:197:13: warning: implicit declaration of function ‘output_word’ [-Wimplicit-function-declaration]
197 | if (i > 0) output_word ("\n\f\n");
| ^~~~~~~~~~~
markov3.l:198:2: warning: implicit declaration of function ‘generate_article’ [-Wimplicit-function-declaration]
198 | generate_article ();
| ^~~~~~~~~~~~~~~~
markov3.l: At top level:
markov3.l:208:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
208 | yywrap () {
| ^~~~~~
markov3.l: In function ‘insert_in_tree’:
markov3.l:282:11: warning: implicit declaration of function ‘my_strcmp’; did you mean ‘strcmp’? [-Wimplicit-function-declaration]
282 | cmp = my_strcmp (p->text, txt);
| ^~~~~~~~~
| strcmp
markov3.l: At top level:
markov3.l:329:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
329 | insert_pair (p1, p2)
| ^~~~~~~~~~~
markov3.l:349:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
349 | treedump (tree, fp)
| ^~~~~~~~
markov3.l: In function ‘treedump’:
markov3.l:357:2: warning: implicit declaration of function ‘chaindump’ [-Wimplicit-function-declaration]
357 | chaindump (tree->succ, fp);
| ^~~~~~~~~
markov3.l: At top level:
markov3.l:365:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
365 | chaindump (p, fp)
| ^~~~~~~~~
markov3.l:383:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
383 | dump_database (file)
| ^~~~~~~~~~~~~
markov3.l:408:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
408 | generate_article () {
| ^~~~~~~~~~~~~~~~
markov3.l: In function ‘generate_article’:
markov3.l:436:5: warning: ‘return’ with no value, in function returning non-void
436 | return;
| ^~~~~~
markov3.l:408:1: note: declared here
408 | generate_article () {
| ^~~~~~~~~~~~~~~~
markov3.l: At top level:
markov3.l:442:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
442 | my_strcmp (a, b)
| ^~~~~~~~~
markov3.l:451:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
451 | output_word (word)
| ^~~~~~~~~~~
markov3.l: In function ‘output_word’:
markov3.l:458:23: warning: ‘return’ with no value, in function returning non-void
458 | if (word == NULL) return;
| ^~~~~~
markov3.l:451:1: note: declared here
451 | output_word (word)
| ^~~~~~~~~~~
markov3.l:477:5: warning: ‘return’ with no value, in function returning non-void
477 | return;
| ^~~~~~
markov3.l:451:1: note: declared here
451 | output_word (word)
| ^~~~~~~~~~~
make: *** [: markov3.o] Error 1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.