[PD-cvs] pd/src configure.in, 1.15, 1.16 d_array.c, 1.5, 1.6 d_mayer_fft.c, 1.3, 1.4 d_osc.c, 1.3, 1.4 d_soundfile.c, 1.9, 1.10 g_canvas.c, 1.11, 1.12 g_editor.c, 1.13, 1.14 g_text.c, 1.11, 1.12 m_class.c, 1.4, 1.5 m_pd.h, 1.8, 1.9 makefile.in, 1.8, 1.9 notes.txt, 1.23, 1.24 s_file.c, 1.8, 1.9 s_inter.c, 1.14, 1.15 s_loader.c, 1.6, 1.7 s_main.c, 1.21, 1.22 s_path.c, 1.7, 1.8 s_stuff.h, 1.7, 1.8 t_main.c, 1.2, 1.3 t_tkcmd.c, 1.6, 1.7 u_main.tk, 1.17, 1.18 x_arithmetic.c, 1.2, 1.3 x_midi.c, 1.2, 1.3 x_misc.c, 1.2, 1.3

Miller Puckette millerpuckette at users.sourceforge.net
Sat Dec 31 21:55:27 CET 2005


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

Modified Files:
	configure.in d_array.c d_mayer_fft.c d_osc.c d_soundfile.c 
	g_canvas.c g_editor.c g_text.c m_class.c m_pd.h makefile.in 
	notes.txt s_file.c s_inter.c s_loader.c s_main.c s_path.c 
	s_stuff.h t_main.c t_tkcmd.c u_main.tk x_arithmetic.c x_midi.c 
	x_misc.c 
Log Message:
Took a bunch of patches... more to come but these are the ones that might break stuff so I'll sync here.



Index: s_loader.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_loader.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** s_loader.c	30 May 2005 03:04:19 -0000	1.6
--- s_loader.c	31 Dec 2005 20:55:25 -0000	1.7
***************
*** 47,54 ****
  void class_set_extern_dir(t_symbol *s);
  
! int sys_load_lib(char *dirname, char *classname)
  {
      char symname[MAXPDSTRING], filename[MAXPDSTRING], dirbuf[MAXPDSTRING],
!         classname2[MAXPDSTRING], *nameptr, *lastdot;
      void *dlobj;
      t_xxx makeout = NULL;
--- 47,55 ----
  void class_set_extern_dir(t_symbol *s);
  
! static int sys_load_lib_alt(char *dirname, char *classname, char *altname)
  {
      char symname[MAXPDSTRING], filename[MAXPDSTRING], dirbuf[MAXPDSTRING],
!       classname2[MAXPDSTRING], *nameptr, *lastdot, 
!       altsymname[MAXPDSTRING];
      void *dlobj;
      t_xxx makeout = NULL;
***************
*** 73,76 ****
--- 74,96 ----
              dirbuf, &nameptr, MAXPDSTRING, 1)) < 0)
          {
+           /* next try (alternative_classname).(sys_dllextent) */
+           if(altname)
+             {
+               if ((fd = open_via_path(dirname, altname, sys_dllextent,
+                                       dirbuf, &nameptr, MAXPDSTRING, 1)) < 0)
+ 
+                 /* next try (alternative_classname)/(alternative_classname).(sys_dllextent) ... */
+                 strncpy(classname2, altname, MAXPDSTRING);
+               filename[MAXPDSTRING-2] = 0;
+               strcat(classname2, "/");
+               strncat(classname2, altname, MAXPDSTRING-strlen(classname2));
+               filename[MAXPDSTRING-1] = 0;
+               if ((fd = open_via_path(dirname, classname2, sys_dllextent,
+                                       dirbuf, &nameptr, MAXPDSTRING, 1)) < 0)
+                 {
+                   return 0;
+                 } 
+             }
+           else
              return (0);
          }
***************
*** 94,100 ****
--- 114,131 ----
      strcpy(symname, "_");
      strcat(symname, nameptr);
+     if(altname)
+       {
+         strcpy(altsymname, "_setup_");
+         strcat(symname, altname);
+       }
  #else
      strcpy(symname, nameptr);
+     if(altname)
+       {
+         strcpy(altsymname, "setup_");
+         strcat(altsymname, altname);
+       }
  #endif
+ 
          /* if the last character is a tilde, replace with "_tilde" */
      if (symname[strlen(symname) - 1] == '~')
***************
*** 111,114 ****
--- 142,146 ----
      }
      makeout = (t_xxx)dlsym(dlobj,  symname);
+     if(!makeout)makeout = (t_xxx)dlsym(dlobj,  altsymname);
  #endif
  #ifdef MSW
***************
*** 122,127 ****
      }
      makeout = (t_xxx)GetProcAddress(ntdll, symname);  
  #endif
! #ifdef MACOSX
      {
          NSObjectFileImage image; 
--- 154,160 ----
      }
      makeout = (t_xxx)GetProcAddress(ntdll, symname);  
+     if(!makeout)makeout = (t_xxx)GetProcAddress(ntdll, altsymname);  
  #endif
! #if defined(MACOSX) && !defined(DL_OPEN)
      {
          NSObjectFileImage image; 
***************
*** 148,151 ****
--- 181,186 ----
          s = NSLookupSymbolInModule(ret, symname); 
  
+         if(!s)s=NSLookupSymbolInModule(ret, altsymname); 
+ 
          if (s)
              makeout = (t_xxx)NSAddressOfSymbol( s);
***************
*** 157,160 ****
--- 192,197 ----
      {
          post("load_object: Symbol \"%s\" not found", symname);
+         if(altname)
+           post("load_object: Symbol \"%s\" not found", altsymname);
          class_set_extern_dir(&s_);
          return 0;
***************
*** 165,173 ****
  }
  
  
  
  
  
! 
  
  
--- 202,244 ----
  }
  
