gencheck.c revision 3939cc42d8157258c3e65b99da2415e8adb532d3
/*
* Copyright (C) 2014-2016 Internet Systems Consortium, Inc. ("ISC")
*
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
#include <config.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#define USAGE "usage: gencheck <filename>\n"
static int
const char chars[] = "abcdefghijklmnopqrstuvwxyz0123456789";
ssize_t i;
for (i = 0;
i < count;
{
/* Just ignore the trailing newline */
if (buf[i] == '\n')
continue;
return 0;
}
return 1;
}
int
{
int ret;
int fd;
char buf[1024];
ret = EXIT_FAILURE;
fd = -1;
length = 0;
if (argc != 2) {
goto out;
}
if (fd == -1)
goto out;
start = 0;
if (count < 0)
goto out;
goto out;
}
ret = EXIT_SUCCESS;
out:
if (fd != -1)
return (ret);
}