mirror of
https://github.com/cc65/cc65.git
synced 2025-01-11 11:30:13 +00:00
Conformed to the cc65 project's coding style.
This commit is contained in:
parent
628d27327b
commit
a92f51fea5
@ -15,7 +15,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
||||||
char * __fastcall__ strqtok (register char *s1, const char *s2)
|
char* __fastcall__ strqtok (register char* s1, const char* s2)
|
||||||
{
|
{
|
||||||
static char c;
|
static char c;
|
||||||
static char *start;
|
static char *start;
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
void main(void)
|
void main (void)
|
||||||
{
|
{
|
||||||
/* b[] and s[] are declared as automatic, not static, variables
|
/* b[] and s[] are declared as automatic, not static, variables
|
||||||
** because strqtok() will change them.
|
** because strqtok() will change them.
|
||||||
@ -41,10 +41,10 @@ void main(void)
|
|||||||
char s[] = " This , \" is only \"a short "
|
char s[] = " This , \" is only \"a short "
|
||||||
"quoting\"test , honoring blanks"
|
"quoting\"test , honoring blanks"
|
||||||
", commas\", and (4) empty \"\"\"\"\"\"\"\" \"strings, EOT ";
|
", commas\", and (4) empty \"\"\"\"\"\"\"\" \"strings, EOT ";
|
||||||
char *t = strqtok(s, " ,");
|
char *t = strqtok (s, " ,");
|
||||||
|
|
||||||
while (t != NULL) {
|
while (t != NULL) {
|
||||||
printf(">%s<\n", t);
|
printf (">%s<\n", t);
|
||||||
t = strqtok(NULL, " ,");
|
t = strqtok (NULL, " ,");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user