+ /* callback type definition */
+ typedef int (*loader_t)(char *dirname, char *classname, char *altname);
  
+ /* linked list of loaders */
+ typedef struct loader_queue {
+     loader_t loader;
+     struct loader_queue *next;
+ } loader_queue_t;
  
+ static loader_queue_t loaders = {sys_load_lib_alt, NULL};
  
+ /* register class loader function */
+ void sys_register_loader(loader_t loader)
+ {
+     loader_queue_t *q = &loaders;
+     while (1)
+     {
+         if (q->next) 
+             q = q->next;
+         else
+         {
+             q->next = (loader_queue_t *)getbytes(sizeof(loader_queue_t));
+             q->next->loader = loader;
+             q->next->next = NULL;
+             break;
+         }
+     }   
+ }
  
! int sys_load_lib(char *dirname, char *classname, char *altname)
! {
!     int dspstate = canvas_suspend_dsp();
!     int ok = 0;
!     loader_queue_t *q;
!     for(q = &loaders; q; q = q->next)
!         if(ok = q->loader(dirname, classname, altname)) break;
!     canvas_resume_dsp(dspstate);
!     return ok;
! }
  
  

Index: u_main.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/u_main.tk,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** u_main.tk	15 Oct 2005 23:14:28 -0000	1.17
--- u_main.tk	31 Dec 2005 20:55:25 -0000	1.18
***************
*** 90,93 ****
--- 90,95 ----
  }
  
+ set help_top_directory $pd_guidir/doc
+ 
  # it's unfortunate but we seem to have to turn off global bindings
  # for Text objects to get control-s and control-t to do what we want for
***************
*** 379,384 ****
      if {$pd_nt == 0} {
          exec sh -c \
!             [format "firefox file:%s || mozilla file:%s &\n" \
!                 $filename $filename]
      } elseif {$pd_nt == 2} {
          puts stderr [format "open %s" $filename]
--- 381,386 ----
      if {$pd_nt == 0} {
          exec sh -c \
!             [format "firefox file:%s || mozilla file:%s " \
!                 $filename $filename] &
      } elseif {$pd_nt == 2} {
          puts stderr [format "open %s" $filename]
***************
*** 390,428 ****
  }
  
- set help_directory $pd_guidir/doc
- set help_top_directory $pd_guidir/doc
- 
- proc menu_documentation {} {
-     global help_directory
-     global pd_nt
-     global pd_guidir
- 
-     if {$pd_nt == 2} {
-         exec rm -rf /tmp/pd-documentation
-         exec cp -pr $pd_guidir/doc /tmp/pd-documentation
-         set filename [tk_getOpenFile -defaultextension .pd \
-         -filetypes { {{documentation} {.pd .txt .htm}} } \
-         -initialdir /tmp/pd-documentation]
-     } else {
-         set filename [tk_getOpenFile -defaultextension .pd \
-         -filetypes { {{documentation} {.pd .txt .htm}} } \
-         -initialdir $help_directory]
-     }    
-     if {$filename != ""} {
-         if {[string first .txt $filename] >= 0} {
-             menu_opentext $filename
-         } elseif {[string first .htm $filename] >= 0} {
-                                 menu_openhtml $filename
-         } else {
-             set help_directory [string range $filename 0 \
-                 [expr [string last / $filename ] - 1]]
-             set basename [string range $filename \
-                 [expr [string last / $filename ] + 1] end]
-             pd [concat pd open [pdtk_enquote $basename] \
-                  [pdtk_enquote $help_directory] \;]
-         }
-     }
- }
- 
  proc menu_doc_open {subdir basename} {
      global pd_guidir
--- 392,395 ----
***************
*** 440,464 ****
  }
  
- proc doc_submenu {helpmenu subdir} {
-          global help_top_directory pd_tearoff
- 
-          set menudir $help_top_directory/$subdir
- 
-     regsub -all "\\\." $subdir "" submenu
  
!          menu $helpmenu.$submenu -tearoff $pd_tearoff
!     regsub -all "\\\." $subdir " " submenuname
!          $helpmenu add cascade -label $submenuname \
!                   -menu $helpmenu.$submenu
!     catch {
! # use this glob pattern to exclude the supporting files
! #        foreach file [ lsort [ glob -dir $menudir {*[0-9][0-9]*} ] ] 
!          foreach file [ lsort [ glob -dir $menudir * ] ] {
!                   set filename ""
!                   regsub {.*/(.*\..+$)} $file {\1} filename
!                   $helpmenu.$submenu add command -label $filename \
!                                 -command "menu_doc_open doc/$subdir $filename"
           }
      }
  }
  
--- 407,466 ----
  }
  
  
! ################## help browser and support functions #########################
! proc menu_doc_browser {dir} {
! 	global .mbar
! 	if {![file isdirectory $dir]} {
! 		puts stderr "menu_doc_browser non-directory $dir\n"
! 	}
! 	if { [winfo exists .help_browser.frame] } {
! 		raise .help_browser
! 	} else {
! 		toplevel .help_browser -menu .mbar
! 		wm title .help_browser "Pd Documentation Browser"
! 		frame .help_browser.frame
! 		pack .help_browser.frame -side top -fill both
! 		doc_make_listbox .help_browser.frame $dir 0
           }
      }
