diff --git a/TODO b/TODO deleted file mode 100644 index bb933f7..0000000 --- a/TODO +++ /dev/null @@ -1,2 +0,0 @@ -Figure out what to do about extern inline, as it's not supported by -newer gcc-3.x. diff --git a/argp-fmtstream.h b/argp-fmtstream.h index 471a129..fbd2bf9 100644 --- a/argp-fmtstream.h +++ b/argp-fmtstream.h @@ -130,16 +130,6 @@ extern ssize_t argp_fmtstream_printf (argp_fmtstream_t __fs, const char *__fmt, ...) PRINTF_STYLE(2,3); -extern int __argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch); -extern int argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch); - -extern int __argp_fmtstream_puts (argp_fmtstream_t __fs, const char *__str); -extern int argp_fmtstream_puts (argp_fmtstream_t __fs, const char *__str); - -extern size_t __argp_fmtstream_write (argp_fmtstream_t __fs, - const char *__str, size_t __len); -extern size_t argp_fmtstream_write (argp_fmtstream_t __fs, - const char *__str, size_t __len); /* Access macros for various bits of state. */ #define argp_fmtstream_lmargin(__fs) ((__fs)->lmargin) @@ -149,38 +139,16 @@ extern size_t argp_fmtstream_write (argp_fmtstream_t __fs, #define __argp_fmtstream_rmargin argp_fmtstream_rmargin #define __argp_fmtstream_wmargin argp_fmtstream_wmargin -/* Set __FS's left margin to LMARGIN and return the old value. */ -extern size_t argp_fmtstream_set_lmargin (argp_fmtstream_t __fs, - size_t __lmargin); -extern size_t __argp_fmtstream_set_lmargin (argp_fmtstream_t __fs, - size_t __lmargin); - -/* Set __FS's right margin to __RMARGIN and return the old value. */ -extern size_t argp_fmtstream_set_rmargin (argp_fmtstream_t __fs, - size_t __rmargin); -extern size_t __argp_fmtstream_set_rmargin (argp_fmtstream_t __fs, - size_t __rmargin); - -/* Set __FS's wrap margin to __WMARGIN and return the old value. */ -extern size_t argp_fmtstream_set_wmargin (argp_fmtstream_t __fs, - size_t __wmargin); -extern size_t __argp_fmtstream_set_wmargin (argp_fmtstream_t __fs, - size_t __wmargin); - -/* Return the column number of the current output point in __FS. */ -extern size_t argp_fmtstream_point (argp_fmtstream_t __fs); -extern size_t __argp_fmtstream_point (argp_fmtstream_t __fs); - /* Internal routines. */ extern void _argp_fmtstream_update (argp_fmtstream_t __fs); extern void __argp_fmtstream_update (argp_fmtstream_t __fs); extern int _argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount); extern int __argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount); -#ifdef __OPTIMIZE__ +#if 1 /* Inline versions of above routines. */ -#if !_LIBC +#if 1 #define __argp_fmtstream_putc argp_fmtstream_putc #define __argp_fmtstream_puts argp_fmtstream_puts #define __argp_fmtstream_write argp_fmtstream_write @@ -193,7 +161,7 @@ extern int __argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount); #endif #ifndef ARGP_FS_EI -#define ARGP_FS_EI extern inline +#define ARGP_FS_EI static inline #endif ARGP_FS_EI size_t @@ -276,7 +244,7 @@ __argp_fmtstream_point (argp_fmtstream_t __fs) return __fs->point_col >= 0 ? __fs->point_col : 0; } -#if !_LIBC +#if 1 #undef __argp_fmtstream_putc #undef __argp_fmtstream_puts #undef __argp_fmtstream_write diff --git a/argp.h b/argp.h index 72abc53..923c9ce 100644 --- a/argp.h +++ b/argp.h @@ -490,10 +490,6 @@ extern void __argp_state_help (const struct argp_state *__restrict __state, FILE *__restrict __stream, unsigned int __flags); -/* Possibly output the standard usage message for ARGP to stderr and exit. */ -extern void argp_usage (const struct argp_state *__state); -extern void __argp_usage (const struct argp_state *__state); - /* If appropriate, print the printf string FMT and following args, preceded by the program name and `:', to stderr, and followed by a `Try ... --help' message, then exit (1). */ @@ -521,15 +517,6 @@ extern void __argp_failure (const struct argp_state *__restrict __state, const char *__restrict __fmt, ...) PRINTF_STYLE(4,5); -/* Returns true if the option OPT is a valid short option. */ -extern int _option_is_short (const struct argp_option *__opt) __THROW; -extern int __option_is_short (const struct argp_option *__opt) __THROW; - -/* Returns true if the option OPT is in fact the last (unused) entry in an - options array. */ -extern int _option_is_end (const struct argp_option *__opt) __THROW; -extern int __option_is_end (const struct argp_option *__opt) __THROW; - /* Return the input field for ARGP in the parser corresponding to STATE; used by the help routines. */ extern void *_argp_input (const struct argp *__restrict __argp, @@ -539,7 +526,7 @@ extern void *__argp_input (const struct argp *__restrict __argp, const struct argp_state *__restrict __state) __THROW; -#ifdef __USE_EXTERN_INLINES +#if 1 # if 1 # define __argp_usage argp_usage @@ -549,15 +536,17 @@ extern void *__argp_input (const struct argp *__restrict __argp, # endif # ifndef ARGP_EI -# define ARGP_EI extern __inline +# define ARGP_EI static __inline # endif +/* Possibly output the standard usage message for ARGP to stderr and exit. */ ARGP_EI void __argp_usage (const struct argp_state *__state) { __argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE); } +/* Returns true if the option OPT is a valid short option. */ ARGP_EI int __NTH (__option_is_short (const struct argp_option *__opt)) { @@ -570,6 +559,8 @@ __NTH (__option_is_short (const struct argp_option *__opt)) } } +/* Returns true if the option OPT is in fact the last (unused) entry in an + options array. */ ARGP_EI int __NTH (__option_is_end (const struct argp_option *__opt)) {