strings[index] = strdup(endptr + 1);
strings[index] = newstrdup(endptr + 1);
static void Read_text	(	istream& in,	vector<char *>& strings		// Strings returned here.	)	{	strings.resize(0);		// Initialize.	strings.reserve(1200);	char buf[1024];	int linenum = 0;	while (!in.eof())		{		++linenum;		in.get(buf, sizeof(buf));		char delim;		// Check for end-of-line.		in.get(delim);		if (delim != '\n' && !in.eof())			{			cerr << "Line #" << linenum << " is too long" << endl;			exit(1);			}		if (!buf[0])			continue;	// Empty line.		char *ptr = &buf[0];		char *endptr;		// Get line# in decimal, hex, or oct.		long index = strtol(ptr, &endptr, 0);		if (endptr == ptr)	// No #?			{			if (*ptr == '#')				continue;			cerr << "Line " << linenum <<					" doesn't start with a number" << endl;			exit(1);			}		if (*endptr != ':')			{			cerr << "Missing ':' in line " << linenum << 				".  Ignoring line" << endl;			continue;			}		if (index >= strings.size())			strings.resize(index + 1);		strings[index] = strdup(endptr + 1);		}	}