key.c

来自「At can be given its arguments in a file.」· C语言 代码 · 共 50 行

C
50
字号
/*
* KEY.C - Monitor to play arguments as they were given from command line.
*
*
* PROGRAMMER:	    Martti Ylikoski
* CREATED:	    19.3.1991
*/
static char *VERSION = "Version  1.0. Copyright (c) Martti Ylikoski. 1990, 1991" ;
/*
*/

static char *progname ;
#include <monout.h>

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <memory.h>
#define INCL_DOS
#define INCL_KBD
#define INCL_VIO
#define INCL_DOSPROCESS
#define INCL_DOSMONITORS
#define INCL_DOSERRORS
#include <os2.h>


int main(int argc, char *argv[])
{
int i ;
char buf[512] ;

   progname = argv[0] ;

   for (i = 1; i < argc ; i++)
   {
       if (argv[i][0] == '\\')
       {
	  MonPlayStr(&argv[i][1], MON_SCAN) ;
       }
       else
       {
	  strcpy(buf, argv[i]) ;
	  //strcat(buf,"\r") ;
	  MonPlayStr(buf, MON_STR) ;
       }
   }
   return( 0 ) ;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?