home *** CD-ROM | disk | FTP | other *** search
- /*{{{}}}*/
- /*{{{ #includes*/
- #include <stdio.h>
-
- #define MESSAGES_C
-
- #include "namelist.h"
- #include "keybind.h"
- #include <h/envvar_str.h>
- /*}}} */
-
- /*{{{ some strings, used more than once*/
- #define CANTO "Can't open "
- #define WARNING "Warning: "
- #define BLOCK "block (level %d)"
- #define FILE_AND_LINE "<%s - %d>"
- #define LIB_INCLUDE LIB_STR"/"include_name_STR
- /*}}} */
- /*{{{ format-strings*/
- char const F_2ALIAS[]= "multi sequence "KEYALIAS_STR" %s\n";
- char const F_AGAIN[]= "compiling after "BLOCK" "FILE_AND_LINE".\n";
- char const F_ALIAS[]= KEYALIAS_STR" %s.\n";
- char const F_ASM_LM[]= "undefined label %s\n";
- char const F_BEG_MODE[]= "start "DEFMODE_STR" %s:\n";
- char const F_BELONGS[]= "and belongs to %s[%d].\n";
- char const F_BINDS[]= "binding uses %d tokens (%d fixed,%d "DEMAND_STR").\n";
- char const F_CLOSE[]= "close %s failed.\n";
- char const F_CUR_TERM[]= "Current "TERMINAL_STR" %s!\n";
- char const F_DBL_BIND[]= WARNING"multiple "KEYDEF_STR" for Key %s.\n";
- char const F_DEFMOD[]= DEFMODE_STR" %d uses long %s and short %s.\n";
- char const F_DEMAC[]= "defineable macrobuffer %d uses %d tokens ";
- char const F_DEM_COMMENT[]= DEMAND_STR" %sactive: %d wished, %d ignored\n";
- char const F_DNDMAC[]= "declared and not defined macro %s.\n";
- char const F_END_MODE[]= "end "DEFMODE_STR" %s.\n";
- char const F_ENT_FILE_1[]= "%s %d:";
- char const F_ENT_FILE_2[]= " entering "LIB_INCLUDE" %s.\n";
- char const F_ERRORPO[]= FILE_AND_LINE;
- char const F_ERRY[]= "\nline read up to column: %d\n";
- char const F_EX_FILE_1[]= "end "LIB_INCLUDE" %s:";
- char const F_EX_FILE_2[]= " restarting %s %d.\n";
- char const F_FOR[]= FORWARD_STR" place %d ";
- char const F_HISTORY[]= "defining "HISTORY_STR" %s.\n";
- char const F_IGNORING[]= "ignoring "BLOCK", starting "FILE_AND_LINE".\n";
- char const F_INCLUDE[]= CANTO LIB_INCLUDE"-file %s.\n";
- char const F_INTS[]= "binding needs %d int-variables.\n";
- char const F_INV_PATH[]= "invalid libary path: %s\n";
- char const F_ISMASKED[]= WARNING"Key %s is masked by other keys.\n";
- char const F_KBDS[]= KBD_STR" %s has number %d.\n";
- char const F_KBD_MISS[]= "missing data for "MULTIKBD_STR" %s.\n";
- char const F_LOMAC[]= DEMAND_STR" macrobuffer %d uses %d tokens ";
- char const F_MARKT[]= "binding generates %d additional "DEFMARK_STR"'s.\n";
- char const F_MASKS[]= WARNING "Key %s masks other keys.\n";
- char const F_MDECLARE[]= DEFMARK_STR" %s.\n";
- char const F_MISALIAS[]= "unknown "TERMINAL_STR"-"KEYALIAS_STR" %s, suppress binding\n";
- char const F_MIS_DEM_END[]= "missing demand end %d\n";
- char const F_MOUSE[]= "binding uses mouse-support %s.\n";
- char const F_M_USE[]= "binding %s mouse, %d buttons.\n";
- char const F_NOAGAIN[]= "ignoring after "BLOCK" "FILE_AND_LINE".\n";
- char const F_NOBIND[]= CANTO"file %s\n";
- char const F_NODES[]= KBD_STR"s for "TERMINAL_STR" %s, %d keytabnodes (%d joined).\n";
- char const F_NOKEYNUMBER[]= "%d=unkown key number!";
- char const F_NOPIPE[]= CANTO" pipe: %s\n";
- char const F_NORC[]= CANTO"%src\n";
- char const F_OPERATION[]= "operation %s[%d] uses %d tokens.\n";
- char const F_OPT_FORMAT[]= "(cur. loop %2d: %3d jmp's cut, %3d modifications, %3d tokens cut)\n";
- char const F_OPT_S_FORMAT[]= "(all %2d loops: %3d jmp's cut, %3d modifications, %3d tokens cut)\n";
- char const F_OVER_CON[]= OVER_PRE_STR" conflict: '%s'<->'%s'\n";
- char const F_OVER_PRE[]= OVER_PRE_STR" '%s' defined\n";
- char const F_SETDEC[]= DEFSET_STR" %s(%d).\n";
- char const F_SETUSE[]= "binding uses %d "DEFSET_STR"'s.\n";
- char const F_STMAC[]= "static macrobuffer %d uses %d tokens ";
- char const F_STRING[]= "code %s as message %d\n";
- char const F_T_START[]= "starting "TERMINAL_STR" %s.\n";
- char const F_UNSET[]= "tag %s marked as unset.\n";
- char const F_USECOMP[]= "compiling "BLOCK", starting "FILE_AND_LINE".\n";
- char const F_USEEND[]= "end of compiled @"COMPIF_STR" "BLOCK" "FILE_AND_LINE".\n";
- char const F_USESET[]= "tag %s marked as set.\n";
- char const F_WARN_CHAR[]= WARNING "character %d out of range (%d%% of given macro)!\n";
- /*}}} */
- /*{{{ simple messages*/
- char const M_ABORTUSED[]= DEFAB_STR"-key is used in keysequence\n";
- char const M_ADD_OS_X[]= "adding "OS_EXT_STR" string '";
- char const M_ASM_1[]= "OCL-assembler %s\n";
- char const M_BEGINUSE[]= "missing @"FI_STR" for earlier @"COMPIF_STR".\n";
- char const M_CASEEND[]= "expected ) for "CASE_STR"-entry.\n";
- char const M_CRASH[]= "CRASH\n";
- char const M_DEFONAME[]= DEFOP_STR" has no name.\n";
- char const M_DEPTH[]= LIB_INCLUDE"-depth too high.\n";
- char const M_DUPAB[]= "duplicate "KEYDEF_STR" abort.\n";
- char const M_DUPAUTO[]= "duplicate macro hook definition.\n";
- char const M_DUPDEF[]= "duplicate/inconsistent "DEFASM_STR"/"DEFMACRO_STR"/"INITMACRO_STR".\n";
- char const M_DUPKEY[]= "multiple "BINDNAME_STR".\n";
- char const M_ENDUSE[]= "missing @"COMPIF_STR" for @"FI_STR".\n";
- char const M_END_OS_X[]= "'.\n";
- char const M_EXPALIAS[]= "expected name for "KEYALIAS_STR".\n";
- char const M_FALSEEND[]= "control key or eof in macro string.\n";
- char const M_INCORRECTFILES[]="generated files are incorrect\n";
- char const M_INVMNAME[]= "no valid macro name.\n";
- char const M_INV_ARGS[]= "invalid argument list!\n";
- char const M_KBDNAME[]= KBD_STR" needs name.\n";
- char const M_KBD_BEGIN[]= KBD_STR"/"TERMINAL_STR" needs `("KEYDEF_STR"'.\n";
- char const M_KBD_ERR[]= MULTIKBD_STR" expected ).\n";
- char const M_KBD_KEY[]= KEYDEF_STR" and "MULTIKBD_STR" crash.\n";
- char const M_KEYEND[]= KEYDEF_STR" ends not with ).\n";
- char const M_KEYNAME[]= BINDNAME_STR" needs name.\n";
- char const M_LONG_KEY[]= "keysequence to long\n";
- char const M_LONG_MACRO[]= "long macro, please split\n";
- char const M_MACGIV[]= "already macros given.\n";
- char const M_MACNAME[]= FORWARD_STR" has no name.\n";
- char const M_MANYMODES[]= "too many "DEFMODE_STR".\n";
- char const M_MARKNAME[]= "expected name for "DEFMARK_STR".\n";
- char const M_MICE[]= "current(known) mice: ";
- char const M_MOUSE[]= "duplicate "MOUSEMAP_STR".\n";
- char const M_MSTR[]= "modestring expected.\n";
- char const M_MUCH_FUN[]= "Crash: too many functions defined ("RC_ENDING" uses 16 bit coding!)\n";
- char const M_NOABORT[]= "abort-keysequence too long.\n";
- char const M_NOADDCOUNTER[]= "expecting an integer.\n";
- char const M_NOBFILE[]= CANTO"binding-file\n";
- char const M_NOBINDNAME[]= "empty binding-name\n";
- char const M_NOCHAR[]= "incorrect char-definition.";
- char const M_NOCNTRL[]= "incorrect control-sequence.\n";
- char const M_NOCODE[]= "incorrect codedefinition.\n";
- char const M_NOCOMMAND[]= "no valid origamicommand.\n";
- char const M_NODEBOUND[]= DEFOP_STR" cannot be bound.\n";
- char const M_NOELSEFI[]= FI_STR" or "ELSE_STR" expected.\n";
- char const M_NOESAC[]= ESAC_STR", "DEFAULT_STR" or ( expexcted.\n";
- char const M_NOFI[]= IF_STR" then "ELSE_STR" without "FI_STR".\n";
- char const M_NOFNAME[]= "no filename given.\n";
- char const M_NOHEX[]= "no valid hex-value.\n";
- char const M_NOHISTORY[]= "expected a "HISTORY_STR" name.\n";
- char const M_NOJUMP[]= "wrong jump-command CRASH\n";
- char const M_NOKCOMMAND[]= "incorrect keybind-command.\n";
- char const M_NOMACROTAG[]= "wrong macrotag\n";
- char const M_NOMEMORY[]= "no memory\n";
- char const M_NOMESSAGE[]= "exit-description expected.\n";
- char const M_NOMETA[]= "incorrect meta-key.\n";
- char const M_NOMSTRING[]= "no valid macro-string.\n";
- char const M_NOOCLOPT[]= "invalid ocl command line option\n";
- char const M_NOPROMPT[]= "prompt-text expected.\n";
- char const M_NOREF[]= "Cannot open referencefile.\n";
- char const M_NOSETCHAR[]= "expected a character for "DEFSET_STR".\n";
- char const M_NOTEST[]= "incorrect test.\n";
- char const M_NOVAR[]= "missing variable.\n";
- char const M_NOVAS[]= "too many internal variables used.\n";
- char const M_NOWHILE[]= "expected "WHILE_STR".\n";
- char const M_NO_DEM[]= "no open demand\n";
- char const M_OPPTAG[]= "incorrect use-list.\n";
- char const M_OPP[]= "incorrect opp-statement.\n";
- char const M_OVER_ERR[]= "expected string for "OVER_PRE_STR".\n";
- char const M_REFCOMP[]= "expected reference compression string!\n";
- char const M_SETMISS[]= "no valid "DEFSET_STR" given.\n";
- char const M_SNAME[]= "setname expected\n";
- char const M_TAB[]= "tabs are for farmers!\n";
- char const M_TOOMANYKEYS[]= "keytable uses to many nodes!\n";
- char const M_T_END[]= "end "TERMINAL_STR" %s\n";
- char const M_T_MAX[]= "to many "TERMINAL_STR"/"KBD_STR" used.\n";
- char const M_T_NAME[]= "need name for a "TERMINAL_STR".\n";
- char const M_UMNAME[]= DEFMODE_STR" needs name.\n";
- /*{{{ M_USAGE*/
- #define first_indent " "
- #define tag_entry(o,s) first_indent "-" o ":\t\t" s "\n"
- #define arg_entry(o,a,s) first_indent "-" o " " a ":\t" s "\n"
- public const char M_USAGE[]=
- "Usage:\n"
- first_indent "keybind [options] file\n"
- "keybind " MAJOR_VERSION "." MINOR_VERSION "." REVISION " options are:\n"
- tag_entry("c", "put comments in rcfile")
- tag_entry("d", "variables are declared by using")
- arg_entry("f","filter", "filter all files through filter")
- tag_entry("h", "show this message")
- tag_entry("l", "show all keywords")
- arg_entry("m","macroname","compile only given macro")
- arg_entry("o","name", "write rcfile to namerc")
- arg_entry("r","file", "write reference to file")
- tag_entry("s", "sort binding list")
- tag_entry("v", "verbose (-V 1)")
- tag_entry("w", "warning")
- arg_entry("F","filter", "filter toplevel fold through filter")
- arg_entry("L","dirpath", "search libary files in dirpath")
- "\t\t" "default: [" KBD_PATH "]\n"
- arg_entry("M","mousename","use mouse support for system mousename")
- tag_entry("O", "optimize macros")
- tag_entry("R", "write reference in rcfile")
- arg_entry("U","tag", "set tag for conditional compilation")
- arg_entry("V","level", "verbose level (0,1,2,3,4,5)")
- ;
- /*}}} */
- char const M_WANTBEGIN[]= "( expected.\n";
- char const M_WANTCHAR[]= "expected a single char for "DEFMARK_STR".\n";
- char const M_WANTEND[]= "waiting for ).\n";
- /*}}} */
-