gsasl-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CVS gsasl/lib/gl


From: gsasl-commit
Subject: CVS gsasl/lib/gl
Date: Sun, 19 Dec 2004 04:33:07 +0100

Update of /home/cvs/gsasl/lib/gl
In directory dopio:/tmp/cvs-serv31603/gl

Modified Files:
        Makefile.am 
Added Files:
        alloca_.h asnprintf.c asprintf.c printf-args.c printf-args.h 
        printf-parse.c printf-parse.h vasnprintf.c vasnprintf.h 
        vasprintf.c vasprintf.h xsize.h 
Log Message:
Add.

--- /home/cvs/gsasl/lib/gl/Makefile.am  2004/12/15 00:16:05     1.16
+++ /home/cvs/gsasl/lib/gl/Makefile.am  2004/12/19 03:33:07     1.17
@@ -9,7 +9,7 @@
 #
 # Generated by gnulib-tool.
 # Invoked as: gnulib-tool --import
-# Reproduce by: gnulib-tool --import --dir=. --lib=libgl --source-base=gl 
--m4-base=gl/m4 --libtool --lgpl base64 gettext restrict stdbool strdup
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgl --source-base=gl 
--m4-base=gl/m4 --libtool --lgpl alloca-opt base64 gettext restrict stdbool 
strdup vasnprintf vasprintf xsize
 
 AUTOMAKE_OPTIONS = 1.5 gnits no-dependencies
 
@@ -25,6 +25,21 @@
 DISTCLEANFILES =
 MAINTAINERCLEANFILES =
 
+## begin gnulib module alloca-opt
+
+BUILT_SOURCES += $(ALLOCA_H)
+EXTRA_DIST += alloca_.h
+
+# We need the following in order to create an <alloca.h> when the system
+# doesn't have one that works with the given compiler.
+all-local $(libgl_la_OBJECTS): $(ALLOCA_H)
+alloca.h: alloca_.h
+       cp $(srcdir)/alloca_.h address@hidden
+       mv address@hidden $@
+MOSTLYCLEANFILES += alloca.h alloca.h-t
+
+## end   gnulib module alloca-opt
+
 ## begin gnulib module base64
 
 libgl_la_SOURCES += base64.h base64.c
@@ -58,5 +73,23 @@
 
 ## end   gnulib module strdup
 
+## begin gnulib module vasnprintf
+
+libgl_la_SOURCES += printf-args.h printf-parse.h vasnprintf.h
+
+## end   gnulib module vasnprintf
+
+## begin gnulib module vasprintf
+
+libgl_la_SOURCES += vasprintf.h
+
+## end   gnulib module vasprintf
+
+## begin gnulib module xsize
+
+libgl_la_SOURCES += xsize.h
+
+## end   gnulib module xsize
+
 
 # Makefile.am ends here

--- /home/cvs/gsasl/lib/gl/alloca_.h    2004/12/19 03:33:07     NONE
+++ /home/cvs/gsasl/lib/gl/alloca_.h    2004/12/19 03:33:07     1.1
/* Memory allocation on the stack.

   Copyright (C) 1995, 1999, 2001, 2002, 2003, 2004 Free Software
   Foundation, Inc.

   This program is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as published
   by the Free Software Foundation; either version 2.1, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   General Public License for more details.

   You should have received a copy of the GNU Lesser General Public
   License along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
   USA.  */

/* When this file is included, it may be preceded only by preprocessor
   declarations.  Thanks to AIX.  Therefore we include it right after
   "config.h", not later.  */

#ifndef _ALLOCA_H
# define _ALLOCA_H

/* alloca (N) returns a pointer to N bytes of memory
   allocated on the stack, which will last until the function returns.
   Use of alloca should be avoided:
     - inside arguments of function calls - undefined behaviour,
     - in inline functions - the allocation may actually last until the
       calling function returns,
     - for huge N (say, N >= 65536) - you never know how large (or small)
       the stack is, and when the stack cannot fulfill the memory allocation
       request, the program just crashes.
 */

#ifdef __GNUC__
# define alloca __builtin_alloca
#elif defined _AIX
# define alloca __alloca
#elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
#else
# include <stddef.h>
# ifdef  __cplusplus
extern "C"
# endif
void *alloca (size_t);
#endif

#endif /* _ALLOCA_H */
--- /home/cvs/gsasl/lib/gl/asnprintf.c  2004/12/19 03:33:07     NONE
+++ /home/cvs/gsasl/lib/gl/asnprintf.c  2004/12/19 03:33:07     1.1
/* Formatted output to strings.
   Copyright (C) 1999, 2002 Free Software Foundation, Inc.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU Lesser General Public License as published by
   the Free Software Foundation; either version 2.1, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public License 
along
   with this program; if not, write to the Free Software Foundation,
   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */

#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

/* Specification.  */
#include "vasnprintf.h"

#include <stdarg.h>

