Skip to content

Commit

Permalink
update chugin.h to chuck-1.5.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gewang committed Nov 2, 2024
1 parent 7b9027f commit c921eb7
Showing 1 changed file with 82 additions and 63 deletions.
145 changes: 82 additions & 63 deletions chuck/include/chugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,26 +67,27 @@

/*----------------------------------------------------------------------------
ChucK Strongly-timed Audio Programming Language
Compiler and Virtual Machine
Compiler, Virtual Machine, and Synthesis Engine
Copyright (c) 2003 Ge Wang and Perry R. Cook. All rights reserved.
http://chuck.stanford.edu/
http://chuck.cs.princeton.edu/
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
U.S.A.
it under the dual-license terms of EITHER the MIT License OR the GNU
General Public License (the latter as published by the Free Software
Foundation; either version 2 of the License or, at your option, any
later version).
This program is distributed in the hope that it will be useful and/or
interesting, but WITHOUT ANY WARRANTY; without even the implied warranty
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
MIT Licence and/or the GNU General Public License for details.
You should have received a copy of the MIT License and the GNU General
Public License (GPL) along with this program; a copy of the GPL can also
be obtained by writing to the Free Software Foundation, Inc., 59 Temple
Place, Suite 330, Boston, MA 02111-1307 U.S.A.
-----------------------------------------------------------------------------*/

//-----------------------------------------------------------------------------
Expand Down Expand Up @@ -115,7 +116,7 @@
// 1.5.0.0 (ge) | moved to chuck.h for at-a-glance visibility
// 1.5.2.0 (ge) | moved to chuck_def.h for chugins headers streamlining
//-----------------------------------------------------------------------------
#define CHUCK_VERSION_STRING "1.5.2.5 (chai)"
#define CHUCK_VERSION_STRING "1.5.4.0 (chai)"
//-----------------------------------------------------------------------------


Expand Down Expand Up @@ -436,26 +437,27 @@ typedef struct { SAMPLE re ; SAMPLE im ; } t_CKCOMPLEX_SAMPLE;
#endif
/*----------------------------------------------------------------------------
ChucK Strongly-timed Audio Programming Language
Compiler and Virtual Machine
Compiler, Virtual Machine, and Synthesis Engine
Copyright (c) 2003 Ge Wang and Perry R. Cook. All rights reserved.
http://chuck.stanford.edu/
http://chuck.cs.princeton.edu/
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
U.S.A.
it under the dual-license terms of EITHER the MIT License OR the GNU
General Public License (the latter as published by the Free Software
Foundation; either version 2 of the License or, at your option, any
later version).
This program is distributed in the hope that it will be useful and/or
interesting, but WITHOUT ANY WARRANTY; without even the implied warranty
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
MIT Licence and/or the GNU General Public License for details.
You should have received a copy of the MIT License and the GNU General
Public License (GPL) along with this program; a copy of the GPL can also
be obtained by writing to the Free Software Foundation, Inc., 59 Temple
Place, Suite 330, Boston, MA 02111-1307 U.S.A.
-----------------------------------------------------------------------------*/

//-----------------------------------------------------------------------------
Expand Down Expand Up @@ -548,26 +550,27 @@ U_boolList U_BoolList( t_CKBOOL head, U_boolList tail );
#endif
/*----------------------------------------------------------------------------
ChucK Strongly-timed Audio Programming Language
Compiler and Virtual Machine
Compiler, Virtual Machine, and Synthesis Engine
Copyright (c) 2003 Ge Wang and Perry R. Cook. All rights reserved.
http://chuck.stanford.edu/
http://chuck.cs.princeton.edu/
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
U.S.A.
it under the dual-license terms of EITHER the MIT License OR the GNU
General Public License (the latter as published by the Free Software
Foundation; either version 2 of the License or, at your option, any
later version).
This program is distributed in the hope that it will be useful and/or
interesting, but WITHOUT ANY WARRANTY; without even the implied warranty
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
MIT Licence and/or the GNU General Public License for details.
You should have received a copy of the MIT License and the GNU General
Public License (GPL) along with this program; a copy of the GPL can also
be obtained by writing to the Free Software Foundation, Inc., 59 Temple
Place, Suite 330, Boston, MA 02111-1307 U.S.A.
-----------------------------------------------------------------------------*/

