i_procdef_st.h 2.03 KB
Newer Older
1
/*
2
 *  Copyright (C) 2014-2016 Joseba García Etxebarria <joseba.gar@gmail.com>
3 4 5
 *  Copyright (C) 2006-2012 SplinterGU (Fenix/Bennugd)
 *  Copyright (C) 2002-2006 Fenix Team (Fenix)
 *  Copyright (C) 1999-2002 José Luis Cebrián Pagüe (Fenix)
6
 *
7
 *  This file is part of PixTudio
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
 *
 *  This software is provided 'as-is', without any express or implied
 *  warranty. In no event will the authors be held liable for any damages
 *  arising from the use of this software.
 *
 *  Permission is granted to anyone to use this software for any purpose,
 *  including commercial applications, and to alter it and redistribute it
 *  freely, subject to the following restrictions:
 *
 *     1. The origin of this software must not be misrepresented; you must not
 *     claim that you wrote the original software. If you use this software
 *     in a product, an acknowledgment in the product documentation would be
 *     appreciated but is not required.
 *
 *     2. Altered source versions must be plainly marked as such, and must not be
 *     misrepresented as being the original software.
 *
 *     3. This notice may not be removed or altered from any source
 *     distribution.
 *
 */

#ifndef __I_PROCDEF_ST_H
#define __I_PROCDEF_ST_H

#include "instance_st.h"
34
#include <stdint.h>
35

36
/* Process definitions, more simple than in the compiler */
37

38 39 40
typedef struct _procdef {
    int *pridata;
    int *pubdata;
41

42
    int *code;
43

44 45
    int exitcode;
    int errorcode;
46

47 48
    int *strings;
    int *pubstrings;
49

50 51
    int private_size;
    int public_size;
52

53
    int code_size;
54

55 56
    int string_count;
    int pubstring_count;
57

58
    intptr_t params;
59 60 61 62
    int id;
    int type;
    int flags;
    char *name;
63 64

    int breakpoint;
65
} PROCDEF;
66

67 68 69 70
#define PROC_USES_FRAME 0x01
#define PROC_USES_LOCALS 0x02
#define PROC_FUNCTION 0x04
#define PROC_USES_PUBLICS 0x08
71 72 73

/* System functions */

74
typedef int SYSFUNC(INSTANCE *, intptr_t *);
75 76 77 78 79
typedef struct _sysproc {
    int code;
    char *name;
    char *paramtypes;
    int type;
80
    intptr_t params;
81 82 83
    SYSFUNC *func;
    int id;
} SYSPROC;
84 85

#endif