char *
asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)
{
  va_list args;
  char *result;

  va_start (args, format);
  result = vasnprintf (resultbuf, lengthp, format, args);
  va_end (args);
  return result;
}
--- /home/cvs/gsasl/lib/gl/asprintf.c   2004/12/19 03:33:07     NONE
+++ /home/cvs/gsasl/lib/gl/asprintf.c   2004/12/19 03:33:07     1.1
/* Formatted output to strings.
   Copyright (C) 1999, 2002 Free Software Foundation, Inc.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU Lesser General Public License as published by
   the Free Software Foundation; either version 2.1, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public License 
along
   with this program; if not, write to the Free Software Foundation,
   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */

#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

/* Specification.  */
#include "vasprintf.h"

#include <stdarg.h>

int
asprintf (char **resultp, const char *format, ...)
{
  va_list args;
  int result;

  va_start (args, format);
  result = vasprintf (resultp, format, args);
  va_end (args);
  return result;
}
--- /home/cvs/gsasl/lib/gl/printf-args.c        2004/12/19 03:33:07     NONE
+++ /home/cvs/gsasl/lib/gl/printf-args.c        2004/12/19 03:33:07     1.1
/* Decomposed printf argument list.
   Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU Lesser General Public License as published by
   the Free Software Foundation; either version 2.1, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public License 
along
   with this program; if not, write to the Free Software Foundation,
   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */

#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

/* Specification.  */
#include "printf-args.h"

#ifdef STATIC
STATIC
#endif
int
printf_fetchargs (va_list args, arguments *a)
{
  size_t i;
  argument *ap;

  for (i = 0, ap = &a->arg[0]; i < a->count; i++, ap++)
    switch (ap->type)
      {
      case TYPE_SCHAR:
        ap->a.a_schar = va_arg (args, /*signed char*/ int);
        break;
      case TYPE_UCHAR:
        ap->a.a_uchar = va_arg (args, /*unsigned char*/ int);
        break;
      case TYPE_SHORT:
        ap->a.a_short = va_arg (args, /*short*/ int);
        break;
      case TYPE_USHORT:
        ap->a.a_ushort = va_arg (args, /*unsigned short*/ int);
        break;
      case TYPE_INT:
        ap->a.a_int = va_arg (args, int);
        break;
      case TYPE_UINT:
        ap->a.a_uint = va_arg (args, unsigned int);
        break;
      case TYPE_LONGINT:
        ap->a.a_longint = va_arg (args, long int);
        break;
      case TYPE_ULONGINT:
        ap->a.a_ulongint = va_arg (args, unsigned long int);
        break;
#ifdef HAVE_LONG_LONG
      case TYPE_LONGLONGINT:
        ap->a.a_longlongint = va_arg (args, long long int);
        break;
      case TYPE_ULONGLONGINT:
        ap->a.a_ulonglongint = va_arg (args, unsigned long long int);
        break;
#endif
      case TYPE_DOUBLE:
        ap->a.a_double = va_arg (args, double);
        break;
#ifdef HAVE_LONG_DOUBLE
      case TYPE_LONGDOUBLE:
        ap->a.a_longdouble = va_arg (args, long double);
        break;
#endif
      case TYPE_CHAR:
        ap->a.a_char = va_arg (args, int);
        break;
#ifdef HAVE_WINT_T
      case TYPE_WIDE_CHAR:
        ap->a.a_wide_char = va_arg (args, wint_t);
        break;
#endif
      case TYPE_STRING:
        ap->a.a_string = va_arg (args, const char *);
        break;
#ifdef HAVE_WCHAR_T
      case TYPE_WIDE_STRING:
        ap->a.a_wide_string = va_arg (args, const wchar_t *);
        break;
#endif
      case TYPE_POINTER:
        ap->a.a_pointer = va_arg (args, void *);
        break;
      case TYPE_COUNT_SCHAR_POINTER:
        ap->a.a_count_schar_pointer = va_arg (args, signed char *);
        break;
      case TYPE_COUNT_SHORT_POINTER:
        ap->a.a_count_short_pointer = va_arg (args, short *);
        break;
      case TYPE_COUNT_INT_POINTER:
        ap->a.a_count_int_pointer = va_arg (args, int *);
        break;
      case TYPE_COUNT_LONGINT_POINTER:
        ap->a.a_count_longint_pointer = va_arg (args, long int *);
        break;
#ifdef HAVE_LONG_LONG
      case TYPE_COUNT_LONGLONGINT_POINTER:
        ap->a.a_count_longlongint_pointer = va_arg (args, long long int *);
        break;
#endif
      default:
        /* Unknown type.  */
        return -1;
      }
  return 0;
}
--- /home/cvs/gsasl/lib/gl/printf-args.h        2004/12/19 03:33:07     NONE
+++ /home/cvs/gsasl/lib/gl/printf-args.h        2004/12/19 03:33:07     1.1
/* Decomposed printf argument list.
   Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU Lesser General Public License as published by
   the Free Software Foundation; either version 2.1, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public License 
along
   with this program; if not, write to the Free Software Foundation,
   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */

