[Mplayer-cvslog] CVS: main/loader registry.c,1.3,1.4

Szabolcs Berecz szabii at users.sourceforge.net
Wed Mar 21 01:14:44 CET 2001


Update of /cvsroot/mplayer/main/loader
In directory usw-pr-cvs1:/tmp/cvs-serv31195

Modified Files:
	registry.c 
Log Message:
get_path()

Index: registry.c
===================================================================
RCS file: /cvsroot/mplayer/main/loader/registry.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** registry.c	2001/03/20 21:11:45	1.3
--- registry.c	2001/03/21 00:14:42	1.4
***************
*** 39,42 ****
--- 39,44 ----
  #define DIR -25
  
+ extern char *get_path(char *);
+ 
  static void create_registry();
  static void open_registry();
***************
*** 69,73 ****
  	int i;
  	int len;
!          struct passwd* pwent;
           char* pathname;
  	if(regs)
--- 71,75 ----
  	int i;
  	int len;
! //         struct passwd* pwent;
           char* pathname;
  	if(regs)
***************
*** 76,83 ****
  		return;
  	}
!         pwent=getpwuid(getuid());
!         pathname=(char*)malloc(strlen(pwent->pw_dir)+20);
! 	strcpy(pathname, pwent->pw_dir);
!         strcat(pathname, "/.mplayer/registry");
  	fd=open(pathname, O_RDONLY);
          free(pathname);
--- 78,86 ----
  		return;
  	}
! //        pwent=getpwuid(getuid());
! //        pathname=(char*)malloc(strlen(pwent->pw_dir)+20);
! //	strcpy(pathname, pwent->pw_dir);
! //        strcat(pathname, "/.mplayer/registry");
! 	pathname = get_path("registry");
  	fd=open(pathname, O_RDONLY);
          free(pathname);
***************
*** 121,130 ****
  {
  	int fd, i, len;
!          struct passwd* pwent;
           char* pathname;
!         pwent=getpwuid(getuid());
!         pathname=(char*)malloc(strlen(pwent->pw_dir)+20);
! 	strcpy(pathname, pwent->pw_dir);
!         strcat(pathname, "/.mplayer/registry");
  	fd=open(pathname, O_WRONLY | O_CREAT, 00777);
          free(pathname);
--- 124,134 ----
  {
  	int fd, i, len;
! //         struct passwd* pwent;
           char* pathname;
! //        pwent=getpwuid(getuid());
! //        pathname=(char*)malloc(strlen(pwent->pw_dir)+20);
! //	strcpy(pathname, pwent->pw_dir);
! //        strcat(pathname, "/.mplayer/registry");
! 	pathname = get_path("registry");
  	fd=open(pathname, O_WRONLY | O_CREAT, 00777);
          free(pathname);


_______________________________________________
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