X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fstring%2F_info.c;fp=ccan%2Fstring%2F_info.c;h=9cb691ce64f5701cf181fccd9d04d6bc42e4874d;hb=650c775ff00cccd03fc84e7789a03c51d9839004;hp=0000000000000000000000000000000000000000;hpb=c8acddea39d222312102952e91c32cfe4dd2cea0;p=ccan diff --git a/ccan/string/_info.c b/ccan/string/_info.c new file mode 100644 index 00000000..9cb691ce --- /dev/null +++ b/ccan/string/_info.c @@ -0,0 +1,35 @@ +#include +#include +#include "config.h" + +/** + * string - string helper routines + * + * This is a grab bag of modules for string comparisons, designed to enhance + * the standard string.h. + * + * Example: + * #include "string/string.h" + * + * int main(int argc, char *argv[]) + * { + * if (argv[1] && streq(argv[1], "--verbose")) + * printf("verbose set\n"); + * if (argv[1] && strstarts(argv[1], "--")) + * printf("Some option set\n"); + * if (argv[1] && strends(argv[1], "cow-powers")) + * printf("Magic option set\n"); + * return 0; + * } + */ +int main(int argc, char *argv[]) +{ + if (argc != 2) + return 1; + + if (strcmp(argv[1], "depends") == 0) + /* Nothing. */ + return 0; + + return 1; +}