guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sample FSPEC file


From: Thien-Thi Nguyen
Subject: sample FSPEC file
Date: Tue, 04 Nov 2003 03:18:13 +0100

to play, save to init.fspec, and do:

  fspec2c -n init.fspec
  fpsec2c    init.fspec

the first invocation shows the gperf input (fspec2c stops before
actually sending it to gperf).  the second does the whole process.
you need a gperf that supports "--output-file" and the SDL headers
installed somewhere (typically /usr/include/SDL/*.h).

thi


________________________________________
;;; init.fspec --- init flags

(
 #:infile
 "SDL/SDL.h"

 #:regexp
 "^#define *\([A-Z_]+\)[ \t]+\(0x[0-9A-Fa-f]+\)"

 #:key-match-num
 1

 #:struct
 ((1 char * name)        ; see "(gperf)User-supplied Struct"
  (2 unsigned long cval)
  (#f SCM sname)
  (#f SCM sval))

 #:struct-name
 "woohoo"

 #:gperf-options
 "-L ANSI-C"

 #:pre-boilerplate
 #{
#include <assert.h>
#include "modsup.h"
  }#

 #:post-boilerplate
 #{/* this is a random C-ish comment */}#
)

;; Local variables:
;; mode: scheme
;; End:

;;; init.fspec ends here




reply via email to

[Prev in Thread] Current Thread [Next in Thread]