forsemi.c
资源名称:DOS系统的源代码.rar [点击查看]
上传用户:xiaoan1112
上传日期:2013-04-11
资源大小:19621k
文件大小:0k
源码类别:
操作系统开发
开发平台:
Visual C++
- /* forsemi.c - walk a semicolon separated sstring */
- #include "..htools.h"
- #include <stdarg.h>
- flagType forsemi (register char *p,
- flagType (*proc)(char *, va_list),
- ...)
- {
- char *p1, c;
- flagType f;
- va_list ap;
- do {
- p1 = strbscan (p, ";");
- c = *p1;
- *p1 = 0;
- va_start(ap, proc);
- f = (*proc)(p, ap);
- va_end(ap);
- p = p1;
- *p++ = c;
- if (f)
- return TRUE;
- } while (c);
- return FALSE;
- }