view release on metacpan or search on metacpan
src/judy-1.0.5/aclocal.m4 view on Meta::CPAN
# handle `-M -o', and we need to detect this.
if depmode=$depmode \
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
>/dev/null 2>conftest.err &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
# that says an option was ignored or not supported.
# When given -MP, icc 7.0 and 7.1 complain thusly:
# icc: Command line warning: ignoring option '-M'; no argument required
# The diagnosis changed in icc 8.0:
# icc: Command line remark: option '-MP' not supported
if (grep 'ignoring option' conftest.err ||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
am_cv_$1_dependencies_compiler_type=$depmode
break
fi
src/judy-1.0.5/autom4te.cache/output.0 view on Meta::CPAN
# handle `-M -o', and we need to detect this.
if depmode=$depmode \
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
>/dev/null 2>conftest.err &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
# that says an option was ignored or not supported.
# When given -MP, icc 7.0 and 7.1 complain thusly:
# icc: Command line warning: ignoring option '-M'; no argument required
# The diagnosis changed in icc 8.0:
# icc: Command line remark: option '-MP' not supported
if (grep 'ignoring option' conftest.err ||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
am_cv_CC_dependencies_compiler_type=$depmode
break
fi
src/judy-1.0.5/autom4te.cache/output.0 view on Meta::CPAN
# handle `-M -o', and we need to detect this.
if depmode=$depmode \
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
>/dev/null 2>conftest.err &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
# that says an option was ignored or not supported.
# When given -MP, icc 7.0 and 7.1 complain thusly:
# icc: Command line warning: ignoring option '-M'; no argument required
# The diagnosis changed in icc 8.0:
# icc: Command line remark: option '-MP' not supported
if (grep 'ignoring option' conftest.err ||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
am_cv_CXX_dependencies_compiler_type=$depmode
break
fi
src/judy-1.0.5/autom4te.cache/output.0 view on Meta::CPAN
#
# `ac_cv_env_foo' variables (set or unset) will be overridden when
# loading this file, other *unset* `ac_cv_foo' will be assigned the
# following values.
_ACEOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, we kill variables containing newlines.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(
for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
eval ac_val=\$$ac_var
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
*_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
esac
src/judy-1.0.5/autom4te.cache/output.1 view on Meta::CPAN
# handle `-M -o', and we need to detect this.
if depmode=$depmode \
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
>/dev/null 2>conftest.err &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
# that says an option was ignored or not supported.
# When given -MP, icc 7.0 and 7.1 complain thusly:
# icc: Command line warning: ignoring option '-M'; no argument required
# The diagnosis changed in icc 8.0:
# icc: Command line remark: option '-MP' not supported
if (grep 'ignoring option' conftest.err ||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
am_cv_CC_dependencies_compiler_type=$depmode
break
fi
src/judy-1.0.5/autom4te.cache/output.1 view on Meta::CPAN
# handle `-M -o', and we need to detect this.
if depmode=$depmode \
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
>/dev/null 2>conftest.err &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
# that says an option was ignored or not supported.
# When given -MP, icc 7.0 and 7.1 complain thusly:
# icc: Command line warning: ignoring option '-M'; no argument required
# The diagnosis changed in icc 8.0:
# icc: Command line remark: option '-MP' not supported
if (grep 'ignoring option' conftest.err ||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
am_cv_CXX_dependencies_compiler_type=$depmode
break
fi
src/judy-1.0.5/autom4te.cache/output.1 view on Meta::CPAN
#
# `ac_cv_env_foo' variables (set or unset) will be overridden when
# loading this file, other *unset* `ac_cv_foo' will be assigned the
# following values.
_ACEOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, we kill variables containing newlines.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(
for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
eval ac_val=\$$ac_var
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
*_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
esac
src/judy-1.0.5/autom4te.cache/traces.0 view on Meta::CPAN
# handle `-M -o', and we need to detect this.
if depmode=$depmode \
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
>/dev/null 2>conftest.err &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
# that says an option was ignored or not supported.
# When given -MP, icc 7.0 and 7.1 complain thusly:
# icc: Command line warning: ignoring option '-M'; no argument required
# The diagnosis changed in icc 8.0:
# icc: Command line remark: option '-MP' not supported
if (grep 'ignoring option' conftest.err ||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
am_cv_$1_dependencies_compiler_type=$depmode
break
fi
src/judy-1.0.5/config.sub view on Meta::CPAN
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted ChangeLog entry.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
# If it is invalid, we print an error message on stderr and exit with code 1.
# Otherwise, we print the canonical config type on stdout and succeed.
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
# that are meaningful with *any* GNU software.
# Each package is responsible for reporting which valid configurations
# it does not support. The user should be able to distinguish
# a failure to support a valid configuration from a meaningless
# configuration.
src/judy-1.0.5/configure view on Meta::CPAN
# handle `-M -o', and we need to detect this.
if depmode=$depmode \
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
>/dev/null 2>conftest.err &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
# that says an option was ignored or not supported.
# When given -MP, icc 7.0 and 7.1 complain thusly:
# icc: Command line warning: ignoring option '-M'; no argument required
# The diagnosis changed in icc 8.0:
# icc: Command line remark: option '-MP' not supported
if (grep 'ignoring option' conftest.err ||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
am_cv_CC_dependencies_compiler_type=$depmode
break
fi
src/judy-1.0.5/configure view on Meta::CPAN
# handle `-M -o', and we need to detect this.
if depmode=$depmode \
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
>/dev/null 2>conftest.err &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
# that says an option was ignored or not supported.
# When given -MP, icc 7.0 and 7.1 complain thusly:
# icc: Command line warning: ignoring option '-M'; no argument required
# The diagnosis changed in icc 8.0:
# icc: Command line remark: option '-MP' not supported
if (grep 'ignoring option' conftest.err ||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
am_cv_CXX_dependencies_compiler_type=$depmode
break
fi
src/judy-1.0.5/configure view on Meta::CPAN
#
# `ac_cv_env_foo' variables (set or unset) will be overridden when
# loading this file, other *unset* `ac_cv_foo' will be assigned the
# following values.
_ACEOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, we kill variables containing newlines.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(
for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
eval ac_val=\$$ac_var
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
*_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
esac
src/judy-1.0.5/doc/ext/JudyHS_3.htm view on Meta::CPAN
Word_t Dups = 0; // number of duplicate lines
while (fgets(Index, MAXLINE, stdin) != (char *)NULL)
{
LineNumb++; // line number
// store string into array
JHSI(PValue, PJArray, Index, strlen(Index));
if (PValue == PJERR) // See ERRORS section
{
fprintf(stderr, "Out of memory -- exit\n");
exit(1);
}
if (*PValue == 0) // check if duplicate
{
Dups++;
printf("Duplicate lines %lu:%lu:%s", *PValue, LineNumb, Index);
}
else
{
*PValue = LineNumb; // store Line number
src/judy-1.0.5/doc/ext/JudySL_3.htm view on Meta::CPAN
Index[0] = '\0'; // start with smallest string.
JSLF(PValue, PJArray, Index); // get first string
while (PValue != NULL)
{
while ((*PValue)--) // print duplicates
printf("%s", Index);
JSLN(PValue, PJArray, Index); // get next string
}
JSLFA(Bytes, PJArray); // free array
fprintf(stderr, "The JudySL array used %lu bytes of memory\n", Bytes);
return (0);
}
</PRE>
<!----------------->
<P>
<DT><B>AUTHOR</B></DT>
<DD>
Judy was invented by Doug Baskins and implemented by Hewlett-Packard.
<!----------------->
<P>
src/judy-1.0.5/doc/ext/Judy_3.htm view on Meta::CPAN
array. Not all calls to insert and delete call <I>malloc()</I>, so they
may succeed even when a call to <I>malloc()</I> would fail.
<BR>
<P>
There are roughly <I>three (3)</I> methods of handling errors when using
the macros:
<DL>
<P>
<DT><B>1) Default Error Handling Method</B></DT>
<DD>
The default is to print error messages to <B>stderr</B>, for example:
<P>
<PRE>
File 'YourCfile.c', line 1234: JudyLIns(), JU_ERRNO_* == 2, ID == 321
</PRE>
This indicates that an error occurred in the <B>JudyLIns()</B> function
at line 321. Line 1234 is the line in 'YourCfile.c' where the
<B>JLI()</B> call failed. JU_ERRNO_* == 2 is equal to JU_ERRNO_NOMEM
(as defined in the <B>Judy.h</B> file). The ID number indicates the
source line number in the function where the error originated. Your
program then terminates with an <I>exit(1);</I>. By default, both
src/judy-1.0.5/doc/ext/Judy_3.htm view on Meta::CPAN
#ifndef JUDYERROR_NOTEST
#include <stdio.h> // needed for fprintf()
// This is the macro that the Judy macro APIs use for return codes of -1:
#define JUDYERROR(CallerFile, CallerLine, JudyFunc, JudyErrno, JudyErrID) \
{ \
if ((JudyErrno) != JU_ERRNO_NOMEM) /* ! a malloc() failure */ \
{ \
(void) fprintf(stderr, "File '%s', line %d: %s(), " \
"JU_ERRNO_* == %d, ID == %d\n", \
CallerFile, CallerLine, \
JudyFunc, JudyErrno, JudyErrID); \
exit(1); \
} \
}
#endif // JUDYERROR_NOTEST not defined
<BR>
</PRE>
This error handling macro must be included before the <B>#include <Judy.h></B>
src/judy-1.0.5/ltmain.sh view on Meta::CPAN
#endif /* PATH_SEPARATOR_2 */
#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
#define XFREE(stale) do { \
if (stale) { free ((void *) stale); stale = 0; } \
} while (0)
/* -DDEBUG is fairly common in CFLAGS. */
#undef DEBUG
#if defined DEBUGWRAPPER
# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
#else
# define DEBUG(format, ...)
#endif
const char *program_name = NULL;
void * xmalloc (size_t num);
char * xstrdup (const char *string);
const char * base_name (const char *name);
char * find_executable(const char *wrapper);
src/judy-1.0.5/ltmain.sh view on Meta::CPAN
if (strcmp(str, pat) == 0)
*str = '\0';
}
return str;
}
static void
lt_error_core (int exit_status, const char * mode,
const char * message, va_list ap)
{
fprintf (stderr, "%s: %s: ", program_name, mode);
vfprintf (stderr, message, ap);
fprintf (stderr, ".\n");
if (exit_status >= 0)
exit (exit_status);
}
void
lt_fatal (const char *message, ...)
{
va_list ap;
va_start (ap, message);
src/judy-1.0.5/src/Judy.h view on Meta::CPAN
// 3. JudyFunc: Name of Judy function reporting the error.
// 4. JudyErrno: One of the JU_ERRNO* values enumerated above.
// 5. JudyErrID: The je_ErrID field described above.
#ifndef JUDYERROR_NOTEST
#ifndef JUDYERROR /* supply a default error macro */
#include <stdio.h>
#define JUDYERROR(CallerFile, CallerLine, JudyFunc, JudyErrno, JudyErrID) \
{ \
(void) fprintf(stderr, "File '%s', line %d: %s(), " \
"JU_ERRNO_* == %d, ID == %d\n", \
CallerFile, CallerLine, \
JudyFunc, JudyErrno, JudyErrID); \
exit(1); \
}
#endif /* JUDYERROR */
#endif /* JUDYERROR_NOTEST */
// If the JUDYERROR macro is not desired at all, then the following eliminates
src/judy-1.0.5/src/JudyCommon/JudyTables.c view on Meta::CPAN
if (Index == LeafSize)
{
CurWord = Words[Index] = OWord;
break;
}
// end of available sizes ?
if (*PAllocSizes == TERMINATOR)
{
fprintf(stderr, "BUG, in %sPopToWords, sizes not big enough for object\n", TableName);
exit(1);
}
// Save words required and last word:
if (*PAllocSizes < MaxWords) { CurWord = Words[Index] = *PAllocSizes; }
else { CurWord = Words[Index] = MaxWords; }
} // for each index
src/judy-1.0.5/src/apps/demo/JudySort.c view on Meta::CPAN
Index[0] = '\0'; // start with smallest string.
JSLF(PValue, PJArray, Index); // get first string
while (PValue != NULL)
{
while ((*PValue)--) // print duplicates
printf("%s", Index);
JSLN(PValue, PJArray, Index); // get next string
}
JSLFA(Bytes, PJArray); // free array
fprintf(stderr, "The JudySL array used %lu bytes of memory\n", Bytes);
return (0);
}
src/judy-1.0.5/test/Judy1LCheck.c view on Meta::CPAN
#include <math.h> // pow()
#include <stdio.h> // printf()
#include <Judy.h>
// Common macro to handle a failure
#define FAILURE(STR, UL) \
{ \
printf( "Error: %s %lu, file='%s', 'function='%s', line %d\n", \
STR, UL, __FILE__, __FUNCTI0N__, __LINE__); \
fprintf(stderr, "Error: %s %lu, file='%s', 'function='%s', line %d\n", \
STR, UL, __FILE__, __FUNCTI0N__, __LINE__); \
exit(1); \
}
// Structure to keep track of times
typedef struct MEASUREMENTS_STRUCT
{
Word_t ms_delta;
}
ms_t, *Pms_t;
src/judy-1.0.5/test/Judy1LHCheck.c view on Meta::CPAN
#include <Judy.h>
// Compile:
// # cc -O Judy1LHCheck.c -lm -lJudy -o Judy1LHCheck
// Common macro to handle a failure
#define FAILURE(STR, UL) \
{ \
printf( "Error: %s %lu, file='%s', 'function='%s', line %d\n", \
STR, (Word_t)(UL), __FILE__, __FUNCTI0N__, __LINE__); \
fprintf(stderr, "Error: %s %lu, file='%s', 'function='%s', line %d\n", \
STR, (Word_t)(UL), __FILE__, __FUNCTI0N__, __LINE__); \
exit(1); \
}
// Structure to keep track of times
typedef struct MEASUREMENTS_STRUCT
{
Word_t ms_delta;
}
ms_t, *Pms_t;
src/judy-1.0.5/test/Judy1LHTime.c view on Meta::CPAN
} // JudyFreeVirtual()
//=======================================================================
// Common macro to handle a failure
#define FAILURE(STR, UL) \
{ \
printf( "\nError: %s %lu, file='%s', 'function='%s', line %d\n", \
STR, (Word_t)(UL), __FILE__, __FUNCTI0N__, __LINE__); \
fprintf(stderr,"\nError: %s %lu, file='%s', 'function='%s', line %d\n", \
STR, (Word_t)(UL), __FILE__, __FUNCTI0N__, __LINE__); \
exit(1); \
}
// Interations without improvement
// Minimum of 2 loops, maximum of 1000000
#define MINLOOPS 2
#define MAXLOOPS 1000000
// Maximum or 10 loops with no improvement
src/judy-1.0.5/test/Judy1LTime.c view on Meta::CPAN
#endif // MALLINFO
//=======================================================================
// Common macro to handle a failure
#define FAILURE(STR, UL) \
{ \
printf( "Error: %s %lu, file='%s', 'function='%s', line %d\n", \
STR, UL, __FILE__, __FUNCTI0N__, __LINE__); \
fprintf(stderr, "Error: %s %lu, file='%s', 'function='%s', line %d\n", \
STR, UL, __FILE__, __FUNCTI0N__, __LINE__); \
exit(1); \
}
// Interations without improvement
// Minimum of 2 loops, maximum of 1000000
#define MINLOOPS 2
#define MAXLOOPS 1000000
// Maximum or 10 loops with no improvement
src/judy-1.0.5/test/JudyString.c view on Meta::CPAN
Len = 0;
Lines++;
}
else Len++;
}
printf("Begin JHSFA (JudyHSFreeArray)\n");
JHSFA(Bytes, PJHArray); // free array
fprintf(stderr, "JHSFA() free'ed %lu bytes of memory\n", Bytes);
return (0);
}
src/judy-1.0.5/test/SLcompare.c view on Meta::CPAN
// M A I N P R O G R A M -by- Doug Baskins
//=======================================================================
// error routine for system routines for accessing file
#define FILERROR \
{ \
printf("%s: Cannot open file \"%s\": %s " \
"(errno = %d)\n", argv[0], argv[1], strerror(errno), \
errno); \
fprintf(stderr, "%s: Cannot open file \"%s\": %s " \
"(errno = %d)\n", argv[0], argv[1], strerror(errno), \
errno); \
exit(1); \
}
//=======================================================================
// M E A S U R E A D T S P E E D and M E M O R Y U S A G E
//=======================================================================
src/judy-1.0.5/test/StringCompare.c view on Meta::CPAN
#endif // NO MALLINFO
//=======================================================================
// F I L E O P E N and M A L L O C F A I L M A C R O S
//=======================================================================
#define FILERROR \
{ \
printf("\n !! OOps - Open file error \"%s\": %s (errno = %d)\n", \
argv[fileidx], strerror(errno), errno); \
fprintf(stderr, " OOps - Open file error \"%s\": %s (errno = %d)\n",\
argv[fileidx], strerror(errno), errno); \
exit(1); \
}
#define MALLOCERROR \
{ \
printf("\n !! OOps - malloc failed at Line = %d\n", __LINE__); \
fprintf(stderr, " OOps - malloc failed at Line = %d\n", __LINE__); \
exit(1); \
}
//=======================================================================
// This alternate form of JudyMalloc() is used to keep track how much ram is
// used on some of the below ADT's
//=======================================================================
// JUDY INCLUDE FILES
//#include "Judy.h"
src/judy-1.0.5/test/malloc-pre2.8a.c view on Meta::CPAN
debugging and assertions, for example:
p = malloc(n);
assert(malloc_usable_size(p) >= 256);
*/
size_t public_mUSABLe(Void_t*);
/*
malloc_stats();
Prints on stderr the amount of space obtained from the system (both
via sbrk and mmap), the maximum amount (which may be more than
current if malloc_trim and/or munmap got called), and the current
number of bytes allocated via malloc (or realloc, etc) but not yet
freed. Note that this is the number of bytes allocated, not the
number requested. It will be larger than the number requested
because of alignment and bookkeeping overhead. Because it includes
alignment wastage as being in use, this figure may be greater than
zero even when no user-level chunks are allocated.
The reported current and maximum system memory can be inaccurate if
src/judy-1.0.5/test/malloc-pre2.8a.c view on Meta::CPAN
------------------------------ malloc_stats ------------------------------
*/
void mSTATs() {
struct mallinfo mi = mALLINFo();
#ifdef WIN32
{
CHUNK_SIZE_T free, reserved, committed;
vminfo (&free, &reserved, &committed);
fprintf(stderr, "free bytes = %10lu\n",
free);
fprintf(stderr, "reserved bytes = %10lu\n",
reserved);
fprintf(stderr, "committed bytes = %10lu\n",
committed);
}
#endif
fprintf(stderr, "max system bytes = %10lu\n",
(CHUNK_SIZE_T)(mi.usmblks));
fprintf(stderr, "system bytes = %10lu\n",
(CHUNK_SIZE_T)(mi.arena + mi.hblkhd));
fprintf(stderr, "in use bytes = %10lu\n",
(CHUNK_SIZE_T)(mi.uordblks + mi.hblkhd));
#if 0
fprintf(stderr, "n0 = %10u\n", n0);
fprintf(stderr, "n1 = %10u\n", n1);
fprintf(stderr, "n2 = %10u\n", n2);
fprintf(stderr, "n3 = %10u\n", n3);
fprintf(stderr, "n4 = %10u\n", n4);
fprintf(stderr, "n5 = %10u\n", n5);
fprintf(stderr, "n6 = %10u\n", n6);
fprintf(stderr, "n7 = %10u\n", n7);
fprintf(stderr, "n8 = %10u\n", n8);
#endif
#ifdef WIN32
{
CHUNK_SIZE_T kernel, user;
if (cpuinfo (TRUE, &kernel, &user)) {
fprintf(stderr, "kernel ms = %10lu\n",
kernel);
fprintf(stderr, "user ms = %10lu\n",
user);
}
}
#endif
}
/*
------------------------------ mallopt ------------------------------
*/
src/judy-1.0.5/tool/README view on Meta::CPAN
# EXTRACT FILENAMES FROM README FILE:
#
# If $dir ends in "/README", strip that part as a convenience to the caller.
for dir in "$@"
do
dir="${dir%/README}"
# Since this whole script is a checker, write the following message to stdout,
# not stderr:
if [[ ! -f "$dir/$file" ]]
then echo "$0: cannot find $dir/$file file"; retval='1'; continue
fi
# Print field 1 if it starts in column 1 and isn't a comment or a README or
# .sbcm file, optionally the basename part only (except for trailing "/"):
awk < "$dir/$file" '
src/judy-1.0.5/tool/jhton.c view on Meta::CPAN
Error(ERREXIT, errno, "Cannot malloc %d bytes", Size);
return(Pm);
} // Malloc()
// ****************************************************************************
// U S A G E
//
// Print usage messages (char *gc_usage[]) to stderr and exit with ERREXIT.
// Follow each message line by a newline.
FUNCTION void Usage(void)
{
int which = 0; // current line.
while (gc_usage[which] != PCNULL)
{
(void) fprintf(stderr, gc_usage[which++], gc_myname);
(void) putc('\n', stderr);
}
exit(ERREXIT);
} // Usage()
// ****************************************************************************
// E R R O R
//
// Given an exit value (NOEXIT, ERREXIT, or USAGE), an errno value (NOERRNO if
// none), a message (printf) string, and zero or more argument strings, print
// an error message to stderr and, if exitvalue is NOEXIT, return; if USAGE,
// print a pointer to the program's usage message; otherwise exit with the
// value.
//
// Message is preceded by "<myname>: " using global gc_myname, and by
// "Warning: " for NOEXIT, and followed by a period and newline. If myerrno
// (system error number) is not NOERRNO, a relevant message is appended before
// the period.
FUNCTION void Error(
int Exitvalue, // or NOEXIT for warning.
int MyErrno, // system errno if relevant.
char * Message, ...)
{
va_list Parg; // place in arg list.
(void) fprintf(stderr, "%s: ", gc_myname);
if (Exitvalue == NOEXIT) (void) fputs("Warning: ", stderr);
va_start(Parg, Message);
(void) vfprintf(stderr, Message, Parg);
va_end(Parg);
if (MyErrno != NOERRNO)
{
(void) fprintf(stderr, ": %s (errno = %d)", strerror(MyErrno),
MyErrno);
}
(void) putc('.', stderr);
(void) putc('\n', stderr);
if (Exitvalue == USAGE)
{
(void) fprintf(stderr, "For a usage summary, run %s -?\n",
gc_myname);
}
DBGCODE(DumpTree(g_Pdnhead, /* Depth = */ 0, /* Separator = */ FALSE);)
if (Exitvalue != NOEXIT)
exit(Exitvalue);
} // Error()