]> git.eshelyaron.com Git - emacs.git/commitdiff
etc/srecode/c.srt: New file, contents from cpp.srt
authorEric Ludlam <zappo@gnu.org>
Thu, 13 Sep 2012 01:38:12 +0000 (21:38 -0400)
committerEdward John Steere <edward.steere@gmail.com>
Wed, 25 Jan 2017 17:43:15 +0000 (19:43 +0200)
etc/srecode/cpp.srt: Delete parts moved to c.srt

lisp/cedet/ede.el:
(ede-configuration-forms-menu): Make robust to cases where there is no
current project.

lisp/cedet/srecode/cpp.el:
(srecode-semantic-handle-:c): Renamed from the srecode-semantic-handle-:cpp.
(srecode-semantic-handle-:cpp): Calls above.
(c-mode::srecode-semantic-apply-tag-to-dict): Moved from a cpp-mode
function to a c-mode function.  Note this in doc.
(srecode-c-apply-templates): Renamed from srecode-cpp-apply-templates

tests/cit-cpp.el:
(cit-plain-c-tags): New variable
(cit-srecode-fill-cpp): Insert above into a new file as part of a new program.

test/manual/cedet/cit-cpp.el

index 4ad7c1c01bdacf01c6288b5e77925baab995ba49..c0ae360966b377f70ed484577a77ded713085428 100644 (file)
@@ -1,6 +1,6 @@
 ;;; cit-cpp.el --- C++ specific things for our integ test.
 
-;; Copyright (C) 2008, 2009, 2010 Eric M. Ludlam
+;; Copyright (C) 2008, 2009, 2010, 2012 Eric M. Ludlam
 
 ;; Author: Eric M. Ludlam <eric@siege-engine.com>
 
@@ -22,6 +22,7 @@
 ;;; Commentary:
 ;;
 ;; C++ specific code for the cedet integration tests.
+;; Add some C code too!
 
 ;;; Code:
 
    )
   "Tags to be inserted into a source file.")
 
+(defvar cit-plain-c-tags
+  (list
+   (semantic-tag-new-include "string.h" nil)
+   (semantic-tag-new-function
+    "main" "int"
+    (list (semantic-tag-new-variable "argc" "int")
+         (semantic-tag-new-variable "argv" "char"
+                                    nil
+                                    :pointer 2 ))
+    :code "   int myInt = 0;
+   char *myStr = strdup(\"MOOSE\");
+")
+   )
+  "Tags to be inserted into plain.c.")
+
 (defvar cit-main-cpp-tags
   (list
    (semantic-tag-new-include "foo.hpp" nil)
@@ -149,6 +165,11 @@ MAKE-TYPE is the type of make process to use."
   ;; 1 e) Tell EDE where the srcs are
   (ede-add-file "Prog")
 
+  ;; Have some plain C code too to test the C code generator
+  (cit-srecode-fill-with-stuff "src/plain.c" cit-plain-c-tags)
+  (ede-new-target "Plain" "program" "n")
+  (ede-add-file "Plain")
+
   (let ((p (ede-current-project)))
     (if (string= make-type "Automake")
        (oset p :variables '( ( "AM_CPPFLAGS" . "-I../include") ))