OSSP CVS Repository

ossp - Check-in [1855]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 1855
Date: 2002-Feb-14 11:51:50 (local)
2002-Feb-14 10:51:50 (UTC)
User:thl
Branch:
Comment: add some wrapper code for lib_ex
Tickets:
Inspections:
Files:
ossp-pkg/lmtp2nntp/Makefile.in      1.45 -> 1.46     3 inserted, 3 deleted
ossp-pkg/lmtp2nntp/lmtp2nntp_exwrap.c      added-> 1.1
ossp-pkg/lmtp2nntp/lmtp2nntp_exwrap.h      added-> 1.1
ossp-pkg/lmtp2nntp/lmtp2nntp_global.h      1.4 -> 1.5     1 inserted, 0 deleted

ossp-pkg/lmtp2nntp/Makefile.in 1.45 -> 1.46

--- Makefile.in  2002/02/13 13:18:25     1.45
+++ Makefile.in  2002/02/14 10:51:50     1.46
@@ -44,9 +44,9 @@
 POD2MAN     = pod2man
 
 PROG = lmtp2nntp
-HDRS = lmtp2nntp_global.h lmtp2nntp_daemon.h lmtp2nntp_lmtp.h lmtp2nntp_nntp.h lmtp2nntp_argz.h lmtp2nntp_shpat.h lmtp2nntp_msg.h lmtp2nntp_option.h lmtp2nntp_config.h 
-SRCS = lmtp2nntp_main.c   lmtp2nntp_daemon.c lmtp2nntp_lmtp.c lmtp2nntp_nntp.c lmtp2nntp_argz.c lmtp2nntp_shpat.c lmtp2nntp_msg.c lmtp2nntp_option.c lmtp2nntp_config.c lmtp2nntp_version.c 
-OBJS = lmtp2nntp_main.o   lmtp2nntp_daemon.o lmtp2nntp_lmtp.o lmtp2nntp_nntp.o lmtp2nntp_argz.o lmtp2nntp_shpat.o lmtp2nntp_msg.o lmtp2nntp_option.o lmtp2nntp_config.o lmtp2nntp_version.o
+HDRS = lmtp2nntp_global.h lmtp2nntp_daemon.h lmtp2nntp_lmtp.h lmtp2nntp_nntp.h lmtp2nntp_argz.h lmtp2nntp_shpat.h lmtp2nntp_msg.h lmtp2nntp_option.h lmtp2nntp_config.h lmtp2nntp_exwrap.h 
+SRCS = lmtp2nntp_main.c   lmtp2nntp_daemon.c lmtp2nntp_lmtp.c lmtp2nntp_nntp.c lmtp2nntp_argz.c lmtp2nntp_shpat.c lmtp2nntp_msg.c lmtp2nntp_option.c lmtp2nntp_config.c lmtp2nntp_exwrap.c lmtp2nntp_version.c 
+OBJS = lmtp2nntp_main.o   lmtp2nntp_daemon.o lmtp2nntp_lmtp.o lmtp2nntp_nntp.o lmtp2nntp_argz.o lmtp2nntp_shpat.o lmtp2nntp_msg.o lmtp2nntp_option.o lmtp2nntp_config.o lmtp2nntp_exwrap.o lmtp2nntp_version.o
 
 SUBDIRS = @SUBDIR_EX@ @SUBDIR_STR@ @SUBDIR_L2@ @SUBDIR_SA@ @SUBDIR_VAR@ @SUBDIR_VAL@ @SUBDIR_POPT@ @SUBDIR_PCRE@
 


ossp-pkg/lmtp2nntp/lmtp2nntp_exwrap.c -> 1.1

*** /dev/null    Sat Nov 23 01:34:35 2024
--- -    Sat Nov 23 01:34:44 2024
***************
*** 0 ****
--- 1,68 ----
+ 
+ /*
+ **  Copyright (c) 2001-2002 The OSSP Project <http://www.ossp.org/>
+ **  Copyright (c) 2001-2002 Cable & Wireless Deutschland <http://www.cw.com/de/>
+ **
+ **  This file is part of OSSP lmtp2nntp, an LMTP speaking local
+ **  mailer which forwards mails as Usenet news articles via NNTP.
+ **  It can be found at http://www.ossp.org/pkg/lmtp2nntp/.
+ **
+ **  This program 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.0 of the License, 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 General Public License
+ **  along with this file; if not, write to the Free Software
+ **  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ **  USA, or contact the OSSP project <ossp@ossp.org>.
+ **
+ **  lmtp2nntp_exwrap.c: lib_ex wrappers
+ */
+ 
+ #include <string.h>
+ #include <stdlib.h>
+ 
+ /* own headers */
+ #include "lmtp2nntp_global.h"
+ 
+ char *strdupex(const char *str)
+ {
+     char *rc;
+ 
+     if ((rc = strdup(str)) == NULL)
+         throw(0,0,0);
+     return rc;
+ }
+ 
+ void *mallocex(size_t size)
+ {
+     void *rc;
+ 
+     if ((rc = malloc(size)) == NULL)
+         throw(0,0,0);
+     return rc;
+ }
+ 
+ void *reallocex(void *ptr, size_t size)
+ {
+     void *rc;
+ 
+     if ((rc = realloc(ptr, size)) == NULL)
+         throw(0,0,0);
+     return rc;
+ }
+ 
+ void freeex(void *ptr)
+ {
+     if (ptr == NULL)
+         throw(0,0,0);
+     free(ptr);
+     return;
+ }
+ 


ossp-pkg/lmtp2nntp/lmtp2nntp_exwrap.h -> 1.1

*** /dev/null    Sat Nov 23 01:34:35 2024
--- -    Sat Nov 23 01:34:44 2024
***************
*** 0 ****
--- 1,39 ----
+ 
+ /*
+ **  Copyright (c) 2001-2002 The OSSP Project <http://www.ossp.org/>
+ **  Copyright (c) 2001-2002 Cable & Wireless Deutschland <http://www.cw.com/de/>
+ **
+ **  This file is part of OSSP lmtp2nntp, an LMTP speaking local
+ **  mailer which forwards mails as Usenet news articles via NNTP.
+ **  It can be found at http://www.ossp.org/pkg/lmtp2nntp/.
+ **
+ **  This program 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.0 of the License, 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 General Public License
+ **  along with this file; if not, write to the Free Software
+ **  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ **  USA, or contact the OSSP project <ossp@ossp.org>.
+ **
+ **  lmtp2nntp_exwrap.h: lib_ex wrappers
+ */
+ 
+ #ifndef __LMTP2NNTP_EXWRAP_H__
+ #define __LMTP2NNTP_EXWRAP_H__
+ 
+ #include <string.h>
+ 
+ char *strdupex(const char *);
+ void *mallocex(size_t);
+ void *reallocex(void *, size_t);
+ void freeex(void *);
+ 
+ 
+ #endif /* __LMTP2NNTP_EXWRAP_H__ */


ossp-pkg/lmtp2nntp/lmtp2nntp_global.h 1.4 -> 1.5

--- lmtp2nntp_global.h   2002/01/30 16:41:02     1.4
+++ lmtp2nntp_global.h   2002/02/14 10:51:50     1.5
@@ -45,5 +45,6 @@
 
 #define __EX_NS_USE_CXX__
 #include <ex.h>
+#include "lmtp2nntp_exwrap.h"
 
 #endif /* __LMTP2NNTP_H__ */

CVSTrac 2.0.1