#ifndef _PRINTF_ARGS_H
#define _PRINTF_ARGS_H

/* Get size_t.  */
#include <stddef.h>

/* Get wchar_t.  */
#ifdef HAVE_WCHAR_T
# include <stddef.h>
#endif

/* Get wint_t.  */
#ifdef HAVE_WINT_T
# include <wchar.h>
#endif

/* Get va_list.  */
#include <stdarg.h>


/* Argument types */
typedef enum
{
  TYPE_NONE,
  TYPE_SCHAR,
  TYPE_UCHAR,
  TYPE_SHORT,
  TYPE_USHORT,
  TYPE_INT,
  TYPE_UINT,
  TYPE_LONGINT,
  TYPE_ULONGINT,
#ifdef HAVE_LONG_LONG
  TYPE_LONGLONGINT,
  TYPE_ULONGLONGINT,
#endif
  TYPE_DOUBLE,
#ifdef HAVE_LONG_DOUBLE
  TYPE_LONGDOUBLE,
#endif
  TYPE_CHAR,
#ifdef HAVE_WINT_T
  TYPE_WIDE_CHAR,
#endif
  TYPE_STRING,
#ifdef HAVE_WCHAR_T
  TYPE_WIDE_STRING,
#endif
  TYPE_POINTER,
  TYPE_COUNT_SCHAR_POINTER,
  TYPE_COUNT_SHORT_POINTER,
  TYPE_COUNT_INT_POINTER,
  TYPE_COUNT_LONGINT_POINTER
#ifdef HAVE_LONG_LONG
, TYPE_COUNT_LONGLONGINT_POINTER
#endif
} arg_type;

/* Polymorphic argument */
typedef struct
{
  arg_type type;
  union
  {
    signed char                 a_schar;
    unsigned char               a_uchar;
    short                       a_short;
    unsigned short              a_ushort;
    int                         a_int;
    unsigned int                a_uint;
    long int                    a_longint;
    unsigned long int           a_ulongint;
#ifdef HAVE_LONG_LONG
    long long int               a_longlongint;
    unsigned long long int      a_ulonglongint;
#endif
    float                       a_float;
    double                      a_double;
#ifdef HAVE_LONG_DOUBLE
    long double                 a_longdouble;
#endif
    int                         a_char;
#ifdef HAVE_WINT_T
    wint_t                      a_wide_char;
#endif
    const char*                 a_string;
#ifdef HAVE_WCHAR_T
    const wchar_t*              a_wide_string;
#endif
    void*                       a_pointer;
    signed char *               a_count_schar_pointer;
    short *                     a_count_short_pointer;
    int *                       a_count_int_pointer;
    long int *                  a_count_longint_pointer;
#ifdef HAVE_LONG_LONG
    long long int *             a_count_longlongint_pointer;
#endif
  }
  a;
}
argument;

typedef struct
{
  size_t count;
  argument *arg;
}
arguments;


/* Fetch the arguments, putting them into a. */
#ifdef STATIC
STATIC
#else
extern
#endif
int printf_fetchargs (va_list args, arguments *a);

#endif /* _PRINTF_ARGS_H */
--- /home/cvs/gsasl/lib/gl/printf-parse.c       2004/12/19 03:33:07     NONE
+++ /home/cvs/gsasl/lib/gl/printf-parse.c       2004/12/19 03:33:07     1.1
/* Formatted output to strings.
   Copyright (C) 1999-2000, 2002-2003 Free Software Foundation, Inc.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU Lesser General Public License as published by
   the Free Software Foundation; either version 2.1, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public License 
along
   with this program; if not, write to the Free Software Foundation,
   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */

#ifdef HAVE_CONFIG_H

[518 lines skipped]
--- /home/cvs/gsasl/lib/gl/printf-parse.h       2004/12/19 03:33:07     NONE
+++ /home/cvs/gsasl/lib/gl/printf-parse.h       2004/12/19 03:33:07     1.1

[592 lines skipped]
--- /home/cvs/gsasl/lib/gl/vasnprintf.c 2004/12/19 03:33:07     NONE
+++ /home/cvs/gsasl/lib/gl/vasnprintf.c 2004/12/19 03:33:07     1.1

[1488 lines skipped]
--- /home/cvs/gsasl/lib/gl/vasnprintf.h 2004/12/19 03:33:07     NONE
+++ /home/cvs/gsasl/lib/gl/vasnprintf.h 2004/12/19 03:33:07     1.1

[1565 lines skipped]
--- /home/cvs/gsasl/lib/gl/vasprintf.c  2004/12/19 03:33:07     NONE
+++ /home/cvs/gsasl/lib/gl/vasprintf.c  2004/12/19 03:33:07     1.1

[1607 lines skipped]
--- /home/cvs/gsasl/lib/gl/vasprintf.h  2004/12/19 03:33:07     NONE
+++ /home/cvs/gsasl/lib/gl/vasprintf.h  2004/12/19 03:33:07     1.1

[1670 lines skipped]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]