Initial import of the CDE 2.1.30 sources from the Open Group.
This commit is contained in:
27
cde/programs/dthelp/parser/pass1/util/emptyfil.c
Normal file
27
cde/programs/dthelp/parser/pass1/util/emptyfil.c
Normal file
@@ -0,0 +1,27 @@
|
||||
/* $XConsortium: emptyfil.c /main/3 1995/11/08 10:30:15 rswiston $ */
|
||||
/* Copyright (c) 1988, 1989 Hewlett-Packard Co. */
|
||||
/* Creates a file with nothing in it */
|
||||
#include <stdio.h>
|
||||
#if defined(MSDOS)
|
||||
#include <process.h>
|
||||
#endif
|
||||
#include "basic.h"
|
||||
|
||||
void main(
|
||||
#if defined(M_PROTO)
|
||||
int argc, char **argv
|
||||
#endif
|
||||
) ;
|
||||
|
||||
void main(argc, argv)
|
||||
int argc ;
|
||||
char **argv ;
|
||||
{
|
||||
if (argc != 2) {
|
||||
fprintf(stderr, "Usage: emptyfil filename\n") ;
|
||||
exit(1) ;
|
||||
}
|
||||
if (! fopen(argv[1], "w"))
|
||||
fprintf(stderr, "Unable to open %s\n", argv[1]) ;
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user