mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-08-30 13:51:03 +00:00
98ee79f433
- parse-options.[ch] has argument processing code. - types.h: Additional types for argument processing. - strbuf.[ch]: Added a function prefixcmp to compare string prefix Signed-off-by: Prasad Joshi <prasadjoshi124@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
14 lines
253 B
C
14 lines
253 B
C
|
|
/* user defined headers */
|
|
#include <kvm/strbuf.h>
|
|
|
|
int prefixcmp(const char *str, const char *prefix)
|
|
{
|
|
for (; ; str++, prefix++) {
|
|
if (!*prefix)
|
|
return 0;
|
|
else if (*str != *prefix)
|
|
return (unsigned char)*prefix - (unsigned char)*str;
|
|
}
|
|
}
|