This repository has been archived on 2024-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
CodeBlocksPortable/WATCOM/samples/clibexam/_bgetcmd.c

19 lines
302 B
C

#include <stdio.h>
#include <stdlib.h>
#include <process.h>
void main()
{
char *cmdline;
int cmdlen;
cmdlen = _bgetcmd( NULL, 0 ) + 1;
cmdline = malloc( cmdlen );
if( cmdline != NULL ) {
cmdlen = _bgetcmd( cmdline, cmdlen );
printf( "%s\n", cmdline );
}
}