1/* infokey.c -- compile ~/.infokey to ~/.info. |
2 $Id: infokey.c,v 1.10 2002/03/19 14:36:49 karl Exp $ |
3 4 Copyright (C) 1999, 2001, 02 Free Software Foundation, Inc. 5 6 This program is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 2, or (at your option) 9 any later version. 10 --- 44 unchanged lines hidden (view full) --- 55/* String describing the shorthand versions of the long options found above. */ 56static char *short_options = "o:"; 57 58/* Structure for holding the compiled sections. */ 59enum sect_e 60 { 61 info = 0, 62 ea = 1, |
63 var = 2 |
64 }; 65struct sect 66 { 67 unsigned int cur; 68 unsigned char data[INFOKEY_MAX_SECTIONLEN]; 69 }; 70 71/* Some "forward" declarations. */ --- 323 unchanged lines hidden (view full) --- 395 get_keyseq, 396 got_keyseq, 397 get_action, 398 got_action, 399 get_varname, 400 got_varname, 401 get_equals, 402 got_equals, |
403 get_value |
404 } 405 state = start_of_line; 406 enum sect_e section = info; 407 enum 408 { 409 normal, 410 slosh, 411 control, 412 octal, |
413 special_key |
414 } 415 seqstate; /* used if state == get_keyseq */ 416 char meta = 0; 417 char ocnt; /* used if state == get_keyseq && seqstate == octal */ 418 419 /* Data is accumulated in the following variables. The code 420 avoids overflowing these strings, and throws an error 421 where appropriate if a string limit is exceeded. These string --- 461 unchanged lines hidden (view full) --- 883{ 884 fprintf (stderr, _("Try --help for more information.\n")); 885} 886 887/* Produce a scaled down description of the available options to Info. */ 888static void 889short_help () 890{ |
891 printf (_("\ |
892Usage: %s [OPTION]... [INPUT-FILE]\n\ 893\n\ 894Compile infokey source file to infokey file. Reads INPUT-FILE (default\n\ 895$HOME/.infokey) and writes compiled key file to (by default) $HOME/.info.\n\ 896\n\ 897Options:\n\ 898 --output FILE output to FILE instead of $HOME/.info\n\ 899 --help display this help and exit.\n\ 900 --version display version information and exit.\n\ |
901"), program_name); 902 903 puts (_("\n\ |
904Email bug reports to bug-texinfo@gnu.org,\n\ 905general questions and discussion to help-texinfo@gnu.org.\n\ |
906Texinfo home page: http://www.gnu.org/software/texinfo/")); 907 |
908 xexit (0); 909} |