1
/***************************************************************/
5
/* Functions to support OS/2. */
7
/* This file is part of REMIND. */
9
/* This file is Copyright (C) 1993 by Russ Herman. */
10
/* REMIND is Copyright (C) 1992-1998 by David F. Skoll */
11
/* Copyright (C) 1999-2000 by Roaring Penguin Software Inc. */
13
/***************************************************************/
16
static char const RCSID[] = "$Id: os2func.c,v 1.1 2000/03/15 16:03:57 dfs Exp $";
24
#define INCL_DOSPROCESS
27
#if defined(OS2_POPUP) || defined(_MSC_VER)
41
/* EMX defines PS_TYPE, so we undefine it here to avoid
42
a redefinition warning when we include "types.h" */
51
typedef USHORT APIRET;
54
static APIRET apiret = 0;
55
static KBDKEYINFO kbci;
56
static char *pszPressAny = "\r\nPress any key to continue";
57
static USHORT pflags = VP_WAIT; /* | VP_TRANSPARENT; */
59
static char VioSubstBuffer[SHELLSIZE + 1];
64
if (!(DebugFlag & DB_ECHO_LINE))
70
if (DebugFlag & DB_ECHO_LINE)
73
VioWrtTTY(pszPressAny, strlen(pszPressAny), 0);
74
KbdCharIn(&kbci, IO_WAIT, hkbd);
79
int PutsPopUp(char *s)
81
char c, *os = VioSubstBuffer;
83
if (DebugFlag & DB_ECHO_LINE)
87
/* Convert \n to \r\n in auxiliary buffer for VIO */
88
if ((c= *s++) == '\n')
92
VioWrtTTY(VioSubstBuffer, strlen(VioSubstBuffer), 0);
97
int PutlPopUp(char *s)
101
if (DebugFlag & DB_ECHO_LINE)
104
VioWrtTTY("\r\n", 2, 0);
114
if (DebugFlag & DB_ECHO_LINE)
119
VioWrtTTY("\r\n", 2, 0);
131
#define DB_ECHO_LINE 16
133
void main(/* int argc, char **argv */)
137
ret = os2fputs("Test VIO PopUp Writing");
139
fprintf(stderr, "Test VIO PopUP Writing returned %d %ld",
147
unsigned sleep(unsigned sec)
149
return DosSleep(sec * 1000L);