/* $NetBSD: xstrtol.h,v 1.1.1.1 2003/01/26 00:43:14 wiz Exp $ */ /* A more useful interface to strtol. Copyright 1995, 1996, 1998, 1999, 2001 Free Software Foundation, Inc. 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, 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 program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef XSTRTOL_H_ # define XSTRTOL_H_ 1 # if HAVE_INTTYPES_H # include /* for uintmax_t */ # endif # ifndef PARAMS # if defined PROTOTYPES || (defined __STDC__ && __STDC__) # define PARAMS(Args) Args # else # define PARAMS(Args) () # endif # endif # ifndef _STRTOL_ERROR enum strtol_error { LONGINT_OK, LONGINT_INVALID, LONGINT_INVALID_SUFFIX_CHAR, LONGINT_OVERFLOW }; typedef enum strtol_error strtol_error; # endif # define _DECLARE_XSTRTOL(name, type) \ strtol_error \ name PARAMS ((const char *s, char **ptr, int base, \ type *val, const char *valid_suffixes)); _DECLARE_XSTRTOL (xstrtol, long int) _DECLARE_XSTRTOL (xstrtoul, unsigned long int) _DECLARE_XSTRTOL (xstrtoimax, intmax_t) _DECLARE_XSTRTOL (xstrtoumax, uintmax_t) # define _STRTOL_ERROR(Exit_code, Str, Argument_type_string, Err) \ do \ { \ switch ((Err)) \ { \ case LONGINT_OK: \ abort (); \ \ case LONGINT_INVALID: \ error ((Exit_code), 0, "invalid %s `%s'", \ (Argument_type_string), (Str)); \ break; \ \ case LONGINT_INVALID_SUFFIX_CHAR: \ error ((Exit_code), 0, "invalid character following %s in `%s'", \ (Argument_type_string), (Str)); \ break; \ \ case LONGINT_OVERFLOW: \ error ((Exit_code), 0, "%s `%s' too large", \ (Argument_type_string), (Str)); \ break; \ } \ } \ while (0) # define STRTOL_FATAL_ERROR(Str, Argument_type_string, Err) \ _STRTOL_ERROR (2, Str, Argument_type_string, Err) # define STRTOL_FAIL_WARN(Str, Argument_type_string, Err) \ _STRTOL_ERROR (0, Str, Argument_type_string, Err) #endif /* not XSTRTOL_H_ */ 019-02-09 03:33:59 +0000'>2019-02-09- Change the allocation macros to be more like function callschristos 2017-11-14check the result of pool_prime.christos 2017-01-04PR/51776: David Binderman: Remove unused variable.christos 2012-02-20comment, and effectively remove, a DIAGNOSTIC check thatoster 2011-08-31NULL does not need a castplunky 2011-05-10convert RF_CommonLogData_s/RF_ReconMap_s mutex to a kmutex/cv.mrg 2008-05-19Re-work some of the guts of the reconstruction code.oster 2007-03-12Pass an ipl argument to pool_init/POOL_INIT to be used when initializingad 2006-11-16__unused removal on arguments; approved by core.christos 2006-10-12- sprinkle __unused on function decls.christos 2005-12-11merge ktrace-lwp.christos 2005-02-27nuke trailing whitespaceperry 2004-03-18Remove a debugging line that was accidentally left in.oster 2004-03-18Re-work the locking mechanisms for reconstruct and PSS structuresoster 2004-03-01We always wait until we get memory, so the NULL check doesn't buy us anything.oster 2003-12-30Some days you wonder if some of the function declaration consistencyoster 2003-12-29Since rf_mutex_destroy() is effectively a NOP now, nuke it.oster 2003-12-29Simplify defn's of rf_mutex_init() and rf_mutex_destroy(). Sinceoster 2003-12-29- first kick at a major reworking of RAIDframe's memory allocation code:oster 2003-12-29[Having received a definite lack of strenuous objection, a small amountoster 2003-12-21Since the 5th arg of pool_init() wasn't actually the numberoster 2003-12-21Fix usage of fifth argument to pool_init().simonb 2002-10-06poolify the RF_ReconMapListElem_t's used by rf_ReconMapUpdate().oster 2002-10-05update_size() does some bookkeeping, but nothing ever reads the dataoster 2002-10-05RU_NIL is not used. Remove it.oster 2002-10-04Minor cleanup. No functional changes.oster 2002-09-17Cast the RF_DEBUG_RECON net a little wider.oster 2002-09-17Were these functions actually called by anything, I might have consideredoster 2002-09-14Everyone and their dog was using RF_ERRORMSG3 to print out the sameoster 2001-11-13add RCSIDslukem 2001-07-18bzero -> memsetthorpej 1999-08-14Fix an 'off-by-one' error in a RF_ASSERT which meant that a reconstructoster 1999-08-13rf_sys.h does not need to be #included in any of these files, and, actually,oster 1999-02-05Phase 2 of the RAIDframe cleanup. The source is now closer to KNFoster 1999-01-26Nuke more bits of RAIDframe "demo" code. We're not "demoing" here,oster 1999-01-26RAIDframe cleanup, phase 1. Nuke simulator support, user-land driver,oster 1998-11-13RAIDframe, version 1.1, from the Parallel Data Laboratory atoster