+ 
+ proc doc_make_listbox {base dir count} {
+ 	global pd_guidir
+ 	if {![file isdirectory $dir]} {
+ 		regsub -- $pd_guidir [file dirname $dir] "" subdir
+ 		set file [file tail $dir]
+ 		if { [catch {menu_doc_open $subdir $file} fid] } {
+ 			puts stderr "Could not open $pd_guidir/$subdir/$file\n"
+ 		}
+ 		return; 
+ 	}
+ 	# check for [file readable]?
+ 	if { [info tclversion] >= 8.5 } {
+ 		# requires Tcl 8.5 but probably deals with special chars better
+ #		destroy {expand}[lrange [winfo children $base] [expr {2 * $count}] end]
+ 	} else {
+ 		if { [catch { eval destroy [lrange [winfo children $base] \
+ 										[expr { 2 * $count }] end] } \
+ 				  errorMessage] } {
+ 			puts stderr "doc_make_listbox: error listing $dir\n"
+ 		}
+ 	}
+ 	# exportselection 0 looks good, but selection gets easily out-of-sync
+ 	set current_listbox [listbox "[set b "$base.listbox$count"]-list" -yscrollcommand \
+ 							 [list "$b-scroll" set] -height 20 -exportselection 0]
+ 	pack $current_listbox [scrollbar "$b-scroll" -command [list $current_listbox yview]] \
+ 		-side left -expand 1 -fill y -anchor w
+ 	foreach item [concat [lsort -dictionary [glob -directory $dir -nocomplain -types {d} -- *]] \
+ 					  [lsort -dictionary [glob -directory $dir -nocomplain -types {f} -- *]]]  {
+ 		$current_listbox insert end "[file tail $item][expr {[file isdirectory $item] ? {/} : {}}]"
+ 	}
+ 	bind $current_listbox <Button-1> [list doc_navigate $dir [incr count] %W %x %y]
+ }
+ 
+ proc doc_navigate {dir count width x y} {
+ 	if {[set subdir [$width get [$width index "@$x,$y"]]] eq {}} {
+ 		return
+ 	}
+ 	doc_make_listbox [winfo parent $width] [file join $dir $subdir] $count
  }
  
***************
*** 527,531 ****
          -command {menu_doc_open doc/1.manual index.htm} 
      $mbar.help add command -label {Browser ...} \
!         -command {menu_documentation} 
  }
  
--- 529,533 ----
          -command {menu_doc_open doc/1.manual index.htm} 
      $mbar.help add command -label {Browser ...} \
!         -command {menu_doc_browser $help_top_directory} 
  }
  

Index: s_path.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_path.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** s_path.c	15 Oct 2005 23:14:28 -0000	1.7
--- s_path.c	31 Dec 2005 20:55:25 -0000	1.8
***************
*** 357,361 ****
  
  
! /* Startup file reading for linux and MACOSX.  As of 0.38 this will be
  deprecated in favor of the "settings" mechanism */
  
--- 357,361 ----
  
  
! /* Startup file reading for linux and __APPLE__.  As of 0.38 this will be
  deprecated in favor of the "settings" mechanism */
  

Index: s_stuff.h
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_stuff.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** s_stuff.h	16 Jul 2005 01:43:18 -0000	1.7
--- s_stuff.h	31 Dec 2005 20:55:25 -0000	1.8
***************
*** 47,51 ****
  
  /* s_loader.c */
! int sys_load_lib(char *dirname, char *filename);
  
  /* s_audio.c */
--- 47,51 ----
  
  /* s_loader.c */
! int sys_load_lib(char *dirname, char *filename, char *altname);
  
  /* s_audio.c */
***************
*** 179,183 ****
  #define API_DEFSTRING "MMIO"
  #endif
! #ifdef MACOSX
  #define API_DEFAULT API_PORTAUDIO
  #define API_DEFSTRING "portaudio"
--- 179,183 ----
  #define API_DEFSTRING "MMIO"
  #endif
! #ifdef __APPLE__
  #define API_DEFAULT API_PORTAUDIO
  #define API_DEFSTRING "portaudio"

Index: g_canvas.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_canvas.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** g_canvas.c	21 Aug 2005 14:46:17 -0000	1.11
--- g_canvas.c	31 Dec 2005 20:55:25 -0000	1.12
***************
*** 27,31 ****
  #define GLIST_DEFCANVASHEIGHT 300
  
! #ifdef MACOSX
  #define GLIST_DEFCANVASYLOC 22
  #else
--- 27,31 ----
  #define GLIST_DEFCANVASHEIGHT 300
  
! #ifdef __APPLE__
  #define GLIST_DEFCANVASYLOC 22
  #else

Index: m_class.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/m_class.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** m_class.c	28 Nov 2004 21:20:42 -0000	1.4
--- m_class.c	31 Dec 2005 20:55:25 -0000	1.5
***************
*** 17,20 ****
--- 17,21 ----
  #include <stdarg.h>
  #include <string.h>
+ #include <stdio.h>
  
  static t_symbol *class_loadsym;     /* name under which an extern is invoked */
***************
*** 514,517 ****
--- 515,554 ----
  int pd_setloadingabstraction(t_symbol *sym);
  
+ 
+ /* replace everything but [a-zA-Z0-9_] by "0x%x" */
+ static char*alternative_classname(char*classname)
+ {
+   char *altname=(char*)getbytes(sizeof(char)*MAXPDSTRING);
+   int count=0;
+   int i=0;
+   for(i=0; i<MAXPDSTRING; i++)
+     altname[i]=0;
+   i=0;
+   while(*classname)
+     {
+       char c=*classname;
+       if((c>=48 && c<=57)|| /* [0-9] */
+          (c>=65 && c<=90)|| /* [A-Z] */
+          (c>=97 && c<=122)||/* [a-z] */
+          (c==95)) /* [_] */
+         {
+           altname[i]=c;
+           i++;
+         }
+       else /* a "bad" character */
+         {
+           sprintf(altname+i, "0x%02x", c);
+           i+=4;
+           count++;
+         }
+       classname++;
+     }
+   if(count>0)return altname;
+   /* seems like the given classname is fine as can be */
+   freebytes(altname, sizeof(char)*MAXPDSTRING);
+   return 0;
+ }
+ 
+ 
      /* this routine is called when a new "object" is requested whose class Pd
      doesn't know.  Pd tries to load it as an extern, then as an abstraction. */
