Changeset c36f4d0 for functions.c
- Timestamp:
- Jul 23, 2011, 9:24:37 PM (13 years ago)
- Parents:
- 4ebbfbc (diff), c40d11a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
functions.c
r4ebbfbc rc36f4d0 2132 2132 2133 2133 /* Create a new filter, or replace an existing one 2134 * with a new definition. 2134 * with a new definition. Returns true on success. 2135 2135 */ 2136 voidowl_function_create_filter(int argc, const char *const *argv)2136 bool owl_function_create_filter(int argc, const char *const *argv) 2137 2137 { 2138 2138 owl_filter *f; … … 2142 2142 if (argc < 2) { 2143 2143 owl_function_error("Wrong number of arguments to filter command"); 2144 return ;2144 return false; 2145 2145 } 2146 2146 … … 2152 2152 if (!strcmp(argv[1], "all")) { 2153 2153 owl_function_error("You may not change the 'all' filter."); 2154 return ;2154 return false; 2155 2155 } 2156 2156 … … 2160 2160 if (!f) { 2161 2161 owl_function_error("The filter '%s' does not exist.", argv[1]); 2162 return ;2162 return false; 2163 2163 } 2164 2164 if (owl_util_string_to_color(argv[3])==OWL_COLOR_INVALID) { 2165 2165 owl_function_error("The color '%s' is not available.", argv[3]); 2166 return ;2166 return false; 2167 2167 } 2168 2168 owl_filter_set_fgcolor(f, owl_util_string_to_color(argv[3])); 2169 2169 owl_mainwin_redisplay(owl_global_get_mainwin(&g)); 2170 return ;2170 return false; 2171 2171 } 2172 2172 if (argc==4 && !strcmp(argv[2], "-b")) { … … 2174 2174 if (!f) { 2175 2175 owl_function_error("The filter '%s' does not exist.", argv[1]); 2176 return ;2176 return false; 2177 2177 } 2178 2178 if (owl_util_string_to_color(argv[3])==OWL_COLOR_INVALID) { 2179 2179 owl_function_error("The color '%s' is not available.", argv[3]); 2180 return ;2180 return false; 2181 2181 } 2182 2182 owl_filter_set_bgcolor(f, owl_util_string_to_color(argv[3])); 2183 2183 owl_mainwin_redisplay(owl_global_get_mainwin(&g)); 2184 return ;2184 return true; 2185 2185 } 2186 2186 … … 2189 2189 if (f == NULL) { 2190 2190 owl_function_error("Invalid filter"); 2191 return ;2191 return false; 2192 2192 } 2193 2193 … … 2210 2210 } 2211 2211 owl_mainwin_redisplay(owl_global_get_mainwin(&g)); 2212 return true; 2212 2213 } 2213 2214
Note: See TracChangeset
for help on using the changeset viewer.