Mercurial > audlegacy
comparison src/audtool/audtool_main.c @ 3873:f3341c2d6b9e
audacious remote functions:
- playlist_ins_url_string() and playlist_enqueue_to_temp() have been implemented.
- now get_version() returns audacious version instead of protocol version.
audtool:
- now argc check works properly.
- some cleanups.
author | Yoshiki Yazawa <yaz@cc.rim.or.jp> |
---|---|
date | Tue, 30 Oct 2007 22:12:47 +0900 |
parents | e48f2f4c116d |
children | 86c9abc83fbd |
comparison
equal
deleted
inserted
replaced
3872:b02853ac8466 | 3873:f3341c2d6b9e |
---|---|
109 {"help", get_handlers_list, "shows handlers list", 0}, | 109 {"help", get_handlers_list, "shows handlers list", 0}, |
110 | 110 |
111 /* test suite */ | 111 /* test suite */ |
112 {"<sep>", NULL, "Test suite", 0}, | 112 {"<sep>", NULL, "Test suite", 0}, |
113 {"activate", test_activate, "activate", 0}, | 113 {"activate", test_activate, "activate", 0}, |
114 {"playlist-enqueue-to-temp", test_enqueue_to_temp, "enqueue_to_temp", 1}, | 114 {"playlist-addurl-to-new-playlist", test_enqueue_to_temp, "adds a url to the newly created playlist", 1}, |
115 {"toggle-aot", test_toggle_aot, "specify allways on top or not", 1}, // xxx need to be improved. | 115 {"always-on-top", test_toggle_aot, "on/off always on top", 1}, |
116 {"get-skin", test_get_skin, "get skin", 0}, | 116 {"get-skin", test_get_skin, "get skin", 0}, |
117 {"set-skin", test_set_skin, "set skin", 1}, | 117 {"set-skin", test_set_skin, "set skin", 1}, |
118 {"get-info", test_get_info, "get info", 0}, | 118 {"get-info", test_get_info, "get info", 0}, |
119 {"playlist-insurl", test_ins_url_string, "inserts a url at specified position in the playlist", 2}, | |
120 {"get-version", test_get_version, "get version of audacious", 0}, | |
119 | 121 |
120 {NULL, NULL, NULL, 0} | 122 {NULL, NULL, NULL, 0} |
121 }; | 123 }; |
122 | 124 |
123 mowgli_error_context_t *e = NULL; | 125 mowgli_error_context_t *e = NULL; |
165 { | 167 { |
166 if ((!g_ascii_strcasecmp(handlers[i].name, argv[j]) || | 168 if ((!g_ascii_strcasecmp(handlers[i].name, argv[j]) || |
167 !g_ascii_strcasecmp(g_strconcat("--", handlers[i].name, NULL), argv[j])) | 169 !g_ascii_strcasecmp(g_strconcat("--", handlers[i].name, NULL), argv[j])) |
168 && g_ascii_strcasecmp("<sep>", handlers[i].name)) | 170 && g_ascii_strcasecmp("<sep>", handlers[i].name)) |
169 { | 171 { |
170 handlers[i].handler(handlers[i].args + 1, &argv[j]); | 172 // handlers[i].handler(handlers[i].args + 1, &argv[j]); |
173 handlers[i].handler(handlers[i].args + 1 < argc - 1 ? handlers[i].args + 1 : argc - 1, | |
174 &argv[j]); // to enable argc check --yaz | |
171 j += handlers[i].args; | 175 j += handlers[i].args; |
172 k++; | 176 k++; |
173 } | 177 } |
174 } | 178 } |
175 } | 179 } |