***************
*** 522,529 ****
      int fd;
      char dirbuf[MAXPDSTRING], *nameptr;
      if (tryingalready) return;
      newest = 0;
      class_loadsym = s;
!     if (sys_load_lib(dir->s_name, s->s_name))
      {
          tryingalready = 1;
--- 559,567 ----
      int fd;
      char dirbuf[MAXPDSTRING], *nameptr;
+     char *altname=alternative_classname(s->s_name);
      if (tryingalready) return;
      newest = 0;
      class_loadsym = s;
!     if (sys_load_lib(dir->s_name, s->s_name, altname))
      {
          tryingalready = 1;
***************
*** 536,539 ****
--- 574,579 ----
      if ((fd = open_via_path(dir->s_name, s->s_name, ".pd",
          dirbuf, &nameptr, MAXPDSTRING, 0)) >= 0 ||
+         (altname && (fd = open_via_path(dir->s_name, altname, ".pd",
+               dirbuf, &nameptr, MAXPDSTRING, 0)) >= 0) ||
              (fd = open_via_path(dir->s_name, s->s_name, ".pat",
                  dirbuf, &nameptr, MAXPDSTRING, 0)) >= 0)

Index: d_array.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/d_array.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** d_array.c	11 Nov 2004 04:58:21 -0000	1.5
--- d_array.c	31 Dec 2005 20:55:25 -0000	1.6
***************
*** 541,550 ****
  
  #else
! #ifdef MACOSX
  #define HIOFFSET 0    /* word offset to find MSB */
  #define LOWOFFSET 1    /* word offset to find LSB */
  #define int32 int  /* a data type that has 32 bits */
  
! #endif /* MACOSX */
  #endif /* __linux__ */
  #endif /* MSW */
--- 541,550 ----
  
  #else
! #ifdef __APPLE__
  #define HIOFFSET 0    /* word offset to find MSB */
  #define LOWOFFSET 1    /* word offset to find LSB */
  #define int32 int  /* a data type that has 32 bits */
  
! #endif /* __APPLE__ */
  #endif /* __linux__ */
  #endif /* MSW */

Index: makefile.in
===================================================================
RCS file: /cvsroot/pure-data/pd/src/makefile.in,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** makefile.in	24 Jul 2005 19:41:14 -0000	1.8
--- makefile.in	31 Dec 2005 20:55:25 -0000	1.9
***************
*** 6,13 ****
  GUINAME= @GUINAME@
  
! INSTALL_PREFIX = @prefix@
! GFLAGS = -DINSTALL_PREFIX=\"$(INSTALL_PREFIX)\"
  
! MANDIR = @mandir@
  
  MORECFLAGS = @MORECFLAGS@
--- 6,23 ----
  GUINAME= @GUINAME@
  
! prefix = @prefix@
! exec_prefix = @exec_prefix@
! bindir = @bindir@
! includedir = @includedir@
! libdir = @libdir@
! mandir = @mandir@
  
! GFLAGS = -DINSTALL_PREFIX=\"$(prefix)\"
! 
! # varibles to match packages/Makefile.buildlayout so that they can be easily
! # overridden when building Pd-extended builds. <hans at at.or.at>
! libpddir = $(libdir)/pd
! pddocdir = $(libpddir)/doc
! libpdbindir = $(libpddir)/bin
  
  MORECFLAGS = @MORECFLAGS@
***************
*** 119,146 ****
  	cd ../extra/pique;make @EXTERNTARGET@
  
- INSTDIR = $(DESTDIR)/$(INSTALL_PREFIX)
- MANINSTDIR = $(DESTDIR)/$(INSTALL_PREFIX)/$(MANDIR)
  BINARYMODE=@binarymode@
  
  install:  all
! 	install -d $(INSTDIR)/lib/pd/bin
! 	install $(BIN_DIR)/$(GUINAME) $(INSTDIR)/lib/pd/bin/$(GUINAME)
! 	install $(BIN_DIR)/pd-watchdog $(INSTDIR)/lib/pd/bin/pd-watchdog
! 	install -m644 $(BIN_DIR)/pd.tk $(INSTDIR)/lib/pd/bin/pd.tk
! 	install -d $(INSTDIR)/bin
! 	install $(BINARYMODE) $(PDEXEC) $(INSTDIR)/bin/pd
! 	install -m755 $(BIN_DIR)/pdsend $(INSTDIR)/bin/pdsend
! 	install -m755 $(BIN_DIR)/pdreceive $(INSTDIR)/bin/pdreceive 
! 	cp -pr ../doc ../extra $(INSTDIR)/lib/pd/
! 	rm -f $(INSTDIR)/extra/*/*.o
! 	install -d $(INSTDIR)/include
! 	install -m644 m_pd.h $(INSTDIR)/include/m_pd.h
! 	install -d $(MANINSTDIR)/man1
! 	gzip < ../man/pd.1 >  $(MANINSTDIR)/man1/pd.1.gz
! 	chmod 644 $(MANINSTDIR)/man1/pd.1.gz
! 	gzip < ../man/pdsend.1 >  $(MANINSTDIR)/man1/pdsend.1.gz
! 	chmod 644 $(MANINSTDIR)/man1/pdsend.1.gz
! 	gzip < ../man/pdreceive.1 >  $(MANINSTDIR)/man1/pdreceive.1.gz
! 	chmod 644 $(MANINSTDIR)/man1/pdreceive.1.gz
  
  local-clean:
--- 129,165 ----
  	cd ../extra/pique;make @EXTERNTARGET@
  
  BINARYMODE=@binarymode@
  
  install:  all
! 	install -d $(libpdbindir)
! 	install $(BIN_DIR)/$(GUINAME) $(libpdbindir)/$(GUINAME)
! 	install $(BIN_DIR)/pd-watchdog $(libpdbindir)/pd-watchdog
! 	install -m644 $(BIN_DIR)/pd.tk $(libpdbindir)/pd.tk
! 	install -d $(DESTDIR)$(bindir)
! 	install $(BINARYMODE) $(PDEXEC) $(DESTDIR)$(bindir)/pd
! 	install -m755 $(BIN_DIR)/pdsend $(DESTDIR)$(bindir)/pdsend
! 	install -m755 $(BIN_DIR)/pdreceive $(DESTDIR)$(bindir)/pdreceive 
! 	for dir in $(shell ls -1 ../doc | grep -v CVS); do \
! 		echo "installing $$dir"; \
! 		install -d $(pddocdir)/$$dir ; \
! 		install -p ../doc/$$dir/*.* $(pddocdir)/$$dir ; \
! 	done
! 	for dir in $(shell ls -1 ../doc/7.stuff | grep -v CVS); do \
! 		echo "installing 7.stuff/$$dir"; \
! 		install -d $(pddocdir)/7.stuff/$$dir ; \
! 		install -p ../doc/7.stuff/$$dir/*.* $(pddocdir)/7.stuff/$$dir ; \
! 	done
! 	cp -pr ../extra $(libpddir)/
! 	rm -f $(libpddir)/extra/*/*.o
! 	install -d $(DESTDIR)$(includedir)
! 	install -m644 m_pd.h $(DESTDIR)$(includedir)/m_pd.h
! 	install -d $(DESTDIR)$(mandir)/man1
! 	gzip < ../man/pd.1 >  $(DESTDIR)$(mandir)/man1/pd.1.gz
! 	chmod 644 $(DESTDIR)$(mandir)/man1/pd.1.gz
! 	gzip < ../man/pdsend.1 >  $(DESTDIR)$(mandir)/man1/pdsend.1.gz
! 	chmod 644 $(DESTDIR)$(mandir)/man1/pdsend.1.gz
! 	gzip < ../man/pdreceive.1 >  $(DESTDIR)$(mandir)/man1/pdreceive.1.gz
! 	chmod 644 $(DESTDIR)$(mandir)/man1/pdreceive.1.gz
! 	@echo "Pd install succeeded."
  
  local-clean:
***************
*** 161,169 ****
  
  distclean: clean
! 	rm -rf config.cache config.log config.status makefile tags \
! 	     autom4te-*.cache
! 	echo all: > makefile
! 	echo -e  "\t./configure" >> makefile
! 	echo -e "\tmake" >> makefile
  
  tags: $(SRC) $(GSRC); ctags *.[ch]
--- 180,187 ----
  
  distclean: clean
! 	-rm -f config.cache config.log config.status makefile configure tags \
! 		autom4te.cache/output.* autom4te.cache/traces.* autom4te.cache/requests
! 	-rmdir autom4te.cache
! 	-rm -rf autom4te-*.cache
  
  tags: $(SRC) $(GSRC); ctags *.[ch]
***************
*** 175,186 ****
  
  uninstall:
! 	rm -f -r $(INSTDIR)/lib/pd
! 	rm -f $(INSTDIR)/bin/pd
! 	rm -f $(INSTDIR)/bin/pdsend
! 	rm -f $(INSTDIR)/bin/pdreceive
! 	rm -f $(INSTDIR)/include/m_pd.h
! 	rm -f $(MANINSTDIR)/man1/pd.1.gz
! 	rm -f $(MANINSTDIR)/man1/pdsend.1.gz
! 	rm -f $(MANINSTDIR)/man1/pdreceive.1.gz
  
  include makefile.dependencies
--- 193,204 ----
  
  uninstall:
! 	rm -f -r $(libpddir)
! 	rm -f $(DESTDIR)$(bindir)/pd
! 	rm -f $(DESTDIR)$(bindir)/pdsend
! 	rm -f $(DESTDIR)$(bindir)/pdreceive
! 	rm -f $(DESTDIR)$(includedir)/m_pd.h
! 	rm -f $(DESTDIR)$(mandir)/man1/pd.1.gz
! 	rm -f $(DESTDIR)$(mandir)/man1/pdsend.1.gz
! 	rm -f $(DESTDIR)$(mandir)/man1/pdreceive.1.gz
  
  include makefile.dependencies

Index: configure.in
===================================================================
RCS file: /cvsroot/pure-data/pd/src/configure.in,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** configure.in	16 Aug 2005 04:06:28 -0000	1.15
--- configure.in	31 Dec 2005 20:55:25 -0000	1.16
***************
*** 261,265 ****
          -framework Carbon -framework CoreMIDI"
      EXT=pd_darwin
!     MORECFLAGS="-DMACOSX -DUNISTD -I/usr/X11R6/include \
  	 -I../portaudio/pa_common -I../portaudio/pablio \
  	-I../portmidi/pm_common -I../portmidi/pm_mac \
--- 261,265 ----
          -framework Carbon -framework CoreMIDI"
      EXT=pd_darwin
!     MORECFLAGS="-DDL_OPEN -DMACOSX -DUNISTD -I/usr/X11R6/include \
  	 -I../portaudio/pa_common -I../portaudio/pablio \
  	-I../portmidi/pm_common -I../portmidi/pm_mac \
***************
*** 317,325 ****
      if test x$jack == "xyes";
      then
!     	LDFLAGS=$LDFLAGS" -framework Jack"
      fi
      if test x$jack == "xrun";
      then
!         LDFLAGS=$LDFLAGS" -framework Jack"
      fi
  fi
--- 317,325 ----
      if test x$jack == "xyes";
      then
!     	LDFLAGS=$LDFLAGS" -weak_framework Jack"
      fi
      if test x$jack == "xrun";
      then
!         LDFLAGS=$LDFLAGS" -weak_framework Jack"
      fi
  fi
***************
*** 350,353 ****
--- 350,378 ----
  fi
  
+ ## JMZ{
+ ##  this does not do very much, but i guess it is a good idea to use it...
+ AC_SYS_LARGEFILE
+ ## test, whether we can use _LARGEFILE64_SOURCE to 
+ ## enable large-file reading via "open64" (and lseek64");
+ if test "x$enable_largefile" != "xno"; then
+ ## the following should run on autoconf>2.54 (which pd is not using)
+ dnl  AC_LINK_IFELSE ( [AC_LANG_PROGRAM([[
+ dnl                          #define _LARGEFILE64_SOURCE
+ dnl                          #include <sys/types.h>
+ dnl                          #include <sys/stat.h>
+ dnl                          #include <fcntl.h>
+ dnl                      ]],[[ open64(0,0); ]])], 
+ dnl                   [ MORECFLAGS=$MORECFLAGS" -D_LARGEFILE64_SOURCE" ], )
+ ## and this is for autoconf<2.50
+ AC_TRY_LINK( [
+                                         #define _LARGEFILE64_SOURCE
+                                         #include <sys/types.h>
+                                         #include <sys/stat.h>
+                                         #include <fcntl.h>
+                                        ],[ open64(0,0); ],
+                 [ MORECFLAGS=$MORECFLAGS" -D_LARGEFILE64_SOURCE" ], )
+ fi
+ ## }JMZ: end of large-file support section
+ 
  AC_OUTPUT(makefile)
  

Index: notes.txt
===================================================================
RCS file: /cvsroot/pure-data/pd/src/notes.txt,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** notes.txt	31 Dec 2005 02:56:03 -0000	1.23
--- notes.txt	31 Dec 2005 20:55:25 -0000	1.24
***************
*** 7,11 ****
    check the right-click-on-empty-canvas
    MIDI I/O (inc. sysex)
! 
  
  doc:
--- 7,11 ----
    check the right-click-on-empty-canvas
    MIDI I/O (inc. sysex)
! what does OSX do when jack is compiled into Pd but not installed??
  
  doc:
***************
*** 44,48 ****
  
  features:
! hook for table mousing
  integrate video into tilde objects
  flag to suppress printing array name above graph
--- 44,48 ----
  
  features:
! .dll to .msw32 or .pd_msw (then offer .pd_msw64, .pd_lnx64, etc.)
  integrate video into tilde objects
  flag to suppress printing array name above graph
***************
*** 77,82 ****
--- 77,86 ----
      select line and hit "insert" to interpolate an object
      option-drag an outlet to make a new, connected object
+     (also, a way to make multiple connections?)
  
  data:
+ hook for table mousing
+ data to save as succession of "list" messages that textfile can store, etc.
+ implement list field (GOP or subwindow, perhaps GOP could suppress bounds rect?)
  fix blue selection rectangle to update if selected datum is redrawn
  data copy/paste doesn't check templates aren't changed

Index: x_midi.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/x_midi.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** x_midi.c	6 Sep 2004 20:20:36 -0000	1.2
--- x_midi.c	31 Dec 2005 20:55:25 -0000	1.3
***************
*** 1188,1192 ****
  {
      poly_class = class_new(gensym("poly"), 
!         (t_newmethod)poly_new, (t_method)poly_clear,
          sizeof(t_poly), 0, A_DEFFLOAT, A_DEFFLOAT, 0);
      class_addfloat(poly_class, poly_float);
--- 1188,1192 ----
  {
      poly_class = class_new(gensym("poly"), 
!         (t_newmethod)poly_new, (t_method)poly_free,
          sizeof(t_poly), 0, A_DEFFLOAT, A_DEFFLOAT, 0);
      class_addfloat(poly_class, poly_float);

Index: d_soundfile.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/d_soundfile.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** d_soundfile.c	15 Sep 2005 03:17:27 -0000	1.9
--- d_soundfile.c	31 Dec 2005 20:55:25 -0000	1.10
***************
*** 28,31 ****
--- 28,36 ----
  #define MAXSFCHANS 64
  
+ #ifdef _LARGEFILE64_SOURCE
+ # define open open64
+ # define lseek lseek64
+ #endif
+ 
  /***************** soundfile header structures ************************/
  

Index: d_osc.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/d_osc.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** d_osc.c	29 Jul 2005 19:01:19 -0000	1.3
--- d_osc.c	31 Dec 2005 20:55:25 -0000	1.4
***************
*** 27,35 ****
  #endif
  
! #if defined(__FreeBSD__) || defined(MACOSX)
  #include <machine/endian.h>
  #endif
  
! #ifdef MACOSX
  #define __BYTE_ORDER BYTE_ORDER
  #define __LITTLE_ENDIAN LITTLE_ENDIAN
--- 27,35 ----
  #endif
  
! #if defined(__FreeBSD__) || defined(__APPLE__)
  #include <machine/endian.h>
  #endif
  
! #ifdef __APPLE__
  #define __BYTE_ORDER BYTE_ORDER
  #define __LITTLE_ENDIAN LITTLE_ENDIAN
***************
*** 40,44 ****
  #endif
  
! #if defined(__unix__) || defined(MACOSX)
  #if !defined(__BYTE_ORDER) || !defined(__LITTLE_ENDIAN)                         
  #error No byte order defined                                                    
--- 40,44 ----
  #endif
  
! #if defined(__unix__) || defined(__APPLE__)
  #if !defined(__BYTE_ORDER) || !defined(__LITTLE_ENDIAN)                         
  #error No byte order defined                                                    
***************
*** 54,58 ****
  #include <sys/types.h>
  #define int32 int32_t
! #endif /* __unix__ or MACOSX*/
  
  
--- 54,58 ----
  #include <sys/types.h>
  #define int32 int32_t
! #endif /* __unix__ or __APPLE__*/
  
  

Index: x_arithmetic.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/x_arithmetic.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** x_arithmetic.c	6 Sep 2004 20:20:36 -0000	1.2
--- x_arithmetic.c	31 Dec 2005 20:55:25 -0000	1.3
***************
*** 12,16 ****
  
  /* MSW and OSX don't appear to have single-precision ANSI math */
! #if defined(MSW) || defined(MACOSX)
  #define sinf sin
  #define cosf cos
--- 12,16 ----
  
  /* MSW and OSX don't appear to have single-precision ANSI math */
! #if defined(MSW) || defined(__APPLE__)
  #define sinf sin
  #define cosf cos

Index: g_text.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_text.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** g_text.c	15 Sep 2005 03:17:27 -0000	1.11
--- g_text.c	31 Dec 2005 20:55:25 -0000	1.12
***************
*** 1134,1138 ****
  /* -------------------- the "text" class  ------------ */
  
! #ifdef MACOSX
  #define EXTRAPIX 2
  #else
--- 1134,1138 ----
  /* -------------------- the "text" class  ------------ */
  
! #ifdef __APPLE__
  #define EXTRAPIX 2
  #else

Index: s_main.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_main.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** s_main.c	31 Dec 2005 02:56:03 -0000	1.21
--- s_main.c	31 Dec 2005 20:55:25 -0000	1.22
***************
*** 216,220 ****
          /* load dynamic libraries specified with "-lib" args */
      for  (nl = sys_externlist; nl; nl = nl->nl_next)
!         if (!sys_load_lib(cwd, nl->nl_string))
              post("%s: can't load library", nl->nl_string);
          /* open patches specifies with "-open" args */
--- 216,220 ----
          /* load dynamic libraries specified with "-lib" args */
      for  (nl = sys_externlist; nl; nl = nl->nl_next)
!         if (!sys_load_lib(cwd, nl->nl_string, 0))
              post("%s: can't load library", nl->nl_string);
          /* open patches specifies with "-open" args */

Index: t_main.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/t_main.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** t_main.c	6 Sep 2004 20:20:36 -0000	1.2
--- t_main.c	31 Dec 2005 20:55:25 -0000	1.3
***************
*** 15,19 ****
  
  
! #ifndef MACOSX     /* linux and IRIX only; in MACOSX we don't link this in */
  #include "tk.h"
  #include <stdlib.h>
--- 15,19 ----
  
  
! #ifndef __APPLE__     /* linux and IRIX only; in __APPLE__ we don't link this in */
  #include "tk.h"
  #include <stdlib.h>
***************
*** 113,115 ****
  }
  
! #endif  /* MACOSX */
--- 113,115 ----
  }
  
! #endif  /* __APPLE__ */

Index: d_mayer_fft.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/d_mayer_fft.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** d_mayer_fft.c	18 May 2005 04:28:50 -0000	1.3
--- d_mayer_fft.c	31 Dec 2005 20:55:25 -0000	1.4
***************
*** 49,53 ****
  */
  
! #ifdef MSW
  #pragma warning( disable : 4305 )  /* uncast const double to float */
  #pragma warning( disable : 4244 )  /* uncast double to float */
--- 49,54 ----
  */
  
! /* These pragmas are only used for MSVC, not MinGW or Cygwin <hans at at.or.at> */
! #ifdef _MSC_VER
  #pragma warning( disable : 4305 )  /* uncast const double to float */
  #pragma warning( disable : 4244 )  /* uncast double to float */

Index: x_misc.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/x_misc.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** x_misc.c	6 Sep 2004 20:20:36 -0000	1.2
--- x_misc.c	31 Dec 2005 20:55:25 -0000	1.3
***************
*** 22,26 ****
  #endif
  
! #if defined (MACOSX) || defined (__FreeBSD__)
  #define HZ CLK_TCK
  #endif
--- 22,26 ----
  #endif
  
! #if defined (__APPLE__) || defined (__FreeBSD__)
  #define HZ CLK_TCK
  #endif

Index: t_tkcmd.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/t_tkcmd.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** t_tkcmd.c	15 Oct 2005 23:14:28 -0000	1.6
--- t_tkcmd.c	31 Dec 2005 20:55:25 -0000	1.7
***************
*** 31,35 ****
  #include <io.h>
  #endif
! #ifdef MSW
  #pragma warning( disable : 4305 )  /* uncast const double to float */
  #pragma warning( disable : 4244 )  /* uncast double to float */
--- 31,37 ----
  #include <io.h>
  #endif
! 
! /* These pragmas are only used for MSVC, not MinGW or Cygwin <hans at at.or.at> */
! #ifdef _MSC_VER
  #pragma warning( disable : 4305 )  /* uncast const double to float */
  #pragma warning( disable : 4244 )  /* uncast double to float */
***************
*** 41,45 ****
  #endif
  
! #ifdef MACOSX
  #define STARTGUI
  #endif
--- 43,47 ----
  #endif
  
! #ifdef __APPLE__
  #define STARTGUI
  #endif
***************
*** 547,551 ****
      is done by passing the name of the file as a startup argument to
      the wish shell.) */
! #if !defined(MSW) && !defined(MACOSX)
  void pdgui_doevalfile(Tcl_Interp *interp, char *s)
  {
--- 549,553 ----
      is done by passing the name of the file as a startup argument to
      the wish shell.) */
! #if !defined(MSW) && !defined(__APPLE__)
  void pdgui_doevalfile(Tcl_Interp *interp, char *s)
  {
***************
*** 585,589 ****
      pdgui_setupsocket();
          /* read in the startup file */
! #if !defined(MSW) && !defined(MACOSX)
      pdgui_evalfile("pd.tk");
  #endif
--- 587,591 ----
      pdgui_setupsocket();
          /* read in the startup file */
! #if !defined(MSW) && !defined(__APPLE__)
      pdgui_evalfile("pd.tk");
  #endif

Index: s_file.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_file.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** s_file.c	15 Oct 2005 23:14:28 -0000	1.8
--- s_file.c	31 Dec 2005 20:55:25 -0000	1.9
***************
*** 206,210 ****
  #endif /* MSW */
  
! #ifdef MACOSX
  
  static void sys_initloadpreferences( void)
--- 206,210 ----
  #endif /* MSW */
  
! #ifdef __APPLE__
  
  static void sys_initloadpreferences( void)
***************
*** 256,260 ****
  }
  
! #endif /* MACOSX */
  
  
--- 256,260 ----
  }
  
