1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-24 11:29:10 +00:00

Include <unistd.h> for getopt's interface rather than declare things

individually here.
This commit is contained in:
Warner Losh 2001-03-01 06:22:46 +00:00
parent 6fdc941228
commit c5acf97d44
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=73264
6 changed files with 11 additions and 23 deletions

View File

@ -30,8 +30,14 @@
*
*/
#ifndef lint
#if 0
static char *id =
"@(#)playvt.c, 1.00, Last Edit-Date: [Sun Jan 1 18:32:22 1995]";
#endif
static const char rcsid[] =
"$FreeBSD$";
#endif /* not lint */
/*---------------------------------------------------------------------------*
*
@ -48,10 +54,6 @@ main(argc,argv)
int argc;
char *argv[];
{
extern int optind;
extern int opterr;
extern char *optarg;
int c;
FILE *fp = stdin;
volatile int i;

View File

@ -39,6 +39,7 @@
#include <stdio.h>
#include <err.h>
#include <fcntl.h>
#include <unistd.h>
#include <machine/pcvt_ioctl.h>
#define DEFAULTFD 0
@ -47,10 +48,6 @@ main(argc,argv)
int argc;
char *argv[];
{
extern int optind;
extern int opterr;
extern char *optarg;
struct pcvtid pcvtid;
struct pcvtinfo pcvtinfo;
int c;

View File

@ -51,6 +51,7 @@
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <machine/pcvt_ioctl.h>
@ -75,9 +76,6 @@ main(argc, argv)
int argc;
char *argv[];
{
extern char *optarg;
extern int optind;
int c = 0;
int errf = 0;

View File

@ -46,6 +46,7 @@
#include <stdio.h>
#include <err.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <machine/pcvt_ioctl.h>
@ -76,10 +77,6 @@ main(argc,argv)
int argc;
char *argv[];
{
extern int optind;
extern int opterr;
extern char *optarg;
FILE *in;
struct stat sbuf, *sbp;
unsigned char *fonttab;

View File

@ -40,6 +40,7 @@
#include <stdio.h>
#include <err.h>
#include <fcntl.h>
#include <unistd.h>
#include <machine/pcvt_ioctl.h>
#define DEFAULTFD 0
@ -172,10 +173,6 @@ main(argc,argv)
int argc;
char *argv[];
{
extern int optind;
extern int opterr;
extern char *optarg;
int c;
int fd;

View File

@ -31,6 +31,7 @@
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <unistd.h>
/*
* The default toupper() macro is stupid, will toupper anything
@ -76,10 +77,6 @@ main(argc,argv)
int argc;
char *argv[];
{
/* these are defined in the getopt routine */
extern char *optarg; /* argument give to an option */
extern int optind; /* argv index after option processing */
int option; /* option character returned by getopt */
int initf = 0; /* read initialization file */
int lockf = 0; /* lock keys after loading strings */