1 /* ---------- */
2 /* najihelp.c */
3 /* ---------- */
4
5 /* najitool help */
6
7 /* this .c is a part of */
8 /* najitool version 0.8.4 */
9
10 /* from najitool version 0.2.0 and */
11 /* above najitool will use libnaji */
12 /* this version uses libnaji 0.6.4 */
13
14 /* both najitool and libnaji */
15 /* are public domain and are */
16 /* made by the same author */
17 /* please read license.txt */
18
19 /* made by NECDET COKYAZICI */
20
21
22 #include "najitool.h"
23
24
25 struct najihelp {
26
27 char *cmd;
28 char *info;
29 char *usage;
30 char *example;
31
32 };
33
34
35 struct najihelp helpitems[NAJITOOL_MAX_COMMANDS] = {
36
37
38 {
39 "8bit256",
40 "makes a file with the character values 0 to 255 from\n"
41 "start to finish the number of times you specify.",
42 "<output file> <amount of times>",
43 "ten.bin 10"
44 },
45
46 {
47 "addim",
48 "makes a multipliction square at the size you specify.",
49 "<square size>",
50 "12"
51 },
52
53 {
54 "addline",
55 "add new line with the specified text at the specified line position.",
56 "<input text file> <output file> <text> <line position>",
57 "main.c hello.c 'printf(\"Hello World\");' 10"
58 },
59
60 {
61 "allbmp16",
62 "Generates every single .bmp file ever possible to exist at\n"
63 "16 width, 16 height, and 16 color.",
64 "",
65 ""
66 },
67
68
69 {
70 "allfiles",
71 "generates every single file ever possible to exist\n"
72 "at a size you specify.",
73 "<size in bytes>",
74 "4"
75 },
76
77 {
78 "arab2eng",
79 "Arabic to English transliteration system. Makes English\n"
80 "letters out of Arabic letters. Download the transliteration\n"
81 "table from http://najitool.sf.net/ for details.",
82 "<input file> <output file>",
83 "arabi.txt eng.txt"
84 },
85
86 {
87 "asc2ebc",
88 "convert ASCII format files to EBCDIC format files.",
89 "<input file> <output file>",
90 "readme.txt readme.ebc"
91 },
92
93 {
94 "asctable",
95 "shows an ASCII table and the decimal, hexidecimal, and binary\n"
96 "values on each line of it from values 32 to 126.",
97 "",
98 ""
99 },
100
101 {
102 "ay",
103 "shows the current month in Turkish.",
104 "",
105 ""
106 },
107
108 {
109 "ayinkaci",
110 "shows the day of the current month.",
111 "",
112 ""
113 },
114
115 {
116 "bigascif",
117 "makes a file with big ASCII art text out of the word or\n"
118 "sentence you specify.",
119 "<text> <output file>",
120 "hello hello.txt"
121 },
122
123 {
124 "bigascii",
125 "shows big ASCII art version of the word or sentence you\n"
126 "specify to the screen.",
127 "<text>",
128 "hello"
129 },
130
131 {
132 "bytsplit",
133 "splits the file you specify into the size of pieces you specify in bytes.\n"
134 "The output file is the original filename with numbered extensions e.g.\n"
135 "example.big.0, example.big.1, example.big.2...\n"
136 "You can use mjoin to join the files.",
137 "<input file> <size of pieces in bytes>",
138 "example.big 1457664"
139 },
140
141
142 {
143 "bin2c",
144 "makes a compilable C programming language source code file\n"
145 "out of any file with the contents of the file in an array.",
146 "<input file> <output c file> <array name>",
147 "mypic.bmp mypic.c my_pic_array"
148 },
149
150 {
151 "bin2hexi",
152 "dumps the file you specify in hexidecimal to a new file.",
153 "<input file> <output file>",
154 "DigiTvOS.bin DigiTvOS.hex"
155 },
156
157
158 {
159 "bin2text",
160 "makes a copy of the file you specify with only the\n"
161 "text of the file skipping binary characters.",
162 "<input file> <output file>",
163 "file.bin file.txt"
164 },
165
166
167 {
168 "blanka",
169 "When a file is converted to blanka format, depending on the decimal value\n"
170 "of an ASCII char it makes that many spaces, e.g. 65 spaces for the letter A,\n"
171 "then it makes a newline to seperate the next char, which could be B, so it\n"
172 "makes 66 spaces, etc. Use unblanka to convert back to original, it can still\n"
173 "change the file back to its original form if the blanka format file is edited\n"
174 "without adding anymore spaces or newlines and only other characters.\n"
175 "Useful for hidden messages.",
176 "<input file> <output file>",
177 "myfile.txt secret.txt"
178 },
179
180
181
182 {
183 "bremline",
184 "makes a copy of a file removing lines\n"
185 "beginning with a certain word or sentence.",
186 "<text> <input file> <output file>",
187 "# prog.c prog2.c"
188 },
189
190 {
191 "bugun",
192 "shows what the day is today in Turkish.",
193 "",
194 ""
195 },
196
197 {
198 "calc",
199 "a calculator.",
200 "",
201 ""
202 },
203
204 {
205 "cat_head",
206 "shows the number of first lines in the file you specify.",
207 "<input file> <number of first lines>",
208 "readme.txt 6"
209 },
210
211 {
212 "cat_tail",
213 "shows the number of last lines in the file you specify.",
214 "<input file> <number of last lines>",
215 "readme.txt 5"
216 },
217
218 {
219 "cat_text",
220 "Shows only the text of a file to screen skiping binary\n"
221 "characters. Accepts input from stdin (standard input).",
222 "\nnajitool cat_text <input file>",
223 "\nnajitool cat_text a.out"
224 },
225
226 {
227 "catrandl",
228 "shows a random line of a text file.",
229 "<line>",
230 "foodlist.txt"
231 },
232
233 {
234 "ccompare",
235 "compares two files and still continues when differences are encountered.",
236 "<input file 1> <input file 2>",
237 "a.out a.bin"
238 },
239
240 {
241 "cfind",
242 "search each line for text and echo it,\n"
243 "displays how many lines contained the text.",
244 "<input file> <text>",
245 "file.txt Hello"
246 },
247
248 {
249 "cfindi",
250 "search each line for text and echo it (case insensitive),\n"
251 "displays how many lines contained the text.",
252 "<input file> <text>",
253 "file.txt hello"
254 },
255
256 {
257 "charaftr",
258 "makes a copy of the file with the specified character after each byte.",
259 "<input file> <output file> <character>",
260 "data.txt newdata.txt \" \""
261 },
262
263 {
264 "charbefr",
265 "makes a copy of the file with the specified character before each byte.",
266 "<input file> <output file> <character>",
267 "data.txt newdata.txt x"
268 },
269
270 {
271 "charfile",
272 "makes a file containing a single character you specify the\n"
273 "amount of times you specify.",
274 "<output file> <size in bytes> <character>",
275 "aaa.txt 1000 a"
276 },
277
278
279 {
280 "charsort",
281 "Makes a copy of a file sorting all the characters in ascending binary order.",
282 "<input file> <output file>",
283 "example.bin sorted.bin"
284 },
285
286
287 {
288 "charwrap",
289 "wraps characters to the specified width.",
290 "<input file> <output file> <width to wrap>",
291 "a.out a.70 70"
292 },
293
294 {
295 "chchar",
296 "changes the specified character in a file to a new character.",
297 "<input file> <output file> <orginal char> <changed char>",
298 "readme.txt readmeo.txt 0 O"
299 },
300
301 {
302 "chchars",
303 "changes the specified characters in a file to new characters.",
304 "<input file> <outputfile> <old chars list> <new chars list>",
305 "readme.txt funny.txt \"abc\" \"@8<\""
306 },
307
308 {
309 "chstr",
310 "changes the specified string in a text file to a new string.",
311 "<input file> <output file> <original string> <changed string>",
312 "input.txt output.txt string new_string"
313 },
314
315 {
316 "coffset",
317 "shows the characters in a file from the offset (start and end)\n"
318 "you specify to the screen.",
319 "<input file> <start range> <end range>",
320 "a.out 30 213"
321 },
322
323 {
324 "compare",
325 "compares two files.",
326 "<input file 1> <input file 2>",
327 "hi.txt hello.txt"
328 },
329
330 {
331 "copyfile",
332 "copies a file.",
333 "<input file> <output file>",
334 "license.txt lbackup.txt"
335 },
336
337 {
338 "copyoffs",
339 "copies the characters in a file from the offset (start and end)\n"
340 "you specify to a new file.",
341 "<input file> <start range> <end range> <output file>",
342 "a.out 10 345 a.bin"
343 },
344
345 {
346 "copyself",
347 "copies the najitool program to a new name.",
348 "<output file>",
349 "naji2"
350 },
351
352 {
353 "cpfroml",
354 "Makes a copy of a text file copying only from the specified line number.\n"
355 "This is useful if you get an error importing a large MySQL .sql file and\n"
356 "it stops with and error giving you the line number the error occured, you\n"
357 "can use this to make a copy of the .sql file to continue from the error.",
358 "<from line number> <input file> <output file>",
359 "1032 database.sql dbconerr.sql"
360 },
361
362 {
363 "cptiline",
364 "Makes a copy of a text file copying only up to the specified line number.",
365 "<until line number> <input file> <output file>",
366 "10 readme.txt read10l.txt"
367 },
368
369 {
370 "credits",
371 "shows the names and details of najitool and\n"
372 "libnaji contributors and their original author.",
373 "",
374 ""
375 },
376
377 {
378 "database",
379 "makes a text file with a list of people and their details.",
380 "",
381 ""
382 },
383
384 {
385 "datetime",
386 "shows the current date and time.",
387 "",
388 ""
389 },
390
391 {
392 "dayofmon",
393 "shows the day of the current month.",
394 "",
395 ""
396 },
397
398 {
399 "dos2unix",
400 "converts DOS/Windows text files to UNIX format.",
401 "<input file> <output file>",
402 "hello.txt HELLO"
403 },
404
405 {
406 "downlist",
407 "Makes a HTML file from a text file with a list of files to download.",
408 "<input file> <output file>",
409 "download.txt download.htm"
410 },
411
412 {
413 "dumpoffs",
414 "shows the hexidecimal values of characters in a file\n"
415 "from the offset (start and end) you specify to the screen.",
416 "<input file> <start range> <end range>",
417 "a.out 30 213"
418 },
419
420 {
421 "e2ahtml",
422 "English to Arabic transliteration system. Makes Arabic\n"
423 "letters out of English letters. This version does that with\n"
424 "a plain text file to a HTML file. Download the transliteration\n"
425 "table from http://najitool.sf.net/ for details.",
426 "<input file> <output file>",
427 "enleters.txt arabic.htm"
428 },
429
430 {
431 "ebc2asc",
432 "convert EBCDIC format files to ASCII format files.",
433 "<input file> <output file>",
434 "readme.ebc readme.txt"
435 },
436
437 {
438 "eng2arab",
439 "English to Arabic transliteration system. Makes Arabic\n"
440 "letters out of English letters. Download the transliteration\n"
441 "table from http://najitool.sf.net/ for details.",
442 "<input file> <output file>",
443 "english.txt arabiyya.txt"
444 },
445
446 {
447 "engnum",
448 "a list of numbers in English words from 1 to 9999.",
449 "",
450 ""
451 },
452
453 {
454 "eremline",
455 "makes a copy of a file removing lines\n"
456 "ending with a certain word or sentence.",
457 "<text> <input file> <output file>",
458 "\"*/\" prog2.c prog3.c"
459 },
460
461 {
462 "f2lower",
463 "makes a copy of a file with all the\n"
464 "capital letters turned into small letters.",
465 "<input file> <output file>",
466 "capitals.txt small.txt"
467 },
468
469 {
470 "f2upper",
471 "makes a copy of a file with all the\n"
472 "small letters turned into capital letters.",
473 "<input file> <output file>",
474 "small.txt big.txt"
475 },
476
477 {
478 "filbreed",
479 "breeds two files i.e. the first byte of the first file\n"
480 "then the first byte of the second file are added to the\n"
481 "new file and the following bytes one file after another.",
482 "<input file 1> <input file 2> <output file>",
483 "in.txt in2.txt out.txt"
484 },
485
486 {
487 "file2bin",
488 "makes a file into a stream of 1 and 0 binary numbers.",
489 "<input file> <output file>",
490 "readme.txt binary.txt"
491 },
492
493 {
494 "file2dec",
495 "makes a file into a stream of decimal numbers.",
496 "<input file> <output file>",
497 "readme.txt decimal.txt"
498 },
499
500 {
501 "file2hex",
502 "makes a file into a stream of hexidecimal values.",
503 "<input file> <output file>",
504 "readme.txt hex.txt"
505 },
506
507 {
508 "filechop",
509 "splits a file into two new files at the offset you specify.",
510 "<offset> <input file> <output file 1> <output file 2>",
511 "2000000000 hello.vob hello1.vob hello2.vob"
512 },
513
514 {
515 "filejoin",
516 "joins two files into a new file.",
517 "<input file 1> <input file 2> <output file>",
518 "hello1.vob hello2.vob hello.vob"
519 },
520
521 {
522 "fillfile",
523 "changes every character in a file to the character you specify.",
524 "<output file> <character>",
525 "hello.txt x"
526 },
527
528 {
529 "find",
530 "search each line for text and echo it.",
531 "<input file> <text>",
532 "file.txt Hello"
533 },
534
535 {
536 "findi",
537 "search each line for text and echo it (case insensitive).",
538 "<input file> <text>",
539 "file.txt hello"
540 },
541
542 {
543 "flipcopy",
544 "\ncopies while flipping the bits of each byte, for example\n"
545 "11110000 becomes\n"
546 "00001111\n"
547 "and\n"
548 "01010101 becomes\n"
549 "10101010 etc",
550 "<input file> <output file>",
551 "hi.txt hifliped.txt"
552 },
553
554 {
555 "freverse",
556 "makes a reversed copy of the file, the start of\n"
557 "the file becomes the end of the file and vice versa.",
558 "<input file> <output file>",
559 "readme.txt emdear.txt"
560 },
561
562 {
563 "fswpcase",
564 "makes a copy of a file with the case of letters swapped, i.e.\n"
565 "if it's capital letters, they become small letters and vice versa.",
566 "<input file> <output file>",
567 "ReadMe.txt rEAD_mE.txt"
568 },
569
570 {
571 "ftothe",
572 "makes a copy of a file adding the text \" to the\"\n"
573 "after every character except the last character.",
574 "<input file> <output file>",
575 "readme.txt readtoda.txt"
576 },
577
578 {
579 "gbsplit",
580 "splits the file you specify into the size of pieces you specify in gigabytes.\n"
581 "The output file is the original filename with numbered extensions e.g.\n"
582 "example.big.0, example.big.1, example.big.2...\n"
583 "You can use mjoin to join the files.",
584 "<input file> <size of pieces in gb>",
585 "example.big 4"
586 },
587
588 {
589 "genhelp",
590 "generates the najitool help file.",
591 "",
592 ""
593 },
594
595 {
596 "genlic",
597 "generates the najitool and libnaji license.",
598 "",
599 ""
600 },
601
602 {
603 "getlinks",
604 "saves only the links in a HTML file to a text file.",
605 "<input file> <output file>",
606 "yo.htm yo_links.txt"
607 },
608
609 {
610 "gdivide",
611 "Calculates a list of division from start to end value.\n",
612 "<start number> <end number>",
613 "1 12"
614 },
615
616 {
617 "gigabyte",
618 "Calculates the number of bytes, kilobytes, and megabytes for the specified\n"
619 "gigabytes.",
620 "<gigabytes>",
621 "1"
622 },
623
624 {
625 "gminus",
626 "Calculates a list of subtractions from start to end value.\n",
627 "<start number> <end number>",
628 "1 12"
629 },
630
631 {
632 "gplus",
633 "Calculates a list of addition from start to end value.\n",
634 "<start number> <end number>",
635 "1 12"
636 },
637
638
639 {
640 "gtimes",
641 "Calculates a list of multiplication from start to end value.\n",
642 "<start number> <end number>",
643 "1 12"
644 },
645
646
647 {
648 "help",
649 "Help for najitool. Shows a list of najitool commands,\n"
650 "shows a list of help catagories, gives detailed\n"
651 "information on a particular najitool command.",
652 "\nnajitool help <catagory>\nnajitool help <command>",
653 "\nnajitool help commands\nnajitool help bin2c"
654 },
655
656 {
657 "hexicat",
658 "dumps the file you specify in hexidecimal to screen with the\n"
659 "displayable text characters on the right.",
660 "<input file>",
661 "a.out"
662 },
663
664 {
665 "hilist",
666 "Makes a HTML file from a text with a list of image names, showing\n"
667 "the images when the HTML file is opened in a web browser.",
668 "<input file> <output file>",
669 "pic_list.txt gallery.htm"
670 },
671
672 {
673 "hmaker",
674 "makes function prototypes of a .c and shows to the screen.",
675 "<input file>",
676 "mycode.c"
677 },
678
679 {
680 "hmakerf",
681 "makes a .h file with the function prototypes of a .c file.",
682 "<input file> <output file>",
683 "mycode.c mycode.h"
684 },
685
686 {
687 "howline",
688 "counts how many lines there are in a text file\n"
689 "and and displays the number to the screen.",
690 "<input text file>",
691 "lafterl.txt"
692 },
693
694 {
695 "html_db",
696 "makes a HTML file with a list of people and their details.",
697 "",
698 ""
699 },
700
701 {
702 "html2txt",
703 "makes a text file out of a HTML file.",
704 "<input file> <output file>",
705 "homepage.htm homepage.txt"
706 },
707
708 {
709 "htmlfast",
710 "makes a HTML file out of a text file preserving the spaces.",
711 "<input file> <output file>",
712 "asciiart.txt asciiart.html"
713 },
714
715 {
716 "htmlhelp",
717 "generates the najitool help in HTML format.",
718 "",
719 ""
720 },
721
722 {
723 "istrael",
724 "inserts string at every line at the specified position.",
725 "<text string> <position> <input file> <output file>",
726 "hello 0 todo.txt hitodo.txt"
727 },
728
729 {
730 "istreml",
731 "inserts string at every empty line.",
732 "<text string> <input file> <output file>",
733 "hello todo.txt hitodo.txt"
734 },
735
736 {
737 "kbsplit",
738 "splits the file you specify into the size of pieces you specify in kilobytes.\n"
739 "The output file is the original filename with numbered extensions e.g.\n"
740 "example.big.0, example.big.1, example.big.2...\n"
741 "You can use mjoin to join the files.",
742 "<input file> <size of pieces in kb>",
743 "example.big 98078"
744 },
745
746
747 {
748 "kitten",
749 "Shows the contents of a file to the screen.\n"
750 "Accepts input from stdin (standard input).",
751 "\nnajitool kitten <input file>",
752 "\nnajitool kitten readme.txt"
753 },
754
755 {
756 "lcharvar",
757 "shows every single combination variation of a sentence or word\n"
758 "starting from the left to the screen.",
759 "<text>",
760 "\"hello world\""
761 },
762
763
764 {
765 "lcvfiles",
766 "makes files with every single combination variation of the specified input file\n"
767 "starting from the beginning of the specified file. The outputed files will have\n"
768 "an lcv-number prefix in their filenames.",
769 "<input file>",
770 "charsort_ed_file.bin"
771 },
772
773
774 {
775 "leetfile",
776 "converts a normal text file into a \"hacker language\" text file.",
777 "<input file> <output file>",
778 "readme.txt w00t.txt"
779 },
780
781 {
782 "leetstr",
783 "shows a \"hacker language\" version of a sentence or word you give it.",
784 "<text>",
785 "\"hello how are you doing today?\""
786 },
787
788 {
789 "length",
790 "convert between the most popular length formats:\n"
791 "mm, cm, inches, meters, feet, yards, km, miles.",
792 "",
793 ""
794 },
795
796 {
797 "lensortl",
798 "sort lines in a text file by length, longest first.",
799 "<input file> <output file>",
800 "file1.txt file2.txt"
801 },
802
803 {
804 "lensorts",
805 "sort lines in a text file by length, shortest first.",
806 "<input file> <output file>",
807 "file2.txt file3.txt"
808 },
809
810 {
811 "license",
812 "shows the najitool and libnaji license to the screen.",
813 "",
814 ""
815 },
816
817 {
818 "linesnip",
819 "make a copy of a file with the amount of characters\n"
820 "you specify to be removed from the front of each line.",
821 "<amount of chars> <input file> <output file>",
822 "4 numbered.c filtered.c"
823 },
824
825 {
826 "lineback",
827 "displays lines in a text file backwards,\n"
828 "starting from the last line to the first line",
829 "<input text file>",
830 "dramatic.txt"
831 },
832
833 {
834 "listdigt",
835 "makes a text file with every possible combinations\n"
836 "of characters from 0 to 9 (numbers) one line after another at\n"
837 "the length you specify.",
838 "<length> <output file>",
839 "6 0-9_6.txt"
840 },
841
842 {
843 "listlowr",
844 "makes a text file with every possible combinations\n"
845 "of characters from a to z (small letters) one line after another at\n"
846 "the length you specify.",
847 "<length> <output file>",
848 "6 a-z_6.txt"
849 },
850
851
852 {
853 "listprnt",
854 "makes a text file with every possible combinations\n"
855 "of printable characters from ! to ~ (ASCII values 33 to 126) one line after another at\n"
856 "the length you specify.",
857 "<length> <output file>",
858 "6 all_6.txt"
859 },
860
861
862 {
863 "listuppr",
864 "makes a text file with every possible combinations\n"
865 "of characters from A to Z (capital letters) one line after another at\n"
866 "the length you specify.",
867 "<length> <output file>",
868 "6 A-Z_6.txt"
869 },
870
871 {
872 "longline",
873 "finds the longest line in a text file\n"
874 "and displays the number to the screen",
875 "<input text file>",
876 "lafterl.txt"
877 },
878
879 {
880 "makarray",
881 "makes a char *[] array out of a text file\n"
882 "with each item on a new line.",
883 "<input file> <output file> <array name>",
884 "zoolist.txt zoo.c zoo_animals"
885 },
886
887 {
888 "mathgame",
889 "a fun and educational math game.",
890 "",
891 ""
892 },
893
894 {
895 "mbsplit",
896 "splits the file you specify into the size of pieces you specify in megabytes.\n"
897 "The output file is the original filename with numbered extensions e.g.\n"
898 "example.big.0, example.big.1, example.big.2...\n"
899 "You can use mjoin to join the files.",
900 "<input file> <size of pieces in mb>",
901 "example.big 4481"
902 },
903
904
905 {
906 "mergline",
907 "merges the lines of two files into a new file and lets you\n"
908 "specify text that comes at the beginning and end of each line.",
909 "<in file 1> <in file 2> <out file> <text start> <text end>",
910 "namlower.txt namupper.txt rename.sh \"mv -i \" \"\""
911 },
912
913
914 {
915 "mjoin",
916 "joins files split with bytsplit, kbsplit, mbsplit, or gbsplit.\n"
917 "specify the filename without the numbered extensions e.g.\n"
918 "if the files are example.big.0, example.big.1 example.big.2 then\n"
919 "you specify example.big as the original filename and they will be\n"
920 "joined automatically to the new output filename.",
921 "<original filename> <new output filename>",
922 "example.big joined_example.big"
923 },
924
925 {
926 "mkpatch",
927 "makes a patch file to be used with qpatch out of differences\n"
928 "between two files of the same size.",
929 "<input file 1> <input file 2> <output file>",
930 "cool.exe cool2.exe cool.nqp"
931 },
932
933 {
934 "month",
935 "shows the current month.",
936 "",
937 ""
938 },
939
940 {
941 "mp3split",
942 "split CBR (Constant Bit Rate) MP3 file\n"
943 "from <start> to <end> in seconds range.",
944 "<start> <end> <input file> <output file>",
945 "1 100 test.mp3 test2.mp3"
946 },
947
948 {
949 "mp3taged",
950 "edit MP3 tag information, only ID3v1 tags supported in this version.",
951 "{<tag> <string>}..\n"
952 "\nTag (ID3v1 only supported):\n"
953 "\ttitle\t\t\t- specify song title\n"
954 "\tartist\t\t\t- specify artist\n"
955 "\talbum\t\t\t- specify album\n"
956 "\tyear\t\t\t- specify year\n"
957 "\tcomment\t\t\t- specify comment\n"
958 "\ttrack\t\t\t- specify track number\n",
959 "artist hello test.mp3"
960 },
961
962 {
963 "mp3tagnf",
964 "shows MP3 tag information.",
965 "<input file>",
966 "lecture.mp3"
967 },
968
969 {
970 "n2ch",
971 "converts new lines of UNIX and DOS/Windows text files to specified character.",
972 "<character> <input file> <output file>",
973 "\";\" dirlist.txt path.txt"
974 },
975
976 {
977 "n2str",
978 "converts new lines of UNIX and DOS/Windows text files to specified string.",
979 "<string> <input file> <output file>",
980 "\"-->\" dirlist.txt dirlead.txt"
981 },
982
983
984 {
985 "najcrypt",
986 "naji interactive encryption/decryption function.",
987 "",
988 ""
989 },
990
991 {
992 "naji_bmp",
993 "generates lots of predefined .BMP file images.",
994 "",
995 ""
996 },
997
998 {
999 "najirle",
1000 "naji RLE (Run-Lengh Encoding) compression on a single file.\n"
1001 "Works best with files with a lot of repeated characters, such as wave files.",
1002 "<input file> <output file>",
1003 "uncomped.wav uncomped.nar"
1004 },
1005
1006 {
1007 "najisum",
1008 "naji checksum function.",
1009 "<input file>",
1010 "checksum.txt"
1011 },
1012
1013 {
1014 "numlines",
1015 "add numbers to the beginning of every line.",
1016 "<input file> <output file>",
1017 "list.txt numlist.txt"
1018 },
1019
1020 {
1021 "onlalnum",
1022 "makes a copy of a file copying only letters and numbers.",
1023 "<input file> <output file>",
1024 "a.out filtered.bin"
1025 },
1026
1027 {
1028 "onlalpha",
1029 "makes a copy of a file copying only letters.",
1030 "<input file> <output file>",
1031 "a.out filtered.bin"
1032 },
1033
1034 {
1035 "onlcntrl",
1036 "makes a copy of a file copying only control characters.",
1037 "<input file> <output file>",
1038 "a.out filtered.bin"
1039 },
1040
1041 {
1042 "onldigit",
1043 "makes a copy of a file copying only numbers.",
1044 "<input file> <output file>",
1045 "a.out filtered.bin"
1046 },
1047
1048 {
1049 "onlgraph",
1050 "makes a copy of a file copying only visible\n"
1051 "printing characters, spaces are not included.",
1052 "<input file> <output file>",
1053 "a.out filtered.bin"
1054 },
1055
1056 {
1057 "onllower",
1058 "makes a copy of a file copying only lower case letters.",
1059 "<input file> <output file>",
1060 "a.out filtered.bin"
1061 },
1062
1063 {
1064 "onlprint",
1065 "makes a copy of a file copying only printing\n"
1066 "characters, which includes the space character.",
1067 "<input file> <output file>",
1068 "a.out filtered.bin"
1069 },
1070
1071 {
1072 "onlpunct",
1073 "makes a copy of a file copying only punctuation.",
1074 "<input file> <output file>",
1075 "a.out filtered.bin"
1076 },
1077
1078 {
1079 "onlspace",
1080 "makes a copy of a file copying only whitespace, that is,\n"
1081 "carriage return, newline, form feed, tab, vertical tab, or space.",
1082 "<input file> <output file>",
1083 "a.out filtered.bin"
1084 },
1085
1086 {
1087 "onlupper",
1088 "makes a copy of a file copying only upper case letters.",
1089 "<input file> <output file>",
1090 "a.out filtered.bin"
1091 },
1092
1093 {
1094 "onlxdigt",
1095 "makes a copy of a file copying only\n"
1096 "hexadecimal digits, this includes 0-9 a-f A-F.",
1097 "<input file> <output file>",
1098 "a.out filtered.bin"
1099 },
1100
1101 {
1102 "onlycat",
1103 "shows the contents of the file you specify\n"
1104 "using only the characters you specify.",
1105 "<input file> <text>",
1106 "readme.txt \"abc\""
1107 },
1108
1109 {
1110 "onlychar",
1111 "makes a copy of the file you specify using only\n"
1112 "the characters you specify.",
1113 "<input file> <output file> <characters>",
1114 "readme.txt abc.txt \"abc\""
1115 },
1116
1117 {
1118 "patch",
1119 "manually patch a file in an interactive text based interface.",
1120 "<output file>",
1121 "cool2.exe"
1122 },
1123
1124 {
1125 "printftx",
1126 "makes a copy of a text file into a .c file as printf statements.",
1127 "<input file> <output file>",
1128 "shortdoc.txt shortdoc.c"
1129 },
1130
1131 {
1132 "putlines",
1133 "makes a copy of the file you specify with text you specify for\n"
1134 "the beginning and end of each line.",
1135 "<input file> <output file> <start line text> <end line text>",
1136 "input.txt output.txt \"hello\" \"world\""
1137 },
1138
1139 {
1140 "qcrypt",
1141 "encrypts or decrypts a file to a new file, this does both\n"
1142 "encryption and decryption.",
1143 "<input file> <output file>",
1144 "secret.txt what.txt"
1145 },
1146
1147 {
1148 "qpatch",
1149 "\npatches a file from a patch file, it must be in format:\n"
1150 "offset\n"
1151 "value\n"
1152 "offset\n"
1153 "value\n"
1154 "etc.\n"
1155 "in plain ASCII numbers, offset being the place in the file you want\n"
1156 "to patch and value being the new value (a value between 0-255).",
1157 "<output file> <input patch file>",
1158 "cool.exe cool.nqp"
1159 },
1160
1161 {
1162 "randkill",
1163 "changes every character in a file to a random character\n"
1164 "and then deletes it, this is good for secure deletion.",
1165 "<file to delete>",
1166 "secret.txt"
1167 },
1168
1169 {
1170 "rbcafter",
1171 "makes a copy of the file with a random\n"
1172 "binary character after each line.",
1173 "<input file> <output file>",
1174 "picture.raw newpic.raw"
1175 },
1176
1177 {
1178 "rbcbefor",
1179 "makes a copy of the file with a random\n"
1180 "binary character before each line.",
1181 "<input file> <output file>",
1182 "picture.raw newpic.raw"
1183 },
1184
1185 {
1186 "rcharvar",
1187 "shows every single combination variation of a sentence or word\n"
1188 "starting from the right to the screen.",
1189 "<text>",
1190 "\"hello world\""
1191 },
1192
1193 {
1194 "rcvfiles",
1195 "makes files with every single combination variation of the specified input file\n"
1196 "starting from the end of the specified file. The outputed files will have\n"
1197 "an rcv-number prefix in their filenames.",
1198 "<input file>",
1199 "charsort_ed_file.bin"
1200 },
1201
1202 {
1203 "remline",
1204 "makes a copy of a file removing lines\n"
1205 "containing a certain word or sentence.",
1206 "<text to remove> <input file> <output file>",
1207 "\"badword\" bad.txt clean.txt"
1208 },
1209
1210 {
1211 "removel",
1212 "remove the specified line and all its line contents.",
1213 "<input text file> <output file> <line number>",
1214 "todo.txt done.txt 10"
1215 },
1216
1217 {
1218 "repcat",
1219 "repeats each character in a file the\n"
1220 "number of times you specify to the screen.",
1221 "<input file> <number of repeats>",
1222 "hmm.txt 3"
1223 },
1224
1225 {
1226 "repcatpp",
1227 "give it a start value and it repeats each character in a\n"
1228 "file then repeats the next character in the file more amount\n"
1229 "of times than the previous character to the screen.",
1230 "<input file> <start number of repeats>",
1231 "hmmmmmmm.txt 3"
1232 },
1233
1234 {
1235 "repchar",
1236 "repeats each character in the file you specify the\n"
1237 "number of times you specify to a new file.",
1238 "<input file> <output file> <number of repeats>",
1239 "hello.wav helloslow.wav 1"
1240 },
1241
1242 {
1243 "repcharp",
1244 "give it a start value and it repeats each character in a\n"
1245 "file then repeats the next character in the file more amount\n"
1246 "of times than the previous character to a new file.",
1247 "<input file> <output file> <start number of repeats>",
1248 "hi.wav hislower.wav 1"
1249 },
1250
1251 {
1252 "replacel",
1253 "replaces specified line contents with the specified text.",
1254 "<input text file> <output file> <new line text> <line number>",
1255 "version1.txt version2.txt \"version v2\" 10"
1256 },
1257
1258 {
1259 "revcat",
1260 "shows a file reversed to the screen.",
1261 "<input file>",
1262 "reverse.txt"
1263 },
1264
1265 {
1266 "revlines",
1267 "reverses every line the file you specify to a new file.",
1268 "<input file> <output file>",
1269 "input.txt output.txt"
1270 },
1271
1272 {
1273 "rmunihtm",
1274 "deletes the files that unihtml generates.",
1275 "",
1276 ""
1277 },
1278
1279 {
1280 "rndbsout",
1281 "puts random characters from value 0 to 255 to the standard output\n"
1282 "(usually the screen) at the size you specify.",
1283 "<size>",
1284 "100"
1285 },
1286
1287
1288 {
1289 "rndffill",
1290 "changes every character in a file to a random character.",
1291 "<edit file>",
1292 "todelete.txt"
1293 },
1294
1295 {
1296 "rndlines",
1297 "randomizes/shuffles every line in a text file and displays it to the screen",
1298 "<input text file>",
1299 "tipofday.txt"
1300 },
1301
1302 {
1303 "rndtsout",
1304 "puts random text characters to the standard output\n"
1305 "(usually the screen) at the size you specify.",
1306 "<size>",
1307 "64"
1308 },
1309
1310 {
1311 "rndbfile",
1312 "generates a file with random characters from value 0 to 255\n"
1313 "at the size you specify.",
1314 "<output file> <size>",
1315 "random.bin 5435346"
1316 },
1317
1318 {
1319 "rndtfile",
1320 "generates a file with random text characters at the size you specify.\n"
1321 "Useful for generating secure random passwords.",
1322 "<output file> <size>",
1323 "random.txt 5435346"
1324 },
1325
1326 {
1327 "rrrchars",
1328 "random range repeat characters.",
1329 "<input file> <output file> <min number> <max number>",
1330 "test.wav test2.wav 1 10"
1331 },
1332
1333 {
1334 "rstrach",
1335 "makes a copy of a file with random text at\n"
1336 "the size you specify after each character.",
1337 "<size> <input file> <output file>",
1338 "10 test.bin ra10test.bin"
1339 },
1340
1341 {
1342 "rstrbch",
1343 "makes a copy of a file with random text at\n"
1344 "the size you specify before each character.",
1345 "<size> <input file> <output file>",
1346 "10 test.bin rb10test.bin"
1347 },
1348
1349 {
1350 "rtcafter",
1351 "makes a copy of the file with a random text character after each line.",
1352 "<input file> <output file>",
1353 "data.txt newdata.txt"
1354 },
1355
1356 {
1357 "rtcbefor",
1358 "makes a copy of the file with a random text character before each line.",
1359 "<input file> <output file>",
1360 "data.txt newdata.txt"
1361 },
1362
1363 {
1364 "saat",
1365 "shows the time.",
1366 "",
1367 ""
1368 },
1369
1370 {
1371 "saatarih",
1372 "shows the current date and time in Turkish.",
1373 "",
1374 ""
1375 },
1376
1377 {
1378 "showline",
1379 "shows the contents of a line you specify.",
1380 "<input file> <line number>",
1381 "readme.txt 3"
1382 },
1383
1384 {
1385 "skipcat",
1386 "shows the contents of a file to the screen skipping\n"
1387 "the characters you specify. Useful for seeing how\n"
1388 "a file would look without certain characters",
1389 "<input file> <characters to skip>",
1390 "readme.txt \"#$&*\""
1391 },
1392
1393 {
1394 "skipchar",
1395 "makes a copy of the file you specify skipping\n"
1396 "the characters you specify.",
1397 "<input file> <output file> <chars to skip>",
1398 "readme.txt readme2.txt \"#$&*\""
1399 },
1400
1401 {
1402 "skipstr",
1403 "makes a copy of a file skipping the specified string.",
1404 "<input file> <output file> <text to skip>",
1405 "input.txt output.txt \"badword\""
1406 },
1407
1408 {
1409 "skpalnum",
1410 "makes a copy of a file skipping letters and numbers.",
1411 "<input file> <output file>",
1412 "a.out filtered.bin"
1413 },
1414
1415 {
1416 "skpalpha",
1417 "makes a copy of a file skipping letters.",
1418 "<input file> <output file>",
1419 "a.out filtered.bin"
1420 },
1421
1422 {
1423 "skpcntrl",
1424 "makes a copy of a file skipping control characters.",
1425 "<input file> <output file>",
1426 "a.out filtered.bin"
1427 },
1428
1429 {
1430 "skpdigit",
1431 "makes a copy of a file skipping numbers.",
1432 "<input file> <output file>",
1433 "a.out filtered.bin"
1434 },
1435
1436 {
1437 "skpgraph",
1438 "makes a copy of a file skipping visible\n"
1439 "printing characters, spaces are not included.",
1440 "<input file> <output file>",
1441 "a.out filtered.bin"
1442 },
1443
1444 {
1445 "skplower",
1446 "makes a copy of a file skipping lower case letters.",
1447 "<input file> <output file>",
1448 "a.out filtered.bin"
1449 },
1450
1451 {
1452 "skpprint",
1453 "makes a copy of a file skipping printing\n"
1454 "characters, which includes the space character.",
1455 "<input file> <output file>",
1456 "a.out filtered.bin"
1457 },
1458
1459 {
1460 "skppunct",
1461 "makes a copy of a file skipping punctuation.",
1462 "<input file> <output file>",
1463 "a.out filtered.bin"
1464 },
1465
1466 {
1467 "skpspace",
1468 "makes a copy of a file skipping whitespace, that is, carriage\n"
1469 "return, newline, form feed, tab, vertical tab, or space.",
1470 "<input file> <output file>",
1471 "a.out filtered.bin"
1472 },
1473
1474 {
1475 "skpupper",
1476 "makes a copy of a file skipping upper case letters.",
1477 "<input file> <output file>",
1478 "a.out filtered.bin"
1479 },
1480
1481 {
1482 "skpxdigt",
1483 "makes a copy of a file skipping\n"
1484 "hexadecimal digits, this includes 0-9 a-f A-F.",
1485 "<input file> <output file>",
1486 "a.out filtered.bin"
1487 },
1488
1489 {
1490 "sort",
1491 "sorts a text file ordering each line according to ASCII value.",
1492 "<input text file>",
1493 "unsorted.txt > sorted.txt"
1494 },
1495
1496 {
1497 "sortlast",
1498 "sorts a text file ordering each line according to ASCII value - backwards.",
1499 "<input text file>",
1500 "unsorted.txt > sorted.txt"
1501 },
1502
1503 {
1504 "sp2ce2sp",
1505 "changes spaces to the specified character,\n"
1506 "changes everything else to space character.",
1507 "<character> <input file> <output file>",
1508 "X todo.txt xoxo.txt"
1509 },
1510
1511 {
1512 "sp2re2sp",
1513 "changes spaces to a random text character,\n"
1514 "changes everything else to space character.",
1515 "<input file> <output file>",
1516 "todo.txt roro.txt"
1517 },
1518
1519 {
1520 "spyramid",
1521 "Makes a pyramid out of the specified string (text).\n"
1522 "That is to say, give it the text hello and it makes\n"
1523 "something like:\n"
1524 "n\n"
1525 "ne\n"
1526 "new\n"
1527 "ne\n"
1528 "n",
1529 "<text>",
1530 "hello"
1531 },
1532
1533 {
1534 "strachar",
1535 "makes a copy of a file with the specified text after each character.",
1536 "<text> <input file> <output file>",
1537 "\" HELLO \" test.txt hitest.txt"
1538 },
1539
1540 {
1541 "strbchar",
1542 "makes a copy of a file with the specified text before each character.",
1543 "<text> <input file> <output file>",
1544 "\" HELLO \" test.txt hitest.txt"
1545 },
1546
1547 {
1548 "strbline",
1549 "puts a word or sentence on the beginning of every line.",
1550 "<input file> <output file> <text>",
1551 "hi.txt new_hi.txt \"hello start\""
1552 },
1553
1554 {
1555 "streline",
1556 "puts a word or sentence on the end of every line.",
1557 "<input file> <output file> <text>",
1558 "hi.txt new_hi.txt \"hello end\""
1559 },
1560
1561 {
1562 "strfile",
1563 "makes a file out of a string (word or sentence) and repeats the\n"
1564 "string in the file that is made the number of times you specify.",
1565 "<output file> <number of reps> <text>",
1566 "what.txt 11 \"what is this?\""
1567 },
1568
1569 {
1570 "swapfeb",
1571 "swaps every other byte of two files",
1572 "<input file 1> <input file 2> <output file>",
1573 "in.txt in2.txt out.txt"
1574 },
1575
1576 {
1577 "systemdt",
1578 "shows the current date and time (asctime format).",
1579 "",
1580 ""
1581 },
1582
1583 {
1584 "tabspace",
1585 "converts tabs to spaces with the number of spaces for\n"
1586 "a tab you specify.",
1587 "<size of spaces> <input file> <output file>",
1588 "4 hello.txt hi_notab.txt"
1589 },
1590
1591 {
1592 "telltime",
1593 "shows the time.",
1594 "",
1595 ""
1596 },
1597
1598 {
1599 "today",
1600 "shows what day it is today.",
1601 "",
1602 ""
1603 },
1604
1605 {
1606 "tothe",
1607 "Adds the text \" to the\" after every character\n"
1608 "except the last character and displays it to the screen.",
1609 "<text>",
1610 "NAJI"
1611 },
1612
1613 {
1614 "ttt",
1615 "A fun Tic-Tac-Toe game with clever AI.\n"
1616 "This game is also called Norts and Crosses in the UK.",
1617 "",
1618 ""
1619 },
1620
1621 {
1622 "turnum",
1623 "a list of numbers in Turkish words from 1 to 9999.",
1624 "",
1625 ""
1626 },
1627
1628 {
1629 "txt2html",
1630 "makes a HTML file out of a text file.",
1631 "<input file> <output file>",
1632 "readme.txt readme.htm"
1633 },
1634
1635 {
1636 "unihtml",
1637 "generates HTML pages with every possible Unicode letter/symbol.",
1638 "",
1639 ""
1640 },
1641
1642 {
1643 "unajirle",
1644 "decompresses a file compressed with najirle.",
1645 "<input file> <output file>",
1646 "uncomped.nar uncomped.wav"
1647 },
1648
1649 {
1650 "unblanka",
1651 "converts a blanka format file back to its original format.",
1652 "<input file> <output file>",
1653 "secret.txt myfile2.txt"
1654 },
1655
1656 {
1657 "unix2dos",
1658 "converts UNIX text files to DOS/Windows format.",
1659 "<input file> <output file>",
1660 "BYE bye.txt"
1661 },
1662
1663 {
1664 "uudecode",
1665 "UUDecode a UUEncoded file.",
1666 "<input file> <output file>",
1667 "hello.uue hello.exe"
1668 },
1669
1670 {
1671 "uuencode",
1672 "UUEncode a binary file to be easily sent with e-mail\n"
1673 "or posted on forums, etc.",
1674 "<input file> <output file>",
1675 "program.exe program.uue"
1676 },
1677
1678
1679 {
1680 "vowelwrd",
1681 "puts vowels inbetween every letter of a word except the first and last letter.\n",
1682 "<word>",
1683 "Flz"
1684 },
1685
1686 {
1687 "weakrypt",
1688 "a weak file encryption function, the same function\n"
1689 "does both encryption and decryption with a password.",
1690 "<password> <input file> <output file>",
1691 "helloworld1234567890abc secret.zip secret.nwk"
1692 },
1693
1694 {
1695 "wordline",
1696 "puts words in sentences in a new line like a word list.",
1697 "<input file> <output file>",
1698 "license.txt licelist.txt"
1699 },
1700
1701 {
1702 "wordwrap",
1703 "wraps text to new lines for files that have all the text on one line.",
1704 "<input file> <output file>",
1705 "readme.txt read.txt"
1706 },
1707
1708 {
1709 "wrdcount",
1710 "counts the number of words in a text file and displays the number.",
1711 "<text input file>",
1712 "my_essay.txt"
1713 },
1714
1715 {
1716 "year",
1717 "shows the current year.",
1718 "",
1719 ""
1720 },
1721
1722 {
1723 "yil",
1724 "shows the current year.",
1725 "",
1726 ""
1727 },
1728
1729 {
1730 "zerokill",
1731 "changes every character in a file to the hexidecimal value 00\n"
1732 "and then deletes it, this is good for secure deletion.",
1733 "<file to delete>",
1734 "secret.txt"
1735 }
1736
1737
1738 };
1739
1740
1741
1742
najitool_help_commands(void)1743 void najitool_help_commands(void)
1744 {
1745 int i;
1746 int j;
1747 int items = 0;
1748 int len = 0;
1749 int spaces = 0;
1750 int lines = 0;
1751
1752 printf("\n ");
1753
1754
1755 for(i=0; i<NAJITOOL_MAX_COMMANDS; i++)
1756 {
1757
1758
1759 len = strlen(najitool_valid_commands[i]);
1760
1761 for (j=1; j<=8; j++)
1762 if (len == j) spaces = 8 - j;
1763
1764 printf(najitool_valid_commands[i]);
1765
1766 if (spaces > 0)
1767 for (j=0; j<spaces; j++)
1768 putchar(' ');
1769
1770 for (j=0; j<3; j++)
1771 putchar(' ');
1772
1773
1774 items++;
1775
1776 if (items == 7)
1777 {
1778 printf("\n\n ");
1779 items = 0;
1780
1781 lines++;
1782 }
1783
1784
1785 if (lines == 7)
1786 {
1787 nextpage();
1788 printf(" ");
1789 lines = 0;
1790 }
1791
1792 }
1793
1794
1795 }
1796
1797
1798
1799
najitool_command_help(char * cmd)1800 void najitool_command_help(char *cmd)
1801 {
1802 int i;
1803
1804 for (i=0; i<NAJITOOL_MAX_COMMANDS; i++)
1805 if (!strcmp(cmd, helpitems[i].cmd))
1806 {
1807 printf("\n\n");
1808 printf("COMMAND: %s\n\n", helpitems[i].cmd);
1809 printf("DESCRIPTION:\n%s\n\n", helpitems[i].info);
1810
1811 printf("USAGE:\nnajitool %s %s\n\n",
1812 helpitems[i].cmd, helpitems[i].usage);
1813
1814 printf("EXAMPLE:\nnajitool %s %s\n\n",
1815 helpitems[i].cmd, helpitems[i].example);
1816
1817 exit(0);
1818 }
1819
1820 }
1821
1822
1823
1824
najitool_generate_help(void)1825 void najitool_generate_help(void)
1826 {
1827 int i;
1828
1829
1830
1831 najout("HELP");
1832
1833
1834
1835 fprintf(naji_output, "\n\n");
1836
1837 fprintf(naji_output, " =-=-=-=-=-=-=-=-=-=-=-=-=-=-\n");
1838 fprintf(naji_output, " najitool 0.8.4 Help Document\n");
1839 fprintf(naji_output, " =-=-=-=-=-=-=-=-=-=-=-=-=-=-\n\n");
1840
1841 fprintf(naji_output, " http://najitool.sf.net/\n\n");
1842
1843 fprintf(naji_output, " Written by NECDET COKYAZICI\n\n\n");
1844
1845
1846 fprintf(naji_output, "-----------------------------------------------------------------------------");
1847
1848 fprintf(naji_output, "\n%i TOTAL NUMBER OF NAJITOOL COMMANDS:\n", NAJITOOL_MAX_COMMANDS);
1849
1850 fprintf(naji_output, "-----------------------------------------------------------------------------");
1851
1852
1853 for (i=0; i<NAJITOOL_MAX_COMMANDS; i++)
1854 {
1855
1856
1857 fprintf(naji_output, "\n\n");
1858 fprintf(naji_output, "COMMAND: %s\n\n", helpitems[i].cmd);
1859 fprintf(naji_output, "DESCRIPTION:\n%s\n\n", helpitems[i].info);
1860
1861 fprintf(naji_output, "USAGE:\nnajitool %s %s\n\n",
1862 helpitems[i].cmd, helpitems[i].usage);
1863
1864 fprintf(naji_output, "EXAMPLE:\nnajitool %s %s\n\n",
1865 helpitems[i].cmd, helpitems[i].example);
1866
1867 fprintf(naji_output, "-----------------------------------------------------------------------------");
1868
1869 }
1870
1871
1872
1873 najoutclose();
1874
1875 unix2dos("HELP", "help.txt");
1876
1877 exit(0);
1878 }
1879
1880
1881
1882
najitool_generate_help_html(void)1883 void najitool_generate_help_html(void)
1884 {
1885 int i;
1886 int j;
1887
1888 najout("help.htm");
1889
1890
1891
1892 fprintf(naji_output, "<html>\n\n");
1893
1894
1895 fprintf(naji_output, "<head> <title>najitool 0.8.4 Help Document</title> </head>\n\n");
1896
1897 fprintf(naji_output, "<body>\n\n");
1898
1899 fprintf(naji_output, "\n\n");
1900
1901 fprintf(naji_output, "<center>\n\n");
1902
1903 fprintf(naji_output, "<h2>najitool 0.8.4 Help Document</h2><p>\n\n");
1904
1905 fprintf(naji_output, "<a href=\"http://najitool.sf.net/\">http://najitool.sf.net/</a><p>\n\n");
1906
1907 fprintf(naji_output, "<b>Written by NECDET COKYAZICI</b><br><p>\n\n\n");
1908
1909
1910 fprintf(naji_output, "</center>\n\n");
1911
1912
1913 fprintf(naji_output, "\n<hr>\n");
1914
1915 fprintf(naji_output, "<b>%i TOTAL NUMBER OF NAJITOOL COMMANDS:</b><br>\n", NAJITOOL_MAX_COMMANDS);
1916
1917 fprintf(naji_output, "\n<hr>\n");
1918
1919
1920
1921
1922 for (i=0; i<NAJITOOL_MAX_COMMANDS; i++)
1923 {
1924
1925
1926
1927
1928
1929 fprintf(naji_output, "\n\n<p>");
1930
1931
1932
1933
1934
1935 fprintf(naji_output, "<b>COMMAND:</b> %s\n\n<p>", helpitems[i].cmd);
1936
1937
1938
1939
1940 fprintf(naji_output, "<b>DESCRIPTION:</b><br>\n");
1941
1942
1943 for (j=0; helpitems[i].info[j] != '\0'; j++)
1944 {
1945
1946 if (helpitems[i].info[j] == '\n')
1947 fprintf(naji_output, "\n<br>");
1948
1949 else if (helpitems[i].info[j] == '<')
1950 fprintf(naji_output, "<");
1951
1952 else if (helpitems[i].info[j] == '>')
1953 fprintf(naji_output, ">");
1954
1955 else fputc(helpitems[i].info[j], naji_output);
1956 }
1957
1958 fprintf(naji_output, "\n\n<p>");
1959
1960
1961
1962
1963 fprintf(naji_output, "<b>USAGE:</b><br><i>\nnajitool");
1964
1965 fprintf(naji_output, " %s ", helpitems[i].cmd);
1966
1967
1968 for (j=0; helpitems[i].usage[j] != '\0'; j++)
1969 {
1970
1971 if (helpitems[i].usage[j] == '\n')
1972 fprintf(naji_output, "\n<br>");
1973
1974 else if (helpitems[i].usage[j] == '<')
1975 fprintf(naji_output, "<");
1976
1977 else if (helpitems[i].usage[j] == '>')
1978 fprintf(naji_output, ">");
1979
1980 else fputc(helpitems[i].usage[j], naji_output);
1981 }
1982
1983 fprintf(naji_output, "\n\n</i><p>");
1984
1985
1986
1987
1988
1989 fprintf(naji_output, "<b>EXAMPLE:</b><br>\nnajitool");
1990
1991 fprintf(naji_output, " %s ", helpitems[i].cmd);
1992
1993
1994 for (j=0; helpitems[i].example[j] != '\0'; j++)
1995 {
1996
1997 if (helpitems[i].example[j] == '\n')
1998 fprintf(naji_output, "\n<br>");
1999
2000 else if (helpitems[i].example[j] == '<')
2001 fprintf(naji_output, "<");
2002
2003 else if (helpitems[i].example[j] == '>')
2004 fprintf(naji_output, ">");
2005
2006 else fputc(helpitems[i].example[j], naji_output);
2007 }
2008
2009
2010 fprintf(naji_output, "\n\n<p>");
2011
2012
2013
2014
2015 fprintf(naji_output, "\n<hr>\n");
2016
2017 }
2018
2019
2020 fprintf(naji_output, "\n\n</body>\n\n");
2021
2022 fprintf(naji_output, "</html>\n\n");
2023
2024
2025 najoutclose();
2026
2027
2028 exit(0);
2029 }
2030