home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / editor / elvis / cflags.doc < prev    next >
Text File  |  1994-01-30  |  16KB  |  463 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. _9.  _C_F_L_A_G_S
  8.  
  9.      Elvis uses many preprocessor symbols to control  compi-
  10. lation.   Some  of  these  control  the sizes of buffers and
  11. such.  The "-DNO_XXXX" options remove small sets of  related
  12. features.
  13.  
  14.      Most  Elvis  users  will  probably  want  to  keep  all
  15. features  available.   Minix-PC  users, though, will have to
  16. sacrifice some sets because otherwise  Elvis  would  be  too
  17. bulky  to  compile.   The "asld" phase of the compiler craps
  18. out.
  19.  
  20. -DM_SYSV, -Dbsd, -DTOS, -DCOHERENT, -Damiga
  21.      These flags tell the compiler that Elvis is being  com-
  22.      piled for System-V UNIX, BSD UNIX, Atari TOS, Coherent,
  23.      or AmigaDos,  respectively.   For  other  systems,  the
  24.      config.h  file  can  generally  figure it out automati-
  25.      cally.
  26.  
  27. -DRAINBOW
  28.      For MS-DOS systems, this causes  support  for  the  DEC
  29.      Rainbow to be compiled into Elvis.
  30.  
  31. -DS5WINSIZE
  32.      Some versions of SysV UNIX don't  support  support  the
  33.      "winsize"   style  of  screen-size  testing,  so  elvis
  34.      ignores window size changes by default.
  35.  
  36.      However, many of the newer SysV systems  defines  "win-
  37.      size"  in  the file "/usr/include/sys/ptem.h".  If your
  38.      SysV  system  has  "winsize"  then   you   should   add
  39.      -DS5SWINSIZE to the CFLAGS setting.
  40.  
  41. -DTERMIOS
  42.      POSIX is a SysV-derived specification which uses a ter-
  43.      minal  control  package  called  "termios",  instead of
  44.      "termio".  Some other SysV systems may  also  use  ter-
  45.      mios.   You  can make elvis uses termios instead of the
  46.      more common  termio  by  adding  -DTERMIOS  to  CFLAGS.
  47.      (Note: This hasn't been tested very well.)
  48.  
  49. -DNBUFS=_n_u_m_b_e_r
  50.      Elvis keeps most of your text in a temporary file; only
  51.      a  small  amount  is actually stored in RAM.  This flag
  52.      allows you to control how much of the file  can  be  in
  53.      RAM  at  any  time.   The  default is 5 blocks, and the
  54.      minimum is 3 blocks.  (See the -DBLKSIZE flag, below.)
  55.  
  56.      More RAM allows global changes to happen a little  fas-
  57.      ter.
  58.       f you're just making many small changes in one section
  59.      of a file, though, extra RAM won't help much.
  60.  
  61.  
  62.  
  63.  
  64.                        June 13, 1992
  65.  
  66.  
  67.  
  68.  
  69.  
  70. 9-2                        CFLAGS                        9-2
  71.  
  72.  
  73. -DBLKSIZE=_n_u_m_b_e_r
  74.      This controls the size of blocks that Elvis uses inter-
  75.      nally.   The  value  of BLKSIZE must be a power of two.
  76.      Every time you double BLKSIZE, you quadruple  the  size
  77.      of  a  text  file  that  Elvis can handle, but you also
  78.      cause the temporary file to grow faster.   For  MS-DOS,
  79.      Coherent,  and  Minix-PC,  the  default  value is 1024,
  80.      which allows you to edit files up to almost 512K  bytes
  81.      long.   For  all  other  systems,  the default value is
  82.      2048, which allows you to edit files that are nearly  2
  83.      megabytes long.
  84.  
  85.      The BLKSIZE also determines the  maximum  line  length,
  86.      and  a few other limits.  BLKSIZE should be either 256,
  87.      512, 1024, or 2048.  Values other than these  can  lead
  88.      to strange behaviour.
  89.  
  90. -DTMPDIR=_s_t_r_i_n_g
  91.      This sets the default value of the "directory"  option,
  92.      which   specifies  where  the  temporary  files  should
  93.      reside.  The value of TMPDIR must be a  string,  so  be
  94.      sure  your  value includes the quote characters on each
  95.      end.
  96.  
  97. -DEXRC=_s_t_r, -DHMEXRC=_s_t_r, -DSYSEXRC=_s_t_r, -DEXINIT=_s_t_r
  98.      This lets you control the names of  the  initialization
  99.      files.   Their  values  must  be strings, so be careful
  100.      about quoting.
  101.  
  102.      EXRC is the name of  the  initialization  file  in  the
  103.      current  directory.   Its  default  value is ".exrc" on
  104.      UNIX systems -- the same as the real  vi.   Since  that
  105.      isn't  a  legal  DOS filename, under DOS the default is
  106.      "elvis.rc".  For  other  systems,  check  the  config.h
  107.      file.
  108.  
  109.      HMEXRC is the name of the initialization file  in  your
  110.      home  directory.   By  default, it is the same as EXRC.
  111.      Elvis will automatically prepend the name of your  home
  112.      directory  to  HMEXRC at run time, so don't give a full
  113.      path name.
  114.  
  115.      SYSEXRC is the name  of  a  system-wide  initialization
  116.      file.   It  has no default value; if you don't define a
  117.      value for it, then the code that supports SYSEXRC  just
  118.      isn't  compiled.  The value of SYSEXRC should be a full
  119.      pathname, in quotes.
  120.  
  121.      EXINIT is the name of an environment variable that  can
  122.      contain  initialization  commands.  Normally, its value
  123.      is "EXINIT".
  124.  
  125. -DKEYWORDPRG=_s_t_r_i_n_g
  126.      This  flag  determines  the  default   value   of   the
  127.  
  128.  
  129.  
  130.                        June 13, 1992
  131.  
  132.  
  133.  
  134.  
  135.  
  136. 9-3                        CFLAGS                        9-3
  137.  
  138.  
  139.      "keywordprg" option.  Its value must be a string, so be
  140.      careful about quoting.  The default value of this  flag
  141.      is "ref", which is a C reference program.
  142.  
  143. -DCC_COMMAND=_s_t_r_i_n_g -DMAKE_COMMAND=_s_t_r_i_n_g -DERRLIST=_s_t_r_i_n_g
  144.      These control the names of the C compiler,  the  "make"
  145.      utility, and the error output file, respectively.  They
  146.      are only used if -DNO_ERRLIST is not given.
  147.  
  148.      The default value of CC_COMMAND depends on the  Operat-
  149.      ing  System and compiler that you use to compile elvis;
  150.      for UNIX, the default is "cc".  The default  values  of
  151.      MAKE_COMMAND  and  ERRLIST  are  "make"  and "errlist",
  152.      respectively.
  153.  
  154. -DMAXRCLEN=_n_u_m_b_e_r
  155.      This determines how large a :@  macro  command  can  be
  156.      (measured  in  bytes).   The default is 1000 bytes.  If
  157.      you increase this value  significantly,  then  you  may
  158.      need  to  allocate extra memory for the stack.  See the
  159.      "CHMEM" setting in the Makefile.
  160.  
  161. -DSHELL=_s_t_r_i_n_g
  162.      This is the default value of the  "shell"  option,  and
  163.      hence  the  default shell used from within Elvis.  This
  164.      only controls the default; the value you give here  may
  165.      be  overridden  at  run-time  by setting an environment
  166.      variable named SHELL  (or  COMSPEC  for  MS-DOS).   Its
  167.      value  must  be  a string constant, so be careful about
  168.      quoting.
  169.  
  170. -DMAILER=_s_t_r_i_n_g
  171.      This is the name of the program that Elvis uses to send
  172.      mail  to  a  user  whose  text has just been preserved.
  173.      (See the manual page for the _e_l_v_p_r_s_v program.)  If your
  174.      system doesn't use electronic mail, then this option is
  175.      irrelevent.  For UNIX and  OS-9  systems,  though,  the
  176.      value  should be a quoted string.  The default value is
  177.      "mail", but SysV users may prefer to use  "mailx",  and
  178.      BSD users may prefer "Mail".
  179.  
  180. -DTAGS=_s_t_r_i_n_g
  181.      This sets the name of the "tags" file, which is used by
  182.      the :tag command.  Its value must be a string constant,
  183.      so be careful about quoting.
  184.  
  185. -DCS_IBMPC -DCS_LATIN1 -DCS_SPECIAL
  186.      The digraph table and  flipcase  option  will  normally
  187.      start  out  empty.   However,  if you add -DCS_IBMPC or
  188.      -DCS_LATIN1 to your CFLAGS, then they  will  start  out
  189.      filled  with values that are appropriate for the IBM PC
  190.      character set or the ISO Latin-1 character set, respec-
  191.      tively.
  192.  
  193.  
  194.  
  195.  
  196.                        June 13, 1992
  197.  
  198.  
  199.  
  200.  
  201.  
  202. 9-4                        CFLAGS                        9-4
  203.  
  204.  
  205.      You can also use -DCS_IBMPC and  -DCS_SPECIAL  together
  206.      to  get  digraphs that produce the PC's graphic charac-
  207.      ters.
  208.  
  209. -DDEBUG -DEBUG2
  210.      -DDEBUG adds the ":debug" and ":validate" commands, and
  211.      also   adds   many  internal  consistency  checks.   It
  212.      increases the size of the ".text" segment by about 6K.
  213.  
  214.      -DDEBUG2 causes a line to be appended to a file  called
  215.      "debug.out"  everytime  any  change is made to the edit
  216.      buffer.
  217.  
  218. -DCRUNCH
  219.      This flag removes some non-critical code, so that Elvis
  220.      is  smaller.   For example, it removes a short-cut from
  221.      the regexp package, so that text searches  are  slower.
  222.      Also, screen updates are not as efficient.  A couple of
  223.      obscure features are disabled by this, too.
  224.  
  225. -DNO_MKEXRC
  226.      This removes the ":mkexrc"  command,  so  you  have  to
  227.      create any .exrc files manually.  The size of the .text
  228.      segment will be reduced by about 600 bytes.
  229.  
  230. -DNO_CHARATTR
  231.      Permanently disables the charattr option.  This reduces
  232.      the size of your ".text" segment by about 850 bytes.
  233.  
  234. -DNO_RECYCLE
  235.      Normally, Elvis will recycle space (from the  temporary
  236.      file)  which contains totally obsolete text.  This flag
  237.      disables  this  recycling.   Without   recycling,   the
  238.      ".text"  segment is about 1K smaller than it would oth-
  239.      erwise be, but the tmp file grows much faster.  If  you
  240.      have  a  lot of free space on your hard disk, but Elvis
  241.      is too bulky to run with recycling, then try it without
  242.      recycling.
  243.  
  244.      When using a version of Elvis that  has  been  compiled
  245.      with  -DNO_RECYCLE, you should be careful to avoid mak-
  246.      ing many small changes to a file because  each  indivi-
  247.      dual change will cause the tmp file to grow by at least
  248.      1k.  Hitting "x" thirty times counts as thirty changes,
  249.      but  typing  "30x"  counts  as  one  change.  Also, you
  250.      should occasionally do a ":w" followed  by  a  ":e"  to
  251.      start with a fresh tmp file.
  252.  
  253.      Interestingly, the real vi never  recycles  space  from
  254.      its temporary file.
  255.  
  256. -DNO_SENTENCE
  257.      Leaves out the "(" and ")" visual mode commands.  Also,
  258.      the   "[[",  "]]",  "{",  and  "}"  commands  will  not
  259.  
  260.  
  261.  
  262.                        June 13, 1992
  263.  
  264.  
  265.  
  266.  
  267.  
  268. 9-5                        CFLAGS                        9-5
  269.  
  270.  
  271.      recognize *roff macros.  The  sections  and  paragraphs
  272.      options  go  away.   This  saves about 650 bytes in the
  273.      ".text" segment.
  274.  
  275. -DNO_CHARSEARCH
  276.      Leaves out the visual commands  which  locate  a  given
  277.      character  in the current line: "f", "t", "F", "T", ","
  278.      and ";".  This saves about 900 bytes.
  279.  
  280. -DNO_EXTENSIONS
  281.      Leaves out the "K" and "#" visual commands.  Also,  the
  282.      arrow  keys will no longer work in input mode.  Regular
  283.      expressions will no longer recognize the \{\} operator.
  284.      (Other  extensions are either inherent in the design of
  285.      Elvis, or are controlled by more specific flags, or are
  286.      too  tiny  to be worth removing.)  This saves about 250
  287.      bytes.
  288.  
  289. -DNO_MAGIC
  290.      Permanently disables the "magic" option, so  that  most
  291.      meta-characters  in  a  regular  expression  are  *NOT*
  292.      recognized.  This  saves  about  3k  of  space  in  the
  293.      ".text" segment, because the complex regular expression
  294.      code can be replaced by much simpler code.
  295.  
  296. -DNO_SHOWMODE
  297.      Permanently  disables  the  "showmode"  option,  saving
  298.      about 250 bytes.
  299.  
  300. -DNO_CURSORSHAPE
  301.      Normally, Elvis tries to adjust the shape of the cursor
  302.      as   a   reminder   of   which  mode  you're  in.   The
  303.      -DNO_CURSORSHAPE flag disables this, saving  about  150
  304.      bytes.
  305.  
  306. -DNO_DIGRAPH
  307.      To allow entry of non-ASCII characters, Elvis  supports
  308.      digraphs.   A digraph is a single (non-ASCII) character
  309.      which is entered as a combination of two other  (ASCII)
  310.      characters.  If you don't need to input non-ASCII char-
  311.      acters, or if your keyboard supports a  better  way  of
  312.      entering non-ASCII characters, then you can disable the
  313.      digraph code and save about 450 bytes.
  314.  
  315. -DNO_ERRLIST
  316.      Elvis adds a ":errlist" command,  which  is  useful  to
  317.      programmers.   If  you don't need this feature, you can
  318.      disable it via the -DNO_ERRLIST flag.  This will reduce
  319.      the .text segment by about 900 bytes, and the .bss seg-
  320.      ment by about 300 bytes.
  321.  
  322. -DNO_ABBR
  323.      The -DNO_ABBR flag disables the  ":abbr"  command,  and
  324.      reduces the size of Elvis by about 250 bytes.
  325.  
  326.  
  327.  
  328.                        June 13, 1992
  329.  
  330.  
  331.  
  332.  
  333.  
  334. 9-6                        CFLAGS                        9-6
  335.  
  336.  
  337. -DNO_OPTCOLS
  338.      When Elvis displays the current  options  settings  via
  339.      the  ":set"  command,  the  options are normally sorted
  340.      into columns.  The -DNO_OPTCOLS flag causes the options
  341.      to be sorted across the rows, which is much simpler for
  342.      the computer.  The -DNO_OPTCOLS flag  will  reduce  the
  343.      size of your .text segment by about 500 bytes.
  344.  
  345. -DNO_MODELINES
  346.      This removes all support for modelines.
  347.  
  348. -DNO_TAG
  349.      This disables tag lookup.  It reduces the size  of  the
  350.      .text segment by about 750 bytes.
  351.  
  352. -DNO_ALT_FKEY -DNO_CTRL_FKEY -DNO_SHIFT_FKEY -DNO_FKEY
  353.      These remove explicit  support  of  function  keys.   -
  354.      DNO_ALT_FKEY  removes  support for the <alternate> ver-
  355.      sions function keys.   -DNO_CTRL_FKEY  removes  support
  356.      for  the  <control>  and  <alternate> versions function
  357.      keys.  -DNO_SHIFT_FKEY removes support for the <shift>,
  358.      <control>,  and  <alternate> versions function keys.  -
  359.      DNO_FKEY removes all support of function keys.
  360.  
  361.      Elvis's ":map" command normally allows you to  use  the
  362.      special  sequence  "#<n>" to map function key <n>.  For
  363.      example, ":map #1 {!}fmt^M" will cause the <F1> key  to
  364.      reformat  a paragraph.  Elvis checks the :k1=: field in
  365.      the termcap description of your terminal to figure  out
  366.      what  code  is  sent  by  the  <F1> key.  This is handy
  367.      because it allows you to create a .exrc file which maps
  368.      function  keys  the same way regardless of what type of
  369.      terminal you use.
  370.  
  371.      That behaviour is standard; most implementations of the
  372.      real  vi  supports it too.  Elvis extends this to allow
  373.      you to use "#1s" to refer  to  <shift>+<F1>,  "#1c"  to
  374.      refer   to   <control>+<F1>,  and  "#1a"  to  refer  to
  375.      <alt>+<F1>.  The termcap description for  the  terminal
  376.      should have fields named :s1=:c1=:a1=: respectively, to
  377.      define the code sent by these key  conbinations.   (You
  378.      should  also  have  :k2=:s2=:c2=:a2=: for the <F2> key,
  379.      and so on.)
  380.  
  381.      But there  may  be  problems.   The  terminfo  database
  382.      doesn't  support :s1=:c1=:a1=:, so no terminfo terminal
  383.      description could ever support shift/control/alt  func-
  384.      tion  keys; so you might as well add -DNO_SHIFT_FKEY to
  385.      CFLAGS if you're using terminfo.
  386.  
  387.      Note that, even if you have -DNO_FKEYS, you  can  still
  388.      configure  Elvis  to  use your function keys my mapping
  389.      the literal character codes sent by the key.  You  just
  390.      couldn't do it in a terminal-independent way.  TERM_925
  391.  
  392.  
  393.  
  394.                        June 13, 1992
  395.  
  396.  
  397.  
  398.  
  399.  
  400. 9-7                        CFLAGS                        9-7
  401.  
  402.  
  403. -DTERM_AMIGA -DTERM_VT100 -DTERM_VT52 etc.
  404.      The tinytcap.c file contains  descriptions  of  several
  405.      terminal  types.  For each system that uses tinytcap, a
  406.      reasonable subset  of  the  available  descriptions  is
  407.      actually  compiled  into Elvis.  If you wish to enlarge
  408.      this  subset,  then  you  can   add   the   appropriate
  409.      -DTERM_XXX flag to your CFLAGS settings.
  410.  
  411.      For a list of the available terminal types,  check  the
  412.      tinytcap.c file.
  413.  
  414. -DINTERNAL_TAGS
  415.      Normally, Elvis uses the "ref" program to  perform  tag
  416.      lookup.   This  is more powerful than the real vi's tag
  417.      lookup, but it can be much slower.
  418.  
  419.      If you add -DINTERNAL_TAGS to your CFLAGS setting, then
  420.      Elvis  will use its own internal tag lookup code, which
  421.      is faster.
  422.  
  423. -DPRSVDIR=_d_i_r_e_c_t_o_r_y
  424.      This controls where preserved files will be placed.  An
  425.      appropriate  default has been chosen for each Operating
  426.      System, so you probably don't need to worry about it.
  427.  
  428. -DFILEPERMS=_n_u_m_b_e_r
  429.      This affects the attributes of files that  are  created
  430.      by  Elvis;  it  is  used  as the second argument to the
  431.      creat() function.  The default is 0666 which  (on  UNIX
  432.      systems  at least) means that anybody can read or write
  433.      the new file, but nobody can execute it.  On UNIX  sys-
  434.      tems, the creat() call modifies this via the umask set-
  435.      ting.
  436.  
  437. -DKEYBUFSIZE=_n_u_m_b_e_r
  438.      This determines the size of the type-ahead buffer  that
  439.      elvis uses.  It also limits the size of keymaps that it
  440.      can handle.  The  default  is  1000  characters,  which
  441.      should be plenty.
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.                        June 13, 1992
  461.  
  462.  
  463.