home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
CMDS
/
smallutils.t.Z
/
smallutils.t
/
sbreak.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-09-28
|
754b
|
46 lines
#include <stdio.h>
#include <sg_codes.h>
#include <sgstat.h>
#include <errno.h>
#include <strings.h>
main(argc,argv)
int argc;
char *argv[];
{
static char temp[50];
FILE *outfile;
int err;
void help();
if (argc<2)
{
fprintf(stderr,"%s: Must specify device! \n",argv[0]);
exit(E_BPNAM);
}
if (argv[1][0]=='-' && argv[1][1] == '?')
help();
outfile=fopen(argv[1],"w");
if (outfile==NULL)
{
fprintf(stderr, "%s: error opening %s\n",argv[0],argv[1]);
exit(0);
}
if (!_ss_break(fileno(outfile)))
{
err=ferror(outfile);
fclose(outfile);
exit(err);
}
fclose(outfile);
exit(0);
}
void help()
{
printf("Syntax: sbreak [/device]\n");
printf("Function: send break on SCF device\n");
printf("Options: none\n");
exit(0);
}