ckuusx.c
资源名称:cku197.tar.Z [点击查看]
上传用户:dufan58
上传日期:2007-01-05
资源大小:3407k
文件大小:192k
源码类别:
通讯/手机编程
开发平台:
Windows_Unix
- }
- if (n == 0)
- goto xdebug;
- m = n + 32; /* m = size of dest */
- pbuf = (char *) malloc(m+1);
- if (!pbuf)
- goto xdebug;
- i = 0;
- pbuf[i++] = '[';
- for (; i <= n; p++) {
- if (*p == LF) {
- if (i >= m-4)
- break;
- pbuf[i++] = '<';
- pbuf[i++] = 'L';
- pbuf[i++] = 'F';
- pbuf[i++] = '>';
- continue;
- } else if (*p) {
- pbuf[i++] = *p;
- continue;
- } else {
- if (i >= m-5)
- break;
- pbuf[i++] = '<';
- pbuf[i++] = 'N';
- pbuf[i++] = 'U';
- pbuf[i++] = 'L';
- pbuf[i++] = '>';
- continue;
- }
- }
- if (i < m-2 || contd) {
- pbuf[i++] = '.';
- pbuf[i++] = '.';
- }
- pbuf[i++] = ']';
- #ifdef COMMENT
- pbuf[i] = NUL;
- #else
- sprintf(pbuf+i,"=%ld",n);
- #endif /* */
- if (!s1) s1 = "";
- if (*s1) {
- if (zsout(ZDFILE,s1) < 0) {
- deblog = 0;
- zclose(ZDFILE);
- }
- }
- if (zsoutl(ZDFILE,pbuf) < 0) {
- deblog = 0;
- zclose(ZDFILE);
- }
- #ifdef CKSYSLOG
- if (ckxsyslog >= SYSLG_DB && ckxlogging) {
- cksyslog(SYSLG_DB,1,"debug",s1,pbuf);
- }
- #endif /* CKSYSLOG */
- free(pbuf);
- }
- #endif /* DEBUG */
- #endif /* COMMENT */
- break;
- case F100: /* 4, "s1" */
- if (zsoutl(ZDFILE,s1) < 0) {
- deblog = 0;
- zclose(ZDFILE);
- }
- #ifdef CKSYSLOG
- if (ckxsyslog >= SYSLG_DB && ckxlogging) {
- cksyslog(SYSLG_DB,1,"debug",s1,NULL);
- }
- #endif /* CKSYSLOG */
- break;
- case F101: /* 5, "s1=n" */
- sprintf(sp,"%s=%ldn",s1,n);
- if (zsout(ZDFILE,dbptr) < 0) {
- deblog = 0;
- zclose(ZDFILE);
- }
- #ifdef CKSYSLOG
- if (ckxsyslog >= SYSLG_DB && ckxlogging) {
- cksyslog(SYSLG_DB,1,"debug",dbptr,NULL);
- }
- #endif /* CKSYSLOG */
- break;
- case F110: /* 6, "s1[s2]" */
- sprintf(sp,"%s[%s]n",s1,s2);
- if (zsout(ZDFILE,dbptr) < 0) {
- deblog = 0;
- zclose(ZDFILE);
- }
- #ifdef CKSYSLOG
- if (ckxsyslog >= SYSLG_DB && ckxlogging) {
- cksyslog(SYSLG_DB,1,"debug",dbptr,NULL);
- }
- #endif /* CKSYSLOG */
- break;
- case F111: /* 7, "s1[s2]=n" */
- sprintf(sp,"%s[%s]=%ldn",s1,s2,n);
- if (zsout(ZDFILE,dbptr) < 0) {
- deblog = 0;
- zclose(ZDFILE);
- }
- #ifdef CKSYSLOG
- if (ckxsyslog >= SYSLG_DB && ckxlogging) {
- cksyslog(SYSLG_DB,1,"debug",dbptr,NULL);
- }
- #endif /* CKSYSLOG */
- break;
- default:
- sprintf(sp,"n?Invalid format for debug() - %dn",f);
- if (zsout(ZDFILE,dbptr) < 0) {
- deblog = 0;
- zclose(ZDFILE);
- }
- #ifdef CKSYSLOG
- if (ckxsyslog >= SYSLG_DB && ckxlogging) {
- cksyslog(SYSLG_DB,1,"debug",dbptr,NULL);
- }
- #endif /* CKSYSLOG */
- break;
- }
- xdebug: /* Common exit point */
- #ifndef OS2
- deblog = 1; /* Restore this */
- #endif /* OS2 */
- return(0);
- }
- VOID
- #ifdef CK_ANSIC
- dohexdump(CHAR *msg, CHAR *st, int cnt)
- #else
- dohexdump(msg,st,cnt) CHAR *msg; CHAR *st; int cnt;
- #endif /* CK_ANSIC */
- /* dohexdump */ {
- int i = 0, j = 0;
- char tmp[8];
- if (!deblog) return; /* If no debug log, don't. */
- if (!dbptr) { /* Allocate memory buffer */
- dbptr = malloc(DBUFL+1); /* This only happens once */
- if (!dbptr) {
- deblog = 0;
- zclose(ZDFILE);
- return;
- }
- }
- if (msg != NULL) {
- sprintf(dbptr,"HEXDUMP: %s (%d bytes)n",msg,cnt);
- if (zsout(ZDFILE,dbptr) < 0) {
- deblog = 0;
- zclose(ZDFILE);
- return;
- }
- } else {
- sprintf(dbptr,"HEXDUMP: (%d bytes)n",cnt);
- zsout(ZDFILE,dbptr);
- if (zsout(ZDFILE,dbptr) < 0) {
- deblog = 0;
- zclose(ZDFILE);
- return;
- }
- }
- for (i = 0; i < cnt; i++) {
- dbptr[0] = ' ';
- for(j = 0 ; (j < 16) && ((i + j) < cnt) ; j++) {
- sprintf(tmp,
- "%s%02x%s",
- (j == 8 ? "| " : ""),
- (CHAR) st[i + j],
- (j < 16 && i < cnt ? " " : "")
- );
- strcat(dbptr,tmp);
- }
- strcat(dbptr,"n");
- i += j - 1;
- if (zsout(ZDFILE,dbptr) < 0) {
- deblog = 0;
- zclose(ZDFILE);
- return;
- }
- } /* end for */
- }
- #endif /* DEBUG */
- VOID
- #ifdef OS2
- logchar(unsigned short c)
- #else /* OS2 */
- #ifdef CK_ANSIC
- logchar(char c)
- #else
- logchar(c) char c;
- #endif /* CK_ANSIC */
- #endif /* OS2 */
- /* logchar */ { /* Log character c to session log */
- #ifndef NOLOCAL
- if (seslog)
- if ((sessft != XYFT_T) ||
- (c != 'r' &&
- c != ' ' &&
- c != XON &&
- c != XOFF))
- if (zchout(ZSFILE,(CHAR)(c & 0xFF)) < 0) {
- conoll("");
- conoll("ERROR WRITING SESSION LOG, LOG CLOSED!");
- seslog = 0;
- zclose(ZSFILE);
- }
- #endif /* NOLOCAL */
- }
- VOID
- logstr(s, len) char * s; int len; { /* Log string to session log */
- #ifndef NOLOCAL
- char c;
- int n = 0;
- if (!seslog || !s)
- return;
- while (n < len) {
- c = s[n];
- n++;
- if ((sessft != XYFT_T) ||
- (c != 'r' &&
- c != ' ' &&
- c != XON &&
- c != XOFF))
- if (zchout(ZSFILE,c) < 0) {
- conoll("");
- conoll("ERROR WRITING SESSION LOG, LOG CLOSED!");
- seslog = 0;
- zclose(ZSFILE);
- return;
- }
- }
- #endif /* NOLOCAL */
- }
- #ifdef CK_CURSES
- #ifdef STRATUS
- /* VOS has curses but no tgetent() */
- int
- tgetent(s1, s2) char * s1, * s2; {
- return(1);
- }
- #endif /* STRATUS */
- #ifdef VMS
- #ifdef __DECC
- _PROTOTYP(int tgetent,(char *, char *));
- #endif /* __DECC */
- #endif /* VMS */
- /*
- There are three different ways to do fullscreen on VMS.
- 1. Use the real curses library, VAXCCURSE.
- 2. Use do-it-yourself code.
- 3. Use the Screen Manager, SMG$.
- Method 1 doesn't work quite right; you can't call endwin(), so once you've
- started curses mode, you can never leave.
- Method 2 doesn't optimize the screen, and so much more time is spent in
- screen writes. This actually causes file transfers to fail because the
- tty device input buffer can be overrun while the screen is being updated,
- especially on a slow MicroVAX that has small typeahead buffers.
- In the following #ifdef block, #define one of them and #undef the other 2.
- So now let's try method 3...
- */
- #ifdef VMS
- #define CK_SMG /* Screen Manager */
- #undef MYCURSES /* Do-it-yourself */
- #undef VMSCURSE /* VAXCCURSE library */
- #endif /* VMS */
- /*
- But just before New Years, 2000, the SMG library seemed to break on
- both VMS systems we have here (an Alpha with VMS 7.1 and a VAX with 5.5).
- So back to MYCURSES, which works fine.
- */
- #ifdef VMS
- #undef CK_SMG
- #define MYCURSES
- #endif /* VMS */
- #ifdef MYCURSES
- #define stdscr 0
- #ifdef CK_WREFRESH
- #undef CK_WREFRESH
- #endif /* CK_WREFRESH */
- #endif /* MYCURSES */
- /* S C R E E N C -- Screen display function, uses curses */
- /* Idea for curses display contributed by Chris Pratt of APV Baker, UK */
- /* Avoid conficts with curses.h */
- #ifdef QNX
- /* Same as ckcasc.h, but in a different radix... */
- #ifdef ESC
- #undef ESC
- #endif /* ESC */
- #endif /* QNX */
- #ifndef MYCURSES
- #undef VOID /* This was defined in ckcdeb.h */
- #endif /* MYCURSES */
- #undef BS /* These were defined in ckcasc.h */
- #undef CR
- #undef NL
- #undef SO
- #undef US
- #undef SP /* Used in ncurses */
- #define CHR_SP 32 /* Use this instead */
- #ifdef VMS /* VMS fullscreen display */
- #ifdef MYCURSES /* Do-it-yourself method */
- extern int isvt52; /* From CKVTIO.C */
- #define printw printf
- #else
- #ifdef VMSCURSE /* VMS curses library VAXCCURSE */
- #include <curses.h>
- /* Note: Screen manager doesn't need a header file */
- #endif /* VMSCURSE */
- #endif /* MYCURSES */
- #else /* Not VMS */
- #ifdef MYCURSES /* Do-it-yourself method */
- #define isvt52 0 /* Used by OS/2, VT-100/ANSI always */
- #ifdef CKXPRINTF
- #define printw ckxprintf
- #else /* CKXPRINTF */
- #define printw printf
- #endif /* CKXPRINTF */
- #else /* Use real curses */
- #ifdef CK_NCURSES /* or ncurses... */
- #ifdef CKXPRINTF /* Our printf macro conflicts with */
- #undef printf /* use of "printf" in ncurses.h */
- #endif /* CKXPRINTF */
- #include <ncurses.h>
- #ifdef CKXPRINTF
- #define printf ckxprintf
- #endif /* CKXPRINTF */
- #else /* Not ncurses */
- #ifdef CKXPRINTF /* Our printf macro conflicts with */
- #undef printf /* use of "printf" in curses.h */
- #endif /* CKXPRINTF */
- #include <curses.h>
- #ifdef CKXPRINTF
- #define printf ckxprintf
- #endif /* CKXPRINTF */
- #endif /* CK_NCURSES */
- #endif /* MYCURSES */
- #endif /* VMS */
- #endif /* CK_CURSES */
- /* F X D I N I T -- File Xfer Display Initialization */
- #ifdef CK_CURSES
- #ifndef MYCURSES
- #ifndef CK_SMG
- static
- #ifdef CK_ANSIC
- /* Can't use VOID because of curses.h */
- void
- ck_termset(int);
- #else
- ck_termset();
- #endif /* CK_ANSIC */
- #endif /* CK_SMG */
- #endif /* MYCURSES */
- #endif /* CK_CURSES */
- #ifdef NOTERMCAP
- static int notermcap = 1;
- #else
- static int notermcap = 0;
- #endif /* NOTERMCAP */
- #ifndef NODISPLAY
- #ifdef OSK
- VOID
- #else
- #ifdef CK_ANSIC
- void
- #endif /* CKANSIC */
- #endif /* OSK */
- fxdinit(xdispla) int xdispla; {
- #ifndef COHERENT
- #ifndef OS2
- #ifndef STRATUS
- char *s;
- int x, dummy;
- debug(F101,"fxdinit xdispla","",xdispla);
- debug(F101,"fxdinit fxd_inited","",fxd_inited);
- #ifdef IKSD
- #ifndef NOXFER
- /* No curses for IKSD */
- if (inserver) {
- fdispla = XYFD_N;
- return;
- }
- if (fxd_inited) /* Only do this once */
- return;
- #endif /* NOXFER */
- #endif /* IKSD */
- #ifdef CK_CURSES
- #ifdef VMS
- /* Force BRIEF in Batch logs */
- if (batch && (xdispla == XYFD_C || xdispla == XYFD_S))
- xdispla = XYFD_B;
- #else
- if (xdispla == XYFD_C || xdispla == 9999) {
- #ifdef DYNAMIC
- if (!trmbuf) {
- /*
- Allocate tgetent() buffer. Make it big -- some termcaps can be huge;
- tgetent() merrily writes past the end of the buffer, causing core dumps
- or worse.
- */
- trmbuf = (char *)malloc(TRMBUFL);
- if (!trmbuf) {
- notermcap = 1;
- debug(F101,"fxdinit malloc trmbuf","FAILED",TRMBUFL);
- fdispla = XYFD_S;
- return;
- }
- debug(F111,"fxdinit malloc trmbuf","OK",TRMBUFL);
- debug(F001,"fxdinit trmbuf","",trmbuf);
- #ifdef COMMENT
- memset(trmbuf,' ',(size_t)TRMBUFL);
- debug(F100,"fxdinit memset OK","",0);
- #endif /* COMMENT */
- }
- #endif /* DYNAMIC */
- debug(F100,"fxdinit before getenv(TERM)","",0);
- s = getenv("TERM");
- debug(F110,"fxdinit after getenv(TERM)",s,0);
- if (!s) s = "";
- if (*s) {
- debug(F110,"fxdinit before tgetent()",s,0);
- x = tgetent(trmbuf,s);
- debug(F111,"fxdinit tgetent",s,x);
- } else {
- x = 0;
- notermcap = 1;
- debug(F110,"fxdinit TERM null - no tgetent",s,0);
- }
- if (x < 1 && !quiet && !backgrd
- #ifdef VMS
- && !batch
- #endif /* VMS */
- ) {
- printf("Warning: terminal type unknown: "%s"n",s);
- printf("SCREEN command will use ANSI sequences.n");
- if (local)
- printf("Fullscreen file transfer display disabled.n");
- fdispla = XYFD_S;
- }
- #ifndef MYCURSES
- #ifndef CK_SMG
- ck_termset(x);
- #endif /* CK_SMG */
- #endif /* MYCURSES */
- fxd_inited = 1;
- }
- #endif /* CK_CURSES */
- #endif /* VMS */
- #endif /* STRATUS */
- #endif /* OS2 */
- #endif /* COHERENT */
- }
- #endif /* NODISPLAY */
- #ifdef CK_CURSES
- #ifdef CK_SMG
- /*
- Long section for Screen Manager starts here...
- By William Bader.
- */
- #include "ckvvms.h"
- #ifdef OLD_VMS
- #include <smgdef.h> /* use this on VAX C 2.4 */
- /* #include <smgmsg.h> */
- #else
- #include <smg$routines.h> /* Martin Zinser */
- #endif /* OLD_VMS */
- extern unsigned int vms_status; /* Used for system service return status */
- static long smg_pasteboard_id = -1; /* pasteboard identifier */
- static long smg_display_id = -1; /* display identifier */
- static int smg_open = 0; /* flag if smg current open */
- static int smg_inited = 0; /* flag if smg initialized */
- #ifdef COMMENT
- #define clrtoeol() SMG$ERASE_LINE(&smg_display_id, 0, 0)
- #define clear() SMG$ERASE_DISPLAY(&smg_display_id, 0, 0, 0, 0)
- #define touchwin(scr) SMG$REPAINT_SCREEN(&smg_pasteboard_id)
- #else /* Not COMMENT */
- #define clrtoeol() smg$erase_line(&smg_display_id, 0, 0)
- #define clear() smg$erase_display(&smg_display_id, 0, 0, 0, 0)
- #define touchwin(scr) smg$repaint_screen(&smg_pasteboard_id)
- #endif /* COMMENT */
- #define clearok(curscr,ok) /* Let wrefresh() do the work */
- #define wrefresh(cursrc) touchwin(scr)
- static void
- move(row, col) int row, col; {
- /* Change from 0-based for curses to 1-based for SMG */
- if (!smg_open)
- return;
- ++row; ++col;
- debug(F111,"VMS smg move",ckitoa(row),col);
- #ifdef COMMENT /* Martin Zinser */
- CHECK_ERR("move: smg$set_cursor_abs",
- SMG$SET_CURSOR_ABS(&smg_display_id, &row, &col));
- #else
- CHECK_ERR("move: smg$set_cursor_abs",
- smg$set_cursor_abs(&smg_display_id, &row, &col));
- #endif /* COMMENT */
- debug(F101,"VMS smg move vms_status","",vms_status);
- }
- #ifdef VMS_V40
- #define OLD_VMS
- #endif /* VMS_V40 */
- #ifdef VMS_V42
- #define OLD_VMS
- #endif /* VMS_V42 */
- #ifdef VMS_V44
- #define OLD_VMS
- #endif /* VMS_V44 */
- static int
- initscr() {
- int rows = 24, cols = 80;
- int row = 1, col = 1;
- debug(F101,"VMS initscr smg_pasteboard_id A","",smg_pasteboard_id);
- if (smg_pasteboard_id == -1) { /* Open the screen */
- #ifdef OLD_VMS /* Note: Routine calls lowercased 9/96 */
- CHECK_ERR("initscr: smg$create_pasteboard",
- smg$create_pasteboard(&smg_pasteboard_id, 0, 0, 0, 0));
- #else
- /* For VMS V5, not tested */
- CHECK_ERR("initscr: smg$create_pasteboard",
- smg$create_pasteboard(&smg_pasteboard_id, 0, 0, 0, 0, 0));
- #endif /* OLD_VMS */
- }
- debug(F101,"VMS initscr smg_pasteboard_id B","",smg_pasteboard_id);
- if (smg_pasteboard_id == -1) {
- printf("?Error initializing fullscreen displayn");
- fdispla = XYFD_S;
- dpyinit();
- return(0);
- }
- debug(F101,"VMS initscr smg_display_id","",smg_display_id);
- if (smg_display_id == -1) { /* Create a display window */
- #ifdef COMMENT /* Martin Zinser */
- CHECK_ERR("initscr: smg$create_virtual_display",
- SMG$CREATE_VIRTUAL_DISPLAY(&rows, &cols, &smg_display_id,
- 0, 0, 0));
- /* Connect the display window to the screen */
- CHECK_ERR("initscr: smg$paste_virtual_display",
- SMG$PASTE_VIRTUAL_DISPLAY(&smg_display_id,&smg_pasteboard_id,
- &row,&col));
- #else
- CHECK_ERR("initscr: smg$create_virtual_display",
- smg$create_virtual_display(&rows, &cols, &smg_display_id,
- 0, 0, 0));
- /* Connect the display window to the screen */
- CHECK_ERR("initscr: smg$paste_virtual_display",
- smg$paste_virtual_display(&smg_display_id,&smg_pasteboard_id,
- &row,&col));
- #endif /* COMMENT */
- }
- debug(F101,"VMS initscr smg_open A","",smg_open);
- if (!smg_open) { /* Start a batch update */
- smg_open = 1;
- #ifdef COMMENT
- CHECK_ERR("initscr: smg$begin_pasteboard_update",
- SMG$BEGIN_PASTEBOARD_UPDATE(&smg_pasteboard_id));
- #else
- CHECK_ERR("initscr: smg$begin_pasteboard_update",
- smg$begin_pasteboard_update(&smg_pasteboard_id));
- #endif /* COMMENT */
- debug(F101,"VMS initscr smg$begin_pasteboard_update","",vms_status);
- }
- debug(F101,"VMS initscr smg_open B","",smg_open);
- smg_inited = 1;
- return(1);
- }
- static void
- refresh() {
- debug(F101,"refresh smg_pasteboard_id","",smg_pasteboard_id);
- if (smg_open == 0 || smg_pasteboard_id == -1)
- return;
- #ifdef COMMENT /* Martin Zinser */
- CHECK_ERR("refresh: smg$end_pasteboard_update",
- SMG$END_PASTEBOARD_UPDATE(&smg_pasteboard_id));
- CHECK_ERR("refresh: smg$begin_pasteboard_update",
- SMG$BEGIN_PASTEBOARD_UPDATE(&smg_pasteboard_id));
- #else
- CHECK_ERR("refresh: smg$end_pasteboard_update",
- smg$end_pasteboard_update(&smg_pasteboard_id));
- CHECK_ERR("refresh: smg$begin_pasteboard_update",
- smg$begin_pasteboard_update(&smg_pasteboard_id));
- #endif /* COMMENT */
- }
- static void
- endwin() {
- if (!smg_open)
- return;
- smg_open = 0;
- #ifdef COMMENT
- CHECK_ERR("endwin: smg$end_pasteboard_update",
- SMG$END_PASTEBOARD_UPDATE(&smg_pasteboard_id));
- #else
- CHECK_ERR("endwin: smg$end_pasteboard_update",
- smg$end_pasteboard_update(&smg_pasteboard_id));
- #endif /* COMMENT */
- move(22, 0);
- #ifdef COMMENT
- /*
- These calls clear the screen.
- (convert routine calls to lowercase - Martin Zinser)
- */
- CHECK_ERR("endwin: smg$delete_virtual_display",
- SMG$DELETE_VIRTUAL_DISPLAY(&smg_display_id));
- smg_display_id = -1;
- CHECK_ERR("endwin: smg$delete_pasteboard",
- SMG$DELETE_PASTEBOARD(&smg_pasteboard_id, 0));
- smg_pasteboard_id = -1;
- #endif /* COMMENT */
- }
- #ifdef COMMENT
- /* DECC 6.2 screams bloody murder about printw ("not enough args") */
- /* but adding the following prototype only makes it holler louder. */
- #ifdef __DECC
- /* "varargs" prototype for printw */
- _PROTOTYP(static int printw,(char *, ...));
- #endif /* __DECC */
- #endif /* COMMENT */
- #ifdef __DECC
- #include <stdarg.h>
- _PROTOTYP(static void printw,(char *, ...));
- static void
- printw(char *str,...) {
- char buf[255];
- va_list ap;
- $DESCRIPTOR(text_dsc, 0);
- text_dsc.dsc$a_pointer=buf;
- if (!smg_open)
- return;
- va_start(ap,str);
- text_dsc.dsc$w_length = vsprintf(buf, str, ap);
- va_end(ap);
- CHECK_ERR("printw: smg$put_chars",
- smg$put_chars(&smg_display_id, &text_dsc, 0, 0, 0, 0, 0));
- }
- #else
- static void
- printw(str, a1, a2, a3, a4, a5, a6, a7, a8)
- char *str;
- long a1, a2, a3, a4, a5, a6, a7, a8;
- /* printw */ {
- char buf[255];
- $DESCRIPTOR(text_dsc, 0);
- if (!smg_open)
- return;
- text_dsc.dsc$a_pointer=buf;
- text_dsc.dsc$w_length = sprintf(buf, str, a1, a2, a3, a4, a5, a6, a7, a8);
- CHECK_ERR("printw: smg$put_chars",
- smg$put_chars(&smg_display_id, &text_dsc, 0, 0, 0, 0, 0));
- }
- #endif /* __DECC */
- #define CK_CURPOS
- int
- ck_curpos(row, col) {
- debug(F111,"VMS smg ck_curpos",ckitoa(row),col);
- if (!smg_inited || !smg_open) {
- initscr();
- }
- debug(F101,"VMS smg curpos smg_open","",smg_open);
- if (!smg_open)
- return(0);
- debug(F111,"VMS smg ck_curpos",ckitoa(row-1),col-1);
- move(row - 1, col - 1); /* SMG is 0-based */
- refresh();
- /* endwin(); */
- return(0);
- }
- int
- ck_cls() {
- debug(F101,"VMS smg ck_cls smg_inited","",smg_inited);
- if (!smg_inited || !smg_open) {
- initscr();
- }
- debug(F101,"VMS smg ck_cls smg_open","",smg_open);
- if (!smg_open)
- return(0);
- clear();
- refresh();
- /* endwin(); */
- return(0);
- }
- int
- ck_cleol() {
- debug(F101,"VMS smg ck_cleol smg_inited","",smg_inited);
- if (!smg_inited || !smg_open) {
- initscr();
- }
- debug(F101,"VMS smg ck_cleol smg_open","",smg_open);
- if (!smg_open)
- return(0);
- clrtoeol();
- refresh();
- /* endwin(); */
- return(0);
- }
- #endif /* CK_SMG */
- #ifdef MYCURSES
- /*
- Do-it-yourself curses implementation for VMS, OS/2 and other ANSI/VT-100's.
- Supports only the VT52 and VT1xx (and later VT2xx/3xx/4xx) terminals.
- By Terry Kennedy, St Peters College.
- First, some stuff we can just ignore:
- */
- static int
- touchwin(x) int x; {
- return(0);
- }
- static int
- initscr() {
- return(0);
- }
- static int
- refresh() {
- return(0);
- }
- static int
- endwin() {
- return(0);
- }
- /*
- * Now, some stuff we need to do:
- */
- _PROTOTYP( int move, (int, int) );
- #ifndef OS2
- int
- move(row, col) int row, col; {
- if (isvt52)
- printf("