mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
Epxerimenta support for GDBM keyings.
This commit is contained in:
parent
6e16296864
commit
e309a875cb
36 changed files with 1049 additions and 558 deletions
|
@ -1,3 +1,8 @@
|
|||
Wed Oct 21 12:20:29 1998 Werner Koch (wk@isil.d.shuttle.de)
|
||||
|
||||
* util.c (iobuf_flush): autoincreasing of a temp. iobuf
|
||||
(iobuf_temp_with_content): New.
|
||||
|
||||
Tue Oct 13 12:40:13 1998 Werner Koch (wk@isil.d.shuttle.de)
|
||||
|
||||
* util.c (.nofast): set this variable
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/intl -I../intl
|
||||
INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/intl
|
||||
|
||||
noinst_LIBRARIES = libutil.a
|
||||
|
||||
|
|
27
util/iobuf.c
27
util/iobuf.c
|
@ -483,6 +483,18 @@ iobuf_temp()
|
|||
return a;
|
||||
}
|
||||
|
||||
IOBUF
|
||||
iobuf_temp_with_content( const char *buffer, size_t length )
|
||||
{
|
||||
IOBUF a;
|
||||
|
||||
a = iobuf_alloc(3, length );
|
||||
memcpy( a->d.buf, buffer, length );
|
||||
a->d.len = length;
|
||||
|
||||
return a;
|
||||
}
|
||||
|
||||
|
||||
/****************
|
||||
* Create a head iobuf for reading from a file
|
||||
|
@ -877,8 +889,19 @@ iobuf_flush(IOBUF a)
|
|||
return 0;
|
||||
|
||||
/*log_debug("iobuf-%d.%d: flush\n", a->no, a->subno );*/
|
||||
if( a->usage == 3 )
|
||||
log_bug("temp buffer too short\n");
|
||||
if( a->usage == 3 ) { /* must increase the size of the temp buffer */
|
||||
char *newbuf;
|
||||
size_t newsize = a->d.size + 8192;
|
||||
|
||||
log_debug("increasing temp iobuf from %lu to %lu\n",
|
||||
(ulong)a->d.size, (ulong)newsize );
|
||||
newbuf = m_alloc( newsize );
|
||||
memcpy( newbuf, a->d.buf, a->d.len );
|
||||
m_free(a->d.buf);
|
||||
a->d.buf = newbuf;
|
||||
a->d.size = newsize;
|
||||
return 0;
|
||||
}
|
||||
else if( a->usage != 2 )
|
||||
log_bug("flush on non-output iobuf\n");
|
||||
else if( !a->filter )
|
||||
|
|
|
@ -161,7 +161,7 @@ g10_log_bug( const char *fmt, ... )
|
|||
va_list arg_ptr ;
|
||||
|
||||
putc('\n', stderr );
|
||||
print_prefix("Ooops: ");
|
||||
print_prefix("Ohhhh jeeee: ");
|
||||
va_start( arg_ptr, fmt ) ;
|
||||
vfprintf(stderr,fmt,arg_ptr) ;
|
||||
va_end(arg_ptr);
|
||||
|
@ -174,7 +174,7 @@ g10_log_bug( const char *fmt, ... )
|
|||
void
|
||||
g10_log_bug0( const char *file, int line, const char *func )
|
||||
{
|
||||
log_bug(_("Ohhhh jeeee ... this is a bug (%s:%d:%s)\n"), file, line, func );
|
||||
log_bug(_("... this is a bug (%s:%d:%s)\n"), file, line, func );
|
||||
}
|
||||
#else
|
||||
void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue