Bläddra i källkod

Feat: cumulative update

fix utf8_to_gbk1
dzp 1 år sedan
förälder
incheckning
2b02a954ba
8 ändrade filer med 23 tillägg och 28 borttagningar
  1. 9 20
      SCRIPTS
  2. 2 0
      TODO
  3. 1 1
      src/configure
  4. 1 2
      src/configure.in
  5. 5 2
      src/help.c
  6. 1 1
      src/mapper.c
  7. 2 1
      src/tables.c
  8. 2 1
      src/utf8.c

+ 9 - 20
SCRIPTS

@@ -112,8 +112,8 @@
 }
 
 #nop -------------------------------------------------------------------------
-#nop Append a goto to your current room when saving a map. You can use
-#nop #map return instead.
+#nop Append a goto to your current room when saving a map. Alternatively, you
+#nop can use #map return.
 #nop -------------------------------------------------------------------------
 
 #alias {savemap}
@@ -124,7 +124,8 @@
 }
 
 #nop -------------------------------------------------------------------------
-#nop Log all text to a file with a timestamp with decisecond precision.
+#nop Log all text to a file with a timestamp with decisecond precision. 
+#nop Alternatively you can use #log timestamp.
 #nop -------------------------------------------------------------------------
 
 #function {timestamp}
@@ -269,7 +270,7 @@
 #showme $temp
 
 #nop -------------------------------------------------------------------------
-#nop Draw a health bar.
+#nop Draw a health bar. Alternatively: #draw bar -2 1 -2 20 {%1;%2<faa><afa>}
 #nop -------------------------------------------------------------------------
 
 #alias {hpbar}
@@ -340,7 +341,7 @@
 
 #split
 
-#function spellcheck
+#function {spellcheck}
 {
 	#format result %S %1;
 	#if {$result == 0}
@@ -370,7 +371,7 @@
 #nop This function tests the random number engine
 #nop -------------------------------------------------------------------------
 
-#alias random
+#alias {random}
 {
 	#var random {};
 	#loop 1 1000 cnt
@@ -382,7 +383,8 @@
 }
 
 #nop -------------------------------------------------------------------------
-#nop This macro allows pasting multi-line code fragments on pressing ctrl-v
+#nop This macro allows pasting multi-line code fragments on pressing ctrl-v.
+#nop Alternatively, use ctrl-enter after pressing ctrl-v and pasting a script.
 #nop -------------------------------------------------------------------------
 
 #macro {\cv}
@@ -399,19 +401,6 @@
 	}
 }
 
-#nop -------------------------------------------------------------------------
-#nop This macro allows pasting multi-line code fragments on pressing ctrl-v
-#nop followed by pressing ctrl-enter
-#nop -------------------------------------------------------------------------
-
-#macro {\e[13;5u}
-{
-	#cursor get tmp;
-	#cursor home;
-	#cursor set {#line sub esc };
-	#cursor enter
-}
-
 #nop -------------------------------------------------------------------------
 #nop This event will cause tintin to always report your screen width as 80
 #nop columns

+ 2 - 0
TODO

@@ -11,6 +11,8 @@
 
 - #SPLIT when you give the top bar a negative value for its size, TinTin isn’t drawing the white box around it
 
+- Add an option to insert multiple items to a list
+
 - https://github.com/mintty/mintty/wiki/CtrlSeqs#audio-support
 - mintty --configdir DIRNAME
 

+ 1 - 1
src/configure

@@ -3458,7 +3458,7 @@ if test "x$ac_cv_header_gnutls_gnutls_h" = xyes; then :
 #define HAVE_GNUTLS_GNUTLS_H 1
 _ACEOF
 
-$as_echo "#define HAVE_GNUTLS_H /**/" >>confdefs.h
+$as_echo "#define HAVE_GNUTLS_H 1" >>confdefs.h
 
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gnutls header file not found, is the develoment part present" >&5

+ 1 - 2
src/configure.in

