summaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to 'misc')
-rw-r--r--misc/afl-fuzz-tokens/kw_build1
-rw-r--r--misc/afl-fuzz-tokens/kw_default1
-rw-r--r--misc/afl-fuzz-tokens/kw_include1
-rw-r--r--misc/afl-fuzz-tokens/kw_pool1
-rw-r--r--misc/afl-fuzz-tokens/kw_rule1
-rw-r--r--misc/afl-fuzz-tokens/kw_subninja1
-rw-r--r--misc/afl-fuzz-tokens/misc_a1
-rw-r--r--misc/afl-fuzz-tokens/misc_b1
-rw-r--r--misc/afl-fuzz-tokens/misc_colon1
-rw-r--r--misc/afl-fuzz-tokens/misc_cont1
-rw-r--r--misc/afl-fuzz-tokens/misc_dollar1
-rw-r--r--misc/afl-fuzz-tokens/misc_eq1
-rw-r--r--misc/afl-fuzz-tokens/misc_indent1
-rw-r--r--misc/afl-fuzz-tokens/misc_pipe1
-rw-r--r--misc/afl-fuzz-tokens/misc_pipepipe1
-rw-r--r--misc/afl-fuzz-tokens/misc_space1
-rw-r--r--misc/afl-fuzz/build.ninja5
-rw-r--r--misc/ninja-mode.el43
-rw-r--r--misc/zsh-completion2
19 files changed, 43 insertions, 23 deletions
diff --git a/misc/afl-fuzz-tokens/kw_build b/misc/afl-fuzz-tokens/kw_build
new file mode 100644
index 0000000..c795b05
--- /dev/null
+++ b/misc/afl-fuzz-tokens/kw_build
@@ -0,0 +1 @@
+build \ No newline at end of file
diff --git a/misc/afl-fuzz-tokens/kw_default b/misc/afl-fuzz-tokens/kw_default
new file mode 100644
index 0000000..331d858
--- /dev/null
+++ b/misc/afl-fuzz-tokens/kw_default
@@ -0,0 +1 @@
+default \ No newline at end of file
diff --git a/misc/afl-fuzz-tokens/kw_include b/misc/afl-fuzz-tokens/kw_include
new file mode 100644
index 0000000..2996fba
--- /dev/null
+++ b/misc/afl-fuzz-tokens/kw_include
@@ -0,0 +1 @@
+include \ No newline at end of file
diff --git a/misc/afl-fuzz-tokens/kw_pool b/misc/afl-fuzz-tokens/kw_pool
new file mode 100644
index 0000000..e783591
--- /dev/null
+++ b/misc/afl-fuzz-tokens/kw_pool
@@ -0,0 +1 @@
+pool \ No newline at end of file
diff --git a/misc/afl-fuzz-tokens/kw_rule b/misc/afl-fuzz-tokens/kw_rule
new file mode 100644
index 0000000..841e840
--- /dev/null
+++ b/misc/afl-fuzz-tokens/kw_rule
@@ -0,0 +1 @@
+rule \ No newline at end of file
diff --git a/misc/afl-fuzz-tokens/kw_subninja b/misc/afl-fuzz-tokens/kw_subninja
new file mode 100644
index 0000000..c4fe0c7
--- /dev/null
+++ b/misc/afl-fuzz-tokens/kw_subninja
@@ -0,0 +1 @@
+subninja \ No newline at end of file
diff --git a/misc/afl-fuzz-tokens/misc_a b/misc/afl-fuzz-tokens/misc_a
new file mode 100644
index 0000000..2e65efe
--- /dev/null
+++ b/misc/afl-fuzz-tokens/misc_a
@@ -0,0 +1 @@
+a \ No newline at end of file
diff --git a/misc/afl-fuzz-tokens/misc_b b/misc/afl-fuzz-tokens/misc_b
new file mode 100644
index 0000000..63d8dbd
--- /dev/null
+++ b/misc/afl-fuzz-tokens/misc_b
@@ -0,0 +1 @@
+b \ No newline at end of file
diff --git a/misc/afl-fuzz-tokens/misc_colon b/misc/afl-fuzz-tokens/misc_colon
new file mode 100644
index 0000000..22ded55
--- /dev/null
+++ b/misc/afl-fuzz-tokens/misc_colon
@@ -0,0 +1 @@
+: \ No newline at end of file
diff --git a/misc/afl-fuzz-tokens/misc_cont b/misc/afl-fuzz-tokens/misc_cont
new file mode 100644
index 0000000..857f13a
--- /dev/null
+++ b/misc/afl-fuzz-tokens/misc_cont
@@ -0,0 +1 @@
+$
diff --git a/misc/afl-fuzz-tokens/misc_dollar b/misc/afl-fuzz-tokens/misc_dollar
new file mode 100644
index 0000000..6f4f765
--- /dev/null
+++ b/misc/afl-fuzz-tokens/misc_dollar
@@ -0,0 +1 @@
+$ \ No newline at end of file
diff --git a/misc/afl-fuzz-tokens/misc_eq b/misc/afl-fuzz-tokens/misc_eq
new file mode 100644
index 0000000..851c75c
--- /dev/null
+++ b/misc/afl-fuzz-tokens/misc_eq
@@ -0,0 +1 @@
+= \ No newline at end of file
diff --git a/misc/afl-fuzz-tokens/misc_indent b/misc/afl-fuzz-tokens/misc_indent
new file mode 100644
index 0000000..136d063
--- /dev/null
+++ b/misc/afl-fuzz-tokens/misc_indent
@@ -0,0 +1 @@
+ \ No newline at end of file
diff --git a/misc/afl-fuzz-tokens/misc_pipe b/misc/afl-fuzz-tokens/misc_pipe
new file mode 100644
index 0000000..a3871d4
--- /dev/null
+++ b/misc/afl-fuzz-tokens/misc_pipe
@@ -0,0 +1 @@
+| \ No newline at end of file
diff --git a/misc/afl-fuzz-tokens/misc_pipepipe b/misc/afl-fuzz-tokens/misc_pipepipe
new file mode 100644
index 0000000..27cc728
--- /dev/null
+++ b/misc/afl-fuzz-tokens/misc_pipepipe
@@ -0,0 +1 @@
+|| \ No newline at end of file
diff --git a/misc/afl-fuzz-tokens/misc_space b/misc/afl-fuzz-tokens/misc_space
new file mode 100644
index 0000000..0519ecb
--- /dev/null
+++ b/misc/afl-fuzz-tokens/misc_space
@@ -0,0 +1 @@
+ \ No newline at end of file
diff --git a/misc/afl-fuzz/build.ninja b/misc/afl-fuzz/build.ninja
new file mode 100644
index 0000000..52cd2f1
--- /dev/null
+++ b/misc/afl-fuzz/build.ninja
@@ -0,0 +1,5 @@
+rule b
+ command = clang -MMD -MF $out.d -o $out -c $in
+ description = building $out
+
+build a.o: b a.c
diff --git a/misc/ninja-mode.el b/misc/ninja-mode.el
index 71825d5..639e537 100644
--- a/misc/ninja-mode.el
+++ b/misc/ninja-mode.el
@@ -47,28 +47,27 @@
(defun ninja-syntax-propertize (start end)
(save-match-data
- (save-excursion
- (goto-char start)
- (while (search-forward "#" end t)
- (let ((match-pos (match-beginning 0)))
- (when (and
- ;; Is it the first non-white character on the line?
- (eq match-pos (save-excursion (back-to-indentation) (point)))
- (save-excursion
- (goto-char (line-end-position 0))
- (or
- ;; If we're continuting the previous line, it's not a
- ;; comment.
- (not (eq ?$ (char-before)))
- ;; Except if the previous line is a comment as well, as the
- ;; continuation dollar is ignored then.
- (nth 4 (syntax-ppss)))))
- (put-text-property match-pos (1+ match-pos) 'syntax-table '(11))
- (let ((line-end (line-end-position)))
- ;; Avoid putting properties past the end of the buffer.
- ;; Otherwise we get an `args-out-of-range' error.
- (unless (= line-end (1+ (buffer-size)))
- (put-text-property line-end (1+ line-end) 'syntax-table '(12))))))))))
+ (goto-char start)
+ (while (search-forward "#" end t)
+ (let ((match-pos (match-beginning 0)))
+ (when (and
+ ;; Is it the first non-white character on the line?
+ (eq match-pos (save-excursion (back-to-indentation) (point)))
+ (save-excursion
+ (goto-char (line-end-position 0))
+ (or
+ ;; If we're continuting the previous line, it's not a
+ ;; comment.
+ (not (eq ?$ (char-before)))
+ ;; Except if the previous line is a comment as well, as the
+ ;; continuation dollar is ignored then.
+ (nth 4 (syntax-ppss)))))
+ (put-text-property match-pos (1+ match-pos) 'syntax-table '(11))
+ (let ((line-end (line-end-position)))
+ ;; Avoid putting properties past the end of the buffer.
+ ;; Otherwise we get an `args-out-of-range' error.
+ (unless (= line-end (1+ (buffer-size)))
+ (put-text-property line-end (1+ line-end) 'syntax-table '(12)))))))))
;;;###autoload
(define-derived-mode ninja-mode prog-mode "ninja"
diff --git a/misc/zsh-completion b/misc/zsh-completion
index af24f89..fd9b3a7 100644
--- a/misc/zsh-completion
+++ b/misc/zsh-completion
@@ -32,7 +32,7 @@ __get_tools() {
}
__get_modes() {
- ninja -d list 2>/dev/null | while read -r a b; do echo $a; done | tail -n +2 | head -n -1
+ ninja -d list 2>/dev/null | while read -r a b; do echo $a; done | tail -n +2 | sed '$d'
}
__modes() {