//-----------------------------------------------------------------------------
Expand Down Expand Up @@ -684,6 +687,7 @@ typedef struct a_Stmt_Continue_ * a_Stmt_Continue;
typedef struct a_Stmt_Return_ * a_Stmt_Return;
typedef struct a_Stmt_Case_ * a_Stmt_Case;
typedef struct a_Stmt_GotoLabel_ * a_Stmt_GotoLabel;
typedef struct a_Stmt_Import_ * a_Stmt_Import;
typedef struct a_Decl_ * a_Decl;
typedef struct a_Var_Decl_ * a_Var_Decl;
typedef struct a_Var_Decl_List_ * a_Var_Decl_List;
Expand All @@ -697,6 +701,7 @@ typedef struct a_Ctor_Call_ * a_Ctor_Call; // 1.5.2.0 (ge) added
typedef struct a_Complex_ * a_Complex;
typedef struct a_Polar_ * a_Polar;
typedef struct a_Vec_ * a_Vec; // ge: added 1.3.5.3
typedef struct a_Import_ * a_Import; // 1.5.2.5 (ge) added

// forward reference for type
typedef struct Chuck_Type * t_CKTYPE;
Expand Down Expand Up @@ -734,6 +739,7 @@ a_Stmt new_stmt_from_continue( uint32_t line, uint32_t where );
a_Stmt new_stmt_from_return( a_Exp exp, uint32_t line, uint32_t where );
a_Stmt new_stmt_from_label( c_str xid, uint32_t line, uint32_t where );
a_Stmt new_stmt_from_case( a_Exp exp, uint32_t line, uint32_t where );
a_Stmt new_stmt_from_import( a_Import target, uint32_t line, uint32_t where );
a_Exp append_expression( a_Exp list, a_Exp exp, uint32_t line, uint32_t where );
a_Exp new_exp_from_binary( a_Exp lhs, ae_Operator oper, a_Exp rhs, uint32_t line, uint32_t where );
a_Exp new_exp_from_unary( ae_Operator oper, a_Exp exp, uint32_t line, uint32_t where );
Expand Down Expand Up @@ -772,6 +778,8 @@ a_Array_Sub prepend_array_sub( a_Array_Sub array, a_Exp exp, uint32_t line, uint
a_Complex new_complex( a_Exp re, uint32_t line, uint32_t where );
a_Polar new_polar( a_Exp mod, uint32_t line, uint32_t where ); // ge: added 1.3.5.3
a_Vec new_vec( a_Exp e, uint32_t line, uint32_t where );
a_Import new_import( c_str str, a_Id_List id_list, uint32_t line, uint32_t where );
a_Import prepend_import( a_Import target, a_Import list, uint32_t line, uint32_t where );

a_Class_Def new_class_def( ae_Keyword class_decl, a_Id_List xid, a_Class_Ext ext, a_Class_Body body, uint32_t line, uint32_t where );
a_Class_Body new_class_body( a_Section section, uint32_t line, uint32_t where );
Expand Down Expand Up @@ -824,6 +832,7 @@ void delete_stmt_from_break( a_Stmt stmt );
void delete_stmt_from_continue( a_Stmt stmt );
void delete_stmt_from_return( a_Stmt stmt );
void delete_stmt_from_label( a_Stmt stmt );
void delete_stmt_from_import( a_Stmt stmt );

// delete an exp
void delete_exp( a_Exp exp );
Expand Down Expand Up @@ -894,6 +903,7 @@ struct a_Arg_List_ { a_Type_Decl type_decl; a_Var_Decl var_decl; t_CKTYPE type;
struct a_Complex_ { a_Exp re; a_Exp im; uint32_t line; uint32_t where; a_Exp self; };
struct a_Polar_ { a_Exp mod; a_Exp phase; uint32_t line; uint32_t where; a_Exp self; };
struct a_Vec_ { a_Exp args; int numdims; uint32_t line; uint32_t where; a_Exp self; }; // ge: added 1.3.5.3
struct a_Import_ { c_str what; a_Import next; uint32_t line; uint32_t where; }; // 1.5.2.5 (ge) added

// enum primary exp type
typedef enum { ae_primary_var, ae_primary_num, ae_primary_float,
Expand Down Expand Up @@ -975,6 +985,7 @@ struct a_Stmt_Continue_ { uint32_t line; uint32_t where; a_Stmt self; };
struct a_Stmt_Return_ { a_Exp val; uint32_t line; uint32_t where; a_Stmt self; };
struct a_Stmt_Case_ { a_Exp exp; uint32_t line; uint32_t where; a_Stmt self; };
struct a_Stmt_GotoLabel_ { S_Symbol name; uint32_t line; uint32_t where; a_Stmt self; };
struct a_Stmt_Import_ { a_Import list; uint32_t line; uint32_t where; a_Stmt self; };
struct a_Stmt_Code_
{
// statement list
Expand All @@ -988,7 +999,8 @@ struct a_Stmt_Code_
// enum values for stmt type
typedef enum { ae_stmt_exp, ae_stmt_while, ae_stmt_until, ae_stmt_for, ae_stmt_foreach,
ae_stmt_loop, ae_stmt_if, ae_stmt_code, ae_stmt_switch, ae_stmt_break,
ae_stmt_continue, ae_stmt_return, ae_stmt_case, ae_stmt_gotolabel
ae_stmt_continue, ae_stmt_return, ae_stmt_case, ae_stmt_gotolabel,
ae_stmt_import
} ae_Stmt_Type;

// a statement
Expand Down Expand Up @@ -1018,6 +1030,7 @@ struct a_Stmt_
struct a_Stmt_Return_ stmt_return;
struct a_Stmt_Case_ stmt_case;
struct a_Stmt_GotoLabel_ stmt_gotolabel;
struct a_Stmt_Import_ stmt_import;
};

// code position
Expand Down Expand Up @@ -1097,26 +1110,27 @@ struct a_Program_ { a_Section section; a_Program next; uint32_t line; uint32_t w
#endif
/*----------------------------------------------------------------------------
ChucK Strongly-timed Audio Programming Language
Compiler and Virtual Machine
Compiler, Virtual Machine, and Synthesis Engine
Copyright (c) 2003 Ge Wang and Perry R. Cook. All rights reserved.
http://chuck.stanford.edu/
http://chuck.cs.princeton.edu/
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
U.S.A.
it under the dual-license terms of EITHER the MIT License OR the GNU
General Public License (the latter as published by the Free Software
Foundation; either version 2 of the License or, at your option, any
later version).
This program is distributed in the hope that it will be useful and/or
interesting, but WITHOUT ANY WARRANTY; without even the implied warranty
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
MIT Licence and/or the GNU General Public License for details.
You should have received a copy of the MIT License and the GNU General
Public License (GPL) along with this program; a copy of the GPL can also
be obtained by writing to the Free Software Foundation, Inc., 59 Temple
Place, Suite 330, Boston, MA 02111-1307 U.S.A.
-----------------------------------------------------------------------------*/

//-----------------------------------------------------------------------------
Expand Down Expand Up @@ -1164,11 +1178,16 @@ struct a_Program_ { a_Section section; a_Program next; uint32_t line; uint32_t w
#define CK_DLL_VERSION_GETMINOR(v) ((v) & 0xFFFF)
#define CK_DLL_VERSION (CK_DLL_VERSION_MAKE(CK_DLL_VERSION_MAJOR, CK_DLL_VERSION_MINOR))


// string literal containing default chugin path (platform-specific)
extern char g_default_chugin_path[];
// string literal containing environment variable for chugin search path
extern char g_chugin_path_envvar[];
// string literal containing default chugin paths (platform-specific)
extern char g_default_path_system[];
extern char g_default_path_packages[];
extern char g_default_path_user[];
// string literal containing environment variable names for import search path
extern char g_envvar_path_system[];
extern char g_envvar_path_packages[];
extern char g_envvar_path_user[];
// contains deprecated env var name
extern char g_envvar_path_deprecated[];


// DL forward references
Expand Down

0 comments on commit c921eb7

Please sign in to comment.