1cdf63a70SMartin Matuska /*- 2*bd66c1b4SMartin Matuska * SPDX-License-Identifier: BSD-2-Clause 3*bd66c1b4SMartin Matuska * 4cdf63a70SMartin Matuska * Copyright (c) 2014, Mike Kazantsev 5cdf63a70SMartin Matuska * All rights reserved. 6cdf63a70SMartin Matuska */ 7cdf63a70SMartin Matuska 8f9762417SMartin Matuska #ifndef BSDCAT_H_INCLUDED 9f9762417SMartin Matuska #define BSDCAT_H_INCLUDED 10f9762417SMartin Matuska 11cdf63a70SMartin Matuska #if defined(PLATFORM_CONFIG_H) 12cdf63a70SMartin Matuska /* Use hand-built config.h in environments that need it. */ 13cdf63a70SMartin Matuska #include PLATFORM_CONFIG_H 14cdf63a70SMartin Matuska #else 15cdf63a70SMartin Matuska /* Not having a config.h of some sort is a serious problem. */ 16cdf63a70SMartin Matuska #include "config.h" 17cdf63a70SMartin Matuska #endif 18cdf63a70SMartin Matuska 19cdf63a70SMartin Matuska struct bsdcat { 20cdf63a70SMartin Matuska /* Option parser state */ 21cdf63a70SMartin Matuska int getopt_state; 22cdf63a70SMartin Matuska char *getopt_word; 23cdf63a70SMartin Matuska 24cdf63a70SMartin Matuska /* Miscellaneous state information */ 25cdf63a70SMartin Matuska int argc; 26cdf63a70SMartin Matuska char **argv; 27cdf63a70SMartin Matuska const char *argument; 28cdf63a70SMartin Matuska }; 29cdf63a70SMartin Matuska 30cdf63a70SMartin Matuska enum { 31cdf63a70SMartin Matuska OPTION_VERSION 32cdf63a70SMartin Matuska }; 33cdf63a70SMartin Matuska 34cdf63a70SMartin Matuska int bsdcat_getopt(struct bsdcat *); 35f9762417SMartin Matuska 36f9762417SMartin Matuska #endif 37