home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
d
/
dir_nm20.zip
/
Dir_NM_2.0
/
NM.h
< prev
next >
Wrap
C/C++ Source or Header
|
1992-07-16
|
5KB
|
197 lines
/* ===== IM.h =====
*/
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xos.h>
#include <X11/keysym.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
#include <sys/time.h>
/* Some global Xlib variables used in all files: */
extern Display *display;
extern int screen;
extern Window win;
extern GC gc;
extern XFontStruct *font_info;
extern XWindowAttributes attribs;
extern char tmpstr[128];
extern Colormap theCmap,cmap;
extern XColor mycolor,exactcolor,mine;
#define Sign(A) ((A) > 0 ? 1.0 : ( (A) < 0 ? -1.0 : 0.0))
#define Max(A,B) ((A) >= (B) ? (A) : (B))
#define Min(A,B) ((A) <= (B) ? (A) : (B))
#define St_Start 30
#define Text_Base 35
#define Max_kind 36
#define Max_Row 1000
#define Max_Column 37
#define Input_On 1
#define List_On 2
#define Output_On 3
#define Re_Name_On 4
#define Move_On 5
#define Delete_On 6
#define Value_On 7
#define Check_Tmp_On 8
#define Switch_On 9
#define Combine_On 10
#define Load_Text_On 13
#define Tempo_Set_On 14
#define Timbre_On 16
#define Words_On 17
#define Dance_On 18
#define Sounds_On 19
#define Voice_On 20
#define Piano_On 21
#define Print_On 22
#define M_Len 630
typedef unsigned char BYTE;
typedef int two[2][7];
typedef char str16[17];
typedef int ary16[16];
typedef struct Chord {
int nt[4],act,vol;
} Chord;
typedef struct Chord_Used {
int Num;
int Next;
int Nt[10][3];
} Chord_Used;
typedef struct Tempo_Unit {
int note,act;
} Tempo_Unit;
typedef struct fast
{
int nt[4],at,cm;
} fast;
typedef struct contmp
{
char Set_name[50];
int tempo[6],instru[6];
} Tempo_Set;
typedef struct more
{
char tool[13];
int freq[20];
} more;
typedef struct stater
{
char word[17];
ary16 say;
struct stater *nxtone;
} stater;
typedef struct midstate
{
char word[17];
ary16 say;
} midstate;
typedef struct pair
{
int a,b;
} pair;
Chord St[1000][M_Len][3],sample[M_Len][3],pm;
Tempo_Unit tmp[1000][30],tmp_buf[1000][30];
Chord_Used Chord_Bank[320];
fast ptr_;
Tempo_Set cont[1000],con;
more *tim[100],tim_pt;
int Menu_On,Row_On,Column_On,Atom_On,Map_SX,Text_SY,Show_Row_Line,Tour_On,
Back_Id,Show_Column_Line,Row_Aim,Column_Aim,Max_num,Copy,Delete,Move,Switch,
Replace,Load_On,At_Value,Mix;
int Action, /* Insert_On Copy_To_On Delete_On Move_To_On Switch_On */
/* Re_Name_On */
Old_Motion,
Motion; /* Input_On List_On Output_On Timbre_On */
/* Words_On Tempo_Set_On Sounds_On Dance_On Sing_On */
/* Voice_On Piano_On Print_On */
int Row_Id,Column_Id,Map_Row_Id,Map_Column_Id,Text_Row_Id,Text_Column_Id,
Table_Width,Table_Height,Head_Len,Table_Row_Num,Table_Column_Num,
Row_Pointer,Column_Pointer,Map_Dx,Map_Dy,Set_Column,Set_Row,Value_Column,
Value_Row,Sample_Column,Sample_Row,Fixer_Column,Fixer_Row,P_S,P_E;
typedef struct Range {
int Position,Delta;
} Range;
Range Column_Range[36],Row_Range[1000];
char *Table_Name,*Old_name[Max_Column],*In_name[Max_Column],
*Out_name[Max_Column],*Atom_array[Max_Row][Max_Column],*Buffer[Max_Column];
int V_Ht,Dist,Del,M_i,j,M_Id,M_Bar_Num,n,lf,hf,fn,t,M_p,duration,Timer,Measure,
code,now,contain,Timbre_num,total,pct,sum,page,way,nx,ny,x,z,marker,head,
tail,calm,Now_Bank,next,rn,hold,nt,at,step,sn,five,lock,unite,rpter[3],
delt[3],size,Signal,Host,Host_X,Host_Y,X_bar,Y_bar,W_bar,H_bar,Dx_bar,
Dy_bar,Piano_X,Piano_Y,In_Menu,On_High,On_Text,Word_Pos,Word_Num,New_Word,
Word_X,Word_Y,Volumn,Set_X,Set_Y,Set_W,Set_H,Set_Id,Value_X,Value_Y,Value_W,
Value_H,Value_H_X,Value_H_Y,Value_H_W,Value_H_H, /* For highlight */
Interval;
int mix[40],uniset[100][11],content[36],d_t[3],Times[3],add[3],pt[3],front[3],
Words_Array[1000]; /* Id of the melodies have words */
double freq,d,rlact,speed,br[10];
two place;
char ch;
char *names[35000],*Sample_names[1000],*sample_name,filname[100],*S_bf,top[180],
Word_Top[5004],buf[2048],ch1[2],ch2[2],wd[17],*Race,*Words[1000];
FILE *melodyfile,*timfile,*unifile,*filvar,*confile,*wordfile,*midifile,
*Textfile;
ary16 sy;
struct stater *firststate,*atstate,*laststate,*newstate;
midstate *mid;
/* XImage *pt0,*pt1,*pt2; */
/* XImage *pic[2][33],*ptdcr; */
int Print_pt,Debug; /* 10 --- Curve details 20 --- seter / tmp values */
/* 100 --- Analyze Table */
/* Finish : Note = 200 */