1N/A/*********************************************************************** 1N/A* This software is part of the ast package * 1N/A* Copyright (c) 1985-2011 AT&T Intellectual Property * 1N/A* and is licensed under the * 1N/A* Common Public License, Version 1.0 * 1N/A* by AT&T Intellectual Property * 1N/A* A copy of the License is available at * 1N/A* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) * 1N/A* Information and Software Systems Research * 1N/A* Glenn Fowler <gsf@research.att.com> * 1N/A* David Korn <dgk@research.att.com> * 1N/A* Phong Vo <kpv@research.att.com> * 1N/A***********************************************************************/ 1N/A * return the record format descriptor given a format string 1N/A * e!=0 set to the first unrecognized char after the format 1N/A * REC_N_TYPE() returned on error 1N/A * d[0xNN|delimiter] (delimited, newline default) 1N/A * [f][+]size (fixed length) 1N/A * v hN oN zN b|l i|n (variable length with size header) 1N/A * h header size in bytes (ibm V 4) 1N/A * o size offset in bytes (ibm V 0) 1N/A * z size length in bytes (ibm V 2) 1N/A * l|b little-endian or big-endian size (ibm V b (0)) 1N/A while (*s ==
' ' || *s ==
'\t' || *s ==
',')
1N/A if (*s ==
'0' && (*(s +
1) ==
'x' || *(s +
1) ==
'X'))
1N/A while (*++s ==
' ' || *s ==
'\t' || *s ==
',');
1N/A case '0':
case '1':
case '2':
case '3':
case '4':
1N/A case '5':
case '6':
case '7':
case '8':
case '9':
1N/A if (n > 0 && t > (
char*)s)
1N/A while (*++s ==
' ' || *s ==
'\t' || *s ==
',');
1N/A for (t = (
char*)s; *t && *t !=
' ' && *t !=
'\t' && *t !=
','; t++);
1N/A * TBD: look up name in method libraries 1N/A * and assign an integer index 1N/A while (*++s ==
' ' || *s ==
'\t' || *s ==
',');
1N/A if (n < 0 || n >
15 || *t++ !=
'.')
1N/A case '0':
case '1':
case '2':
case '3':
case '4':
1N/A case '5':
case '6':
case '7':
case '8':
case '9':
1N/A s = (
const char*)t -
1;
1N/A if (a[
3] > (a[
1] - a[
2]))