X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=sm%2Fserver.c;h=a43ff34729b48d3590c0dffcdf433677f4105c3c;hb=8bffc2850be3e430e7f6faec136d31c6c815f93f;hp=e21c6a4f57db1851f6f5180e7e825e1015fd12c6;hpb=158ef6d574d6bd975c94e86476cb1631e775a40c;p=platform%2Fupstream%2Fgpg2.git diff --git a/sm/server.c b/sm/server.c index e21c6a4..a43ff34 100644 --- a/sm/server.c +++ b/sm/server.c @@ -30,6 +30,7 @@ #include "gpgsm.h" #include #include "sysutils.h" +#include "server-help.h" #define set_error(e,t) assuan_set_error (ctx, gpg_error (e), (t)) @@ -95,38 +96,6 @@ strcpy_escaped_plus (char *d, const char *s) } -/* Skip over options. - Blanks after the options are also removed. */ -static char * -skip_options (const char *line) -{ - while (spacep (line)) - line++; - while ( *line == '-' && line[1] == '-' ) - { - while (*line && !spacep (line)) - line++; - while (spacep (line)) - line++; - } - return (char*)line; -} - - -/* Check whether the option NAME appears in LINE */ -static int -has_option (const char *line, const char *name) -{ - const char *s; - int n = strlen (name); - - s = strstr (line, name); - if (s && s >= skip_options (line)) - return 0; - return (s && (s == line || spacep (s-1)) && (!s[n] || spacep (s+n))); -} - - /* A write handler used by es_fopencookie to write assuan data lines. */ static gpgrt_ssize_t