Added header comments (with AGPL3 license).

Pascal J. Bourguignon [2013-01-24 23:56]
Added header comments (with AGPL3 license).
Filename
Makefile
clang.lisp
lispify-clang
diff --git a/Makefile b/Makefile
index bc1950a..c017ed5 100644
--- a/Makefile
+++ b/Makefile
@@ -29,7 +29,7 @@ clang-raw.lisp:clang.i Makefile
 	< clang.lisp > clang-raw.lisp
 	rm clang.lisp

-clang.lisp:clang-raw.lisp Makefile lispify
+clang.lisp:clang-raw.lisp Makefile lispify-clang
 	./lispify-clang < clang-raw.lisp > clang.lisp

 clean:
diff --git a/clang.lisp b/clang.lisp
index b253180..9bbc84e 100644
--- a/clang.lisp
+++ b/clang.lisp
@@ -1,6 +1,43 @@
-;;;; -*- mode:lisp; coding:utf-8 -*-
+;;;; -*- mode:lisp;coding:utf-8 -*-
+;;;;**************************************************************************
+;;;;FILE:               clang.lisp
+;;;;LANGUAGE:           Common-Lisp
+;;;;SYSTEM:             Common-Lisp
+;;;;USER-INTERFACE:     NONE
+;;;;DESCRIPTION
+;;;;
+;;;;    Defines a lisp API over clang cindex library.
+;;;;    Generated by swig -cffi and then postprocessed.
+;;;;
+;;;;    DO NOT EDIT!  THE SOURCES ARE:
+;;;;    clang.i, lispify-clang, and Makefile.
+;;;;
+;;;;AUTHORS
+;;;;    <PJB> Pascal J. Bourguignon <pjb@informatimago.com>
+;;;;MODIFICATIONS
+;;;;    2013-01-25 <PJB> Created.
+;;;;BUGS
+;;;;LEGAL
+;;;;    AGPL3
+;;;;
+;;;;    Copyright Pascal J. Bourguignon 2013 - 2013
+;;;;
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
+;;;;
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
+;;;;
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+;;;;**************************************************************************


+(IN-PACKAGE "COMMON-LISP-USER")
 (DEFPACKAGE "COM.OGAMITA.CLANG" (:USE)
  (:EXPORT "BLOCK-COMMAND-COMMENT-GET-ARG-TEXT" "CALLING-CONV" "LOAD-DIAG-ERROR"
   "INCLUSION-VISITOR" "GETTER" "TOGGLE-CRASH-RECOVERY" "DIAGNOSTIC" "BASES"
@@ -147,6 +184,12 @@
   "IDX-ATTR-KIND" "CURSOR-GET-ARGUMENT" "STARTED-TRANSLATION-UNIT"
   "CODE-COMPLETE-GET-DIAGNOSTIC" "TRANSLATION-UNIT-FLAGS"
   "GET-DECL-OBJ-CTYPE-ENCODING" "IDX-CONTAINER-INFO" "IS-CONTAINER"))