@@ -72,8 +72,7 @@ AC_CHECK_HEADERS([zlib.h],,
 AC_CHECK_HEADERS([pcre.h],,
 	[AC_MSG_ERROR([pcre header file not found, is the development part present])])
 AC_CHECK_HEADERS([gnutls/gnutls.h],
-	[AC_DEFINE([HAVE_GNUTLS_H],,
-	[Define to 1 if you have <gnutls/gnutls.h>.])],
+	[AC_DEFINE([HAVE_GNUTLS_H],[1],[Define to 1 if you have <gnutls/gnutls.h>.])],
 	[AC_MSG_WARN([gnutls header file not found, is the develoment part present])])
 
 # Checks for typedefs, structures, and compiler characteristics.

+ 5 - 2
src/help.c

@@ -2111,7 +2111,7 @@ struct help_type help_table[] =
 		"<278>         settings, as well as the list names that you can ignore.\n"
 		"\n"
 		"<278>         If you for example use #IGNORE ACTIONS ON actions will no longer\n"
-		"<278>         triger. Not every list can be ignored.\n"
+		"<278>         trigger. Not every list can be ignored.\n"
 		,
 		"class debug info kill message"
 	},
@@ -4110,9 +4110,11 @@ struct help_type help_table[] =
 		"<178>      \\\\ <278>Match a backslash                              \\\\\n"
 		"\n"
 		"<278>         \\s matches one space, \\s+ matches one or multiple spaces, the use\n"
-		"<278>         of {\\s+} is required for this sequence to work in tintin, \\s by"
+		"<278>         of {\\s+} is required for this sequence to work in tintin, \\s by\n"
 		"<278>         itself will work outside of a set of braces.\n"
 		"\n"
+		"<278>         Use \\% to forcibly match a literal % character.\n"
+		"\n"
 		"<278>         <128>Color triggers\n"
 		"\n"
 		"<278>         To make matching easier text triggers (Actions, Gags, Highlights,\n"
@@ -4264,6 +4266,7 @@ struct help_type help_table[] =
 		"<178>      %0 <278>should be avoided in triggers, and if left alone lists all matches.\n"
 		"<178>     { } <278>embed a raw regular expression, matches are stored to %1-%99.\n"
 		"<178>   %!{ } <278>embed a raw regular expression, matches are not stored.\n"
+		"\n"
 		"<178>         <278>[ ] . + | ( ) ? * are treated as normal text unlessed used within\n"
 		"<178>         <278>braces. Keep in mind that { } is replaced with ( ) automatically\n"
 		"<178>         <278>unless %!{ } is used.\n"

+ 1 - 1
src/mapper.c

@@ -5974,7 +5974,7 @@ DO_MAP(map_entrance)
 
 	if (rev_exit == NULL)
 	{
-		show_message(ses, LIST_COMMAND, "#MAP ENTRANCE {%s}: EXIT {%s} HAS NO MATCHING ENTRANCE.");
+		show_message(ses, LIST_COMMAND, "#MAP ENTRANCE: EXIT {%s} HAS NO MATCHING ENTRANCE.", arg1);
 
 		return;
 	}

+ 2 - 1
src/tables.c

@@ -824,7 +824,8 @@ struct event_type event_table[] =
 	{    "PORT INITIALIZED",                       0, EVENT_FLAG_PORT,     "PORT",      "port is initialized"        },
 	{    "PORT LOG MESSAGE",                       0, EVENT_FLAG_PORT,     "PORT",      "local port log messages"    },
 	{    "PORT MESSAGE",                           0, EVENT_FLAG_PORT,     "PORT",      "local port messages"        },
-	{    "PORT RECEIVED MESSAGE",                  0, EVENT_FLAG_PORT,     "PORT",      "socket data is received"    },
+	{    "PORT RECEIVED DATA",                     0, EVENT_FLAG_PORT,     "PORT",      "bulk data is received"      },
+	{    "PORT RECEIVED MESSAGE",                  0, EVENT_FLAG_PORT,     "PORT",      "line data is received"      },
 	{    "PORT UNINITIALIZED",                     0, EVENT_FLAG_PORT,     "PORT",      "port is uninitialized"      },
 	{    "PRESSED ",                               0, EVENT_FLAG_MOUSE,    "MOUSE",     "mouse button is pressed"    },
 	{    "PROCESSED KEYPRESS",                     0, EVENT_FLAG_INPUT,    "INPUT",     "after a regular keypress"   },

+ 2 - 1
src/utf8.c

@@ -1352,7 +1352,7 @@ int utf8_to_gbk1(char *input, char *output, int length)
 	pto = output;
 
 //	while (*pti)
-	while (length--)
+	while (length)
 	{
 		size = get_utf8_index(pti, &index);
 
@@ -1380,6 +1380,7 @@ int utf8_to_gbk1(char *input, char *output, int length)
 		{
 			*pto++ = *pti++;
 		}
+		length -= size;
 	}
 	*pto = 0;