[PD-cvs] pd/src s_main.c,1.1.1.4.2.14,1.1.1.4.2.15

Thomas Grill xovo at users.sourceforge.net
Thu Sep 9 22:05:05 CEST 2004


Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27651

Modified Files:
      Tag: devel_0_37
	s_main.c 
Log Message:
make help and lib paths adjustable

Index: s_main.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_main.c,v
retrieving revision 1.1.1.4.2.14
retrieving revision 1.1.1.4.2.15
diff -C2 -d -r1.1.1.4.2.14 -r1.1.1.4.2.15
*** s_main.c	23 Jul 2004 08:46:40 -0000	1.1.1.4.2.14
--- s_main.c	9 Sep 2004 20:05:03 -0000	1.1.1.4.2.15
***************
*** 32,35 ****
--- 32,45 ----
  #endif
  
+ /* T.Grill - make paths adjustable */
+ #ifndef PD_HELP_PATH
+ #define PD_HELP_PATH "./doc/5.reference"
+ #endif
+ 
+ #ifndef PD_EXTRA_PATH
+ #define PD_EXTRA_PATH "./extra"
+ #endif
+ 
+ 
  #ifdef MSW
  /* T.Grill - for Matju's GUI stuff */
***************
*** 800,804 ****
      	}
  	/* Matju { */
!     	else if (!strcmp(*argv,"-console"))
  	{
  		console_scrollback = atoi(argv[1]);
--- 810,814 ----
      	}
  	/* Matju { */
!     else if (!strcmp(*argv,"-console"))
  	{
  		console_scrollback = atoi(argv[1]);
***************
*** 841,854 ****
      char sbuf[MAXPDSTRING];
      int i;
! 	    /* add "extra" library to path */
!     strncpy(sbuf, sys_libdir->s_name, MAXPDSTRING-30);
!     sbuf[MAXPDSTRING-30] = 0;
!     strcat(sbuf, "/extra");
      sys_addpath(sbuf);
! 	    /* add "doc/5.reference" library to helppath */
!     strncpy(sbuf, sys_libdir->s_name, MAXPDSTRING-30);
!     sbuf[MAXPDSTRING-30] = 0;
!     strcat(sbuf, "/doc/5.reference");
      sys_addhelppath(sbuf);
      	/* correct to make audio and MIDI device lists zero based.  On
  	MMIO, however, "1" really means the second device (the first one
--- 851,879 ----
      char sbuf[MAXPDSTRING];
      int i;
! 
!     /* add "extra" library to path */
!     if(PD_EXTRA_PATH[0] == '.') {
!         /* relative */
!         strncpy(sbuf, sys_libdir->s_name, MAXPDSTRING-30);
!         sbuf[MAXPDSTRING-30] = 0;
!         strcat(sbuf, "/" PD_EXTRA_PATH);
!     }
!     else
!         /* absolute */
!         strcpy(sbuf, PD_EXTRA_PATH);
      sys_addpath(sbuf);
! 
!     /* add "doc/5.reference" library to helppath */
!     if(PD_HELP_PATH[0] == '.') {
!         /* relative */
!         strncpy(sbuf, sys_libdir->s_name, MAXPDSTRING-30);
!         sbuf[MAXPDSTRING-30] = 0;
!         strcat(sbuf, "/" PD_HELP_PATH);
!     }
!     else
!         /* absolute */
!         strcpy(sbuf, PD_HELP_PATH);
      sys_addhelppath(sbuf);
+ 
      	/* correct to make audio and MIDI device lists zero based.  On
  	MMIO, however, "1" really means the second device (the first one





More information about the Pd-cvs mailing list