From: Ralph Boehme Date: Mon, 11 Aug 2014 05:23:31 +0000 (+0200) Subject: Spotlight: support for OS X 10.6 clients X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=netatalk.git;a=commitdiff_plain;h=1c6d13342d94a51dce37c829b9002ee086204407 Spotlight: support for OS X 10.6 clients 10.6 clients seem to use simple "=" instead of "==" in equality tests in queries. Signed-off-by: Ralph Boehme --- diff --git a/etc/spotlight/spotlight_rawquery_lexer.c b/etc/spotlight/spotlight_rawquery_lexer.c index b13b721b..c14d4ffb 100644 --- a/etc/spotlight/spotlight_rawquery_lexer.c +++ b/etc/spotlight/spotlight_rawquery_lexer.c @@ -366,8 +366,8 @@ static void yy_fatal_error (yyconst char msg[] ); *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; -#define YY_NUM_RULES 17 -#define YY_END_OF_BUFFER 18 +#define YY_NUM_RULES 18 +#define YY_END_OF_BUFFER 19 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -377,12 +377,12 @@ struct yy_trans_info }; static yyconst flex_int16_t yy_accept[57] = { 0, - 0, 0, 18, 17, 16, 17, 5, 17, 17, 6, - 7, 15, 14, 12, 17, 13, 15, 15, 15, 17, - 17, 17, 17, 11, 0, 8, 15, 0, 0, 0, - 10, 15, 15, 15, 9, 0, 0, 0, 15, 15, - 15, 0, 0, 15, 15, 4, 0, 15, 3, 0, - 15, 0, 1, 0, 2, 0 + 0, 0, 19, 18, 17, 18, 5, 18, 18, 6, + 7, 16, 15, 13, 11, 14, 16, 16, 16, 18, + 18, 18, 18, 12, 0, 8, 16, 0, 0, 0, + 10, 16, 16, 16, 9, 0, 0, 0, 16, 16, + 16, 0, 0, 16, 16, 4, 0, 16, 3, 0, + 16, 0, 1, 0, 2, 0 } ; static yyconst flex_int32_t yy_ec[256] = @@ -826,40 +826,45 @@ return EQUAL; case 11: YY_RULE_SETUP #line 38 "spotlight_rawquery_lexer.l" -return UNEQUAL; +return EQUAL; YY_BREAK case 12: YY_RULE_SETUP #line 39 "spotlight_rawquery_lexer.l" -return LT; +return UNEQUAL; YY_BREAK case 13: YY_RULE_SETUP #line 40 "spotlight_rawquery_lexer.l" -return GT; +return LT; YY_BREAK case 14: YY_RULE_SETUP #line 41 "spotlight_rawquery_lexer.l" -return COMMA; +return GT; YY_BREAK case 15: YY_RULE_SETUP #line 42 "spotlight_rawquery_lexer.l" -{yylval.sval = talloc_strdup(SLQ_VAR, yytext); return WORD;} +return COMMA; YY_BREAK case 16: -/* rule 16 can match eol */ YY_RULE_SETUP #line 43 "spotlight_rawquery_lexer.l" -/* ignore */ +{yylval.sval = talloc_strdup(SLQ_VAR, yytext); return WORD;} YY_BREAK case 17: +/* rule 17 can match eol */ YY_RULE_SETUP #line 44 "spotlight_rawquery_lexer.l" +/* ignore */ + YY_BREAK +case 18: +YY_RULE_SETUP +#line 45 "spotlight_rawquery_lexer.l" ECHO; YY_BREAK -#line 863 "spotlight_rawquery_lexer.c" +#line 868 "spotlight_rawquery_lexer.c" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -1853,7 +1858,7 @@ void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 44 "spotlight_rawquery_lexer.l" +#line 45 "spotlight_rawquery_lexer.l" diff --git a/etc/spotlight/spotlight_rawquery_lexer.l b/etc/spotlight/spotlight_rawquery_lexer.l index db7f40cd..34d7e05f 100644 --- a/etc/spotlight/spotlight_rawquery_lexer.l +++ b/etc/spotlight/spotlight_rawquery_lexer.l @@ -35,6 +35,7 @@ true {yylval.bval = true; return BOOL;} \&\& return AND; \|\| return OR; \=\= return EQUAL; +\= return EQUAL; \!\= return UNEQUAL; \< return LT; \> return GT;