rminnichinitial1fcdf7916 years agoHistory
32 lines · 506 B · C
RawDownload
#include <u.h>#include <libc.h> int	strcomment = '#'; intstrparse(char *p, int arsize, char **arv){	int arc = 0; 	/*print("parse: 0x%lux = \"%s\"\n", p, p);/**/	while(p){		while(*p == ' ' || *p == '\t')			p++;		if(*p == 0 || *p == strcomment)			break;		if(arc >= arsize-1)			break;		arv[arc++] = p;		while(*p && *p != ' ' && *p != '\t')			p++;		if(*p == 0)			break;		*p++ = 0;	}	arv[arc] = 0;	/*while(*arv){		print("\t0x%lux = \"%s\"\n", *arv, *arv);		++arv;	}/**/	return arc;}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t