As an example of how easy Engrave is to work with, the following example will read in either an EDC file or an EET file and attempt to write out an EET and EDC version of the given file.
#include "Engrave.h" int main(int argc, char ** argv) { Engrave_File *ef = NULL; if (argc < 2) { printf("need file\n"); return 1; } if (strstr(argv[1], ".eet")) ef = engrave_load_eet(argv[1]); else { if (argc < 4) { printf("need img and font dirs with .edc file\n"); return 1; } ef = engrave_load_edc(argv[1], argv[2], argv[3]); } if (!engrave_eet_output(ef, "test.eet")) printf("failed to write test.eet\n"); if (!engrave_edc_output(ef, "test.out")) printf("failed to write test.out\n"); return 0; }
Compiling with the Engrave library is pretty simple, assuming you've named your app engrave_test.c the following command will do the trick:
gcc -o engrave_test `engrave-config --cflags --libs` engrave_test.c
If you have any questions or comments about Engrave please email dj2 <zero@perplexity.org> or Rephorm <rephorm@rephorm.com>