updated libopts

This commit is contained in:
Nikos Mavrogiannopoulos
2013-04-28 15:16:15 +03:00
parent fed7861b89
commit 66d9e9404d
59 changed files with 7427 additions and 4770 deletions
+16 -10
View File
@@ -1,10 +1,15 @@
/** \file tokenize.c
*
* Tokenize a string, accommodating quoted strings.
*
* @addtogroup autoopts
* @{
*/
/*
* This file defines the string_tokenize interface
* Time-stamp: "2012-03-04 13:23:50 bkorb"
*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
* AutoOpts is Copyright (c) 1992-2012 by Bruce Korb - all rights reserved
* AutoOpts is Copyright (C) 1992-2013 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -16,11 +21,11 @@
* The Modified Berkeley Software Distribution License
* See the file "COPYING.mbsd"
*
* These files have the following md5sums:
* These files have the following sha256 sums:
*
* 43b91e8ca915626ed3818ffb1b71248b pkg/libopts/COPYING.gplv3
* 06a1a2e4760c90ea5e1dad8dfaac4d39 pkg/libopts/COPYING.lgplv3
* 66a5cedaf62c4b2637025f049f9b826f pkg/libopts/COPYING.mbsd
* 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
* 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
* 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
#include <errno.h>
@@ -145,8 +150,8 @@ alloc_token_list(char const * str)
pz = SPN_WHITESPACE_CHARS(pz);
} while (*pz != NUL);
res = malloc(sizeof(*res) + (pz - str)
+ (max_token_ct * sizeof(ch_t*)));
res = malloc(sizeof(*res) + (size_t)(pz - str)
+ ((size_t)max_token_ct * sizeof(ch_t*)));
}
if (res == NULL)
@@ -324,7 +329,8 @@ main(int argc, char** argv)
}
#endif
/*
/** @}
*
* Local Variables:
* mode: C
* c-file-style: "stroustrup"