comparison parser-mpcmd.c @ 29263:0f1b5b68af32

whitespace cosmetics: Remove all trailing whitespace.
author diego
date Wed, 13 May 2009 02:58:57 +0000
parents 9e739bdb049c
children 93947ce0e2cb
comparison
equal deleted inserted replaced
29262:7d545a6b8aff 29263:0f1b5b68af32
54 } 54 }
55 55
56 static inline void add_entry(play_tree_t **last_parentp, 56 static inline void add_entry(play_tree_t **last_parentp,
57 play_tree_t **last_entryp, play_tree_t *entry) { 57 play_tree_t **last_entryp, play_tree_t *entry) {
58 if(*last_entryp == NULL) 58 if(*last_entryp == NULL)
59 play_tree_set_child(*last_parentp,entry); 59 play_tree_set_child(*last_parentp,entry);
60 else 60 else
61 play_tree_append_entry(*last_entryp,entry); 61 play_tree_append_entry(*last_entryp,entry);
62 *last_entryp = entry; 62 *last_entryp = entry;
63 } 63 }
64 64
65 /// Setup the \ref Config from command line arguments and build a playtree. 65 /// Setup the \ref Config from command line arguments and build a playtree.
86 86
87 config->mode = M_COMMAND_LINE; 87 config->mode = M_COMMAND_LINE;
88 mode = GLOBAL; 88 mode = GLOBAL;
89 #ifdef CONFIG_MACOSX_FINDER 89 #ifdef CONFIG_MACOSX_FINDER
90 root=macosx_finder_args(config, argc, argv); 90 root=macosx_finder_args(config, argc, argv);
91 if(root) 91 if(root)
92 return root; 92 return root;
93 #endif 93 #endif
94 94
95 last_parent = root = play_tree_new(); 95 last_parent = root = play_tree_new();
96 /* in order to work recursion detection properly in parse_config_file */ 96 /* in order to work recursion detection properly in parse_config_file */
134 } 134 }
135 last_entry = last_parent; 135 last_entry = last_parent;
136 last_parent = last_entry->parent; 136 last_parent = last_entry->parent;
137 continue; 137 continue;
138 } 138 }
139 139
140 if ((no_more_opts == 0) && (*opt == '-') && (*(opt+1) != 0)) /* option */ 140 if ((no_more_opts == 0) && (*opt == '-') && (*(opt+1) != 0)) /* option */
141 { 141 {
142 int tmp = 0; 142 int tmp = 0;
143 /* remove trailing '-' */ 143 /* remove trailing '-' */
144 opt++; 144 opt++;
228 end_title=abs(start_title); 228 end_title=abs(start_title);
229 start_title=1; 229 start_title=1;
230 } else { 230 } else {
231 end_title=strtol(splitpos+1,NULL,10); 231 end_title=strtol(splitpos+1,NULL,10);
232 } 232 }
233 233
234 if (dvd_range(start_title) && dvd_range(end_title) && (start_title<end_title)) 234 if (dvd_range(start_title) && dvd_range(end_title) && (start_title<end_title))
235 { 235 {
236 for (j=start_title;j<=end_title;j++) 236 for (j=start_title;j<=end_title;j++)
237 { 237 {
238 if (j!=start_title) 238 if (j!=start_title)
239 entry=play_tree_new(); 239 entry=play_tree_new();
240 snprintf(entbuf,9,"dvd://%d",j); 240 snprintf(entbuf,9,"dvd://%d",j);
241 play_tree_add_file(entry,entbuf); 241 play_tree_add_file(entry,entbuf);
242 add_entry(&last_parent,&last_entry,entry); 242 add_entry(&last_parent,&last_entry,entry);
243 last_entry = entry; 243 last_entry = entry;
244 } 244 }
245 } else { 245 } else {
246 mp_msg(MSGT_CFGPARSER, MSGL_ERR, MSGTR_InvalidPlayEntry, argv[i]); 246 mp_msg(MSGT_CFGPARSER, MSGL_ERR, MSGTR_InvalidPlayEntry, argv[i]);
247 } 247 }
248 248
249 } else { // dvd:// or dvd://x entry 249 } else { // dvd:// or dvd://x entry
250 play_tree_add_file(entry,argv[i]); 250 play_tree_add_file(entry,argv[i]);
251 } 251 }
252 } else { 252 } else {
253 play_tree_add_file(entry,argv[i]); 253 play_tree_add_file(entry,argv[i]);