📄 common.h
字号:
/****************************************************************//* *//* Name: common.h *//* *//* Project: NeuroBasic *//* *//* Survey: Common definitions (used by host and MUSIC *//* part). *//* *//* Author: Urs Mueller *//* Electronics Laboratory, ETH Zuerich *//* Switzerland *//* *//* Created: July 21, 1994 *//* Modified: January 8, 1995 (mk) *//* *//****************************************************************/#ifndef __COMMON_H__#define __COMMON_H__/* Limits *//**********/#define STR_BUF_MAX 128 /* size of string buffer */#define MDISK_BLOCKSIZE 512 /* Blocksize of MUSIC disk = 512 Word*/#define INV_MDISK_BLOCKSIZE 0.001953125 /* = 1 / MDISK_BLOCKSIZE *//* Error codes *//***************/#define ERR_NOERROR 0 /* no error */#define ERR_GERROR -1 /* general error */#define ERR_OBJTABFULL -2 /* object table full */#define ERR_NOMEM -3 /* not enough memory */#define ERR_NOOBJ -4 /* not an object */#define ERR_WRONGOBJ -5 /* wrong object type */#define ERR_PARCONF -6 /* parameter conflict */#define ERR_DISKERROR -7 /* disk I/O error */#define ERR_NOFILE -8 /* file not found *//* Message Type *//****************/#define MESSAGE_MAX 10 /* size of message buffer */typedef union{ MINT i; MFLOAT f; void *p;} message_t[MESSAGE_MAX];/* File types *//**************/#define FF_MDISK 1 /* Input patterns on Music disk */#define FF_FLOAT32 4 /* 32-bit floating-point format */#define FF_FIXED8 8 /* 8-bit compact fixed-point format */#define FF_ASCII 16 /* ASCII Format *//* User Interface Code *//***********************/typedef enum{ C_USER_FCT, C_INPUT, C_ERR_ARRAY, /* nonexistent array */ C_ERR_ARRAY_INDEX, /* array index out of ragne */ C_ERR_MUSIC_MEM, /* MUSIC out of memory */ C_FNERROR, /* function reports an error */ C_VARERROR, /* error in Basic variable */ C_SYSTEM, C_PRINT, /* print out the queue */ C_PRINTTAB, /* print a tab */ C_PRINTNL, /* new line */ C_PRINTS, /* print a string */ C_PRINTF, /* print a floatingpoint value */ C_OPENFILE, /* open print file */ C_CLOSEFILE, /* close print file */ C_ASSIGN_STR, /* assign to string variable */ C_STR_ADD, /* concatenate two string var. */ C_STR_STR, /* convert float to string */ C_STR_DEL_STACK, /* delete string stack */ C_SENDSTRING, /* send string to Music */ C_END} server_command_t;/* video board *//***************/#define VIDEO_X 340#define VIDEO_Y 260#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -