Changeset 1240
- Timestamp:
- Oct 26, 2006, 2:12:44 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
toilet/trunk/src/main.c
r1228 r1240 76 76 { "termwidth", 0, NULL, 't' }, 77 77 { "filter", 1, NULL, 'F' }, 78 { "gay", 0, NULL, 'g' }, 79 { "metal", 0, NULL, 'm' }, 80 { "irc", 0, NULL, 'i' }, 78 { "gay", 0, NULL, 130 }, 79 { "metal", 0, NULL, 131 }, 80 { "irc", 0, NULL, 140 }, 81 { "html", 0, NULL, 141 }, 82 { "tga", 0, NULL, 142 }, 81 83 { "help", 0, NULL, 'h' }, 82 84 { "infocode", 1, NULL, 'I' }, … … 85 87 }; 86 88 87 int c = getopt_long(argc, argv, "f:d:w:tF: gmihI:v",89 int c = getopt_long(argc, argv, "f:d:w:tF:hI:v", 88 90 long_options, &option_index); 89 91 # else 90 92 # define MOREINFO "Try `%s -h' for more information.\n" 91 int c = getopt(argc, argv, "f:d:w:tF: gmihI:v");93 int c = getopt(argc, argv, "f:d:w:tF:hI:v"); 92 94 # endif 93 95 if(c == -1) … … 115 117 return -1; 116 118 break; 117 case 'g': /* --gay */119 case 130: /* --gay */ 118 120 filter_add(cx, "gay"); 119 121 break; 120 case 'm': /* --metal */122 case 131: /* --metal */ 121 123 filter_add(cx, "metal"); 122 124 break; … … 136 138 break; 137 139 } 138 case 'i': /* --irc */140 case 140: /* --irc */ 139 141 cx->export = "irc"; 142 break; 143 case 141: /* --html */ 144 cx->export = "html"; 145 break; 146 case 142: /* --tga */ 147 cx->export = "tga"; 140 148 break; 141 149 case '?': … … 242 250 #if defined(HAVE_GETOPT_H) 243 251 # define USAGE \ 244 "Usage: toilet [ - ghimtvF] [ -d fontdirectory ]\n" \245 " [ -f fontfile ] [ - w outputwidth ]\n" \252 "Usage: toilet [ -htv ] [ -d fontdirectory ]\n" \ 253 " [ -f fontfile ] [ -F filter ] [ -w outputwidth ]\n" \ 246 254 " [ -I infocode ] [ message ]\n" 247 255 #else … … 272 280 printf(USAGE); 273 281 # ifdef HAVE_GETOPT_LONG 274 printf(" -f, --font < fontfile>select the font\n");282 printf(" -f, --font <name> select the font\n"); 275 283 printf(" -d, --directory <dir> specify font directory\n"); 276 284 printf(" -w, --width <width> set output width\n"); 277 285 printf(" -t, --termwidth adapt to terminal's width\n"); 278 printf(" -F, --filter apply one or several filters to the text\n"); 279 printf(" -g, --gay add a rainbow effect to the text\n"); 280 printf(" -m, --metal add a metal effect to the text\n"); 281 printf(" -i, --irc output IRC colour codes\n"); 286 printf(" -F, --filter <name> apply one or several filters to the text\n"); 287 printf(" --gay rainbow filter (same as -F gay)\n"); 288 printf(" --metal metal filter (same as -F metal)\n"); 289 printf(" --irc output IRC colour codes\n"); 290 printf(" --html output an HTML document\n"); 291 printf(" --tga output a TGA image\n"); 282 292 printf(" -h, --help display this help and exit\n"); 283 printf(" -I, --infocode 293 printf(" -I, --infocode <code> print FIGlet-compatible infocode\n"); 284 294 printf(" -v, --version output version information and exit\n"); 285 295 # else 286 printf(" -f < fontfile>select the font\n");296 printf(" -f <name> select the font\n"); 287 297 printf(" -d <dir> specify font directory\n"); 288 298 printf(" -w <width> set output width\n"); 289 299 printf(" -t adapt to terminal's width\n"); 290 printf(" -F apply one or several filters to the text\n"); 291 printf(" -g add a rainbow effect to the text\n"); 292 printf(" -m add a metal effect to the text\n"); 293 printf(" -i output IRC colour codes\n"); 300 printf(" -F <name> apply one or several filters to the text\n"); 294 301 printf(" -h display this help and exit\n"); 295 printf(" -I 302 printf(" -I <code> print FIGlet-compatible infocode\n"); 296 303 printf(" -v output version information and exit\n"); 297 304 # endif
Note: See TracChangeset
for help on using the changeset viewer.