~ubuntu-branches/ubuntu/wily/clamav/wily-proposed

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/utils/emacs/tablegen-mode.el

  • Committer: Package Import Robot
  • Author(s): Scott Kitterman, Sebastian Andrzej Siewior, Andreas Cadhalpun, Scott Kitterman, Javier Fernández-Sanguino
  • Date: 2015-01-28 00:25:13 UTC
  • mfrom: (0.48.14 sid)
  • Revision ID: package-import@ubuntu.com-20150128002513-lil2oi74cooy4lzr
Tags: 0.98.6+dfsg-1
[ Sebastian Andrzej Siewior ]
* update "fix-ssize_t-size_t-off_t-printf-modifier", include of misc.h was
  missing but was pulled in via the systemd patch.
* Don't leak return codes from libmspack to clamav API. (Closes: #774686).

[ Andreas Cadhalpun ]
* Add patch to avoid emitting incremental progress messages when not
  outputting to a terminal. (Closes: #767350)
* Update lintian-overrides for unused-file-paragraph-in-dep5-copyright.
* clamav-base.postinst: always chown /var/log/clamav and /var/lib/clamav
  to clamav:clamav, not only on fresh installations. (Closes: #775400)
* Adapt the clamav-daemon and clamav-freshclam logrotate scripts,
  so that they correctly work under systemd.
* Move the PidFile variable from the clamd/freshclam configuration files
  to the init scripts. This makes the init scripts more robust against
  misconfiguration and avoids error messages with systemd. (Closes: #767353)
* debian/copyright: drop files from Files-Excluded only present in github
  tarballs
* Drop Workaround-a-bug-in-libc-on-Hurd.patch, because hurd got fixed.
  (see #752237)
* debian/rules: Remove useless --with-system-tommath --without-included-ltdl
  configure options.

[ Scott Kitterman ]
* Stop stripping llvm when repacking the tarball as the system llvm on some
  releases is too old to use
* New upstream bugfix release
  - Library shared object revisions.
  - Includes a patch from Sebastian Andrzej Siewior making ClamAV pid files
    compatible with systemd.
  - Fix a heap out of bounds condition with crafted Yoda's crypter files.
    This issue was discovered by Felix Groebert of the Google Security Team.
  - Fix a heap out of bounds condition with crafted mew packer files. This
    issue was discovered by Felix Groebert of the Google Security Team.
  - Fix a heap out of bounds condition with crafted upx packer files. This
    issue was discovered by Kevin Szkudlapski of Quarkslab.
  - Fix a heap out of bounds condition with crafted upack packer files. This
    issue was discovered by Sebastian Andrzej Siewior. CVE-2014-9328.
  - Compensate a crash due to incorrect compiler optimization when handling
    crafted petite packer files. This issue was discovered by Sebastian
    Andrzej Siewior.
* Update lintian override for embedded zlib to match new so version

[ Javier Fernández-Sanguino ]
* Updated Spanish Debconf template translation (Closes: #773563)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
;; Maintainer:  The LLVM team, http://llvm.org/
 
2
;; Description: Major mode for TableGen description files (part of LLVM project)
 
3
;; Updated:     2007-12-18
 
4
 
 
5
(require 'comint)
 
6
(require 'custom)
 
7
(require 'ansi-color)
 
8
 
 
9
;; Create mode-specific tables.
 
10
(defvar td-decorators-face 'td-decorators-face
 
11
  "Face method decorators.")
 
12
(make-face 'td-decorators-face)
 
13
 
 
14
(defvar tablegen-font-lock-keywords
 
15
  (let ((kw (mapconcat 'identity
 
16
                       '("class" "defm" "def" "field" "include" "in"
 
17
                         "let" "multiclass")
 
18
                       "\\|"))
 
19
        (type-kw (mapconcat 'identity
 
20
                            '("bit" "bits" "code" "dag" "int" "list" "string")
 
21
                            "\\|"))
 
22
        )
 
23
    (list
 
24
     ;; Comments
 
25
;;     '("\/\/" . font-lock-comment-face)
 
26
     ;; Strings
 
27
     '("\"[^\"]+\"" . font-lock-string-face)
 
28
     ;; Hex constants
 
29
     '("\\<0x[0-9A-Fa-f]+\\>" . font-lock-preprocessor-face)
 
30
     ;; Binary constants
 
31
     '("\\<0b[01]+\\>" . font-lock-preprocessor-face)
 
32
     ;; Integer literals
 
33
     '("\\<[-]?[0-9]+\\>" . font-lock-preprocessor-face)
 
34
     ;; Floating point constants
 
35
     '("\\<[-+]?[0-9]+\.[0-9]*\([eE][-+]?[0-9]+\)?\\>" . font-lock-preprocessor-face)
 
36
 
 
37
     '("^[ \t]*\\(@.+\\)" 1 'td-decorators-face)
 
38
     ;; Keywords
 
39
     (cons (concat "\\<\\(" kw "\\)\\>[ \n\t(]") 1)
 
40
 
 
41
     ;; Type keywords
 
42
     (cons (concat "\\<\\(" type-kw "\\)[ \n\t(]") 1)
 
43
     ))
 
44
  "Additional expressions to highlight in TableGen mode.")
 
45
(put 'tablegen-mode 'font-lock-defaults '(tablegen-font-lock-keywords))
 
46
 
 
47
;; ---------------------- Syntax table ---------------------------
 
48
;; Shamelessly ripped from jasmin.el
 
49
;; URL: http://www.neilvandyke.org/jasmin-emacs/jasmin.el
 
50
 
 
51
(defvar tablegen-mode-syntax-table nil
 
52
  "Syntax table used in `tablegen-mode' buffers.")
 
53
(when (not tablegen-mode-syntax-table)
 
54
  (setq tablegen-mode-syntax-table (make-syntax-table))
 
55
  ;; whitespace (` ')
 
56
  (modify-syntax-entry ?\   " "      tablegen-mode-syntax-table)
 
57
  (modify-syntax-entry ?\t  " "      tablegen-mode-syntax-table)
 
58
  (modify-syntax-entry ?\r  " "      tablegen-mode-syntax-table)
 
59
  (modify-syntax-entry ?\n  " "      tablegen-mode-syntax-table)
 
60
  (modify-syntax-entry ?\f  " "      tablegen-mode-syntax-table)
 
61
  ;; word constituents (`w')
 
62
  (modify-syntax-entry ?\%  "w"      tablegen-mode-syntax-table)
 
63
  (modify-syntax-entry ?\_  "w"      tablegen-mode-syntax-table)
 
64
  ;; comments
 
65
  (modify-syntax-entry ?/   ". 124b" tablegen-mode-syntax-table)
 
66
  (modify-syntax-entry ?*   ". 23"   tablegen-mode-syntax-table)
 
67
  (modify-syntax-entry ?\n  "> b"    tablegen-mode-syntax-table)
 
68
  ;; open paren (`(')
 
69
  (modify-syntax-entry ?\(  "("      tablegen-mode-syntax-table)
 
70
  (modify-syntax-entry ?\[  "("      tablegen-mode-syntax-table)
 
71
  (modify-syntax-entry ?\{  "("      tablegen-mode-syntax-table)
 
72
  (modify-syntax-entry ?\<  "("      tablegen-mode-syntax-table)
 
73
  ;; close paren (`)')
 
74
  (modify-syntax-entry ?\)  ")"      tablegen-mode-syntax-table)
 
75
  (modify-syntax-entry ?\]  ")"      tablegen-mode-syntax-table)
 
76
  (modify-syntax-entry ?\}  ")"      tablegen-mode-syntax-table)
 
77
  (modify-syntax-entry ?\>  ")"      tablegen-mode-syntax-table)
 
78
  ;; string quote ('"')
 
79
  (modify-syntax-entry ?\"  "\""     tablegen-mode-syntax-table)
 
80
  )
 
81
 
 
82
;; --------------------- Abbrev table -----------------------------
 
83
 
 
84
(defvar tablegen-mode-abbrev-table nil
 
85
  "Abbrev table used while in TableGen mode.")
 
86
(define-abbrev-table 'tablegen-mode-abbrev-table ())
 
87
 
 
88
(defvar tablegen-mode-hook nil)
 
89
(defvar tablegen-mode-map nil)   ; Create a mode-specific keymap.
 
90
 
 
91
(if (not tablegen-mode-map)
 
92
    ()  ; Do not change the keymap if it is already set up.
 
93
  (setq tablegen-mode-map (make-sparse-keymap))
 
94
  (define-key tablegen-mode-map "\t"  'tab-to-tab-stop)
 
95
  (define-key tablegen-mode-map "\es" 'center-line)
 
96
  (define-key tablegen-mode-map "\eS" 'center-paragraph))
 
97
 
 
98
(defun tablegen-mode ()
 
99
  "Major mode for editing TableGen description files.
 
100
  \\{tablegen-mode-map}
 
101
  Runs tablegen-mode-hook on startup."
 
102
  (interactive)
 
103
  (kill-all-local-variables)
 
104
  (use-local-map tablegen-mode-map)      ; Provides the local keymap.
 
105
  (make-local-variable 'font-lock-defaults)
 
106
  (setq major-mode 'tablegen-mode        ; This is how describe-mode
 
107
                                         ;   finds the doc string to print.
 
108
        mode-name             "TableGen" ; This name goes into the modeline.
 
109
        local-abbrev-table    tablegen-mode-abbrev-table
 
110
        font-lock-defaults    `(tablegen-font-lock-keywords)
 
111
        require-final-newline t
 
112
        )
 
113
 
 
114
  (set-syntax-table tablegen-mode-syntax-table)
 
115
  (make-local-variable 'comment-start)
 
116
  (setq comment-start "//")
 
117
  (run-hooks 'tablegen-mode-hook))       ; Finally, this permits the user to
 
118
                                         ;   customize the mode with a hook.
 
119
 
 
120
;; Associate .td files with tablegen-mode
 
121
(setq auto-mode-alist (append '(("\\.td$" . tablegen-mode)) auto-mode-alist))
 
122
 
 
123
(provide 'tablegen-mode)
 
124
;; end of tablegen-mode.el