diff options
author | Werner Koch <wk@gnupg.org> | 2000-01-24 12:55:49 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2000-01-24 12:55:49 +0100 |
commit | 0070faa0ffd5c366bc20f477a4838b701c20b063 (patch) | |
tree | 4fb8a63c5f2b7cb4b33a51247bdc8961caa89720 /include | |
parent | See ChangeLog: Fri Dec 31 14:06:56 CET 1999 Werner Koch (diff) | |
download | gnupg2-0070faa0ffd5c366bc20f477a4838b701c20b063.tar.xz gnupg2-0070faa0ffd5c366bc20f477a4838b701c20b063.zip |
See ChangeLog: Mon Jan 24 13:04:28 CET 2000 Werner Koch
Diffstat (limited to 'include')
-rw-r--r-- | include/ChangeLog | 4 | ||||
-rw-r--r-- | include/memory.h | 85 | ||||
-rw-r--r-- | include/util.h | 15 |
3 files changed, 8 insertions, 96 deletions
diff --git a/include/ChangeLog b/include/ChangeLog index 48124e9f3..e37b9a3db 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,7 @@ +Mon Jan 24 13:04:28 CET 2000 Werner Koch <wk@gnupg.de> + + * memory.h: Removed. + Wed Dec 8 21:58:32 CET 1999 Werner Koch <wk@gnupg.de> * util.h: Moved argparse stuff to the argparse header. Move some diff --git a/include/memory.h b/include/memory.h deleted file mode 100644 index 32c42fcd5..000000000 --- a/include/memory.h +++ /dev/null @@ -1,85 +0,0 @@ -/* memory.h - memory allocation - * Copyright (C) 1998 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 - */ - -#ifndef G10_MEMORY_H -#define G10_MEMORY_H - -#ifdef M_DEBUG -#ifndef STR - #define STR(v) #v -#endif -#define M_DBGINFO(a) __FUNCTION__ "["__FILE__ ":" STR(a) "]" -#define m_alloc(n) m_debug_alloc((n), M_DBGINFO( __LINE__ ) ) -#define m_alloc_clear(n) m_debug_alloc_clear((n), M_DBGINFO(__LINE__) ) -#define m_alloc_secure(n) m_debug_alloc((n), M_DBGINFO(__LINE__) ) -#define m_alloc_secure_clear(n) m_debug_alloc((n), M_DBGINFO(__LINE__) ) -#define m_realloc(n,m) m_debug_realloc((n),(m), M_DBGINFO(__LINE__) ) -#define m_free(n) m_debug_free((n), M_DBGINFO(__LINE__) ) -#define m_check(n) m_debug_check((n), M_DBGINFO(__LINE__) ) -/*#define m_copy(a) m_debug_copy((a), M_DBGINFO(__LINE__) )*/ -#define m_strdup(a) m_debug_strdup((a), M_DBGINFO(__LINE__) ) - -void *m_debug_alloc( size_t n, const char *info ); -void *m_debug_alloc_clear( size_t n, const char *info ); -void *m_debug_alloc_secure( size_t n, const char *info ); -void *m_debug_alloc_secure_clear( size_t n, const char *info ); -void *m_debug_realloc( void *a, size_t n, const char *info ); -void m_debug_free( void *p, const char *info ); -void m_debug_check( const void *a, const char *info ); -/*void *m_debug_copy( const void *a, const char *info );*/ -char *m_debug_strdup( const char *a, const char *info ); - -#else -void *m_alloc( size_t n ); -void *m_alloc_clear( size_t n ); -void *m_alloc_secure( size_t n ); -void *m_alloc_secure_clear( size_t n ); -void *m_realloc( void *a, size_t n ); -void m_free( void *p ); -void m_check( const void *a ); -/*void *m_copy( const void *a );*/ -char *m_strdup( const char * a); -#endif - -int m_is_secure( const void *a ); - -size_t m_size( const void *a ); -void m_print_stats(const char *prefix); - -/*-- secmem.c --*/ -void secmem_init( size_t npool ); -void secmem_term( void ); -void *secmem_malloc( size_t size ); -void *secmem_realloc( void *a, size_t newsize ); -void secmem_free( void *a ); -void secmem_dump_stats(void); -void secmem_set_flags( unsigned flags ); -unsigned secmem_get_flags(void); - - - -#define DBG_MEMORY memory_debug_mode -#define DBG_MEMSTAT memory_stat_debug_mode -int memory_debug_mode; -int memory_stat_debug_mode; - - - -#endif /*G10_MEMORY_H*/ diff --git a/include/util.h b/include/util.h index 190bff6ff..db221bba6 100644 --- a/include/util.h +++ b/include/util.h @@ -27,9 +27,10 @@ #include <stdio.h> #include "types.h" #include "errors.h" -#include "../util/mischelp.h" -#include "../util/stringhelp.h" -#include "../util/argparse.h" +#include "../jnlib/mischelp.h" +#include "../jnlib/stringhelp.h" +#include "../jnlib/argparse.h" +#include "../jnlib/dotlock.h" /*-- logger.c --*/ @@ -91,14 +92,6 @@ void g10_log_hexdump( const char *text, const char *buf, size_t len ); const char * g10_errstr( int no ); -/*-- dotlock.c --*/ -struct dotlock_handle; -typedef struct dotlock_handle *DOTLOCK; - -DOTLOCK create_dotlock( const char *file_to_lock ); -int make_dotlock( DOTLOCK h, long timeout ); -int release_dotlock( DOTLOCK h ); - /*-- fileutil.c --*/ char * make_basename(const char *filepath); |