! #endif /* __APPLE__ */
  
  

Index: s_inter.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_inter.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** s_inter.c	15 Oct 2005 23:14:28 -0000	1.14
--- s_inter.c	31 Dec 2005 20:55:25 -0000	1.15
***************
*** 41,45 ****
  #include <stdio.h>
  
! #ifdef MACOSX
  #include <sys/types.h>
  #include <sys/stat.h>
--- 41,45 ----
  #include <stdio.h>
  
! #ifdef __APPLE__
  #include <sys/types.h>
  #include <sys/stat.h>
***************
*** 1019,1023 ****
          {
              seteuid(getuid());          /* lose setuid priveliges */
! #ifndef MACOSX
                  /* the wish process in Unix will make a wish shell and
                      read/write standard in and out unless we close the
--- 1019,1023 ----
          {
              seteuid(getuid());          /* lose setuid priveliges */
! #ifndef __APPLE__
                  /* the wish process in Unix will make a wish shell and
                      read/write standard in and out unless we close the
***************
*** 1038,1042 ****
              if (!sys_guicmd)
              {
! #ifdef MACOSX
                  char *homedir = getenv("HOME"), filename[250];
                  struct stat statbuf;
--- 1038,1042 ----
              if (!sys_guicmd)
              {
! #ifdef __APPLE__
                  char *homedir = getenv("HOME"), filename[250];
                  struct stat statbuf;
***************
*** 1203,1207 ****
          fprintf(stderr, "pd: couldn't set high priority class\n");
  #endif
! #ifdef MACOSX
      if (sys_hipriority)
      {
--- 1203,1207 ----
          fprintf(stderr, "pd: couldn't set high priority class\n");
  #endif
! #ifdef __APPLE__
      if (sys_hipriority)
      {
***************
*** 1215,1219 ****
              post("warning: high priority scheduling failed\n");
      }
! #endif /* MACOSX */
  
      if (!sys_nogui && !sys_guisetportnumber)
--- 1215,1219 ----
              post("warning: high priority scheduling failed\n");
      }
