commit 4e62363cbbfee8be8bed7e23895a5ee88e1d8ff9
parent c5e519b528e9beb89c6f4588989201f522f408fd
Author: Rafael Garcia <rafael.garcia.gallego@gmail.com>
Date: Tue, 26 Jul 2011 01:31:40 +0200
Slightly healthier defaults. Fixed a couple of warnings on 64-bit systems.
Diffstat:
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/config.def.h b/config.def.h
@@ -1,6 +1,6 @@
/* A simplified way to customize */
#define HILIGHT_CURRENT 1
-#define SHOW_NONPRINT 0
+#define SHOW_NONPRINT 1
#define HILIGHT_SYNTAX 1
/* Things unlikely to be changed, yet still in the config.h file */
@@ -155,7 +155,8 @@ static const Command cmds[] = { /* if(arg == 0) arg.v=regex_match */
};
/* Syntax color definition */
-#define B "(^| |\t|\\(|\\)|\\[|\\]|\\{|\\}|$)"
+#define B "\\b"
+/* #define B "^| |\t|\\(|\\)|\\[|\\]|\\{|\\}|\\||$" -- Use this if \b is not in your libc's regex implementation */
static const Syntax syntaxes[] = {
#if HILIGHT_SYNTAX
@@ -164,7 +165,7 @@ static const Syntax syntaxes[] = {
/* HiGreen */ B"(for|if|while|do|else|case|default|switch|try|throw|catch|operator|new|delete)"B,
/* LoGreen */ B"(float|double|bool|char|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline|((s?size)|((u_?)?int(8|16|32|64|ptr)))_t|class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)"B,
/* HiMag */ B"(goto|continue|break|return)"B,
- /* LoMag */ "(^#(define|include(_next)?|(un|ifn?)def|endif|el(if|se)|if|warning|error|pragma))|"B"\\<[A-Z_][0-9A-Z_]+\\>"B"",
+ /* LoMag */ "(^#(define|include(_next)?|(un|ifn?)def|endif|el(if|se)|if|warning|error|pragma))|"B"[A-Z_][0-9A-Z_]+"B"",
/* HiBlue */ "(\\(|\\)|\\{|\\}|\\[|\\])",
/* LoRed */ "(\"(\\\\.|[^\"])*\")",
/* LoBlue */ "(//.*|/\\*([^*]|\\*[^/])*\\*/|/\\*([^*]|\\*[^/])*$|^([^/]|/[^*])*\\*/)",
diff --git a/sandy.c b/sandy.c
@@ -1406,7 +1406,7 @@ i_update(void) {
/* Update env*/
snprintf(buf, 16, "%ld", ncur);
setenv(envs[EnvLine], buf, 1);
- snprintf(buf, 16, "%d", fcur.o);
+ snprintf(buf, 16, "%d", (int)fcur.o);
setenv(envs[EnvOffset], buf, 1);
/* Update title */
@@ -1422,7 +1422,7 @@ i_update(void) {
(!t_rw()?"[RO]":""),
(statusflags&S_CaseIns?"[icase]":""),
(statusflags&S_Selecting?"[SEL]":""),
- ncur, fcur.o,
+ ncur, (int)fcur.o,
(scrline==fstline?
(nlst<lines3?"All":"Top"):
(nlst-nscr<lines3?"Bot":buf)