home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Texteditors / Origami / Sources / src / keybind / messages.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-27  |  10.6 KB  |  192 lines

  1. /*{{{}}}*/
  2. /*{{{  #includes*/
  3. #include <stdio.h>
  4.  
  5. #define MESSAGES_C
  6.  
  7. #include "namelist.h"
  8. #include "keybind.h"
  9. #include <h/envvar_str.h>
  10. /*}}}  */
  11.  
  12. /*{{{  some strings, used more than once*/
  13. #define CANTO "Can't open "
  14. #define WARNING "Warning: "
  15. #define BLOCK "block (level %d)"
  16. #define FILE_AND_LINE "<%s - %d>"
  17. #define LIB_INCLUDE LIB_STR"/"include_name_STR
  18. /*}}}  */
  19. /*{{{  format-strings*/
  20. char const F_2ALIAS[]=        "multi sequence "KEYALIAS_STR" %s\n";
  21. char const F_AGAIN[]=         "compiling after "BLOCK" "FILE_AND_LINE".\n";
  22. char const F_ALIAS[]=         KEYALIAS_STR" %s.\n";
  23. char const F_ASM_LM[]=        "undefined label %s\n";
  24. char const F_BEG_MODE[]=      "start "DEFMODE_STR" %s:\n";
  25. char const F_BELONGS[]=       "and belongs to %s[%d].\n";
  26. char const F_BINDS[]=         "binding uses %d tokens (%d fixed,%d "DEMAND_STR").\n";
  27. char const F_CLOSE[]=         "close %s failed.\n";
  28. char const F_CUR_TERM[]=      "Current "TERMINAL_STR" %s!\n";
  29. char const F_DBL_BIND[]=      WARNING"multiple "KEYDEF_STR" for Key %s.\n";
  30. char const F_DEFMOD[]=        DEFMODE_STR" %d uses long %s and short %s.\n";
  31. char const F_DEMAC[]=         "defineable macrobuffer %d uses %d tokens ";
  32. char const F_DEM_COMMENT[]=   DEMAND_STR" %sactive: %d wished, %d ignored\n";
  33. char const F_DNDMAC[]=        "declared and not defined macro %s.\n";
  34. char const F_END_MODE[]=      "end "DEFMODE_STR" %s.\n";
  35. char const F_ENT_FILE_1[]=    "%s %d:";
  36. char const F_ENT_FILE_2[]=    " entering "LIB_INCLUDE" %s.\n";
  37. char const F_ERRORPO[]=       FILE_AND_LINE;
  38. char const F_ERRY[]=          "\nline read up to column: %d\n";
  39. char const F_EX_FILE_1[]=     "end "LIB_INCLUDE" %s:";
  40. char const F_EX_FILE_2[]=     " restarting %s %d.\n";
  41. char const F_FOR[]=           FORWARD_STR" place %d ";
  42. char const F_HISTORY[]=       "defining "HISTORY_STR" %s.\n";
  43. char const F_IGNORING[]=      "ignoring "BLOCK", starting "FILE_AND_LINE".\n";
  44. char const F_INCLUDE[]=       CANTO LIB_INCLUDE"-file %s.\n";
  45. char const F_INTS[]=          "binding needs %d int-variables.\n";
  46. char const F_INV_PATH[]=      "invalid libary path: %s\n";
  47. char const F_ISMASKED[]=      WARNING"Key %s is masked by other keys.\n";
  48. char const F_KBDS[]=          KBD_STR" %s has number %d.\n";
  49. char const F_KBD_MISS[]=      "missing data for "MULTIKBD_STR" %s.\n";
  50. char const F_LOMAC[]=         DEMAND_STR" macrobuffer %d uses %d tokens ";
  51. char const F_MARKT[]=         "binding generates %d additional "DEFMARK_STR"'s.\n";
  52. char const F_MASKS[]=         WARNING "Key %s masks other keys.\n";
  53. char const F_MDECLARE[]=      DEFMARK_STR" %s.\n";
  54. char const F_MISALIAS[]=      "unknown "TERMINAL_STR"-"KEYALIAS_STR" %s, suppress binding\n";
  55. char const F_MIS_DEM_END[]=   "missing demand end %d\n";
  56. char const F_MOUSE[]=         "binding uses mouse-support %s.\n";
  57. char const F_M_USE[]=         "binding %s mouse, %d buttons.\n";
  58. char const F_NOAGAIN[]=       "ignoring after "BLOCK" "FILE_AND_LINE".\n";
  59. char const F_NOBIND[]=        CANTO"file %s\n";
  60. char const F_NODES[]=         KBD_STR"s for "TERMINAL_STR" %s, %d keytabnodes (%d joined).\n";
  61. char const F_NOKEYNUMBER[]=   "%d=unkown key number!";
  62. char const F_NOPIPE[]=        CANTO" pipe: %s\n";
  63. char const F_NORC[]=          CANTO"%src\n";
  64. char const F_OPERATION[]=     "operation %s[%d] uses %d tokens.\n";
  65. char const F_OPT_FORMAT[]=    "(cur. loop %2d: %3d jmp's cut, %3d modifications, %3d tokens cut)\n";
  66. char const F_OPT_S_FORMAT[]=  "(all %2d loops: %3d jmp's cut, %3d modifications, %3d tokens cut)\n";
  67. char const F_OVER_CON[]=      OVER_PRE_STR" conflict: '%s'<->'%s'\n";
  68. char const F_OVER_PRE[]=      OVER_PRE_STR" '%s' defined\n";
  69. char const F_SETDEC[]=        DEFSET_STR" %s(%d).\n";
  70. char const F_SETUSE[]=        "binding uses %d "DEFSET_STR"'s.\n";
  71. char const F_STMAC[]=         "static macrobuffer %d uses %d tokens ";
  72. char const F_STRING[]=        "code %s as message %d\n";
  73. char const F_T_START[]=       "starting "TERMINAL_STR" %s.\n";
  74. char const F_UNSET[]=         "tag %s marked as unset.\n";
  75. char const F_USECOMP[]=       "compiling "BLOCK", starting "FILE_AND_LINE".\n";
  76. char const F_USEEND[]=        "end of compiled @"COMPIF_STR" "BLOCK" "FILE_AND_LINE".\n";
  77. char const F_USESET[]=        "tag %s marked as set.\n";
  78. char const F_WARN_CHAR[]=     WARNING "character %d out of range (%d%% of given macro)!\n";
  79. /*}}}  */
  80. /*{{{  simple messages*/
  81. char const M_ABORTUSED[]=     DEFAB_STR"-key is used in keysequence\n";
  82. char const M_ADD_OS_X[]=      "adding "OS_EXT_STR" string '";
  83. char const M_ASM_1[]=         "OCL-assembler %s\n";
  84. char const M_BEGINUSE[]=      "missing @"FI_STR" for earlier @"COMPIF_STR".\n";
  85. char const M_CASEEND[]=       "expected ) for "CASE_STR"-entry.\n";
  86. char const M_CRASH[]=         "CRASH\n";
  87. char const M_DEFONAME[]=      DEFOP_STR" has no name.\n";
  88. char const M_DEPTH[]=         LIB_INCLUDE"-depth too high.\n";
  89. char const M_DUPAB[]=         "duplicate "KEYDEF_STR" abort.\n";
  90. char const M_DUPAUTO[]=       "duplicate macro hook definition.\n";
  91. char const M_DUPDEF[]=        "duplicate/inconsistent "DEFASM_STR"/"DEFMACRO_STR"/"INITMACRO_STR".\n";
  92. char const M_DUPKEY[]=        "multiple "BINDNAME_STR".\n";
  93. char const M_ENDUSE[]=        "missing @"COMPIF_STR" for @"FI_STR".\n";
  94. char const M_END_OS_X[]=      "'.\n";
  95. char const M_EXPALIAS[]=      "expected name for "KEYALIAS_STR".\n";
  96. char const M_FALSEEND[]=      "control key or eof in macro string.\n";
  97. char const M_INCORRECTFILES[]="generated files are incorrect\n";
  98. char const M_INVMNAME[]=      "no valid macro name.\n";
  99. char const M_INV_ARGS[]=      "invalid argument list!\n";
  100. char const M_KBDNAME[]=       KBD_STR" needs name.\n";
  101. char const M_KBD_BEGIN[]=     KBD_STR"/"TERMINAL_STR" needs `("KEYDEF_STR"'.\n";
  102. char const M_KBD_ERR[]=       MULTIKBD_STR" expected ).\n";
  103. char const M_KBD_KEY[]=       KEYDEF_STR" and "MULTIKBD_STR" crash.\n";
  104. char const M_KEYEND[]=        KEYDEF_STR" ends not with ).\n";
  105. char const M_KEYNAME[]=       BINDNAME_STR" needs name.\n";
  106. char const M_LONG_KEY[]=      "keysequence to long\n";
  107. char const M_LONG_MACRO[]=    "long macro, please split\n";
  108. char const M_MACGIV[]=        "already macros given.\n";
  109. char const M_MACNAME[]=       FORWARD_STR" has no name.\n";
  110. char const M_MANYMODES[]=     "too many "DEFMODE_STR".\n";
  111. char const M_MARKNAME[]=      "expected name for "DEFMARK_STR".\n";
  112. char const M_MICE[]=          "current(known) mice: ";
  113. char const M_MOUSE[]=         "duplicate "MOUSEMAP_STR".\n";
  114. char const M_MSTR[]=          "modestring expected.\n";
  115. char const M_MUCH_FUN[]=      "Crash: too many functions defined ("RC_ENDING" uses 16 bit coding!)\n";
  116. char const M_NOABORT[]=       "abort-keysequence too long.\n";
  117. char const M_NOADDCOUNTER[]=  "expecting an integer.\n";
  118. char const M_NOBFILE[]=       CANTO"binding-file\n";
  119. char const M_NOBINDNAME[]=    "empty binding-name\n";
  120. char const M_NOCHAR[]=        "incorrect char-definition.";
  121. char const M_NOCNTRL[]=       "incorrect control-sequence.\n";
  122. char const M_NOCODE[]=        "incorrect codedefinition.\n";
  123. char const M_NOCOMMAND[]=     "no valid origamicommand.\n";
  124. char const M_NODEBOUND[]=     DEFOP_STR" cannot be bound.\n";
  125. char const M_NOELSEFI[]=      FI_STR" or "ELSE_STR" expected.\n";
  126. char const M_NOESAC[]=        ESAC_STR", "DEFAULT_STR" or ( expexcted.\n";
  127. char const M_NOFI[]=          IF_STR" then "ELSE_STR" without "FI_STR".\n";
  128. char const M_NOFNAME[]=       "no filename given.\n";
  129. char const M_NOHEX[]=         "no valid hex-value.\n";
  130. char const M_NOHISTORY[]=     "expected a "HISTORY_STR" name.\n";
  131. char const M_NOJUMP[]=        "wrong jump-command CRASH\n";
  132. char const M_NOKCOMMAND[]=    "incorrect keybind-command.\n";
  133. char const M_NOMACROTAG[]=    "wrong macrotag\n";
  134. char const M_NOMEMORY[]=      "no memory\n";
  135. char const M_NOMESSAGE[]=     "exit-description expected.\n";
  136. char const M_NOMETA[]=        "incorrect meta-key.\n";
  137. char const M_NOMSTRING[]=     "no valid macro-string.\n";
  138. char const M_NOOCLOPT[]=      "invalid ocl command line option\n";
  139. char const M_NOPROMPT[]=      "prompt-text expected.\n";
  140. char const M_NOREF[]=         "Cannot open referencefile.\n";
  141. char const M_NOSETCHAR[]=     "expected a character for "DEFSET_STR".\n";
  142. char const M_NOTEST[]=        "incorrect test.\n";
  143. char const M_NOVAR[]=         "missing variable.\n";
  144. char const M_NOVAS[]=         "too many internal variables used.\n";
  145. char const M_NOWHILE[]=       "expected "WHILE_STR".\n";
  146. char const M_NO_DEM[]=        "no open demand\n";
  147. char const M_OPPTAG[]=        "incorrect use-list.\n";
  148. char const M_OPP[]=           "incorrect opp-statement.\n";
  149. char const M_OVER_ERR[]=      "expected string for "OVER_PRE_STR".\n";
  150. char const M_REFCOMP[]=          "expected reference compression string!\n";
  151. char const M_SETMISS[]=       "no valid "DEFSET_STR" given.\n";
  152. char const M_SNAME[]=         "setname expected\n";
  153. char const M_TAB[]=           "tabs are for farmers!\n";
  154. char const M_TOOMANYKEYS[]=   "keytable uses to many nodes!\n";
  155. char const M_T_END[]=         "end "TERMINAL_STR" %s\n";
  156. char const M_T_MAX[]=         "to many "TERMINAL_STR"/"KBD_STR" used.\n";
  157. char const M_T_NAME[]=        "need name for a "TERMINAL_STR".\n";
  158. char const M_UMNAME[]=        DEFMODE_STR" needs name.\n";
  159. /*{{{  M_USAGE*/
  160. #define first_indent "  "
  161. #define tag_entry(o,s) first_indent "-" o ":\t\t" s "\n"
  162. #define arg_entry(o,a,s)  first_indent "-" o " " a ":\t" s "\n"
  163. public const char M_USAGE[]=
  164.    "Usage:\n"
  165.    first_indent "keybind [options] file\n"
  166.    "keybind " MAJOR_VERSION "." MINOR_VERSION "." REVISION " options are:\n"
  167.    tag_entry("c",            "put comments in rcfile")
  168.    tag_entry("d",            "variables are declared by using")
  169.    arg_entry("f","filter",   "filter all files through filter")
  170.    tag_entry("h",            "show this message")
  171.    tag_entry("l",            "show all keywords")
  172.    arg_entry("m","macroname","compile only given macro")
  173.    arg_entry("o","name",     "write rcfile to namerc")
  174.    arg_entry("r","file",     "write reference to file")
  175.    tag_entry("s",            "sort binding list")
  176.    tag_entry("v",            "verbose (-V 1)")
  177.    tag_entry("w",            "warning")
  178.    arg_entry("F","filter",   "filter toplevel fold through filter")
  179.    arg_entry("L","dirpath",  "search libary files in dirpath")
  180.               "\t\t"         "default: [" KBD_PATH "]\n"
  181.    arg_entry("M","mousename","use mouse support for system mousename")
  182.    tag_entry("O",            "optimize macros")
  183.    tag_entry("R",            "write reference in rcfile")
  184.    arg_entry("U","tag",      "set tag for conditional compilation")
  185.    arg_entry("V","level",    "verbose level (0,1,2,3,4,5)")
  186. ;
  187. /*}}}  */
  188. char const M_WANTBEGIN[]=     "( expected.\n";
  189. char const M_WANTCHAR[]=      "expected a single char for "DEFMARK_STR".\n";
  190. char const M_WANTEND[]=       "waiting for ).\n";
  191. /*}}}  */
  192.