home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
old
/
ckermit5a190
/
ckmptp.h
< prev
next >
Wrap
C/C++ Source or Header
|
1994-08-18
|
19KB
|
480 lines
/*
Copyright (C) 1985, 1992, Trustees of Columbia University in the City of New
York. Permission is granted to any individual or institution to use this
software as long as it is not sold for profit. This copyright notice must be
retained. This software may not be included in commercial products without
written permission of Columbia University.
*/
/*
* ckmco2.c
*/
extern int InitKeyStuff(void);
extern int UpdateOptKey(int enable);
extern int FutzOptKey(int enable);
extern unsigned char DeModifyChar(long keyCode, long modifiers);
extern int OutputChar(struct termw *termw, unsigned char c);
extern Boolean bittest(char bitmap[], int bitnum);
extern int handle_char(struct termw *termw, EventRecord *evt);
extern int checkescape(char c);
extern int console_char(struct termw *termw, EventRecord *evt);
extern void makerect(struct termw *termw, Rect *r, int lin, int col,
int numlin, int numcol);
extern void invertchars(struct termw *termw, int lin, int col, int numlin,
int numcol);
extern void term_new_font(struct termw *termw);
extern struct termw *consetup(int boxid);
extern void term_reset(struct termw *termw);
extern Boolean cursor_rect(struct termw *termw, int line, int col, Rect *r);
extern void cursor_draw(struct termw *termw);
extern void cursor_erase(struct termw *termw);
extern void flash_cursor(struct termw *termw);
extern int waitnoinput(void);
extern int waitasec(struct termw *termw);
extern void updateCursor(struct termw *termw, int force,
WindowPeek myfrontwindow);
extern void flushbuf(struct termw *termw);
extern int screen_to_bottom(struct termw *termw);
extern int update_vscroll(struct termw *termw);
extern int termmouse(struct termw *termw, EventRecord *evt);
extern void maybe_nuke_selection(struct termw *termw, int tlin, int blin);
extern void init_scr_clip(void);
extern void destroy_scr_clip(void);
extern void invalidate_scr_clip(void);
extern int scr_copy(struct termw *termw);
extern int scr_paste(struct termw *termw);
extern int show_inval_rgn(WindowPeek w);
extern void flushscroll(struct termw *termw);
extern void scroll_screen(struct termw *termw, int tlin, int blin, int delta);
extern int term_redraw(struct termw *termw);
extern int draw_grow_and_erase_line(struct termw *termw, int invalidate_it);
extern int term_activate(struct termw *termw, int mod);
extern int set_term_invert(struct termw *termw, int new_inv);
extern int init_term(struct termw *termw);
extern int grow_term_to(struct termw *termw, int size);
extern int growterm(struct termw *termw, Point *p);
extern int get_term_pos(struct termw *termw, int *top_p, int *left_p);
extern int set_term_pos(struct termw *termw, int top, int left);
extern void draw_line_w_attrs(struct termw *termw, register int lin,
register int v, register int l_col,
register int r_col, int must_drawblanks);
extern void mouse_cursor_move(struct termw *termw, EventRecord *evt);
extern void do_arrow(struct termw *termw, unsigned char dir);
extern void do_keypad (struct termw *termw, int n);
extern void do_pfkey(struct termw *termw, int n);
extern void do_keyenter(struct termw *termw);
extern void invert_text(struct termw *termw, int from_lin, int from_col,
int to_lin, int to_col);
extern void mouse_region_select (struct termw *termw, EventRecord *evt);
extern void set_style (struct termw *termw, int style);
extern void scroll_term (struct termw *termw);
extern void t_pagescroll (struct termw *termw, int code, int amount,
ControlHandle ctrlh);
extern int typeof_char(unsigned char c);
extern int all_spaces (struct termw *termw, register int r, register int c);
extern void point_to_mouse_low_high (struct termw *termw, Point *MousePt_p,
int n_clicks, int *mouselin_p,
int *mousecol_p, int *mousecol_lp,
int *mousecol_hp);
extern void sizevscroll (struct termw *termw);
/*
* ckmcon.c
*/
extern int inpchars(struct termw *termw);
extern int printps(struct termw *termw, StringPtr s);
extern PFV mlookup(unsigned char index, PFV table[], int min, int max);
extern int printem(struct termw *termw, unsigned char *buf, int count);
extern int set_char_set(struct termw *termw, unsigned char c);
extern int set_char_map(struct termw *termw);
extern void norm_home_clear_save(struct termw *termw);
extern void invert_term(struct termw *termw);
extern void zeroline(struct termw *termw, int lin, int line_attrs_also);
extern void scrtolog(struct termw *termw);
extern void scrlasttolog(struct termw *termw);
extern int doesc(char c);
extern void MDrawChars(struct termw *termw, register unsigned char *cp, int n);
extern void set_tab(struct termw *termw);
extern void back_space(struct termw *termw);
extern void carriage_return(struct termw *termw);
extern void line_feed(struct termw *termw);
extern void bell(struct termw *termw);
extern void csi_seq(struct termw *termw);
extern void dcs_seq(struct termw *termw);
extern void toss_char(struct termw *termw);
extern void toss_till_st(struct termw *termw);
extern void norm_char(struct termw *termw);
extern void escape_seq(struct termw *termw);
extern void string_term(struct termw *termw);
extern void vt320_mode(struct termw *termw);
extern void text_mode(struct termw *termw);
extern void clear_line(struct termw *termw);
extern void erase_display(struct termw *termw);
extern void cursor_position(struct termw *termw);
extern void cursor_up(struct termw *termw);
extern void cursor_down(struct termw *termw);
extern void cursor_right(struct termw *termw);
extern void cursor_left(struct termw *termw);
extern void cursor_save(struct termw *termw);
extern void cursor_restore(struct termw *termw);
extern void set_scroll_region(struct termw *termw);
extern void reverse_line_feed(struct termw *termw);
extern void dummy(struct termw *termw);
extern void delete_char(struct termw *termw);
extern void insert_mode(struct termw *termw);
extern void end_insert_mode(struct termw *termw);
extern void insert_line(struct termw *termw);
extern void delete_line(struct termw *termw);
extern void query_terminal(struct termw *termw);
extern void insert_char(struct termw *termw);
extern void insert_chars(struct termw *termw);
extern void erase_char(struct termw *termw);
extern void cursor_h_pos(struct termw *termw);
extern void home_cursor(struct termw *termw);
extern void line_dblh_top(struct termw *termw);
extern void line_dblh_bot(struct termw *termw);
extern void line_singw(struct termw *termw);
extern void line_dblh_top(struct termw *termw);
extern void printer_control(struct termw *termw);
extern void graphic_G0(struct termw *termw);
extern void graphic_G1(struct termw *termw);
extern void graphic_G2(struct termw *termw);
extern void graphic_G3(struct termw *termw);
extern void control_N(struct termw *termw);
extern void control_O(struct termw *termw);
extern void single_shift_2(struct termw *termw);
extern void single_shift_3(struct termw *termw);
extern void lock_shift_2(struct termw *termw);
extern void lock_shift_3(struct termw *termw);
extern void lock_shift_3r(struct termw *termw);
extern void lock_shift_2r(struct termw *termw);
extern void lock_shift_1r(struct termw *termw);
extern void set_appl (struct termw *termw);
extern void reset_appl (struct termw *termw);
extern void set_compat(struct termw *termw);
extern void set_charattr(struct termw *termw);
extern void start_selected(struct termw *termw);
extern void end_selected(struct termw *termw);
extern void set_mode(struct termw *termw, int arg);
extern void reset_mode(struct termw *termw, int arg);
extern void set_heath_mode(struct termw *termw, int arg);
extern void reset_heath_mode(struct termw *termw, int arg);
extern void position_report(struct termw *termw);
extern void relmove(struct termw *termw, int hor, int ver);
extern void absmove(struct termw *termw, int hor, int ver);
extern void new_line(struct termw *termw);
extern void request_report(struct termw *termw);
extern void set_tab(struct termw *termw);
extern void clear_tab(struct termw *termw);
extern void tab(struct termw *termw);
extern void clear_screen(struct termw *termw);
extern void push_clear_screen(struct termw *termw);
extern void vt_align(struct termw *termw);
extern void h19_graph_mode(struct termw *termw);
extern void end_h19_graph_mode(struct termw *termw);
extern void line_dblw(struct termw *termw);
void writereply(char *s);
extern void end_numarg(struct termw *termw);
/*
* ckmfio.c
*/
extern int zopeni(int n, char *name);
extern void bzero(char *b, int n);
extern void bcopy(char *a, char *b, int n);
extern int GetFileInfo(short vol, char *name, ParamBlockRec *iop);
extern int SetFileInfo(short vol, char *name, ParamBlockRec *iop);
extern int MakeTextFile(short vol, char *name, ParamBlockRec *iop);
extern int macbinopen(char *name, MACFILE *fpp);
extern int is_macbinary(MBHead h);
extern int zopeno(int n, char *name, struct zattr *zz, struct filinfo *fcb);
extern int mbcl_cleanup(void);
extern int zclose(int n);
extern int zchin(int n, char *c);
extern int zsinl(int n, char *s, int x);
extern int zinfill(void);
extern int zsout(int n, char *s);
extern int zsoutl(int n, char *s);
extern int zsoutx(int n, char *s, int x);
extern int zchout(int n, char c);
extern int zoutdump(void);
extern int chkfn(int n);
extern long zchki(char *name);
extern int zchko(char *name);
extern int zdelet(char *name);
extern VOID zrtol(char *name, char *name2);
extern VOID zstrip(char *name, char **name2);
extern VOID zltor(char *name, char *name2);
extern int fnparse(char *string);
extern int zchkspa(char *f, long n);
extern int zrename(char *old, char *new);
extern int zchdir(char *dirnam);
extern char *zhome(void);
extern char *zgtdir(void);
extern void zinitpipe(MACPIPE *pipe, PFV_NA refillproc);
extern void zfillpipe(MACPIPE *pipe, char *str, Boolean last);
extern int formatnum(long num, char fillc, int width, char *str);
extern void zlspace(void);
extern void zldir(void);
extern int zmxcmd(char *comand);
extern int zxcmd(int filnum, char *comand);
extern int getcmd(char *cmd);
extern int zclosf(void);
extern int zxpand(char *fn);
extern int znext(char *fn);
extern VOID znewn(char *fn, char **s);
extern int iswild(char *filespec);
extern int zsattr(struct zattr *xx);
extern int zkermini(char *line, int rcflag, char *kermrc);
extern pascal void reset(void);
extern int zmail(char *p, char *f);
extern int zprint(char *p, char *f);
extern int ioutil(int err);
extern OSErr OpenRF_rdonly (ConstStr255Param fileName, short vRefNum, short *refNum);
extern OSErr FSOpen_rdonly (ConstStr255Param fileName, short vRefNum, short *refNum);
extern int openslog(void);
extern int openlogfile(char *prompt, char *name, short *fdp, int n);
extern int closeslog(void);
extern int slog(char *s, int n);
extern int openplog(void);
extern int closeplog(void);
extern int opendlog(void);
extern int closedlog(void);
extern char *tilde_expand(char *dirname);
extern int zstime(char *f, struct zattr *yy, int x);
/*
* ckmini.c
*/
extern VOID cmdini(void);
extern char CAP(char c);
extern int findcmd(char *cmd);
extern int getch(void);
extern int gettoken(void);
extern char nextcmd(void);
extern int setup_menus(void);
extern Boolean IsWNEImplemented(void);
extern int mac_init(void);
extern int mac_post_load_init(void);
extern int syscleanup(void);
extern VOID doclean(void);
extern VOID doexit(int exitstat, int what);
/*
* ckmkey.c
*/
extern short FindMacro(short theCode);
extern int DeleteMacro(short theIndex);
extern short NewMacro(void);
extern int SetMacro(short theIndex, short theCode, char *theFlags,
StringPtr theStr);
extern int InsertMacro(short theCode, char *theFlags, StringPtr theStr);
extern int RemoveMacro(short theCode);
extern int ReplaceMacro(short theCode, char *theFlags, StringPtr theStr);
extern int GetMacro(short theCode, char *theFlags, StringPtr theStr);
extern int DisposeMacros(void);
extern int EncodeString(char *s, char *flags);
extern int DecodeString(char *s, char flags);
extern pascal Boolean keyfilter(DialogPtr theDialog, EventRecord *theEvent,
short *itemHit);
extern int keymacros(void);
extern int keymoddialog(void);
extern int loadkset(void);
extern int loadmset(void);
extern int savekset(void);
extern int savemset(void);
/*
* ckmpri.c
*/
extern void add_to_print (int len, char *s);
extern void upd_ptr_dlg(void);
extern void now_print(void);
extern int printer_init(void);
extern void printer_close();
extern void dopagesetup();
extern void printer (Handle h, long length, long index, long limit);
extern void pr_stat(void);
/*
* ckmrem.c
*/
extern int remotedialog(int rid, char *gstr);
extern int initrcmdw(void);
extern pascal void rdoscroll(ControlHandle WHICHCONTROL, short THECODE);
/*
* ckmsav.c
*/
extern void KillResource(ResType type, int id);
extern void savevals(void);
extern void loadvals(void);
extern void takedialog(void);
extern void findfinderfiles(void);
extern void getlfile (char *name, short vref);
extern void doloadvals(char *fn, int refnum);
extern void startlfile(void);
/*
* ckmscr.c
*/
extern int scrcreate(void);
extern void scrdispose(Boolean wait);
extern void update_scr_therm(void);
extern VOID screen(int f, char c, long n, char *s);
extern int scrmydlg(int item);
/*
* ckmsfp.c
*/
extern Handle gethdl(int item, DialogPtr dp);
extern int setfilflgs(int item, DialogPtr dlg);
extern int setfilnams(int remfid, DialogPtr dlg);
extern pascal short sendmydlg(short ITEM, DialogPtr DLG);
extern pascal Boolean sendfilter(DialogPtr THEDIALOG, EventRecord *THEEVENT,
short *ITEMHIT);
extern pascal short recvmydlg(short ITEM, DialogPtr DLG);
extern int dosenddialog(char *lclf[], char *remf[]);
extern int dorecvdialog(char *fn, char *lclf[]);
extern int initfilrecv(void);
extern int initfilset(void);
extern int dogetfdialog(char *remf[]);
extern int sfprtol(char *fn);
extern int set_cwd(void);
/*
* ckmtio.c
*/
extern int sysinit(void);
extern int inittiobufs(void);
extern int port_open(int port);
extern int port_close(void);
extern int ttopen(char *ttname, int *lcl, int modem, int timeo);
extern int ttclos(void);
extern int sershake (int flow);
extern int ttpkt(long spd, int flow, int parity);
extern int ttvt(long spd, int flow, int parity);
extern int ttflui(void);
extern int ttfluo(void);
extern int ttsndb(void);
extern int flushio(void);
extern int sendbreak(int msunit);
extern int toggle_dtr(int msunit);
extern int do_xon(void);
extern int ttsspd(int cps);
extern long ttgspd(void);
/* extern VOID conint(SIGTYP(*f )(int ), SIGTYP(*s )(int )); */
extern VOID connoi(void);
extern void writeps (StringPtr s);
extern int ttol(CHAR *s, int n);
extern int ttoc(char c);
extern int myunrd(CHAR ch);
extern int mac_mygetbuf(long timeo_tics, long intim);
#ifdef PARSENSE
extern int ttinl(CHAR *dest, int max, int timo, CHAR eol, CHAR start);
#else
extern int ttinl(CHAR *dest, int max, int timo, CHAR eol);
#endif
extern int ttinc (int timo);
extern int ttinm(register char *buf, register int max);
extern int ttchk (void);
extern int mac_putchar (int c);
extern int mac_puts (const char *string);
extern int mac_printf(const char *, ...);
extern int mac_perror(const char *);
extern int mac_getchar (void);
/*
* ckmusr.c
*/
extern char macparser(void);
extern int miniparser(int deplete);
extern char microparser(int deplete, int menuok, long time);
extern char domouse(EventRecord *evt, int mini);
extern int doupdate(WindowPtr window);
extern int doactivate(WindowPtr window, int mod);
extern char menu_event(long menu_item);
extern VOID herald(void);
extern int conect(void);
extern int cmdlin(void);
extern int chkint(void);
extern int dodebug(int f, char *s1, char *s2, long n);
extern int sleep(int secs);
extern VOID ermsg(char *msg);
extern VOID intmsg(long n);
/*
* ckmutl.c
*/
extern char *bldlen(char *str, char *dest);
extern void ssetgen(char *stor, char type, char *arg1, char *arg2, char *arg3);
extern CHAR setgen(char type, char *arg1, char *arg2, char *arg3);
extern int printerr(char *str, int err);
extern VOID macfatal(char *str, int err);
extern int SetStrText(int item, StringPtr s, DialogPtr dlg);
extern int SetNumText(int item, int val, DialogPtr dlg);
extern int circleOK(DialogPtr dlg);
extern StringPtr c2p_tmp(char *s);
extern StringPtr c2p_tmp2(char *s);
extern char *p2c_tmp(StringPtr s);
extern char *p2c_tmp2(StringPtr s);
extern void pstring_copy(StringPtr d, StringPtr s);
extern void enable_fkeys(int enable);
extern int aboutKermit(void);
extern int show_stats(void);
extern int handapple(int accitem);
extern int setup_font_menu(void);
extern int change_current_size(struct termw *termw, int item);
extern int change_current_font(struct termw *termw, int item);
extern int setserial(int irefnum, int orefnum, int b, int p);
extern int rshilite(int servalue, RESSERTBL rstbl[], DialogPtr dlg);
extern int rsreference(RESSERTBL rstbl[], int value, DialogPtr dlg);
extern int rsserval(int resvalue, RESSERTBL rstbl[]);
extern int commdialog(void);
extern int etgetcc(int item, DialogPtr dlg, char *chrcell);
extern int etgetnum(int item, DialogPtr dlg, int *intcell);
extern int protodialog(void);
extern int termsetdialog(struct termw *termw);
extern int charsetdialog(struct termw *termw);
extern int setradpair(int rid1, int rid2, int bool, DialogPtr dlg);
extern int setfiledialog(void);
extern int handlelaunch(void);
extern VOID fstats(void);
extern VOID tstats(void);
extern VOID rdebu(CHAR *c, int i);
extern VOID sdebu(int l);
extern void printfalert (char *format, ...);
/*
* ckmwin.c
*/
extern struct cmdw *initcmdw(int id, int vscroll, int hscroll);
extern int sizescrollbars(struct cmdw *cmdw);
extern int sizeteviewr(struct cmdw *cmdw);
extern void growremwindow(struct cmdw *cmdw, Point p);
extern int rcmdwhide(struct cmdw *cmdw);
extern int rcmdwshow(struct cmdw *cmdw);
extern int rcdactivate(struct cmdw *cmdw, int mod);
extern pascal void rdoscroll(ControlHandle WHICHCONTROL, short THECODE);
extern int rcdkey(struct cmdw *cmdw, EventRecord *evt);
extern int rcdmouse(struct cmdw *cmdw, EventRecord *evt);
extern int rcd_cut(struct cmdw *cmdw);
extern int rcd_copy(struct cmdw *cmdw);
extern int rcd_paste(struct cmdw *cmdw);
extern int rcd_clear(struct cmdw *cmdw);
extern int rcdupdate(struct cmdw *cmdw);
extern int scrollbits(struct cmdw *cmdw);
extern int rcdwscroll(struct cmdw *cmdw);
extern int pagescroll(struct cmdw *cmdw, int code, int amount,
ControlHandle ctrlh);
extern int setscrollmax(struct cmdw *cmdw);
extern int trimcon(struct cmdw *cmdw, int l);
extern VOID kSelectWindow(WindowPtr w);
extern VOID kShowWindow(struct termw *termw);
extern VOID kHideWindow(struct termw *termw);
extern struct cmdw *cmdwbywindow (WindowPtr w);
struct termw *termwbywindow (WindowPtr w);
/*
* ckmxla.c
*/
extern CHAR ident(CHAR c);
extern CHAR xl1toas(CHAR c);
extern CHAR xamtoas(CHAR c);
extern CHAR xl1toam(CHAR c);
extern CHAR xamtol1(CHAR c);
#ifdef notdef
extern int CHAR(*xlr[MAXTCSETS +1 ][MAXFCSETS +1 ]);
extern int CHAR(*xls[MAXTCSETS +1 ][MAXFCSETS +1 ]);
#endif