+;;; This file was automatically generated by SWIG (http://www.swig.org).
+;;; Version 2.0.10
+;;;
+;;; Do not make changes to this file unless you know what you are doing--modify
+;;; the SWIG interface file instead.
+
 (DEFMACRO DEFANONENUM (&BODY ENUMS) "Converts anonymous enums to defconstants."
  `(PROGN
    ,@(LOOP FOR VALUE IN ENUMS FOR INDEX = 0 THEN (1+ INDEX) WHEN (LISTP VALUE)
diff --git a/lispify-clang b/lispify-clang
index 2888ebb..f2ddf43 100755
--- a/lispify-clang
+++ b/lispify-clang
@@ -1,5 +1,43 @@
 #!/usr/bin/clisp -ansi -norc -q -E iso-8859-1
-;; -*- mode:lisp;coding:iso-8859-1 -*-
+;;;; -*- mode:lisp;coding:utf-8 -*-
+;;;;**************************************************************************
+;;;;FILE:               lispify-clang
+;;;;LANGUAGE:           Common-Lisp
+;;;;SYSTEM:             Common-Lisp
+;;;;USER-INTERFACE:     NONE
+;;;;DESCRIPTION
+;;;;
+;;;;    Processes the output of swig -cffi clang.i to produce the
+;;;;    clang.lisp package source.
+;;;;
+;;;;AUTHORS
+;;;;    <PJB> Pascal J. Bourguignon <pjb@informatimago.com>
+;;;;MODIFICATIONS
+;;;;    2013-01-25 <PJB> Created.
+;;;;BUGS
+;;;;LEGAL
+;;;;    AGPL3
+;;;;
+;;;;    Copyright Pascal J. Bourguignon 2013 - 2013
+;;;;
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
+;;;;
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
+;;;;
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+;;;;**************************************************************************
+
+(defparameter *clang-package-name* "COM.OGAMITA.CLANG")
+(make-package *clang-package-name* :use '())
+
+
 (setf *print-right-margin* 80
       *print-pretty* t
       *print-case* :upcase)
@@ -87,8 +125,6 @@ RETURN: A tree congruent to the TREES, each node being the result of
    "WITH-POINTER-TO-VECTOR-DATA" ))


-(defparameter *clang-package-name* "COM.OGAMITA.CLANG")
-(make-package "COM.OGAMITA.CLANG" :use '())



@@ -157,8 +193,6 @@ RETURN: A tree congruent to the TREES, each node being the result of



-;; lispify symbols
-;; export symbols from com.ogamita.clang

 (defun lispify (atom)
   (gethash atom *lispified* atom))
@@ -221,21 +255,61 @@ RETURN: A tree congruent to the TREES, each node being the result of
                                    (push symbol syms))))
 (export *clang-exports* *clang-package-name*)

-(format t ";;;; -*- mode:lisp; coding:utf-8 -*-~2%")
-
-(pprint
- `(defpackage ,*clang-package-name*
-    (:use)
-    (:export ,@(mapcar (function symbol-name) *clang-exports*))))
+(princ ";;;; -*- mode:lisp;coding:utf-8 -*-
+;;;;**************************************************************************
+;;;;FILE:               clang.lisp
+;;;;LANGUAGE:           Common-Lisp
+;;;;SYSTEM:             Common-Lisp
+;;;;USER-INTERFACE:     NONE
+;;;;DESCRIPTION
+;;;;
+;;;;    Defines a lisp API over clang cindex library.
+;;;;    Generated by swig -cffi and then postprocessed.
+;;;;
+;;;;    DO NOT EDIT!  THE SOURCES ARE:
+;;;;    clang.i, lispify-clang, and Makefile.
+;;;;
+;;;;AUTHORS
+;;;;    <PJB> Pascal J. Bourguignon <pjb@informatimago.com>
+;;;;MODIFICATIONS
+;;;;    2013-01-25 <PJB> Created.
+;;;;BUGS
+;;;;LEGAL
+;;;;    AGPL3
+;;;;
+;;;;    Copyright Pascal J. Bourguignon 2013 - 2013
+;;;;
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
+;;;;
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
+;;;;
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+;;;;**************************************************************************
+
+")
+
+(pprint `(in-package "COMMON-LISP-USER"))
+(pprint `(defpackage ,*clang-package-name*
+           (:use)
+           (:export ,@(mapcar (function symbol-name) *clang-exports*))))
+
+(princ "
+;;; This file was automatically generated by SWIG (http://www.swig.org).
+;;; Version 2.0.10
+;;;
+;;; Do not make changes to this file unless you know what you are doing--modify
+;;; the SWIG interface file instead.
+")

 (dolist (sexp *sexps*)
   (pprint sexp))

 (ext:exit 0)
-
-
-#|
-sed	-e 1i\\ -e '(in-package "COM.OGAMITA.CLANG")' \
-	-e 's/(cl:defconstant CINDEX_VERSION .*)/(cl:defconstant CINDEX_VERSION (cl:+ (cl:* CINDEX_VERSION_MAJOR 10000) (cl:* CINDEX_VERSION_MINOR 1)))/' \
-	-e 's/#\.(cl:logior CXGlobalOpt_ThreadBackgroundPriorityForIndexing CXGlobalOpt_ThreadBackgroundPriorityForEditing)/3/' \
-|#
+;;;; THE END ;;;;
ViewGit