home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / jove414s.zip / externs.h < prev    next >
C/C++ Source or Header  |  1991-07-07  |  15KB  |  577 lines

  1. /***************************************************************************
  2.  * This program is Copyright (C) 1986, 1987, 1988 by Jonathan Payne.  JOVE *
  3.  * is provided to you without charge, and with no warranty.  You may give  *
  4.  * away copies of JOVE, including sources, provided that this notice is    *
  5.  * included in all the files.                                              *
  6.  ***************************************************************************/
  7.  
  8. extern char
  9. /* os2proc.c */
  10.     *MakeName proto((char *command)),
  11.  
  12. /* ask.c */
  13.     *ask_file proto((char *prmt, char *def, char *buf)),
  14.     *ask proto((char *, char *, ...)),
  15.     *do_ask proto((char *, int (*) proto((int)), char *, char *, ...));
  16.  
  17. extern int
  18.     yes_or_no_p proto((char *, ...));
  19.  
  20. extern void
  21.     minib_add proto((char *str,int movedown));
  22.  
  23. extern void
  24.     _fastcall isprocbuf proto((char *bufname)),
  25.     DoAutoExec proto((char *new,char *old)),
  26.     _fastcall RegToUnix proto((struct buffer *outbuf,char *cmd));
  27.  
  28. extern void
  29.     /* extend.c */
  30.     vpr_aux proto((const struct variable *, char *)),
  31.  
  32.     /* os2proc.c */
  33. #ifndef    MSDOS
  34.     dowait proto((int pid, int *status)),
  35. #endif
  36.     _fastcall get_FL_info proto((char *, char *)),
  37.     ErrFree proto((void));
  38.  
  39. extern SIGRESULT
  40. /* jove.c */
  41.      finish proto((int code));    /* doesn't return at all! */
  42. extern int
  43. /* ctype.h */
  44.     ismword proto((int c)),
  45.  
  46. /* os2proc.c */
  47.     UnixToBuf proto((char *, int, int, int, ...)),
  48.  
  49. /* extend.c */
  50.     addgetc proto((void)),
  51.     ask_int proto((char *prompt,int base)),
  52.     aux_complete proto((int c)),
  53.     chr_to_int proto((char *cp,int base,int allints, int *result)),
  54.     complete proto((char * *possible,char *prompt,int flags)),
  55.     joverc proto((char *file)),
  56.  
  57. /* jove.c */
  58. #ifdef    MAC
  59.     win_reshape proto((int /*junk*/)),
  60. #endif
  61.     _fastcall charp proto((void)),
  62.     _fastcall get_ch proto((void)),
  63.     _fastcall jgetchar proto((void)),
  64.     _fastcall getrawinchar proto((void)),
  65.     _fastcall kbd_char(KBD_REQUEST request, int *UpdModLine);
  66.  
  67. extern void
  68.     error proto((char *, ...)),
  69.     complain proto((char *, ...)),
  70.     confirm proto((char *, ...)),
  71.     ttyset proto((int n)),
  72.     tty_reset proto ((void)),
  73.     _fastcall ToError proto((int forward)),
  74.     _fastcall Ungetc proto((int c));
  75.  
  76.  
  77. #ifdef IBMPC
  78. extern int
  79.     lower proto((char *c)),
  80.     _fastcall rawkey_ready proto((void));
  81. extern char
  82.     switchar proto((void));
  83. #endif
  84.  
  85. extern Bufpos
  86. /* insert.c */
  87.     *DoYank proto((struct line *fline,int fchar,struct line *tline,int tchar,struct line *atline,int atchar,struct buffer *whatbuf)),
  88.     *lisp_indent proto((void));
  89.  
  90. extern void
  91.     Insert proto((int c)),
  92.     LineInsert proto((int num));
  93.  
  94. /* c.c */
  95. extern Bufpos
  96.     *_fastcall c_indent proto((int brace)),
  97.     *_fastcall m_paren proto((int p_type,int dir,int can_mismatch,int can_stop));
  98.  
  99. extern void
  100.     mp_error proto((void));
  101. #ifndef OS2SCR
  102. extern unsigned char _fastcall CharPerLine proto((void));
  103. extern unsigned char _fastcall LinePerPage proto((void));
  104. #endif /* OS2SCR */
  105. extern void
  106.     DoJustify proto((struct line *l1,int c1,struct line *l2,int c2,int scrunch,int indent)),
  107.  
  108.     /* abbrev.c */
  109. #ifdef    ABBREV
  110.     AbbrevExpand proto((void)),
  111. #endif
  112.  
  113.     /* disp.c */
  114.     _fastcall message proto((char *)),
  115.  
  116.     /* insert.c */
  117. #ifdef    ABBREV
  118.     MaybeAbbrevExpand proto((void)),
  119. #endif
  120.     GCchunks proto((void)),
  121.  
  122.     /* fmt.c */
  123.     _fastcall format proto((char *buf, size_t len, char *fmt, char *ap)),
  124.     add_mess proto((char *, ...)),
  125.     f_mess proto((char *, ...)),
  126.     fwritef proto((struct _file *, char *, ...)),
  127.     writef proto((char *, ...)),
  128.     s_mess proto((char *, ...)),
  129.     swritef proto((char *, char *, ...)),
  130.  
  131.     /* keymaps.c */
  132.     InitKeymaps proto((void)),
  133.  
  134.     /* paragraph.c */
  135.     _fastcall do_rfill proto((int ulm)),
  136.  
  137.     /* macros.c */
  138.     mac_init proto((void)),
  139.  
  140.     /* misc.c */
  141.     skip_wht_space proto((void)),
  142.     put_bufs proto((int askp)),
  143.  
  144.     /* term.c */
  145. #ifndef    IBMPC
  146.     getTERM proto((void)),
  147. #endif
  148.     putpad proto((char *str,int lines)),
  149.     putargpad proto((char *str, int arg, int lines)),
  150.     settout proto((char *ttbuf));
  151.  
  152. #if defined(IBMPC)
  153. #ifndef OS2SCR
  154. extern void
  155.     _fastcall write_em proto((char *s)),
  156.     _fastcall write_emc proto((char *s,int n)),
  157.     _fastcall write_emif proto(()),
  158.     _fastcall write_emif proto((char *s));
  159. #endif
  160. #endif
  161.  
  162. #ifdef MAC
  163.  
  164. extern int
  165.     creat proto((char *,int)),
  166.     open proto((char *,int)),
  167.     close proto((int)),
  168.     read proto((int,char *,unsigned)),
  169.     write proto((int,char *,unsigned)),
  170.     unlink proto((char *)),
  171.     chdir proto((char *)),
  172.     rawchkc proto((void)),
  173.     getArgs proto((char ***));
  174.  
  175. extern long
  176.     lseek proto((int,long,unsigned));
  177.  
  178. extern time_t
  179.      time proto((time_t *));
  180.  
  181. #endif /* MAC */
  182.  
  183. extern char
  184.     *pwd proto((void)),
  185. #ifdef MAC
  186.     *getwd(),
  187. #else
  188.     *getwd proto((char *)),
  189. #endif
  190.     *pfile proto((char *)),
  191.     *gfile proto((char *));
  192.  
  193. #ifdef MAC
  194. extern void
  195.     MacInit proto((void)),
  196.     InitBinds proto((void)),
  197.     NPlacur proto((int,int)),
  198.     i_lines proto((int,int,int)),
  199.     d_lines proto((int,int,int)),
  200.     clr_page proto((void)),
  201.     clr_eoln proto((void)),
  202.     docontrols proto((void)),
  203.     RemoveScrollBar proto((Window *)),
  204.     InitEvents proto((void)),
  205.     menus_on proto((void)),
  206.     menus_off proto((void));
  207. #endif
  208.  
  209. /* Wired Commands */
  210.  
  211. extern void
  212.     UnbindC proto((void)),
  213.     ShowVersion proto((void)),
  214.     WVisSpace proto((void)),
  215.     AppReg proto((void)),
  216.     Apropos proto((void)),
  217.     BackChar proto((void)),
  218.     BList proto((void)),
  219.     FList proto((void)),
  220.     BUpList proto((void)),
  221.     FDownList proto((void)),
  222.     BSexpr proto((void)),
  223.     BackWord proto((void)),
  224.     Bof proto((void)),
  225.     Bol proto((void)),
  226.     Bos proto((void)),
  227.     Bow proto((void)),
  228.     BindAKey proto((void)),
  229.     BindMac proto((void)),
  230.     BufPos proto((void)),
  231. #if defined(MSDOS)
  232.     Buf1Select proto((void)),
  233.     Buf2Select proto((void)),
  234.     Buf3Select proto((void)),
  235.     Buf4Select proto((void)),
  236.     Buf5Select proto((void)),
  237.     Buf6Select proto((void)),
  238.     Buf7Select proto((void)),
  239.     Buf8Select proto((void)),
  240.     Buf9Select proto((void)),
  241.     Buf10Select proto((void)),
  242. #endif /* MSDOS */
  243.     CasRegLower proto((void)),
  244.     CasRegUpper proto((void)),
  245.     CapChar proto((void)),
  246.     CapWord proto((void)),
  247.     LowWord proto((void)),
  248.     UppWord proto((void)),
  249.     Chdir proto((void)),
  250.     prCWD proto((void)),
  251.     prDIRS proto((void)),
  252.     Pushd proto((void)),
  253.     Popd proto((void)),
  254.     prCTIME proto((void)),
  255.     ChrToOct proto((void)),
  256.     ClAndRedraw proto((void)),
  257. #if !defined(MAC)
  258.     MakeErrors proto((void)),
  259.     ErrParse proto((void)),
  260. #endif
  261.     CopyRegion proto((void)),
  262.     BufSelect proto((void)),
  263.     DelBlnkLines proto((void)),
  264.     DelNChar proto((void)),
  265.     DelNWord proto((void)),
  266.     OneWindow proto((void)),
  267.     DelPChar proto((void)),
  268.     DelPWord proto((void)),
  269.     DelReg proto((void)),
  270.     KillSome proto((void)),
  271.     DelWtSpace proto((void)),
  272.     DelCurWindow proto((void)),
  273.     KeyDesc proto((void)),
  274.     Digit proto((void)),
  275.     Digit0 proto((void)),
  276.     Digit1 proto((void)),
  277.     Digit2 proto((void)),
  278.     Digit3 proto((void)),
  279.     Digit4 proto((void)),
  280.     Digit5 proto((void)),
  281.     Digit6 proto((void)),
  282.     Digit7 proto((void)),
  283.     Digit8 proto((void)),
  284.     Digit9 proto((void)),
  285.     DescBindings proto((void)),
  286.     DescCom proto((void)),
  287.     Eof proto((void)),
  288.     Eol proto((void)),
  289.     Eos proto((void)),
  290.     Eow proto((void)),
  291.     ForPara proto((void)),
  292.     BackPara proto((void)),
  293.     BufErase proto((void)),
  294.     PtToMark proto((void)),
  295.     Extend proto((void)),
  296.     ExecMacro proto((void)),
  297.     RunMacro proto((void)),
  298.     Leave proto((void)),
  299.     FindFile proto((void)),
  300.     WindFind proto((void)),
  301.     FindTag proto((void)),
  302.     FDotTag proto((void)),
  303.     ToIndent proto((void)),
  304.     ForChar proto((void)),
  305.     FSexpr proto((void)),
  306.     ForWord proto((void)),
  307.     TimesFour proto((void)),
  308.     GoLine proto((void)),
  309. #ifndef _mac    /* conflicts with MacTraps version */
  310.     GrowWindow proto((void)),
  311. #endif
  312.     IncFSearch proto((void)),
  313.     IncRSearch proto((void)),
  314.     InsFile proto((void)),
  315.     Justify proto((void)),
  316.     RegJustify proto((void)),
  317.     SetLMargin proto((void)),
  318.     SetRMargin proto((void)),
  319.     LRShift proto((void)),
  320.     RRShift proto((void)),
  321.     BufKill proto((void)),
  322.     KillBos proto((void)),
  323.     KillEos proto((void)),
  324.     KillEOL proto((void)),
  325.     KillExpr proto((void)),
  326.     BufList proto((void)),
  327.     NotModified proto((void)),
  328.     NameMac proto((void)),
  329.     DelMacro proto((void)),
  330.     Newline proto((void)),
  331.     OpenLine proto((void)),
  332.     LineAI proto((void)),
  333. #if !defined(MAC)
  334.     ShowErr proto((void)),
  335.     NextError proto((void)),
  336. #endif /* MAC */
  337. #if defined(MSDOS)
  338.     PageScrollUp proto((void)),
  339.     PageScrollDown proto((void)),
  340. #endif /* MSDOS */
  341. #if !defined(MAC)
  342.     PrevError proto((void)),
  343. #endif /* MAC */
  344.     NextLine proto((void)),
  345.     NextPage proto((void)),
  346.     NextWindow proto((void)),
  347.     Recur proto((void)),
  348.     PopMark proto((void)),
  349.     PageNWind proto((void)),
  350.     Tab proto((void)),
  351.     DoParen proto((void)),
  352. #if !defined(MAC)
  353.     ParseAll proto((void)),
  354. #endif
  355. #if defined(SPELL)
  356.     SpelWords proto((void)),
  357. #endif
  358. #if defined(JOB_CONTROL)
  359.     PauseJove proto((void)),
  360. #endif
  361.     PrevLine proto((void)),
  362.     PrevPage proto((void)),
  363.     PrevWindow proto((void)),
  364. #if !defined(MAC)
  365.     Push proto((void)),
  366. #endif
  367.     RegReplace proto((void)),
  368.     QRepSearch proto((void)),
  369.     QuotChar proto((void)),
  370.     ReadFile proto((void)),
  371.     DefKBDMac proto((void)),
  372.     RedrawDisplay proto((void)),
  373.     ReNamBuf proto((void)),
  374.     RepSearch proto((void)),
  375.     DownScroll proto((void)),
  376.     UpScroll proto((void)),
  377.     ForSearch proto((void)),
  378.     FSrchND proto((void)),
  379.     RevSearch proto((void)),
  380.     RSrchND proto((void)),
  381.     SelfInsert proto((void)),
  382.     SetVar proto((void)),
  383.     SetMark proto((void)),
  384. #if !defined(MAC)
  385.     ShellCom proto((void)),
  386.     ShNoBuf proto((void)),
  387.     Shtypeout proto((void)),
  388.     ShToBuf proto((void)),
  389. #endif
  390.     ShrWindow proto((void)),
  391.     Source proto((void)),
  392. #if defined(SPELL)
  393.     SpelBuffer proto((void)),
  394. #endif
  395.     SplitWind proto((void)),
  396.     GotoWind proto((void)),
  397.     Remember proto((void)),
  398.     Forget proto((void)),
  399.     StrLength proto((void)),
  400.     TransChar proto((void)),
  401.     TransLines proto((void)),
  402.     SaveFile proto((void)),
  403.     WtModBuf proto((void)),
  404.     WriteMacs proto((void)),
  405.     WrtReg proto((void)),
  406.     Yank proto((void)),
  407.     YankPop proto((void)),
  408.     PrVar proto((void)),
  409. #if !defined(MAC)
  410.     FilterRegion proto((void)),
  411. #endif
  412.     WNumLines proto((void)),
  413. #if defined(IPROCS) || defined (OS2IPROCS)
  414.     ShellProc proto((void)),
  415.     ProcInt proto((void)),
  416.     ProcQuit proto((void)),
  417.     ProcKill proto((void)),
  418. #  if !defined(PIPEPROCS)
  419.     ProcEof proto((void)),
  420.     ProcStop proto((void)),
  421.     ProcCont proto((void)),
  422.     ProcDStop proto((void)),
  423. #  endif
  424.     ProcSendData proto((void)),
  425.     ProcNewline proto((void)),
  426.     ProcList proto((void)),
  427.     ProcBind proto((void)),
  428.     Iprocess proto((void)),
  429.     DBXpoutput proto((void)),
  430. #endif
  431.  
  432. #if defined(LISP)
  433.     GSexpr proto((void)),    /* Grind S Expression. */
  434.     AddSpecial proto((void)),    /* add lisp special form */
  435. #endif
  436.     CAutoExec proto((void)),
  437.     MAutoExec proto((void)),
  438.  
  439.     DefMAbbrev proto((void)),
  440.     DefGAbbrev proto((void)),
  441.     SaveAbbrevs proto((void)),
  442.     RestAbbrevs proto((void)),
  443.     EditAbbrevs proto((void)),
  444.     BindMtoW proto((void)),
  445.  
  446. #if defined(CMT_FMT)
  447.     Comment proto((void)),
  448. #endif
  449.  
  450.     ScrollLeft proto((void)),
  451.     ScrollRight proto((void)),
  452.  
  453.     MakeKMap proto((void)),
  454.     KmBind proto((void)),
  455.     ProcKmBind proto((void)),
  456.  
  457.     MacInter proto((void));        /* This is the last one. */
  458.  
  459. #ifdef OS2
  460.     void os2_kbd_open( void);
  461. #endif
  462. /*==== Declarations of Library/System Routines ====*/
  463.  
  464. /* General Utilities: <stdlib.h> */
  465.  
  466. extern int    abs proto((int));
  467.  
  468. extern void    abort proto((void));
  469. extern void    exit proto((int));
  470.  
  471. extern int    atoi proto((const char */*nptr*/));
  472.  
  473. extern void    qsort proto((UnivPtr /*base*/, size_t /*nmemb*/,
  474.     size_t /*size*/, int (*/*compar*/)(UnivConstPtr, UnivConstPtr)));
  475.  
  476. extern char    *getenv proto((const char *));
  477. extern int    system proto((const char *));
  478.  
  479. extern void
  480.     free proto((UnivPtr));
  481. #ifndef PORTSRV
  482. extern char
  483.     *calloc proto((unsigned int, unsigned int)),
  484.     *malloc proto((size_t)),
  485.     *realloc proto((UnivPtr, size_t));
  486. #endif
  487.  
  488. /* Date and Time <time.h> */
  489.  
  490. extern time_t    time proto((time_t */*tloc*/));
  491. extern char    *ctime proto((const time_t *));
  492.  
  493. /* UNIX */
  494.  
  495. #ifdef IBMPC
  496. #define const    /* the const's in the following defs conflict with MSC 5.1 */
  497. #endif
  498.  
  499. extern int    chdir proto((const char */*path*/));
  500. extern int    access proto((const char */*path*/, int /*mode*/));
  501. extern int    creat proto((const char */*path*/, int /*mode*/));
  502.     /* Open may have an optional third argument, int mode */
  503. extern int    open proto((const char */*path*/, int /*flags*/, ...));
  504.  
  505. #ifdef IBMPC
  506. extern int    read proto((int /*fd*/, char * /*buf*/, size_t /*nbytes*/));
  507. extern int    write proto((int /*fd*/, char * /*buf*/, size_t /*nbytes*/));
  508. #else
  509. extern int    read proto((int /*fd*/, UnivPtr /*buf*/, size_t /*nbytes*/));
  510. extern int    write proto((int /*fd*/, UnivPtr /*buf*/, size_t /*nbytes*/));
  511. #endif
  512.  
  513. extern int    execl proto((const char */*name*/, const char */*arg0*/, ...));
  514. extern int    execlp proto((const char */*name*/, const char */*arg0*/, ...));
  515. extern int    execv proto((const char */*name*/, const char */*argv*/[]));
  516. extern int    execvp proto((const char */*name*/, const char */*argv*/[]));
  517.  
  518. #ifdef IBMPC
  519. #undef const
  520. #endif
  521.  
  522. extern void    _exit proto((int));    /* exit(), without flush, etc */
  523.  
  524. extern unsigned    alarm proto((unsigned /*seconds*/));
  525.  
  526. extern int    _pipe proto((int *));
  527. extern int    close proto((int));
  528. extern int    dup proto((int));
  529. extern int    dup2 proto((int /*old_fd*/, int /*new_fd*/));
  530. extern long    lseek proto((int /*fd*/, long /*offset*/, int /*whence*/));
  531. extern int    fchmod proto((int /*fd*/, int /*mode*/));
  532. extern int    unlink proto((const char */*path*/));
  533. extern int    fsync proto((int));
  534.  
  535. extern int    fork proto((void));
  536.  
  537. extern int    getpid proto((void));
  538. extern int    getuid proto((void));
  539. #ifndef OS2
  540. extern int    kill proto((int /*pid*/, int /*sig*/));
  541. #endif
  542. extern char    *mktemp proto((char *));
  543.  
  544. #ifndef IBMPC
  545. /* BSD UNIX
  546.  *
  547.  * Note: in most systems, declarations of non-existant functions is
  548.  * OK if they are never actually called.  The parentheses around the
  549.  * name prevents any macro expansion.
  550.  */
  551. extern int    UNDEF(vfork) proto((void));
  552.  
  553. #ifdef BSD_SIGS
  554. extern int    UNDEF(killpg) proto((int /*pgrp*/, int /*sig*/));
  555. #endif
  556. extern int    UNDEF(setpgrp) proto((int /*pid*/, int /*pgrp*/));    /* Sys V takes no arg */
  557.  
  558. #ifdef    __STDC__
  559. struct timeval;    /* forward declaration */
  560. #endif    /* __STDC__ */
  561. extern int    UNDEF(select) proto((int /*width*/, long */*readfds*/, long */*writefds*/,
  562.     long */*exceptfds*/, struct timeval */*timeout*/));
  563.  
  564. extern void    UNDEF(bcopy) proto((UnivConstPtr, UnivPtr, size_t));
  565. extern void    UNDEF(bzero) proto((UnivPtr, size_t));
  566. extern int    UNDEF(ffs) proto((long));
  567.  
  568. /* termcap */
  569.  
  570. extern int    UNDEF(tgetent) proto((char */*buf*/, const char */*name*/));
  571. extern int    UNDEF(tgetflag) proto((const char */*id*/));
  572. extern int    UNDEF(tgetnum) proto((const char */*id*/));
  573. extern char    *tgetstr proto((const char */*id*/, char **/*area*/));
  574. extern void    UNDEF(tputs) proto((const char *, int, void (*) proto((int))));
  575. extern char    UNDEF(*tgoto) proto((const char *, int /*destcol*/, int /*destline*/));
  576. #endif
  577.