Merge pull request #506 from andrewcsmith/patch-2
[supercollider.git] / include / lang / SCBase.h
blob717a92abc574ae92ae9bc7758b25a16df33df4e8
1 // SuperCollider real time audio synthesis system
2 // Copyright (c) 2002 James McCartney. All rights reserved.
3 // http://www.audiosynth.com
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or
8 // (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 // Contains the most common definitions.
21 #ifndef _SCBASE_
22 #define _SCBASE_
24 #include <limits.h>
25 #include <stdio.h>
26 #ifdef _WIN32
27 # include <stdlib.h>
28 #ifndef PATH_MAX
29 # define PATH_MAX _MAX_PATH
30 #endif
31 #endif
33 #include "SC_BoundsMacros.h"
34 #include "SC_Types.h"
35 #include "PyrErrors.h"
36 #include "AllocPools.h"
37 #include "SC_Export.h"
39 void postfl(const char *fmt, ...);
40 void post(const char *fmt, ...);
41 void error(const char *fmt, ...);
42 void postText(const char *text, long length);
43 void postChar(char c);
44 void flushPostBuf();
45 void setPostFile(FILE *file); // If file is not NULL, causes all posted text to also be written to the file.
47 void debugf(char *fmt, ...);
48 void pprintf(unsigned char *str, char *fmt, ...);
50 SC_DLLEXPORT_C void schedInit();
51 SC_DLLEXPORT_C void init_OSC(int port);
52 SC_DLLEXPORT_C void cleanup_OSC();
53 SC_DLLEXPORT_C bool pyr_init_mem_pools(int runtime_space, int runtime_grow);
55 SC_DLLEXPORT_C void schedRun();
56 SC_DLLEXPORT_C void schedStop();
57 SC_DLLEXPORT_C bool compileLibrary();
58 SC_DLLEXPORT_C void runLibrary(struct PyrSymbol* selector);
59 SC_DLLEXPORT_C void runInterpreter(struct VMGlobals *g, struct PyrSymbol *selector, int numArgsPushed);
61 SC_DLLEXPORT_C struct VMGlobals* scGlobals();
63 SC_DLLEXPORT_C struct PyrSymbol* getsym(const char *inName);
64 SC_DLLEXPORT_C struct PyrSymbol* getmetasym(const char *name);
65 SC_DLLEXPORT_C struct PyrSymbol* findsym(const char *name);
67 #endif