home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / elvis184.zip / doc / cflags.ms next >
Text File  |  1994-01-16  |  14KB  |  287 lines

  1. .Go 11 "CFLAGS"
  2. .PP
  3. \*E uses many preprocessor symbols to control compilation.
  4. Some of these control the sizes of buffers and such.
  5. The "-DNO_XXXX" options remove small sets of related features.
  6. .PP
  7. Most \*E users will probably want to keep all features available.
  8. Minix-PC users, though, will have to sacrifice some sets because otherwise
  9. \*E would be too bulky to compile.
  10. The "asld" phase of the compiler craps out.
  11. .IP "-DM_SYSV, -Dbsd, -DTOS, -DCOHERENT, -Damiga"
  12. These flags tell the compiler that \*E is being compiled for
  13. System-V UNIX, BSD UNIX, Atari TOS, Coherent, or AmigaDos, respectively.
  14. For other systems, the config.h file can generally figure it out automatically.
  15. .IP -DRAINBOW
  16. For MS-DOS systems, this causes support for the DEC Rainbow to be compiled
  17. into \*E.
  18. .IP -DNO_S5WINSIZE
  19. Some versions of SysV UNIX don't support support the "winsize"
  20. style of screen-size testing.
  21. If you have a SysV system and can't compile "curses.c",
  22. then try adding -DNO_S5WINSIZE to the CFLAGS.
  23. .IP -DTERMIOS
  24. POSIX is a SysV-derived specification which uses a terminal control
  25. package called "termios", instead of "termio".
  26. Some other SysV systems may also use termios.
  27. You can make elvis uses termios instead of the more common termio
  28. by adding -DTERMIOS to CFLAGS.
  29. (Note: This hasn't been tested very well.)
  30. .IP -DNBUFS=\fInumber\fP
  31. \*E keeps most of your text in a temporary file;
  32. only a small amount is actually stored in RAM.
  33. This flag allows you to control how much of the file can be in RAM at any time.
  34. The default is 5 blocks, and the minimum is 3 blocks.
  35. (See the -DBLKSIZE flag, below.)
  36. .IP
  37. More RAM allows global changes to happen a little faster.
  38. If you're just making many small changes in one section of a file, though,
  39. extra RAM won't help much.
  40. .IP -DBLKSIZE=\fInumber\fP
  41. This controls the size of blocks that \*E uses internally.
  42. The value of BLKSIZE must be a power of two.
  43. Every time you double BLKSIZE, you quadruple the size of a text file that
  44. \*E can handle, but you also cause the temporary file to grow faster.
  45. For MS-DOS, Coherent, and Minix-PC, the default value is 1024, which allows
  46. you to edit files up to almost 512K bytes long.
  47. For all other systems, the default value is 2048, which allows you to edit
  48. files that are nearly 2 megabytes long.
  49. .IP
  50. The BLKSIZE also determines the maximum line length, and a few other limits.
  51. BLKSIZE should be either 256, 512, 1024, or 2048.
  52. Values other than these can lead to strange behavior.
  53. .IP -DTMPDIR=\fIstring\fP
  54. This sets the default value of the "directory" option, which specifies where
  55. the temporary files should reside.
  56. The value of TMPDIR must be a string, so be sure your value includes the
  57. quote characters on each end.
  58. .IP "-DEXRC=\fIstr\fP, -DHMEXRC=\fIstr\fP, -DSYSEXRC=\fIstr\fP, -DEXINIT=\fIstr\fP"
  59. This lets you control the names of the initialization files.
  60. Their values must be strings, so be careful about quoting.
  61. .IP
  62. EXRC is the name of the initialization file in the current directory.
  63. Its default value is ".exrc" on UNIX systems -- the same as the real vi.
  64. Since that isn't a legal DOS filename, under DOS the default is "elvis.rc".
  65. For other systems, check the config.h file.
  66. .IP
  67. HMEXRC is the name of the initialization file in your home directory.
  68. By default, it is the same as EXRC.
  69. \*E will automatically prepend the name of your home directory to HMEXRC
  70. at run time, so don't give a full path name.
  71. .IP
  72. SYSEXRC is the name of a system-wide initialization file.
  73. It has no default value;
  74. if you don't define a value for it, then
  75. the code that supports SYSEXRC just isn't compiled.
  76. The value of SYSEXRC should be a full pathname, in quotes.
  77. .IP
  78. EXINIT is the name of an environment variable that can contain initialization
  79. commands.
  80. Normally, its value is "EXINIT".
  81. .IP -DKEYWORDPRG=\fIstring\fP
  82. This flag determines the default value of the "keywordprg" option.
  83. Its value must be a string, so be careful about quoting.
  84. The default value of this flag is "ref", which is a C reference program.
  85. .IP "-DCC_COMMAND=\fIstring\fP -DMAKE_COMMAND=\fIstring\fP -DERRLIST=\fIstring\fP"
  86. These control the names of the C compiler, the "make" utility, and the
  87. error output file, respectively.
  88. They are only used if -DNO_ERRLIST is not given.
  89. .IP
  90. The default value of CC_COMMAND depends on the Operating System and compiler
  91. that you use to compile elvis;
  92. for UNIX, the default is "cc".
  93. The default values of MAKE_COMMAND and ERRLIST are "make" and "errlist",
  94. respectively.
  95. .IP -DMAXRCLEN=\fInumber\fP
  96. This determines how large a :@ macro command can be (measured in bytes).
  97. The default is 1000 bytes.
  98. If you increase this value significantly,
  99. then you may need to allocate extra memory for the stack.
  100. See the "CHMEM" setting in the Makefile.
  101. .IP -DSHELL=\fIstring\fP
  102. This is the default value of the "shell" option, and hence
  103. the default shell used from within \*E.
  104. This only controls the default;
  105. the value you give here may be overridden at run-time by setting
  106. an environment variable named SHELL (or COMSPEC for MS-DOS).
  107. Its value must be a string constant, so be careful about quoting.
  108. .IP -DMAILER=\fIstring\fP
  109. This is the name of the program that \*E uses to send mail to a user whose
  110. text has just been preserved.
  111. (See the manual page for the \fIelvprsv\fR program.)
  112. If your system doesn't use electronic mail, then this option is irrelevant.
  113. For UNIX and OS-9 systems, though, the value should be a quoted string.
  114. The default value is "mail", but
  115. SysV users may prefer to use "mailx", and BSD users may prefer "Mail".
  116. .IP -DTAGS=\fIstring\fP
  117. This sets the name of the "tags" file,
  118. which is used by the :tag command.
  119. Its value must be a string constant, so be careful about quoting.
  120. .IP "-DCS_IBMPC -DCS_LATIN1 -DCS_SPECIAL"
  121. The digraph table and flipcase option will normally start out empty.
  122. However, if you add -DCS_IBMPC or -DCS_LATIN1 to your CFLAGS,
  123. then they will start out filled with values that are appropriate for the
  124. IBM PC character set or the ISO Latin-1 character set, respectively.
  125. .IP
  126. You can also use -DCS_IBMPC and -DCS_SPECIAL together to get digraphs
  127. that produce the PC's graphic characters.
  128. .IP "-DDEBUG -DEBUG2"
  129. -DDEBUG adds the ":debug" and ":validate" commands,
  130. and also adds many internal consistency checks.
  131. It increases the size of the ".text" segment by about 6K.
  132. .IP
  133. -DDEBUG2 causes a line to be appended to a file called "debug.out"
  134. everytime any change is made to the edit buffer.
  135. .IP -DCRUNCH
  136. This flag removes some non-critical code, so that \*E is smaller.
  137. For example, it removes a short-cut from the regexp package, so that
  138. text searches are slower.
  139. Also, screen updates are not as efficient.
  140. A couple of obscure features are disabled by this, too.
  141. .IP -DNO_MKEXRC
  142. This removes the ":mkexrc" command,
  143. so you have to create any .exrc files manually.
  144. The size of the .text segment will be reduced by about 1500 bytes.
  145. .IP -DNO_CHARATTR
  146. Permanently disables the charattr option.
  147. This reduces the size of your ".text" segment by about 850 bytes.
  148. .IP -DNO_RECYCLE
  149. Normally, \*E will recycle space (from the temporary file) which contains
  150. totally obsolete text.
  151. This flag disables this recycling.
  152. Without recycling, the ".text" segment is about 1K smaller
  153. than it would otherwise be,
  154. but the tmp file grows much faster.
  155. If you have a lot of free space on your hard disk,
  156. but \*E is too bulky to run with recycling,
  157. then try it without recycling.
  158. .IP
  159. When using a version of \*E that has been compiled with -DNO_RECYCLE,
  160. you should be careful to avoid making many small changes to a file
  161. because each individual change will cause the tmp file to grow by at least 1k.
  162. Hitting "x" thirty times counts as thirty changes,
  163. but typing "30x" counts as one change.
  164. Also, you should occasionally do a ":w" followed by a ":e" to start with a
  165. fresh tmp file.
  166. .IP
  167. Interestingly, the real vi never recycles space from its temporary file.
  168. .IP -DNO_SENTENCE
  169. Leaves out the "(" and ")" visual mode commands.
  170. Also, the "[[", "]]", "{", and "}" commands will not recognize *roff macros.
  171. The sections and paragraphs options go away.
  172. This saves about 650 bytes in the ".text" segment.
  173. .IP -DNO_CHARSEARCH
  174. Leaves out the visual commands which locate a given character
  175. in the current line:
  176. "f", "t", "F", "T", "," and ";".
  177. This saves about 900 bytes.
  178. .IP -DNO_EXTENSIONS
  179. Leaves out the "K" and "#" visual commands.
  180. Also, the arrow keys will no longer work in input mode.
  181. Regular expressions will no longer recognize the \\{\\} operator.
  182. (Other extensions are either inherent in the design of \*E,
  183. or are controlled by more specific flags,
  184. or are too tiny to be worth removing.)
  185. This saves about 250 bytes.
  186. .IP -DNO_MAGIC
  187. Permanently disables the "magic" option, so that most meta-characters
  188. in a regular expression are *NOT* recognized.
  189. This saves about 3k of space in the ".text" segment, because
  190. the complex regular expression code can be replaced by much simpler code.
  191. .IP -DNO_SHOWMODE
  192. Permanently disables the "showmode" option, saving about 250 bytes.
  193. .IP -DNO_CURSORSHAPE
  194. Normally, \*E tries to adjust the shape of the cursor as a reminder
  195. of which mode you're in.
  196. The -DNO_CURSORSHAPE flag disables this, saving about 150 bytes.
  197. .IP -DNO_DIGRAPH
  198. To allow entry of non-ASCII characters, \*E supports digraphs.
  199. A digraph is a single (non-ASCII) character which is entered as a
  200. combination of two other (ASCII) characters.
  201. If you don't need to input non-ASCII characters,
  202. or if your keyboard supports a better way of entering non-ASCII characters,
  203. then you can disable the digraph code and save about 450 bytes.
  204. .IP -DNO_ERRLIST
  205. \*E adds a ":errlist" command, which is useful to programmers.
  206. If you don't need this feature, you can disable it via the -DNO_ERRLIST flag.
  207. This will reduce the .text segment by about 900 bytes, and the .bss segment
  208. by about 300 bytes.
  209. .IP -DNO_ABBR
  210. The -DNO_ABBR flag disables the ":abbr" command,
  211. and reduces the size of \*E by about 250 bytes.
  212. .IP -DNO_OPTCOLS
  213. When \*E displays the current options settings via the ":set" command,
  214. the options are normally sorted into columns.
  215. The -DNO_OPTCOLS flag causes the options to be sorted across the rows,
  216. which is much simpler for the computer.
  217. The -DNO_OPTCOLS flag will reduce the size of your .text segment by about
  218. 500 bytes.
  219. .IP -DNO_MODELINES
  220. This removes all support for modelines.
  221. .IP -DNO_TAG
  222. This disables tag lookup.
  223. It reduces the size of the .text segment by about 750 bytes.
  224. .IP -DNO_TAGSTACK
  225. This disables the tagstack.
  226. The ^T and :pop commands will no longer be available.
  227. .IP "-DNO_ALT_FKEY, -DNO_CTRL_FKEY, -DNO_SHIFT_FKEY, -DNO_FKEY"
  228. These remove explicit support of function keys.
  229. -DNO_ALT_FKEY removes support for the <alternate> versions function keys.
  230. -DNO_CTRL_FKEY removes support for the <control> and <alternate> versions function keys.
  231. -DNO_SHIFT_FKEY removes support for the <shift>, <control>, and <alternate> versions function keys.
  232. -DNO_FKEY removes all support of function keys.
  233. .IP
  234. \*E's ":map" command normally allows you to use the special sequence "#<n>"
  235. to map function key <n>.
  236. For example, ":map #1 {!}fmt^M" will cause the <F1> key to reformat a paragraph.
  237. \*E checks the :k1=: field in the termcap description of your terminal
  238. to figure out what code is sent by the <F1> key.
  239. This is handy because it allows you to create a .exrc file which maps function
  240. keys the same way regardless of what type of terminal you use.
  241. .IP
  242. That behavior is standard; most implementations of the real vi supports it too.
  243. \*E extends this to allow you to use "#1s" to refer to <shift>+<F1>,
  244. "#1c" to refer to <control>+<F1>, and
  245. "#1a" to refer to <alt>+<F1>.
  246. The termcap description for the terminal should have fields named
  247. :s1=:c1=:a1=: respectively, to define the code sent by these key combinations.
  248. (You should also have :k2=:s2=:c2=:a2=: for the <F2> key, and so on.)
  249. .IP
  250. But there may be problems.
  251. The terminfo database doesn't support :s1=:c1=:a1=:, so no terminfo terminal
  252. description could ever support shift/control/alt function keys;
  253. so you might as well add -DNO_SHIFT_FKEY to CFLAGS if you're using terminfo.
  254. .IP
  255. Note that, even if you have -DNO_FKEYS, you can still configure \*E to use
  256. your function keys my mapping the literal character codes sent by the key.
  257. You just couldn't do it in a terminal-independent way.
  258. .IP "-DTERM_925, -DTERM_AMIGA, -DTERM_VT100, -DTERM_VT52, etc."
  259. The tinytcap.c file contains descriptions of several terminal types.
  260. For each system that uses tinytcap, a reasonable subset of the available
  261. descriptions is actually compiled into \*E.
  262. If you wish to enlarge this subset, then you can add the appropriate -DTERM_XXX
  263. flag to your CFLAGS settings.
  264. .IP
  265. For a list of the available terminal types, check the tinytcap.c file.
  266. .IP -DINTERNAL_TAGS
  267. Normally, \*E uses the "ref" program to perform tag lookup.
  268. This is more powerful than the real vi's tag lookup,
  269. but it can be much slower.
  270. .IP
  271. If you add -DINTERNAL_TAGS to your CFLAGS setting,
  272. then \*E will use its own internal tag lookup code, which is faster.
  273. .IP -DPRSVDIR=\fIdirectory\fR
  274. This controls where preserved files will be placed.
  275. An appropriate default has been chosen for each Operating System,
  276. so you probably don't need to worry about it.
  277. .IP -DFILEPERMS=\fInumber\fR
  278. This affects the attributes of files that are created by \*E;
  279. it is used as the second argument to the creat() function.
  280. The default is 0666 which (on UNIX systems at least) means that
  281. anybody can read or write the new file, but nobody can execute it.
  282. On UNIX systems, the creat() call modifies this via the umask setting.
  283. .IP -DKEYBUFSIZE=\fInumber\fR
  284. This determines the size of the type-ahead buffer that elvis uses.
  285. It also limits the size of keymaps that it can handle.
  286. The default is 1000 characters, which should be plenty.
  287.