From c7d035ae1a729232579a0fe41ed5affa131d3623 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 20 Feb 2017 00:05:27 -0800 Subject: Import Upstream version 5d9 --- inc2scm | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'inc2scm') diff --git a/inc2scm b/inc2scm index 5037e2c..951104b 100755 --- a/inc2scm +++ b/inc2scm @@ -43,11 +43,13 @@ ;;;; "inc2scm", Convert numeric C #defines to Scheme definitions. ;;; Author: Aubrey Jaffer. -(define (go-script) - (cond ((< 1 (- (length *argv*) *optind*)) - (apply inc2scm (list-tail *argv* *optind*))) - (else - (display "\ +(define (inc2scm.script args) + (cond ((< 1 (length args)) + (apply scm<-usr/includes args)) + (else (inc2scm.usage)))) + +(define (inc2scm.usage) + (display "\ \ Usage: inc2scm defines.scm [pre:] [/usr/include/] file1.h file2.h ... \ @@ -57,9 +59,11 @@ Usage: inc2scm defines.scm [pre:] [/usr/include/] file1.h file2.h ... PRE: is prepended to those scheme names lacking a prefix. /USR/INCLUDE/ defaults to /usr/include/. + +http://swissnet.ai.mit.edu/~jaffer/SCM " - (current-error-port)) - (exit #f)))) + (current-error-port)) + #f) (require 'string-search) (require 'printf) @@ -172,7 +176,6 @@ Usage: inc2scm defines.scm [pre:] [/usr/include/] file1.h file2.h ... (apply scm<-includes scmname pre include-path filenames) (delete-file "tmpprog.c") (delete-file "tmpprog")) -(define inc2scm scm<-usr/includes) (define (scm<-h* scmname . filenames) (define pre (let ((first (car filenames))) @@ -183,8 +186,7 @@ Usage: inc2scm defines.scm [pre:] [/usr/include/] file1.h file2.h ... (delete-file "tmpprog")) (define h2scm scm<-h*) -(go-script) - ;;; Local Variables: ;;; mode:scheme ;;; End: +(exit (inc2scm.script (list-tail *argv* *optind*))) -- cgit v1.2.3