|
|
|
#ifndef re2c_substr_h
|
|
|
|
#define re2c_substr_h
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include "tools/re2c/basics.h"
|
|
|
|
|
|
|
|
struct SubStr {
|
|
|
|
char *str;
|
|
|
|
unsigned int len;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct SubStr SubStr;
|
|
|
|
|
|
|
|
int SubStr_eq(const SubStr *, const SubStr *);
|
|
|
|
|
* ins.h, scanner.h, dfa.h, code.c, re.h, parse.h, token.h, substr.h:
Remove use of "inline". This could cause breakage on non-gcc systems (as
these files do not use config.h because of cross-build reasons).
* yasm.dep, yasm.mak, yasm.dsp, yasm.dsw: Remove support for VC6 builds.
* libyasm.dsp, libyasm.mak, libyasm.dep: Likewise.
* modules.dsp, modules.mak, modules.dep: Likewise.
* yasm.suo: Remove unneeded user options file.
* vc: Update svn:ignore property to reflect removal of VC6 builds and user
options file.
* genmacro.vcproj: Generate genmacro tool.
* genmacro/run.bat: Use genmacro to generate nasm-macros.c.
* modules.vcproj: Point to the new location for nasm-macros.c.
* re2c.vcproj: Generate re2c tool.
* re2c/run.bat: Use re2c to generate re2c-generated .c files.
* yasm.sln: Utilize genmacro and re2c.
svn path=/trunk/yasm/; revision=1144
20 years ago
|
|
|
static void SubStr_init_u(SubStr*, unsigned char*, unsigned int);
|
|
|
|
static SubStr *SubStr_new_u(unsigned char*, unsigned int);
|
|
|
|
|
* ins.h, scanner.h, dfa.h, code.c, re.h, parse.h, token.h, substr.h:
Remove use of "inline". This could cause breakage on non-gcc systems (as
these files do not use config.h because of cross-build reasons).
* yasm.dep, yasm.mak, yasm.dsp, yasm.dsw: Remove support for VC6 builds.
* libyasm.dsp, libyasm.mak, libyasm.dep: Likewise.
* modules.dsp, modules.mak, modules.dep: Likewise.
* yasm.suo: Remove unneeded user options file.
* vc: Update svn:ignore property to reflect removal of VC6 builds and user
options file.
* genmacro.vcproj: Generate genmacro tool.
* genmacro/run.bat: Use genmacro to generate nasm-macros.c.
* modules.vcproj: Point to the new location for nasm-macros.c.
* re2c.vcproj: Generate re2c tool.
* re2c/run.bat: Use re2c to generate re2c-generated .c files.
* yasm.sln: Utilize genmacro and re2c.
svn path=/trunk/yasm/; revision=1144
20 years ago
|
|
|
static void SubStr_init(SubStr*, char*, unsigned int);
|
|
|
|
static SubStr *SubStr_new(char*, unsigned int);
|
|
|
|
|
* ins.h, scanner.h, dfa.h, code.c, re.h, parse.h, token.h, substr.h:
Remove use of "inline". This could cause breakage on non-gcc systems (as
these files do not use config.h because of cross-build reasons).
* yasm.dep, yasm.mak, yasm.dsp, yasm.dsw: Remove support for VC6 builds.
* libyasm.dsp, libyasm.mak, libyasm.dep: Likewise.
* modules.dsp, modules.mak, modules.dep: Likewise.
* yasm.suo: Remove unneeded user options file.
* vc: Update svn:ignore property to reflect removal of VC6 builds and user
options file.
* genmacro.vcproj: Generate genmacro tool.
* genmacro/run.bat: Use genmacro to generate nasm-macros.c.
* modules.vcproj: Point to the new location for nasm-macros.c.
* re2c.vcproj: Generate re2c tool.
* re2c/run.bat: Use re2c to generate re2c-generated .c files.
* yasm.sln: Utilize genmacro and re2c.
svn path=/trunk/yasm/; revision=1144
20 years ago
|
|
|
static void SubStr_copy(SubStr*, const SubStr*);
|
|
|
|
static SubStr *SubStr_new_copy(const SubStr*);
|
|
|
|
|
|
|
|
void SubStr_out(const SubStr*, FILE *);
|
|
|
|
#define SubStr_delete(x) free(x)
|
|
|
|
|
|
|
|
typedef struct SubStr Str;
|
|
|
|
|
|
|
|
void Str_init(Str*, const SubStr*);
|
|
|
|
Str *Str_new(const SubStr*);
|
|
|
|
|
|
|
|
void Str_copy(Str*, Str*);
|
|
|
|
Str *Str_new_copy(Str*);
|
|
|
|
|
|
|
|
Str *Str_new_empty(void);
|
|
|
|
void Str_destroy(Str *);
|
|
|
|
void Str_delete(Str *);
|
|
|
|
|
* ins.h, scanner.h, dfa.h, code.c, re.h, parse.h, token.h, substr.h:
Remove use of "inline". This could cause breakage on non-gcc systems (as
these files do not use config.h because of cross-build reasons).
* yasm.dep, yasm.mak, yasm.dsp, yasm.dsw: Remove support for VC6 builds.
* libyasm.dsp, libyasm.mak, libyasm.dep: Likewise.
* modules.dsp, modules.mak, modules.dep: Likewise.
* yasm.suo: Remove unneeded user options file.
* vc: Update svn:ignore property to reflect removal of VC6 builds and user
options file.
* genmacro.vcproj: Generate genmacro tool.
* genmacro/run.bat: Use genmacro to generate nasm-macros.c.
* modules.vcproj: Point to the new location for nasm-macros.c.
* re2c.vcproj: Generate re2c tool.
* re2c/run.bat: Use re2c to generate re2c-generated .c files.
* yasm.sln: Utilize genmacro and re2c.
svn path=/trunk/yasm/; revision=1144
20 years ago
|
|
|
static void
|
|
|
|
SubStr_init_u(SubStr *r, unsigned char *s, unsigned int l)
|
|
|
|
{
|
|
|
|
r->str = (char*)s;
|
|
|
|
r->len = l;
|
|
|
|
}
|
|
|
|
|
* ins.h, scanner.h, dfa.h, code.c, re.h, parse.h, token.h, substr.h:
Remove use of "inline". This could cause breakage on non-gcc systems (as
these files do not use config.h because of cross-build reasons).
* yasm.dep, yasm.mak, yasm.dsp, yasm.dsw: Remove support for VC6 builds.
* libyasm.dsp, libyasm.mak, libyasm.dep: Likewise.
* modules.dsp, modules.mak, modules.dep: Likewise.
* yasm.suo: Remove unneeded user options file.
* vc: Update svn:ignore property to reflect removal of VC6 builds and user
options file.
* genmacro.vcproj: Generate genmacro tool.
* genmacro/run.bat: Use genmacro to generate nasm-macros.c.
* modules.vcproj: Point to the new location for nasm-macros.c.
* re2c.vcproj: Generate re2c tool.
* re2c/run.bat: Use re2c to generate re2c-generated .c files.
* yasm.sln: Utilize genmacro and re2c.
svn path=/trunk/yasm/; revision=1144
20 years ago
|
|
|
static SubStr *
|
|
|
|
SubStr_new_u(unsigned char *s, unsigned int l)
|
|
|
|
{
|
|
|
|
SubStr *r = malloc(sizeof(SubStr));
|
|
|
|
r->str = (char*)s;
|
|
|
|
r->len = l;
|
|
|
|
return r;
|
|
|
|
}
|
|
|
|
|
* ins.h, scanner.h, dfa.h, code.c, re.h, parse.h, token.h, substr.h:
Remove use of "inline". This could cause breakage on non-gcc systems (as
these files do not use config.h because of cross-build reasons).
* yasm.dep, yasm.mak, yasm.dsp, yasm.dsw: Remove support for VC6 builds.
* libyasm.dsp, libyasm.mak, libyasm.dep: Likewise.
* modules.dsp, modules.mak, modules.dep: Likewise.
* yasm.suo: Remove unneeded user options file.
* vc: Update svn:ignore property to reflect removal of VC6 builds and user
options file.
* genmacro.vcproj: Generate genmacro tool.
* genmacro/run.bat: Use genmacro to generate nasm-macros.c.
* modules.vcproj: Point to the new location for nasm-macros.c.
* re2c.vcproj: Generate re2c tool.
* re2c/run.bat: Use re2c to generate re2c-generated .c files.
* yasm.sln: Utilize genmacro and re2c.
svn path=/trunk/yasm/; revision=1144
20 years ago
|
|
|
static void
|
|
|
|
SubStr_init(SubStr *r, char *s, unsigned int l)
|
|
|
|
{
|
|
|
|
r->str = s;
|
|
|
|
r->len = l;
|
|
|
|
}
|
|
|
|
|
* ins.h, scanner.h, dfa.h, code.c, re.h, parse.h, token.h, substr.h:
Remove use of "inline". This could cause breakage on non-gcc systems (as
these files do not use config.h because of cross-build reasons).
* yasm.dep, yasm.mak, yasm.dsp, yasm.dsw: Remove support for VC6 builds.
* libyasm.dsp, libyasm.mak, libyasm.dep: Likewise.
* modules.dsp, modules.mak, modules.dep: Likewise.
* yasm.suo: Remove unneeded user options file.
* vc: Update svn:ignore property to reflect removal of VC6 builds and user
options file.
* genmacro.vcproj: Generate genmacro tool.
* genmacro/run.bat: Use genmacro to generate nasm-macros.c.
* modules.vcproj: Point to the new location for nasm-macros.c.
* re2c.vcproj: Generate re2c tool.
* re2c/run.bat: Use re2c to generate re2c-generated .c files.
* yasm.sln: Utilize genmacro and re2c.
svn path=/trunk/yasm/; revision=1144
20 years ago
|
|
|
static SubStr *
|
|
|
|
SubStr_new(char *s, unsigned int l)
|
|
|
|
{
|
|
|
|
SubStr *r = malloc(sizeof(SubStr));
|
|
|
|
r->str = s;
|
|
|
|
r->len = l;
|
|
|
|
return r;
|
|
|
|
}
|
|
|
|
|
* ins.h, scanner.h, dfa.h, code.c, re.h, parse.h, token.h, substr.h:
Remove use of "inline". This could cause breakage on non-gcc systems (as
these files do not use config.h because of cross-build reasons).
* yasm.dep, yasm.mak, yasm.dsp, yasm.dsw: Remove support for VC6 builds.
* libyasm.dsp, libyasm.mak, libyasm.dep: Likewise.
* modules.dsp, modules.mak, modules.dep: Likewise.
* yasm.suo: Remove unneeded user options file.
* vc: Update svn:ignore property to reflect removal of VC6 builds and user
options file.
* genmacro.vcproj: Generate genmacro tool.
* genmacro/run.bat: Use genmacro to generate nasm-macros.c.
* modules.vcproj: Point to the new location for nasm-macros.c.
* re2c.vcproj: Generate re2c tool.
* re2c/run.bat: Use re2c to generate re2c-generated .c files.
* yasm.sln: Utilize genmacro and re2c.
svn path=/trunk/yasm/; revision=1144
20 years ago
|
|
|
static void
|
|
|
|
SubStr_copy(SubStr *r, const SubStr *s)
|
|
|
|
{
|
|
|
|
r->str = s->str;
|
|
|
|
r->len = s->len;
|
|
|
|
}
|
|
|
|
|
* ins.h, scanner.h, dfa.h, code.c, re.h, parse.h, token.h, substr.h:
Remove use of "inline". This could cause breakage on non-gcc systems (as
these files do not use config.h because of cross-build reasons).
* yasm.dep, yasm.mak, yasm.dsp, yasm.dsw: Remove support for VC6 builds.
* libyasm.dsp, libyasm.mak, libyasm.dep: Likewise.
* modules.dsp, modules.mak, modules.dep: Likewise.
* yasm.suo: Remove unneeded user options file.
* vc: Update svn:ignore property to reflect removal of VC6 builds and user
options file.
* genmacro.vcproj: Generate genmacro tool.
* genmacro/run.bat: Use genmacro to generate nasm-macros.c.
* modules.vcproj: Point to the new location for nasm-macros.c.
* re2c.vcproj: Generate re2c tool.
* re2c/run.bat: Use re2c to generate re2c-generated .c files.
* yasm.sln: Utilize genmacro and re2c.
svn path=/trunk/yasm/; revision=1144
20 years ago
|
|
|
static SubStr *
|
|
|
|
SubStr_new_copy(const SubStr *s)
|
|
|
|
{
|
|
|
|
SubStr *r = malloc(sizeof(SubStr));
|
|
|
|
r->str = s->str;
|
|
|
|
r->len = s->len;
|
|
|
|
return r;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|