qemacs-commit
[Top][All Lists]
Advanced

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

[Qemacs-commit] qemacs clang.c


From: Charlie Gordon
Subject: [Qemacs-commit] qemacs clang.c
Date: Mon, 10 Dec 2007 11:03:36 +0000

CVSROOT:        /cvsroot/qemacs
Module name:    qemacs
Changes by:     Charlie Gordon <chqrlie>        07/12/10 11:03:36

Modified files:
        .              : clang.c 

Log message:
        added missing C keywords and types

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/clang.c?cvsroot=qemacs&r1=1.10&r2=1.11

Patches:
Index: clang.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/clang.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- clang.c     9 Dec 2007 23:31:38 -0000       1.10
+++ clang.c     10 Dec 2007 11:03:36 -0000      1.11
@@ -21,12 +21,14 @@
 #include "qe.h"
 
 static const char c_keywords[] = 
-"|auto|break|case|const|continue|do|else|enum|extern|for|goto|"
-"if|register|return|static|struct|switch|typedef|union|volatile|while|";
+    "|auto|break|case|const|continue|default|do|else|enum|extern|for|goto|"
+    "if|inline|register|restrict|return|sizeof|static|struct|switch|"
+    "typedef|union|volatile|while|";
 
 /* NOTE: 'var' is added for javascript */
 static const char c_types[] = 
-"|char|double|float|int|long|unsigned|short|signed|void|var|";
+    "|char|double|float|int|long|unsigned|short|signed|void|var|"
+    "_Bool|_Complex|_Imaginary";
 
 static int get_c_keyword(char *buf, int buf_size, unsigned int **pp)
 {
@@ -171,7 +173,8 @@
                 if (strfind(c_keywords, kbuf, 0)) {
                     set_color(p_start, p1 - p_start, QE_STYLE_KEYWORD);
                 } else
-                if (strfind(c_types, kbuf, 0)) {
+                if (strfind(c_types, kbuf, 0)
+                ||  (l > 2 && kbuf[l - 2] == '_' && kbuf[l - 1] == 't')) {
                     /* c type */
                     /* if not cast, assume type declaration */
                     if (*p != ')') {




reply via email to

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