diff options
author | Michiel Van Der Kolk <not.valid@email.address> | 2005-04-29 21:02:17 +0000 |
---|---|---|
committer | Michiel Van Der Kolk <not.valid@email.address> | 2005-04-29 21:02:17 +0000 |
commit | ec407a86a758925e7ba0c994ae17d29e19dc4b39 (patch) | |
tree | cc2fb9c032aad91a786ecb1dd47c730298efeb37 /apps/plugins/searchengine/searchengine.c | |
parent | 388d9ff6a3229149c4b37f52321d10b460acc382 (diff) | |
download | rockbox-ec407a86a758925e7ba0c994ae17d29e19dc4b39.tar.gz rockbox-ec407a86a758925e7ba0c994ae17d29e19dc4b39.zip |
Code policy...
Removed tokentool for now since this is not the proper place, but what is?
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6383 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/searchengine/searchengine.c')
-rw-r--r-- | apps/plugins/searchengine/searchengine.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/apps/plugins/searchengine/searchengine.c b/apps/plugins/searchengine/searchengine.c index 16b92369f1..5a85af5184 100644 --- a/apps/plugins/searchengine/searchengine.c +++ b/apps/plugins/searchengine/searchengine.c | |||
@@ -72,7 +72,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | |||
72 | parsefd=rb->open(parameter,O_RDONLY); | 72 | parsefd=rb->open(parameter,O_RDONLY); |
73 | if(parsefd<0) { | 73 | if(parsefd<0) { |
74 | rb->splash(2*HZ,true,"Unable to open search tokenstream"); | 74 | rb->splash(2*HZ,true,"Unable to open search tokenstream"); |
75 | return PLUGIN_ERROR; | 75 | return PLUGIN_ERROR; |
76 | } | 76 | } |
77 | result=parse(parsefd); | 77 | result=parse(parsefd); |
78 | rb->snprintf(buf,250,"Retval: 0x%x",result); | 78 | rb->snprintf(buf,250,"Retval: 0x%x",result); |
@@ -80,15 +80,14 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | |||
80 | rb->close(parsefd); | 80 | rb->close(parsefd); |
81 | hits=0; | 81 | hits=0; |
82 | if(result!=0) { | 82 | if(result!=0) { |
83 | int fd=rb->open("/search.m3u", O_WRONLY|O_CREAT|O_TRUNC); | 83 | int fd=rb->open("/search.m3u", O_WRONLY|O_CREAT|O_TRUNC); |
84 | int i; | 84 | int i; |
85 | for(i=0;i<rb->tagdbheader->filecount;i++) | 85 | for(i=0;i<rb->tagdbheader->filecount;i++) |
86 | if(result[i]) { | 86 | if(result[i]) { |
87 | hits++; | 87 | hits++; |
88 | rb->fdprintf(fd,"%s\n",getfilename(i)); | 88 | rb->fdprintf(fd,"%s\n",getfilename(i)); |
89 | } | 89 | } |
90 | /* rb->write(fd,result,rb->tagdbheader->filecount);*/ | 90 | rb->close(fd); |
91 | rb->close(fd); | ||
92 | } | 91 | } |
93 | rb->snprintf(buf,250,"Hits: %d",hits); | 92 | rb->snprintf(buf,250,"Hits: %d",hits); |
94 | rb->splash(HZ*3,true,buf); | 93 | rb->splash(HZ*3,true,buf); |