github.com/256dpi/max-go@v0.7.0/lib/max/common/commonsyms_max4.c (about)

     1  /* 
     2  	symbols.c
     3  
     4  	Copyright 2001-2002 - Cycling '74
     5  	Joshua Kit Clayton jkc@cycling74.com
     6  	
     7  */
     8  
     9  #include "ext.h"
    10  
    11  BEGIN_USING_C_LINKAGE
    12  
    13  //stringulation-station
    14  t_symbol *_sym_nothing;
    15  t_symbol *_sym_new;
    16  t_symbol *_sym_free;
    17  t_symbol *_sym_classname;
    18  t_symbol *_sym_getname;
    19  t_symbol *_sym_getmethod;
    20  t_symbol *_sym_get;
    21  t_symbol *_sym_set;
    22  t_symbol *_sym_unset;
    23  t_symbol *_sym_register;
    24  t_symbol *_sym_char;
    25  t_symbol *_sym_long;
    26  t_symbol *_sym_float32;
    27  t_symbol *_sym_float64;
    28  t_symbol *_sym_symbol;
    29  t_symbol *_sym_pointer;
    30  t_symbol *_sym_object;
    31  t_symbol *_sym_atom;
    32  t_symbol *_sym_list;
    33  t_symbol *_sym_type;
    34  t_symbol *_sym_dim;
    35  t_symbol *_sym_planecount;
    36  t_symbol *_sym_val;
    37  t_symbol *_sym_plane;
    38  t_symbol *_sym_cell;
    39  t_symbol *_sym_jit_matrix;
    40  t_symbol *_sym_class_jit_matrix;
    41  t_symbol *_sym_togworld;
    42  t_symbol *_sym_fromgworld;
    43  t_symbol *_sym_frommatrix;
    44  t_symbol *_sym_class_jit_attribute;
    45  t_symbol *_sym_jit_attribute;
    46  t_symbol *_sym_jit_attr_offset;
    47  t_symbol *_sym_jit_attr_offset_array;
    48  t_symbol *_sym_rebuilding;
    49  t_symbol *_sym_modified;
    50  t_symbol *_sym_lock;
    51  t_symbol *_sym_setinfo;
    52  t_symbol *_sym_setinfo_ex;
    53  t_symbol *_sym_getinfo;
    54  t_symbol *_sym_data;
    55  t_symbol *_sym_getdata;
    56  t_symbol *_sym_outputmatrix;
    57  t_symbol *_sym_clear;
    58  t_symbol *_sym_err_calculate;
    59  t_symbol *_sym_max_jit_classex;
    60  t_symbol *_sym_setall;
    61  t_symbol *_sym_chuck;
    62  t_symbol *_sym_getsize;
    63  t_symbol *_sym_getindex;
    64  t_symbol *_sym_objptr2index;
    65  t_symbol *_sym_append;
    66  t_symbol *_sym_insertindex;
    67  t_symbol *_sym_deleteindex;
    68  t_symbol *_sym_chuckindex;
    69  t_symbol *_sym_makearray;
    70  t_symbol *_sym_reverse;
    71  t_symbol *_sym_rotate;
    72  t_symbol *_sym_shuffle;
    73  t_symbol *_sym_swap;
    74  t_symbol *_sym_findfirst;
    75  t_symbol *_sym_findall;
    76  t_symbol *_sym_methodall;
    77  t_symbol *_sym_methodindex;
    78  t_symbol *_sym_sort;
    79  t_symbol *_sym_matrix_calc;
    80  t_symbol *_sym_genframe;
    81  t_symbol *_sym_filter;
    82  t_symbol *_sym_jit_mop;
    83  t_symbol *_sym_newcopy;
    84  t_symbol *_sym_jit_linklist;
    85  t_symbol *_sym_inputcount;
    86  t_symbol *_sym_outputcount;
    87  t_symbol *_sym_getinput;
    88  t_symbol *_sym_getoutput;
    89  t_symbol *_sym_getinputlist;
    90  t_symbol *_sym_getoutputlist;
    91  t_symbol *_sym_ioname;
    92  t_symbol *_sym_matrixname;
    93  t_symbol *_sym_outputmode;
    94  t_symbol *_sym_matrix;
    95  t_symbol *_sym_getmatrix;
    96  t_symbol *_sym_typelink;
    97  t_symbol *_sym_dimlink;
    98  t_symbol *_sym_planelink;
    99  t_symbol *_sym_restrict_type;
   100  t_symbol *_sym_restrict_planecount;
   101  t_symbol *_sym_restrict_dim;
   102  t_symbol *_sym_special;
   103  t_symbol *_sym_getspecial;
   104  t_symbol *_sym_adapt;
   105  t_symbol *_sym_decorator;
   106  t_symbol *_sym_frommatrix_trunc;
   107  t_symbol *_sym_ioproc;
   108  t_symbol *_sym_getioproc;
   109  t_symbol *_sym_name;
   110  t_symbol *_sym_types;
   111  t_symbol *_sym_minplanecount;
   112  t_symbol *_sym_maxplanecount;
   113  t_symbol *_sym_mindim;
   114  t_symbol *_sym_maxdim;
   115  t_symbol *_sym_gl_points;
   116  t_symbol *_sym_gl_lines;
   117  t_symbol *_sym_gl_line_strip;
   118  t_symbol *_sym_gl_line_loop;
   119  t_symbol *_sym_gl_triangles;
   120  t_symbol *_sym_gl_tri_strip;
   121  t_symbol *_sym_gl_tri_fan;
   122  t_symbol *_sym_gl_quads;
   123  t_symbol *_sym_gl_quad_strip;
   124  t_symbol *_sym_gl_polygon;
   125  t_symbol *_sym_gl_tri_grid;
   126  t_symbol *_sym_gl_quad_grid;
   127  t_symbol *_sym_err_lockout_stack;
   128  
   129  t_symbol *_sym_class_jit_namespace;
   130  t_symbol *_sym_jit_namespace;
   131  t_symbol *_sym_findsize;
   132  t_symbol *_sym_attach;
   133  t_symbol *_sym_detach;
   134  t_symbol *_sym_add;
   135  t_symbol *_sym_replace;
   136  t_symbol *_sym_gettype;
   137  t_symbol *_sym_ob_sym;
   138  t_symbol *_sym_resolve_name;
   139  t_symbol *_sym_resolve_raw;
   140  t_symbol *_sym_notifyall;
   141  
   142  t_symbol *_sym_anything;
   143  t_symbol *_sym_usercanset;
   144  t_symbol *_sym_usercanget;
   145  t_symbol *_sym_notify;
   146  t_symbol *_sym_getvalueof;
   147  t_symbol *_sym_setvalueof;
   148  t_symbol *_sym_dumpout;
   149  t_symbol *_sym_attributes;
   150  t_symbol *_sym_adornments;
   151  t_symbol *_sym_attr_getnames;
   152  t_symbol *_sym_attr_get;
   153  t_symbol *_sym_float;
   154  t_symbol *_sym_int;
   155  t_symbol *_sym_bang;
   156  
   157  t_symbol *_sym_parent;
   158  t_symbol *_sym_global;
   159  t_symbol *_sym_arguments;
   160  t_symbol *_sym_args;
   161  t_symbol *_sym_attr_modified;
   162  
   163  t_symbol *_sym_hashtab_entry_new;
   164  t_symbol *_sym_hashtab_entry_free;
   165  t_symbol *_sym_hashtab_free;
   166  
   167  //comonly used symbols that are exported
   168  void common_symbols_init(void);
   169  END_USING_C_LINKAGE
   170  
   171  void common_symbols_init(void) 
   172  {
   173  	_sym_nothing		= gensym("");
   174  	_sym_new			= gensym("new");
   175  	_sym_free			= gensym("free");
   176  	_sym_classname		= gensym("classname");
   177  	_sym_getname		= gensym("getname");
   178  	_sym_getmethod		= gensym("getmethod");
   179  	_sym_get 			= gensym("get");
   180  	_sym_set 			= gensym("set");
   181  	_sym_unset			= gensym("unset");
   182  	_sym_register		= gensym("register");
   183  	//types
   184  	_sym_char			= gensym("char");
   185  	_sym_long			= gensym("long");
   186  	_sym_float32		= gensym("float32");
   187  	_sym_float64		= gensym("float64");
   188  	_sym_symbol			= gensym("symbol");
   189  	_sym_pointer		= gensym("pointer");
   190  	_sym_object			= gensym("object");
   191  	_sym_atom			= gensym("atom");
   192  	//others
   193  	_sym_list			= gensym("list");
   194  	_sym_type			= gensym("type");
   195  	_sym_dim			= gensym("dim");
   196  	_sym_planecount		= gensym("planecount");
   197  	_sym_val			= gensym("val");
   198  	_sym_plane			= gensym("plane");
   199  	_sym_cell			= gensym("cell");
   200  	_sym_jit_matrix		= gensym("jit_matrix");
   201  	_sym_class_jit_matrix	= gensym("class_jit_matrix");
   202  	_sym_togworld		= gensym("togworld");
   203  	_sym_fromgworld		= gensym("fromgworld");
   204  	_sym_frommatrix		= gensym("frommatrix");
   205  	_sym_class_jit_attribute	= gensym("class_jit_attribute");
   206  	_sym_jit_attribute		= gensym("jit_attribute");
   207  	_sym_jit_attr_offset	= gensym("jit_attr_offset");
   208  	_sym_jit_attr_offset_array	= gensym("jit_attr_offset_array");
   209  	_sym_rebuilding		= gensym("rebuilding");
   210  	_sym_modified		= gensym("modified");
   211  	_sym_lock			= gensym("lock");
   212  	_sym_setinfo		= gensym("setinfo");
   213  	_sym_setinfo_ex		= gensym("setinfo_ex");
   214  	_sym_getinfo		= gensym("getinfo");
   215  	_sym_data			= gensym("data");
   216  	_sym_getdata		= gensym("getdata");
   217  	_sym_outputmatrix	= gensym("outputmatrix");
   218  	_sym_clear			= gensym("clear");
   219  	_sym_err_calculate	= gensym("could not calculate");
   220  	_sym_max_jit_classex = gensym("max_jit_classex");
   221  	_sym_setall			= gensym("setall");
   222  	_sym_chuck			= gensym("chuck");
   223  	_sym_getsize		= gensym("getsize");
   224  	_sym_getindex		= gensym("getindex");
   225  	_sym_objptr2index	= gensym("objptr2index");
   226  	_sym_append			= gensym("append");
   227  	_sym_insertindex	= gensym("insert");
   228  	_sym_deleteindex	= gensym("delete");
   229  	_sym_chuckindex		= gensym("chuckindex");
   230  	_sym_makearray		= gensym("makearray");
   231  	_sym_reverse		= gensym("reverse");
   232  	_sym_rotate			= gensym("rotate");
   233  	_sym_shuffle		= gensym("shuffle");
   234  	_sym_swap			= gensym("swap");
   235  	_sym_findfirst		= gensym("findfirst");
   236  	_sym_findall		= gensym("findall");
   237  	_sym_methodall		= gensym("methodall");
   238  	_sym_methodindex	= gensym("methodindex");
   239  	_sym_sort			= gensym("sort");
   240  	_sym_matrix_calc	= gensym("matrix_calc");
   241  	_sym_genframe		= gensym("genframe");
   242  	_sym_filter			= gensym("filter");
   243  	_sym_jit_mop		= gensym("jit_mop");
   244  	_sym_newcopy		= gensym("newcopy");
   245  	_sym_jit_linklist	= gensym("jit_linklist");
   246  	_sym_inputcount		= gensym("inputcount");
   247  	_sym_outputcount	= gensym("outputcount");
   248  	_sym_getinput		= gensym("getinput");
   249  	_sym_getoutput		= gensym("getoutput");
   250  	_sym_getinputlist	= gensym("getinputlist");
   251  	_sym_getoutputlist	= gensym("getoutputlist");
   252  	_sym_ioname			= gensym("ioname");
   253  	_sym_matrixname		= gensym("matrixname");
   254  	_sym_outputmode		= gensym("outputmode");
   255  	_sym_matrix			= gensym("matrix");
   256  	_sym_getmatrix		= gensym("getmatrix");
   257  	_sym_typelink		= gensym("typelink");
   258  	_sym_dimlink		= gensym("dimlink");
   259  	_sym_planelink		= gensym("planelink");
   260  	_sym_restrict_type	= gensym("restrict_type");
   261  	_sym_restrict_planecount	= gensym("restrict_planecount");
   262  	_sym_restrict_dim	= gensym("restrict_dim");
   263  	_sym_special		= gensym("special");
   264  	_sym_getspecial		= gensym("getspecial");
   265  	_sym_adapt			= gensym("adapt");
   266  	_sym_decorator		= gensym("decorator");
   267  	_sym_frommatrix_trunc	= gensym("frommatrix_trunc");
   268  	_sym_ioproc			= gensym("ioproc");
   269  	_sym_getioproc		= gensym("getioproc");
   270  	_sym_name			= gensym("name");
   271  	_sym_types			= gensym("types");
   272  	_sym_minplanecount	= gensym("minplanecount");
   273  	_sym_maxplanecount	= gensym("maxplanecount");
   274  	_sym_mindim			= gensym("mindim");
   275  	_sym_maxdim			= gensym("maxdim");
   276  	_sym_err_lockout_stack 	= gensym("lockout stack underflow or overflow");
   277  	// gl
   278  	_sym_gl_points 		= gensym("points");
   279  	_sym_gl_lines 		= gensym("lines");
   280  	_sym_gl_line_strip 	= gensym("line_strip");
   281  	_sym_gl_line_loop 	= gensym("line_loop");
   282  	_sym_gl_triangles 	= gensym("triangles");
   283  	_sym_gl_tri_strip 	= gensym("tri_strip");
   284  	_sym_gl_tri_fan 	= gensym("tri_fan");
   285  	_sym_gl_quads 		= gensym("quads");
   286  	_sym_gl_quad_strip 	= gensym("quad_strip");
   287  	_sym_gl_polygon 	= gensym("polygon");
   288  	_sym_gl_tri_grid 	= gensym("tri_grid");
   289  	_sym_gl_quad_grid 	= gensym("quad_grid");
   290  	// namespace
   291  	_sym_class_jit_namespace	= gensym("class_jit_namespace");
   292  	_sym_jit_namespace	= gensym("jit_namespace");
   293  	_sym_findsize		= gensym("findsize");
   294  	_sym_attach			= gensym("attach");
   295  	_sym_detach			= gensym("detach");
   296  	_sym_add			= gensym("add");
   297  	_sym_replace		= gensym("replace");
   298  	_sym_gettype		= gensym("gettype");
   299  	_sym_ob_sym			= gensym("ob_sym");
   300  	_sym_resolve_name	= gensym("resolve_name");
   301  	_sym_resolve_raw	= gensym("resolve_raw");
   302  	_sym_notifyall		= gensym("notifyall");	
   303  	
   304  	_sym_anything		= gensym("anything");
   305  	_sym_usercanset		= gensym("usercanset");
   306  	_sym_usercanget		= gensym("usercanget");
   307  	_sym_notify			= gensym("notify");
   308  	_sym_getvalueof		= gensym("getvalueof");
   309  	_sym_setvalueof		= gensym("setvalueof");
   310  	_sym_dumpout		= gensym("dumpout");
   311  	_sym_attributes		= gensym("attributes");
   312  	_sym_adornments		= gensym("adornments");
   313  	_sym_attr_getnames	= gensym("attr_getnames");
   314  	_sym_attr_get		= gensym("attr_get");
   315  	_sym_float			= gensym("float");
   316  	_sym_int			= gensym("int");
   317  	_sym_bang			= gensym("bang");
   318  
   319  	_sym_parent			= gensym("parent");
   320  	_sym_global			= gensym("global");
   321  	_sym_arguments		= gensym("arguments");
   322  	_sym_args			= gensym("args");
   323  	_sym_attr_modified	= gensym("attr_modified");
   324  
   325  	_sym_hashtab_entry_new 	= gensym("hashtab_entry_new");
   326  	_sym_hashtab_entry_free = gensym("hashtab_entry_free");
   327  	_sym_hashtab_free 		= gensym("hashtab_free");
   328  }