00001
00002
00003
00004
00005
00006
00007 #include "includes.h"
00008
00009 int main(int argc, char *argv[])
00010 {
00011 int i;
00012 int iters = 1;
00013
00014 const char *ret = NULL;
00015
00016
00017 lp_load("/dev/null", True, False, False, True);
00018
00019 if (argc < 3) {
00020 fprintf(stderr, "usage: %s STRING1 STRING2 [ITERS]\n"
00021 "Compares two strings, prints the results of strstr_m\n",
00022 argv[0]);
00023 return 2;
00024 }
00025 if (argc >= 4)
00026 iters = atoi(argv[3]);
00027
00028 for (i = 0; i < iters; i++) {
00029 ret = strstr_m(argv[1], argv[2]);
00030 }
00031
00032 if (ret == NULL)
00033 ret = "(null)";
00034
00035 printf("%s\n", ret);
00036
00037 return 0;
00038 }