Skip to content

Commit

Permalink
hey
Browse files Browse the repository at this point in the history
  • Loading branch information
cooljeanius committed Jun 29, 2024
1 parent a98a88a commit 6838595
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 13 deletions.
2 changes: 1 addition & 1 deletion argp/argp-standalone-1.3/argp-namefrob.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* argp-namefrob.h: Name frobnication for compiling argp outside of glibc
/* argp-namefrob.h: Name frobnication for building argp out of glibc -*- C -*-
Copyright (C) 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <[email protected]>.
Expand Down
6 changes: 3 additions & 3 deletions argp/argp-standalone-1.3/argp-parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -1295,13 +1295,13 @@ weak_alias (__argp_input, _argp_input)
/* Defined here, in case a user is not inlining the definitions in
* argp.h */
void
__argp_usage(__const struct argp_state *__state) __THROW
__argp_usage(__const struct argp_state *__state)
{
__argp_state_help(__state, stderr, ARGP_HELP_STD_USAGE);
}

int
__option_is_short(__const struct argp_option *__opt) __THROW
__option_is_short(__const struct argp_option *__opt)
{
if (__opt->flags & OPTION_DOC)
return 0;
Expand All @@ -1315,7 +1315,7 @@ __option_is_short(__const struct argp_option *__opt) __THROW
}

int
__option_is_end(__const struct argp_option *__opt) __THROW
__option_is_end(__const struct argp_option *__opt)
{
return !__opt->key && !__opt->name && !__opt->doc && !__opt->group;
}
Expand Down
6 changes: 3 additions & 3 deletions argp/argp-standalone-1.3/argp.h
Original file line number Diff line number Diff line change
Expand Up @@ -571,13 +571,13 @@ __argp_short_program_name(const struct argp_state *state) __THROW;
# endif /* !ARGP_EI */

ARGP_EI void
__argp_usage(__const struct argp_state *__state) __THROW
__argp_usage(__const struct argp_state *__state)
{
__argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE);
}

ARGP_EI int
__option_is_short(__const struct argp_option *__opt) __THROW
__option_is_short(__const struct argp_option *__opt)
{
if (__opt->flags & OPTION_DOC)
return 0;
Expand All @@ -589,7 +589,7 @@ __option_is_short(__const struct argp_option *__opt) __THROW
}

ARGP_EI int
__option_is_end(__const struct argp_option *__opt) __THROW
__option_is_end(__const struct argp_option *__opt)
{
return !__opt->key && !__opt->name && !__opt->doc && !__opt->group;
}
Expand Down
27 changes: 21 additions & 6 deletions msgcat.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,36 @@ up-to-date. Many thanks.
******************************************************************/

#include <sys/cdefs.h>

#ifndef __FBSDID
# define __FBSDID(str) static const char *fbsdid_msgcat_c str
#endif /* !__FBSDID */

__FBSDID("$FreeBSD: src/lib/libc/nls/msgcat.c,v 1.49 2005/02/01 16:04:55 phantom Exp $");

/*
* We need a better way of handling errors than printing text. I need
* to add an error handling routine.
*/

#ifndef __has_include
# define __has_include(foo) 0
#endif /* !__has_include */

#include "namespace.h"
#include <sys/types.h>
#include <sys/stat.h>

#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <xlocale.h>
#if defined(HAVE_XLOCALE_H) || __has_include(<xlocale.h>)
# include <xlocale.h>
#else
# if defined(__GNUC__) && !defined(__STRICT_ANSI__)
# warning "msgcat.c expects <xlocale.h> to be included."
# endif /* __GNUC__ && !__STRICT_ANSI__ */
#endif /* HAVE_XLOCALE_H */
#include <nl_types.h>
#include <stdio.h>
#include <stdlib.h>
Expand Down Expand Up @@ -151,16 +166,16 @@ catopen(__const char *name, int type)
++nlspath;
/* fallthrough */
default:
if (pathP - path >=
sizeof(path) - 1)
if ((pathP - path) >=
(sizeof(path) - 1UL))
goto too_long;
*(pathP++) = *nlspath;
continue;
}
++nlspath;
put_tmpptr:
spcleft = sizeof(path) -
(pathP - path) - 1;
spcleft = (sizeof(path) -
(pathP - path) - 1UL);
if (strlcpy(pathP, tmpptr, spcleft) >=
spcleft) {
too_long:
Expand All @@ -170,7 +185,7 @@ catopen(__const char *name, int type)
}
pathP += strlen(tmpptr);
} else {
if (pathP - path >= sizeof(path) - 1)
if ((pathP - path) >= (sizeof(path) - 1UL))
goto too_long;
*(pathP++) = *nlspath;
}
Expand Down

0 comments on commit 6838595

Please sign in to comment.