aboutsummaryrefslogtreecommitdiff
path: root/externals/grill
diff options
context:
space:
mode:
Diffstat (limited to 'externals/grill')
-rw-r--r--externals/grill/deljoin/deljoin.dsp95
-rwxr-xr-xexternals/grill/deljoin/deljoin.mpw81
-rw-r--r--externals/grill/deljoin/deljoin.vcproj.vspscc10
-rw-r--r--externals/grill/deljoin/help-deljoin.pd20
-rwxr-xr-xexternals/grill/deljoin/main.cpp144
-rw-r--r--externals/grill/deljoin/package.txt2
6 files changed, 101 insertions, 251 deletions
diff --git a/externals/grill/deljoin/deljoin.dsp b/externals/grill/deljoin/deljoin.dsp
deleted file mode 100644
index b40b6189..00000000
--- a/externals/grill/deljoin/deljoin.dsp
+++ /dev/null
@@ -1,95 +0,0 @@
-# Microsoft Developer Studio Project File - Name="deljoin" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** NICHT BEARBEITEN **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=deljoin - Win32 Debug
-!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE
-!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl
-!MESSAGE
-!MESSAGE NMAKE /f "deljoin.mak".
-!MESSAGE
-!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben
-!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
-!MESSAGE
-!MESSAGE NMAKE /f "deljoin.mak" CFG="deljoin - Win32 Debug"
-!MESSAGE
-!MESSAGE Für die Konfiguration stehen zur Auswahl:
-!MESSAGE
-!MESSAGE "deljoin - Win32 Release" (basierend auf "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "deljoin - Win32 Debug" (basierend auf "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName "deljoin"
-# PROP Scc_LocalPath "."
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "deljoin - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "pd-msvc/r"
-# PROP Intermediate_Dir "pd-msvc/r"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DELJOIN_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\source" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D FLEXT_SYS=2 /YX /FD /c
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0xc07 /d "NDEBUG"
-# ADD RSC /l 0xc07 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib pd.lib flext-pdwin.lib /nologo /dll /machine:I386 /libpath:"c:\programme\audio\pd\bin" /libpath:"f:\prog\max\flext\pd-msvc"
-
-!ELSEIF "$(CFG)" == "deljoin - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "pd-msvc/d"
-# PROP Intermediate_Dir "pd-msvc/d"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DELJOIN_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\source" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D FLEXT_SYS=2 /FR /YX /FD /GZ /c
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0xc07 /d "_DEBUG"
-# ADD RSC /l 0xc07 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib pd.lib flext_d-pdwin.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"c:\programme\audio\pd\bin" /libpath:"f:\prog\max\flext\pd-msvc"
-
-!ENDIF
-
-# Begin Target
-
-# Name "deljoin - Win32 Release"
-# Name "deljoin - Win32 Debug"
-# Begin Source File
-
-SOURCE=.\main.cpp
-# End Source File
-# End Target
-# End Project
diff --git a/externals/grill/deljoin/deljoin.mpw b/externals/grill/deljoin/deljoin.mpw
deleted file mode 100755
index 11436fe3..00000000
--- a/externals/grill/deljoin/deljoin.mpw
+++ /dev/null
@@ -1,81 +0,0 @@
-# deljoin - join list with delimiter
-# Copyright (c) 2002 Thomas Grill (xovo@gmx.net)
-#
-# Makefile for Apple MPW-PR
-#
-# usage: make -f deljoin.mpw
-#
-# ---------------------------------------------
-
-MAKEFILE = deljoin.mpw
-¥MondoBuild¥ = {MAKEFILE} # Make blank to avoid rebuilds when makefile is modified
-
-Name = deljoin
-
-ObjDir = :MPW:
-MaxSDK = HD Daten:Prog Stuff:Max/MSP SDK:SDK Examples
-flext = ::flext:
-Includes = -i :,"{flext}source","{MaxSDK}:Max Includes","{MaxSDK}:MSP Includes"
-Defines = -d MAXMSP
-
-Sym-PPC = -sym off
-Flags = -bool on -enum int -includes unix -opt speed,unroll,unswitch
-
-
-PPCCPlusOptions = {Includes} {Sym-PPC} {Defines} {Flags}
-
-
-### Source Files ###
-
-SrcFiles = main.cpp
-Headers =
-
-
-### Object Files ###
-
-Obj-PPC = ¶
- "{ObjDir}main.cpp.x"
-
-LibFiles-Ext = ¶
- "{flext}MPW:flext.o" ¶
- "{MaxSDK}:Max Includes:MaxLib" ¶
- "{MaxSDK}:MSP Includes:MaxAudioLib"
-
-### Libraries ###
-
-LibFiles-PPC = ¶
- "{SharedLibraries}StdCLib" ¶
- "{SharedLibraries}MathLib" ¶
- "{PPCLibraries}StdCRuntime.o" ¶
- "{PPCLibraries}PPCCRuntime.o" ¶
- "{PPCLibraries}MrCPlusLib.o" ¶
-
-
-### Default Rules ###
-
-{ObjDir} Ä :
-
-.cpp.x Ä .cpp {¥MondoBuild¥} {Headers}
- {PPCCPlus} {depDir}{default}.cpp -o {targDir}{default}.cpp.x {PPCCPlusOptions}
-
-
-### Build Rules ###
-
-all Ä Folder {¥MondoBuild¥} {ObjDir}{Name}
-
-Folder ÄÄ
- if !`Exists {ObjDir}` ; NewFolder {ObjDir} ; end
-
-{ObjDir}{Name} Ä {Obj-PPC}
- PPCLink ¶
- -o {Targ} ¶
- {deps} ¶
- {LibFiles-Ext} ¶
- {LibFiles-PPC} ¶
- {Sym-PPC} ¶
- -mf -d ¶
- -t 'iLaF' ¶
- -c 'max2' ¶
- -xm s ¶
- -export main ¶
- -main main
diff --git a/externals/grill/deljoin/deljoin.vcproj.vspscc b/externals/grill/deljoin/deljoin.vcproj.vspscc
deleted file mode 100644
index 6cb031bc..00000000
--- a/externals/grill/deljoin/deljoin.vcproj.vspscc
+++ /dev/null
@@ -1,10 +0,0 @@
-""
-{
-"FILE_VERSION" = "9237"
-"ENLISTMENT_CHOICE" = "NEVER"
-"PROJECT_FILE_RELATIVE_PATH" = ""
-"NUMBER_OF_EXCLUDED_FILES" = "0"
-"ORIGINAL_PROJECT_FILE_PATH" = ""
-"NUMBER_OF_NESTED_PROJECTS" = "0"
-"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROJECT"
-}
diff --git a/externals/grill/deljoin/help-deljoin.pd b/externals/grill/deljoin/help-deljoin.pd
new file mode 100644
index 00000000..bf49460e
--- /dev/null
+++ b/externals/grill/deljoin/help-deljoin.pd
@@ -0,0 +1,20 @@
+#N canvas 300 90 462 290 12;
+#X msg 247 89 symbol -;
+#X msg 232 62 list;
+#X msg 259 115 list +;
+#X obj 105 229 print;
+#X symbolatom 266 143 10 0 0 0 - - -;
+#X msg 44 66 a b c d e f;
+#X msg 217 34 0;
+#X obj 105 203 deljoin 0;
+#X text 254 21 no delimiter;
+#X text 272 62 space;
+#X msg 208 11 bang;
+#X connect 0 0 7 1;
+#X connect 1 0 7 1;
+#X connect 2 0 7 1;
+#X connect 4 0 7 1;
+#X connect 5 0 7 0;
+#X connect 6 0 7 1;
+#X connect 7 0 3 0;
+#X connect 10 0 7 1;
diff --git a/externals/grill/deljoin/main.cpp b/externals/grill/deljoin/main.cpp
index 0554bf8a..d01e8fed 100755
--- a/externals/grill/deljoin/main.cpp
+++ b/externals/grill/deljoin/main.cpp
@@ -2,31 +2,26 @@
deljoin - join a list with delimiter
-Copyright (c) 2002-2003 Thomas Grill (xovo@gmx.net)
+Copyright (c) 2002-2005 Thomas Grill (gr@grrrr.org)
For information on usage and redistribution, and for a DISCLAIMER OF ALL
WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#define FLEXT_ATTRIBUTES 1
+
#include <flext.h>
-#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 401)
-#error You need at least flext version 0.4.1
+#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 500)
+#error You need at least flext version 0.5.0
#endif
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
-#define I int
-#define L long
-#define F float
-#define D double
-#define V void
-#define C char
-#define BL bool
-#define VERSION "0.1.2"
+#define VERSION "0.1.4"
#ifdef __MWERKS__
#define STD std
@@ -41,91 +36,110 @@ class deljoin:
FLEXT_HEADER_S(deljoin,flext_base,Setup)
public:
- deljoin(I argc,const t_atom *argv);
+ deljoin(int argc,const t_atom *argv);
protected:
- V m_list(const t_symbol *s,int argc,const t_atom *argv);
- V m_del(const t_symbol *s);
-
+ void m_list(const t_symbol *s,int argc,const t_atom *argv);
+ void m_del(const t_symbol *s,int argc,const t_atom *argv);
+
const t_symbol *delim;
- virtual void m_help();
-
private:
- static V Setup(t_classid c);
+ static void Setup(t_classid c);
+ static const t_symbol *sym__space;
+
FLEXT_CALLBACK_A(m_list)
- FLEXT_CALLBACK_S(m_del)
+ FLEXT_CALLBACK_A(m_del)
+ FLEXT_ATTRVAR_S(delim)
};
FLEXT_NEW_V("deljoin",deljoin)
-V deljoin::Setup(t_classid c)
+const t_symbol *deljoin::sym__space = NULL;
+
+void deljoin::Setup(t_classid c)
{
+ sym__space = MakeSymbol(" ");
+
FLEXT_CADDMETHOD(c,0,m_list);
FLEXT_CADDMETHOD(c,1,m_del);
+ FLEXT_CADDATTR_VAR1(c,"del",delim);
}
-deljoin::deljoin(I argc,const t_atom *argv):
- delim(NULL)
+deljoin::deljoin(int argc,const t_atom *argv):
+ delim(sym__)
{
AddInAnything("Anything in - triggers output");
- AddInSymbol("Set the Delimiter");
+ AddInAnything("Set the Delimiter");
AddOutSymbol("A symbol representing the joined list");
- if(argc && IsSymbol(argv[0])) delim = GetSymbol(argv[0]);
+ m_del(sym_list,argc,argv);
}
-V deljoin::m_help()
-{
- post("%s version " VERSION " (using flext " FLEXT_VERSTR "), (C) 2002 Thomas Grill",thisName());
+void deljoin::m_del(const t_symbol *s,int argc,const t_atom *argv)
+{
+ delim = NULL;
+ if(s == sym_symbol) {
+ FLEXT_ASSERT(argc == 1 && IsSymbol(argv[0]));
+ delim = GetSymbol(argv[0]);
+ }
+ else if(s == sym_list) {
+ if(argc == 0)
+ delim = sym__space;
+ else if(argc >= 1) {
+ if(IsSymbol(argv[0]))
+ delim = GetSymbol(argv[0]);
+ else if(IsFloat(argv[0]) || IsInt(argv[0]))
+ delim = sym__;
+ }
+ }
+ else if(s == sym_bang || s == sym_float || s == sym_int)
+ delim = sym__;
+
+ if(!delim) {
+ post("%s - Argument must be a symbol, list or int/float/bang",thisName());
+ delim = sym__;
+ }
}
/** \brief convert incoming list to a concatenated string
Handles symbols, integers and floats
*/
-V deljoin::m_list(const t_symbol *s,int argc,const t_atom *argv)
+void deljoin::m_list(const t_symbol *s,int argc,const t_atom *argv)
{
- if(delim) {
- C tmp[1024],*t = tmp;
- const C *sdel = GetString(delim);
- I ldel = strlen(sdel);
-
- if(s && s != sym_list && s != sym_float && s != sym_int) {
- strcpy(t,GetString(s));
- t += strlen(t);
+ FLEXT_ASSERT(delim);
+
+ char tmp[1024],*t = tmp;
+ const char *sdel = GetString(delim);
+ int ldel = strlen(sdel);
+
+ if(s && s != sym_list && s != sym_float && s != sym_int) {
+ strcpy(t,GetString(s));
+ t += strlen(t);
+ }
+
+ for(int i = 0; i < argc; ++i) {
+ if(t != tmp) {
+ strcpy(t,sdel);
+ t += ldel;
}
-
- for(int i = 0; i < argc; ++i) {
- if(t != tmp) {
- strcpy(t,sdel);
- t += ldel;
- }
-
- const t_atom &a = argv[i];
- if(IsSymbol(a))
- strcpy(t,GetString(a));
- else if(IsInt(a)) {
- STD::sprintf(t,"%i",GetInt(a),10);
- }
- else if(IsFloat(a)) {
- STD::sprintf(t,"%f",GetFloat(a),10);
- }
- // else do nothing
-
- t += strlen(t);
+
+ const t_atom &a = argv[i];
+ if(IsSymbol(a))
+ strcpy(t,GetString(a));
+ else if(IsInt(a)) {
+ STD::sprintf(t,"%i",GetInt(a),10);
}
-
- ToOutString(0,tmp);
+ else if(IsFloat(a)) {
+ STD::sprintf(t,"%f",GetFloat(a),10);
+ }
+// else do nothing
+
+ t += strlen(t);
}
- else
- post("%s - No delimiter defined",thisName());
-}
-
-V deljoin::m_del(const t_symbol *s)
-{
- delim = s;
+
+ ToOutString(0,tmp);
}
-
diff --git a/externals/grill/deljoin/package.txt b/externals/grill/deljoin/package.txt
new file mode 100644
index 00000000..afe0207e
--- /dev/null
+++ b/externals/grill/deljoin/package.txt
@@ -0,0 +1,2 @@
+NAME=deljoin
+SRCS=main.cpp