From 469fe687a5d4d41dc6fa497c3502de5920f65316 Mon Sep 17 00:00:00 2001 From: Neal Walfield Date: Tue, 18 Feb 2003 21:38:02 +0000 Subject: / 2003-02-18 Neal H. Walfield * configure.ac: Fix typo. (AC_CONFIG_FILES): Remove common/Makefile.am. * common: Remove directory. src/ 2003-02-18 Neal H. Walfield * Makefile.am (libassuan_a_LIBADD): New variable. * funopen.c: Move from ../common. * isascii.c: Likewise. * memrchr.c: Likewise. * putc_unlocked.c: Likewise. --- ChangeLog | 6 ++++++ Makefile.am | 2 +- configure.ac | 2 +- src/ChangeLog | 8 ++++++++ src/Makefile.am | 2 ++ src/funopen.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ src/isascii.c | 29 +++++++++++++++++++++++++++++ src/memrchr.c | 36 ++++++++++++++++++++++++++++++++++++ src/putc_unlocked.c | 31 +++++++++++++++++++++++++++++++ 9 files changed, 158 insertions(+), 2 deletions(-) create mode 100644 src/funopen.c create mode 100644 src/isascii.c create mode 100644 src/memrchr.c create mode 100644 src/putc_unlocked.c diff --git a/ChangeLog b/ChangeLog index 793ad0a..18c84c0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-02-18 Neal H. Walfield + + * configure.ac: Fix typo. + (AC_CONFIG_FILES): Remove common/Makefile.am. + * common: Remove directory. + 2003-02-18 Neal H. Walfield * common: New directory. diff --git a/Makefile.am b/Makefile.am index 2c1cc76..a5cd5a4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1 +1 @@ -SUBDIRS = common src doc tests \ No newline at end of file +SUBDIRS = src doc tests \ No newline at end of file diff --git a/configure.ac b/configure.ac index a0e4381..125bfd3 100644 --- a/configure.ac +++ b/configure.ac @@ -135,6 +135,7 @@ if test $ac_cv_func_funopen != yes; then AC_CHECK_FUNCS(fopencookie, AC_LIBOBJ(funopen), AC_MSG_ERROR([[ No implementation of fopencookie or funopen available. ]])) +fi AC_REPLACE_FUNCS(isascii) AC_REPLACE_FUNCS(putc_unlocked) @@ -142,7 +143,6 @@ AC_REPLACE_FUNCS(memrchr) AC_CONFIG_FILES([ Makefile -common/Makefile src/Makefile src/libassuan-config doc/Makefile diff --git a/src/ChangeLog b/src/ChangeLog index 688bcf0..2ac113d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2003-02-18 Neal H. Walfield + + * Makefile.am (libassuan_a_LIBADD): New variable. + * funopen.c: Move from ../common. + * isascii.c: Likewise. + * memrchr.c: Likewise. + * putc_unlocked.c: Likewise. + 2003-02-18 Neal H. Walfield * assuan-handler.c (_IO_cookie_io_functions_t): Remove. diff --git a/src/Makefile.am b/src/Makefile.am index 1af90e7..344c261 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -49,5 +49,7 @@ libassuan_a_SOURCES = \ assuan-domain-server.c \ assuan-logging.c +libassuan_a_LIBADD = @LIBOBJS@ + assuan-errors.c : assuan.h $(srcdir)/mkerrors < $(srcdir)/assuan.h > assuan-errors.c diff --git a/src/funopen.c b/src/funopen.c new file mode 100644 index 0000000..e768b05 --- /dev/null +++ b/src/funopen.c @@ -0,0 +1,44 @@ +/* funopen.c - Replacement for funopen. + * Copyright (C) 2003 Free Software Foundation, Inc. + * + * This file is part of GnuPG. + * + * GnuPG is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GnuPG 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 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 +#endif + +#include + +#ifdef HAVE_FOPENCOOKIE +FILE * +funopen(const void *cookie, cookie_read_function_t *readfn, + cookie_write_function_t *writefn, + cookie_seek_function_t *seekfn, + cookie_close_function_t *closefn) +{ + cookie_io_functions_t io = { read: readfn, write: writefn, + seek: seekfn, + close: closefn }; + + return fopencookie ((void *) cookie, + readfn ? ( writefn ? "rw" : "r" ) + : ( writefn ? "w" : ""), io); +} +#else +#error No known way to implement funopen. +#endif diff --git a/src/isascii.c b/src/isascii.c new file mode 100644 index 0000000..565c716 --- /dev/null +++ b/src/isascii.c @@ -0,0 +1,29 @@ +/* isascii.c - Replacement for isascii. + * Copyright (C) 2002 Free Software Foundation, Inc. + * + * This file is part of GnuPG. + * + * GnuPG is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GnuPG 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 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 +#endif + +int +isascii (int c) +{ + return (((c) & ~0x7f) == 0); +} diff --git a/src/memrchr.c b/src/memrchr.c new file mode 100644 index 0000000..3e60c55 --- /dev/null +++ b/src/memrchr.c @@ -0,0 +1,36 @@ +/* memrchr.c - Replacement for memrchr. + * Copyright (C) 2002 Free Software Foundation, Inc. + * + * This file is part of GnuPG. + * + * GnuPG is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GnuPG 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 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 +#endif + +#include + +void * +memrchr (const void *block, int c, size_t size) +{ + void *p; + + for (p = block + size; p != block; p --) + if (*p == c) + return p; + return 0; +} diff --git a/src/putc_unlocked.c b/src/putc_unlocked.c new file mode 100644 index 0000000..02c6461 --- /dev/null +++ b/src/putc_unlocked.c @@ -0,0 +1,31 @@ +/* putc_unlocked.c - Replacement for putc_unlocked. + * Copyright (C) 2002 Free Software Foundation, Inc. + * + * This file is part of GnuPG. + * + * GnuPG is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GnuPG 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 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 +#endif + +#include + +int +putc_unlocked (int c, FILE *stream) +{ + return putc (c, stream); +} -- cgit v1.2.3