[Mplayer-cvslog] CVS: main mplayerHQ.c,1.4,1.5
Szabolcs Berecz
szabii at users.sourceforge.net
Mon Mar 19 14:23:14 CET 2001
Update of /cvsroot/mplayer/main
In directory usw-pr-cvs1:/tmp/cvs-serv12646
Modified Files:
mplayerHQ.c
Log Message:
added cfgparser fixes to mplayerHQ.c
Index: mplayerHQ.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayerHQ.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** mplayerHQ.c 2001/03/19 03:45:49 1.4
--- mplayerHQ.c 2001/03/19 13:23:11 1.5
***************
*** 38,41 ****
--- 38,42 ----
#include "cfgparser.h"
+ #include "cfg-mplayer-def.h"
#include "libvo/video_out.h"
***************
*** 318,331 ****
}
- void usage(void){
- printf("%s",help_text);
- exit(0);
- }
-
- void missing_param(char *s){
- printf("Missing parameter: %s\n", s);
- exit(1);
- }
-
int divx_quality=0;
--- 319,322 ----
***************
*** 381,384 ****
--- 372,377 ----
char *homedir;
char conffile[100];
+ char confdir[100];
+ int conffile_fd;
#include "cfg-mplayer.h"
***************
*** 390,394 ****
printf("Can't find HOME dir\n");
} else {
! snprintf(conffile, 100, "%s/.mplayerrc", homedir);
if (parse_config_file(conf, conffile) < 0)
exit(1);
--- 383,393 ----
printf("Can't find HOME dir\n");
} else {
! snprintf(confdir, 100, "%s/.mplayer", homedir);
! mkdir(confdir, 0777);
! snprintf(conffile, 100, "%s/config", confdir);
! if ((conffile_fd = open(conffile, O_CREAT | O_EXCL | O_WRONLY, 0644)) != -1) {
! write(conffile_fd, default_config, strlen(default_config));
! close(conffile_fd);
! }
if (parse_config_file(conf, conffile) < 0)
exit(1);
***************
*** 433,439 ****
if(!filename){
if(vcd_track) filename="/dev/cdrom";
! else
! //filename="MI2-Trailer.avi";
! usage();
}
--- 432,438 ----
if(!filename){
if(vcd_track) filename="/dev/cdrom";
! else {
! printf("%s",help_text); exit(0);
! }
}
_______________________________________________
Mplayer-cvslog mailing list
Mplayer-cvslog at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog
More information about the MPlayer-cvslog
mailing list