mirror of
https://github.com/jeremysrand/md2teach.git
synced 2024-12-26 21:32:12 +00:00
Add a few files for the resources of a babel fish translator. Code to come.
This commit is contained in:
parent
ff039e5ee0
commit
c361a9c311
@ -42,6 +42,9 @@
|
||||
/* Begin PBXFileReference section */
|
||||
9D406AA12644E8CF00747EE9 /* Makefile */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
|
||||
9D406AB12644EB6500747EE9 /* babelfish.mk */ = {isa = PBXFileReference; lastKnownFileType = text; path = babelfish.mk; sourceTree = "<group>"; };
|
||||
9D406AC4264A2AD400747EE9 /* babelfish_defs.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = babelfish_defs.h; sourceTree = "<group>"; };
|
||||
9D406ACB264A2B5800747EE9 /* babelfish_rez.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = babelfish_rez.h; sourceTree = "<group>"; };
|
||||
9D406ACD264A2BD300747EE9 /* markdown.rez */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.rez; path = markdown.rez; sourceTree = "<group>"; };
|
||||
9D6532E42626240800105D50 /* md2teach */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = md2teach; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
9D6532EA2626240800105D50 /* doNotBuild */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = doNotBuild; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
9D6532EC2626240800105D50 /* main.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = "<group>"; };
|
||||
@ -102,6 +105,9 @@
|
||||
9D406AB02644EB4E00747EE9 /* babelfish */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9D406AC4264A2AD400747EE9 /* babelfish_defs.h */,
|
||||
9D406ACB264A2B5800747EE9 /* babelfish_rez.h */,
|
||||
9D406ACD264A2BD300747EE9 /* markdown.rez */,
|
||||
);
|
||||
path = babelfish;
|
||||
sourceTree = "<group>";
|
||||
|
45
md2teach/babelfish/babelfish_defs.h
Normal file
45
md2teach/babelfish/babelfish_defs.h
Normal file
@ -0,0 +1,45 @@
|
||||
/*
|
||||
* babelfish_defs.h
|
||||
* md2teach
|
||||
*
|
||||
* Created by Jeremy Rand on 2021-05-10.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _GUARD_PROJECTmd2teach_FILEbabelfish_defs_
|
||||
#define _GUARD_PROJECTmd2teach_FILEbabelfish_defs_
|
||||
|
||||
#define rTrData 0x5472
|
||||
|
||||
// Flags
|
||||
#define bf320 0x0001
|
||||
#define bf640 0x0002
|
||||
#define bfCanImport 0x0001
|
||||
#define bfCanExport 0x0001
|
||||
#define bfImportOptions 0x0002
|
||||
#define bfExportOptions 0x0002
|
||||
|
||||
//Translator IDs
|
||||
#define TrVersion 0x0001 //rVersion
|
||||
#define TrAbout 0x0001 //rComment
|
||||
#define TrCantLauch 0x0002
|
||||
|
||||
#define TrData 0x0001 //rTrData
|
||||
|
||||
#define TrInit 0x0001 //rCodeResource
|
||||
#define TrImportOptions 0x0002 //rCodeResource
|
||||
#define TrExportOptions 0x0003
|
||||
#define TrFilter 0x0004
|
||||
|
||||
#define TrImportInfo 0x0002 //rText
|
||||
#define TrExportInfo 0x0003 //rText
|
||||
|
||||
#define TrFormatNone 0x0000
|
||||
#define TrFormatText 0x0001
|
||||
#define TrFormatPixelMap 0x0002
|
||||
#define TrFormatTrueColorImage 0x0003
|
||||
#define TrFormatQD2Picture 0x0004
|
||||
#define TrFormatFont 0x0005
|
||||
#define TrFormatSound 0x0006
|
||||
|
||||
#endif /* define _GUARD_PROJECTmd2teach_FILEbabelfish_defs_ */
|
30
md2teach/babelfish/babelfish_rez.h
Normal file
30
md2teach/babelfish/babelfish_rez.h
Normal file
@ -0,0 +1,30 @@
|
||||
/*
|
||||
* babelfish_rez.h
|
||||
* md2teach
|
||||
*
|
||||
* Created by Jeremy Rand on 2021-05-10.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _GUARD_PROJECTmd2teach_FILEbabelfish_rez_
|
||||
#define _GUARD_PROJECTmd2teach_FILEbabelfish_rez_
|
||||
|
||||
|
||||
type rTrData
|
||||
{
|
||||
_mybase_ integer = 0; //revision
|
||||
_mybase_ integer; //general flags
|
||||
_mybase_ integer; //Import Flags
|
||||
array[8]
|
||||
{
|
||||
hex byte; //Import Kinds
|
||||
};
|
||||
_mybase_ integer; //Export Flags
|
||||
array[8]
|
||||
{
|
||||
hex byte; //Export Kinds
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
#endif /* define _GUARD_PROJECTmd2teach_FILEbabelfish_rez_ */
|
54
md2teach/babelfish/markdown.rez
Normal file
54
md2teach/babelfish/markdown.rez
Normal file
@ -0,0 +1,54 @@
|
||||
/*
|
||||
* markdown.rez
|
||||
* md2teach
|
||||
*
|
||||
* Created by Jeremy Rand on 2021-05-10.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "types.rez"
|
||||
#include "babelfish_defs.h"
|
||||
#include "babelfish_rez.h"
|
||||
|
||||
|
||||
resource rVersion(TrVersion)
|
||||
{
|
||||
{
|
||||
0, /* Major version number in BCD */
|
||||
1, /* Minor version number in BCD */
|
||||
0, /* Bug version number in BCD */
|
||||
beta, /* Development phase */
|
||||
0 /* Release number */
|
||||
},
|
||||
verUS,
|
||||
"Markdown Translator",
|
||||
"by Jeremy Rand\nCopyright 2021 Jeremy Rand"
|
||||
};
|
||||
|
||||
|
||||
resource rComment(TrAbout)
|
||||
{
|
||||
"Markdown BabelFish translator"
|
||||
};
|
||||
|
||||
|
||||
resource rTrData(TrData)
|
||||
{
|
||||
bf320+bf640,
|
||||
bfCanImport,
|
||||
{TrFormatText,0,0,0,0,0,0,0},
|
||||
0,
|
||||
{0,0,0,0,0,0,0,0}
|
||||
};
|
||||
|
||||
|
||||
read rCodeResource(TrFilter, locked, convert) "filter_code";
|
||||
read rCodeResource(TrInit, locked, convert) "init_code";
|
||||
|
||||
|
||||
resource rText(TrImportInfo)
|
||||
{
|
||||
"Import markdown files.\n\n"
|
||||
"by Jeremy Rand."
|
||||
};
|
Loading…
Reference in New Issue
Block a user