! #endif /* __APPLE__ */
  
      if (!sys_nogui && !sys_guisetportnumber)

Index: m_pd.h
===================================================================
RCS file: /cvsroot/pure-data/pd/src/m_pd.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** m_pd.h	19 Aug 2005 23:28:03 -0000	1.8
--- m_pd.h	31 Dec 2005 20:55:25 -0000	1.9
***************
*** 18,27 ****
  #endif
  
! #ifdef MSW
  /* #pragma warning( disable : 4091 ) */
  #pragma warning( disable : 4305 )  /* uncast const double to float */
  #pragma warning( disable : 4244 )  /* uncast float/int conversion etc. */
  #pragma warning( disable : 4101 )  /* unused automatic variables */
! #endif /* MSW */
  
      /* the external storage class is "extern" in UNIX; in MSW it's ugly. */
--- 18,28 ----
  #endif
  
! /* These pragmas are only used for MSVC, not MinGW or Cygwin <hans at at.or.at> */
! #ifdef _MSC_VER
  /* #pragma warning( disable : 4091 ) */
  #pragma warning( disable : 4305 )  /* uncast const double to float */
  #pragma warning( disable : 4244 )  /* uncast float/int conversion etc. */
  #pragma warning( disable : 4101 )  /* unused automatic variables */
! #endif /* _MSC_VER */
  
      /* the external storage class is "extern" in UNIX; in MSW it's ugly. */

Index: g_editor.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_editor.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** g_editor.c	15 Sep 2005 03:17:27 -0000	1.13
--- g_editor.c	31 Dec 2005 20:55:25 -0000	1.14
***************
*** 1030,1034 ****
  /* on one-button-mouse machines, you can use double click to
      mean right click (which gets the popup menu.)  Do this for Mac. */
! #ifdef MACOSX
  #define SIMULATERIGHTCLICK
  #endif
--- 1030,1034 ----
  /* on one-button-mouse machines, you can use double click to
      mean right click (which gets the popup menu.)  Do this for Mac. */
! #ifdef __APPLE__
  #define SIMULATERIGHTCLICK
  #endif
***************
*** 1493,1497 ****
          keynamesym = gensym("#keyname");
      }
! #ifdef MACOSX
          if (keynum == 30)
              keynum = 0, gotkeysym = gensym("Up");
--- 1493,1497 ----
          keynamesym = gensym("#keyname");
      }
! #ifdef __APPLE__
          if (keynum == 30)
              keynum = 0, gotkeysym = gensym("Up");





More information about the Pd-cvs mailing list