From 503f80e9ec8e925a3d75917cd56c699d526e7be8 Mon Sep 17 00:00:00 2001 From: Scandum Date: Mon, 21 Mar 2022 16:05:19 +0100 Subject: [PATCH] 2.02.20 --- TODO | 51 ++-- docs/help.html | 322 +++++++++++++++++----- docs/syntax.txt | 21 +- mods/igr.mods | 99 ++++++- src/banner.c | 66 ++--- src/buffer.c | 108 ++++++-- src/chat.c | 5 +- src/command.c | 1 - src/config.c | 26 +- src/cursor.c | 11 +- src/daemon.c | 6 +- src/data.c | 50 +++- src/draw.c | 192 +++++++++---- src/files.c | 2 +- src/gui.h | 4 +- src/help.c | 318 +++++++++++++++++----- src/history.c | 8 + src/input.c | 12 +- src/list.c | 202 +++++++++----- src/log.c | 2 +- src/main.c | 23 +- src/mapper.c | 636 +++++++++++++++++++++++++------------------- src/math.c | 31 +-- src/memory.c | 11 + src/misc.c | 16 +- src/nest.c | 174 +++++++++--- src/net.c | 2 + src/parse.c | 6 +- src/path.c | 2 +- src/port.c | 10 +- src/regex.c | 24 ++ src/scan.c | 5 +- src/screen.c | 6 +- src/session.c | 41 +-- src/show.c | 69 ++--- src/split.c | 2 +- src/string.c | 6 +- src/substitute.c | 77 +++--- src/tables.c | 37 ++- src/telopt_client.c | 71 +++-- src/terminal.c | 16 +- src/tintin.h | 26 +- src/tokenize.c | 25 +- src/trigger.c | 4 +- src/update.c | 9 +- src/utf8.c | 203 ++------------ src/utils.c | 2 +- src/variable.c | 146 ++++++++-- src/vt102.c | 6 +- 49 files changed, 2081 insertions(+), 1111 deletions(-) diff --git a/TODO b/TODO index 81da826..867f428 100644 --- a/TODO +++ b/TODO @@ -1,9 +1,23 @@ - - look into large variable handling, foreach, once again +- make #draw talign+balign do a vertical calign + lalign+ralign do a horizontal calign + +- make -g mode not write to disk + +- look into #draw boxed map with unicode mode. + +- Display room symbol in #map info +- Add nohup mode + +ne room has #map set roomsymbol {/}, +e room has #map set roomsymbol {------} +se room has #map set roomsymbol {\\} ---------------- - - GMCP: MG.room.info { "exits": [ ] } gets parsed into {exits} {{1}{}} + - add shadow session support with access to all events. - - #map info save option + - set_line_screen debug: col = -5 (64) from draw_text(%p,%d,%p,%p,%p) + + - regex101 like regex tester - check: #var bla { x};#draw scroll box 1 1 3 40 $bla @@ -11,20 +25,12 @@ - input spell checking, #cursor display ? - - cp949toutf8 is missing some characters - - look into named actions as a 4th argument - - look into adding #line quiet support to #buffer - - - pruned tile handling - - Get discworld / aardwolf mxp to work for @sentix - look into default input color - - Add RECEIVED INPUT CHARACTER event / filter mouse input sequences. - - add ctrl-r support for scrollback - Add #event {SESSION CONNECTED} {5.1} option. @@ -61,7 +67,9 @@ - Add #line gag 2 +2 -2 support. - - Work on VT2020 protocol (mouse click) + - VT2020 + + - mouse enter/leave events on move. hoover/long-press. - $var[%*][%*] support. @@ -69,14 +77,14 @@ - tab completion on directory structure. + - auto align routine that inserts void rooms where needed + - look into writing script to drag rooms + void with mouse - pancake mode to display rooms at all levels and annotations - Store the map filename to differentiate between maps. - #map list {} breaks on rooms that have e mapped to eu. - finish landmarks - map sandbox mode support (flags to disable saving?) - add ghosting to fix #map flag nofollow exit cmd issues? - - Request: aura around the character position. Something similar to terrain dense narrow. Could improve visibility of the character position on big resolutions. Furthermor config to allow modification of the character terrain. - - vt map doesn't utilize all available space. - Request: 'stop' #map center command, so i could see how the 'user' moves, rather map moves around him? - #map uninsert - make map spacing easier @@ -92,8 +100,6 @@ #draw button #draw titanic - - proper vt100 skip detection for improper color codes. - - Make { match both a { and \x7B as it's an annoying issue to debug. - Add VT100 filter to make outside sources respect terminal size constraints, also needed to run bash in vsplit mode. @@ -245,23 +251,14 @@ - add option to show party members on the map - - add option to add a delay to each exit for #map run - - map where command that shows relative coordinates. - - Room creation event - - Add better table support for data fields. - auto adjust max vnum size of mapper. - global flag to only show the same area with the mapper. - - map color setting for hidden exits. - - - Create global exits, (aka portals) like recall, that can be used - with #map run. - - Add something to indicate a non standard exit on the ASCII mapper. - Display hidden exits differently. @@ -278,7 +275,7 @@ * STUFF FOR A RAINY DAY -- Fix up ipv6 support in chat. +- Fix up IPv6 support in port/chat. - Look into packet defragmentation for chat. @@ -297,8 +294,6 @@ - Keep last input visible with repeat enter enabled. -- would be nice to have "#map list" show the variable being filtered on, instead of defaulting to roomname ie, I'm currently writing a script to save "#map list {roomnote} {{\w+}}" into a variable, then map get roomnote for each item in the list and display it...would be nice if when listing for a roomnote, it showed the roomnote - ------------------------------------------------------------------------------- * STUFF THAT WON'T BE IMPLEMENTED diff --git a/docs/help.html b/docs/help.html index d4c2cee..18a4425 100644 --- a/docs/help.html +++ b/docs/help.html @@ -33,9 +33,9 @@ RUN SCAN SCREEN SCREEN READER SCRIPT SEND SESSION SESSIONNAME SHOWME SNOOP SPEEDWALK SPLIT SSL STATEMENTS SUBSTITUTE - SUSPEND SWITCH SYSTEM TAB TEXTIN - TICKER TIME VARIABLE WHILE WRITE - ZAP + SUBSTITUTIONS SUSPEND SWITCH SYSTEM TAB + TEXTIN TICKER TIME VARIABLE WHILE + WRITE ZAP @@ -49,9 +49,6 @@ variables are substituted from the message and can be used in the command part of the action. - The priority part is optional and determines the priority of the - action, it defaults to 5. - If the message starts with a ~ color codes must be matched. You can enable #config {convert meta} on to display meta characters. @@ -59,19 +56,16 @@ Example: #action {%1 tells you '%2'} {tell %1 I'm afk.} - Actions can be triggered by the show command and certain system - messages. - Actions can be triggered by the #show command. If you don't want a #show to get triggered use: #line ignore #show {text} Actions are ordered alphabetically and only one action can trigger at a time. To change the order you can assign a priority, which defaults to 5, with a lower number indicating a higher priority. The priority - can be a floating point number. + can be a floating point number and should be between 1 and 9. - To remove action with %* as the message, use #unaction {%%*} or - #unaction {%*}. Alternatively you could wrap the action inside a + To remove an action with %* as the message, use #unaction {%%*} or + #unaction {\%*}. Alternatively you could wrap the action inside a class, and kill that class when you no longer need the action. Comment: You can remove an action with the #unaction command. @@ -112,7 +106,7 @@ can be a floating point number. To remove an alias with %* as the name, use #unalias {%%*} or #unalias - {%*}. Alternatively you can wrap the alias inside a class, and kill + {\%*}. Alternatively you can wrap the alias inside a class, and kill that class when you no longer need the alias. For more information on pattern matching see the section on PCRE. @@ -192,34 +186,45 @@ The buffer command has various options to manipulate your scrollback buffer. - #buffer {home} - - Moves you to the top of your scrollback buffer and displays the page. - Enables scroll lock mode. Most useful when used in a #macro. + The size of the scrollback buffer can be configured using #config + buffer_size <size>. The size must be either 100, 1000, 10000, 100000 + or 1000000 lines. - #buffer {up} [lines] + While scrolling through the scrollback buffer incoming text is not + displayed, this can be disabled using #config scroll_lock off. The + scroll lock is automatically disabled when manual input is received, + subsequently #buffer up and down only work properly when used in a + macro or mouse event. + + #buffer {clear} {[lower bound]} {[upper bound]} - Moves your scrollback buffer up one page and displays the page. - Enables scroll lock mode. Most useful when used in a #macro. You - can use #buffer {up} {1} to move the scrollback buffer up 1 line. + Without an argument this will clear the entire scrollback buffer. + Otherwise it will clear the given range. + + Positive numbers are measured from the start of the scrollback buffer, + negative numbers from the end. #buffer {down} [lines] - Moves your scrollback buffer down one page and displays the page. - Enables scroll lock mode unless at the end. Most useful when used in - a #macro. + Moves your scrollback buffer down one page and displays the page. If + a line number is provided it will scroll down the given number of + lines. #buffer {end} Moves you to the end of your scrollback buffer and displays the page. Disables scroll lock mode. Most useful when used in a #macro. - #buffer {find} {[number]} {<string>} + #buffer {find} {[number]} {<string>} {[variable]} Moves the buffer to the given string which can contain a regular expression. Optionally you can provide the number of matches to skip, allowing you to jump further back in the buffer. + A positive number searches from the start of the buffer, a negative + number from the end. If you provide a variable the location will be + stored and no jump takes place. + #buffer {get} {<variable>} {<lower bound>} {[upper bound]} Allows you to store one or several lines from your scrollback buffer @@ -228,10 +233,23 @@ omitted the given line is stored as a standard variable. If an upper bound is given the lines between the two bounds are stored as a list. + Positive numbers are measured from the start of the scrollback buffer, + negative numbers from the end. + + #buffer {home} + + Moves you to the top of your scrollback buffer and displays the page. + Enables scroll lock mode. Most useful when used in a #macro. + #buffer {info} {[save]} {[variable]} Display buffer info, optionally save the data to a variable. + #buffer {jump} {<location>} + + Moves the buffer to the given location. A positive number jumps from + the start of the buffer, a negative number from the end. + #buffer {lock} {on|off} Toggles the lock on the scrollback buffer. When locked, newly incoming @@ -239,6 +257,17 @@ several buffer commands will re-enable the lock. When unlocking it'll move you to the end of your scrollback buffer and display the page. + #buffer {refresh} + + Marks the buffer as needing to be refreshed, only useful while in + vertical split mode. + + #buffer {up} [lines] + + Moves your scrollback buffer up one page and displays the page. + Enables scroll lock mode. Most useful when used in a #macro. You + can use #buffer {up} {1} to move the scrollback buffer up 1 line. + #buffer {write} {<filename>} Writes the scrollback buffer to the given file. @@ -463,7 +492,6 @@ Will store the size of the class in a variable. #class {<name>} {write} {<filename>} Will write all triggers of the given class to file. - The {kill} option will delete all triggers of the given class. Keep in mind that the kill and read option are very fast allowing them to be used to enable and disable classes. @@ -539,13 +567,41 @@ When the 0,0 coordinate is in the upper left corner TinTin++ uses - a y,x / rows,cols notation. When the 0,0 coordinate is in the - bottom left corner tintin uses a x,y / cols/rows notation. + a y,x / row,col notation, starting at 1,1. Subsequently -1,-1 + will indicate the bottom right corner. This type of argument is + used by the #showme command. - When a square is defined this is done by specifying the upper left - and bottom right corner of the square using four coordinates. + When the 0,0 coordinate is in the bottom left corner tintin uses + a standard x,y notation. This type of argument is used by the + #map jump command. - The vast majority of tintin commands use row,col notation. + The vast majority of tintin commands use y,x / row,col notation, + primarily because that is the notation used by the VT100 standard + used for terminal emulation. + + Squares + + A square argument takes 2 coordinates. The first coordinate defines + the upper left corner, the last coordinate defines the bottom + right corner. The upper left corner of the terminal is defined as + 1,1 and the bottom right corner as -1,-1. This type of argument is + used by #draw, #button and #map offset. + + Panes + + A pane argument takes 4 size values, which are: top pane, bottom + pane, left pane, right pane. When a negative value is provided the + size is the maximum size, minus the value. This type of argument + is used by the #split command. + + Ranges + + A range argument takes 2 values known as the upper bound and lower + bound. The upper bound (first value) defines the start of the + range, the lower bound (second value) the end. The first index of + a range is defined as 1. When a negative value is provides the last + index is defined as -1. This type of argument is used by #buffer + and #variable. Related: characters, colors, escape, mathematics and pcre. @@ -666,6 +722,9 @@ #daemon list [name] List all daemons or daemons with matching name. + You can launch tintin and attach the first daemonized instance using + tt++ -R. To attach a named instance use tt++ -R<name>. + Related: script, system and run. @@ -1191,8 +1250,8 @@ SESSION EVENTS SESSION ACTIVATED %0 name - SESSION CONNECTED %0 name %1 host %2 ip %3 port - SESSION CREATED %0 name %1 host %2 ip %3 port + SESSION CONNECTED %0 name %1 host %2 ip %3 port %4 file + SESSION CREATED %0 name %1 host %2 ip %3 port %4 file SESSION DEACTIVATED %0 name SESSION DISCONNECTED %0 name %1 host %2 ip %3 port SESSION TIMED OUT %0 name %1 host %2 ip %3 port @@ -1370,7 +1429,7 @@ #################################################################### # # - # T I N T I N + + 2.02.12 # + # T I N T I N + + 2.02.13b # # # # Code by Peter Unold, Bill Reis, and Igor van den Hoven # # # @@ -1585,7 +1644,7 @@ All commands can be separated with a ';'. - n;l green;s;say Dan Dare is back! -- do these 4 commands + n;l dragon;s;say Dan Dare is back! -- do these 4 commands There are 3 ways ';'s can be overruled. \say Hello ;) -- Lines starting with a '\' aren't parsed by TinTin++. @@ -1631,12 +1690,6 @@ Example: #alias greet say Greetings, most honorable %1 - If there are no variables on the right-side of the alias definition, - any arguments following the aliases-command will be appended to the - command string. - -Example: #alias ff cast 'fireball' -- 'ff bob' equals: cast 'fireball' bob - If you want an alias to execute more commands, you must use braces. Example: #alias ws {wake;stand} @@ -1651,7 +1704,7 @@ Or by using the send command. -Example: #send put %1 in %2 +Example: #alias put #send put %1 in %2 Action @@ -1822,9 +1875,12 @@ triggers/variables associated with that list. With the SAVE option this data is written to the info variable. + #info arguments will show matched trigger arguments. + #info big5toutf will show the big5 to utf8 translation table. #info cpu will show information about tintin's cpu usage. #info environ will show the environment variables. #info input will show information about the input line. + #info matches will show matched command arguments. #info mccp will show information about data compression. #info memory will show information about the memory stack. #info stack will show the low level debugging stack. @@ -1977,16 +2033,17 @@ #list {var} {add} {item} Add {item} to the list #list {var} {clear} Empty the given list - #list {var} {collapse} Turn list into a variable - #list {var} {create} {item} Create a list using {items} - #list {var} {delete} {index} {number} Delete the item at {index}, - the {number} is optional. - #list {var} {explode} Turn list into a character list + #list {var} {collapse} {separator} Turn list into a variable + #list {var} {create} {items} Create a list using {items} + #list {var} {delete} {index} {amount} Delete the item at {index}, + the {amount} is optional. + #list {var} {explode} {separator} Turn variable into a list #list {var} {indexate} Index a list table for sorting #list {var} {insert} {index} {string} Insert {string} at given index #list {var} {filter} {keep} {remove} Filter with keep / remove regex #list {var} {find} {regex} {variable} Return the found index #list {var} {get} {index} {variable} Copy an item to {variable} + #list {var} {numerate} Turn a table into a list #list {var} {order} {string} Insert item in numerical order #list {var} {shuffle} Shuffle the list #list {var} {set} {index} {string} Change the item at {index} @@ -1995,7 +2052,7 @@ #list {var} {sort} {string} Insert item in alphabetic order #list {var} {tokenize} {string} Create a character list - The index should be between 1 and the list's length. You can also give + The index should be between +1 and the list's size. You can also give a negative value, in which case -1 equals the last item in the list, -2 the second last, etc. @@ -2005,10 +2062,11 @@ The add and create options allow using multiple items, as well as semicolon separated items. - A length of 0 is returned for an empty or non existant list. + A size of 0 is returned for an empty or non-existent list. You can + directly access the size of a list using &var[]. - You can directly access elements in a list variable using $var[1], - $var[2], $var[-1], etc. + You can directly access elements in a list variable using $var[+1], + $var[+2], $var[-1], etc. Related: break, continue, foreach, loop, parse, repeat, return and while. @@ -2223,6 +2281,47 @@ If you want to get a better look at what goes on behind the scenes while executing scripts you can use '#debug all on'. To stop seeing debug information use '#debug all off'. + + List Tables + + List tables are also known as databases and the #list command has + several options to manipulate them. + + For these options to work properly all tables need to have identical + keys. Here is an example list table. + + #var {friendlist} + { + {1}{{name}{bob} {age}{54}} + {2}{{name}{bubba} {age}{21}} + {3}{{name}{pamela} {age}{36}} + } + + To sort the list table by age you would use: + + #list friendlist indexate age + #list friendlist order + + To remove everyone whose name starts with a 'b' you would use: + + #list friendlist indexate name + #list friendlist filter {} {b%*} + + The filter option only supports regular expressions. To filter + using mathematics you would loop through the list backwards: + + #loop &friendlist[] 1 index + { + #if {$friendlist[+$index][age] < 30} + { + #list friendlist delete $index + } + } + + To add an item to a list table there are two options: + + #list friendlist add {{{name}{hobo} {age}{42}}} + #list friendlist insert -1 {{name}{hobo} {age}{42}} Optimization @@ -2451,12 +2550,16 @@ searches for the given room name. If found the shortest path from your current location to the destination is calculated. The route is stored in #path and can subsequently be used with - the various #path commands. If <exits> is provided all exits - must be matched, if <roomdesc>, <roomarea> or <roomnote> or - <roomterrain> or <roomflag> is provided these are matched as - well against the room to be found. - These options are also available to the at, delete, goto - link, list and run commands. + the various #path commands. If #map flag nofollow is set it + will store the exit commands instead of the exit names. + + If <exits> is provided all exits must be matched, if + <roomdesc>, <roomarea> or <roomnote> or <roomterrain> or + <roomflag> is provided these are matched as well against the + room to be found. + + These search options are also available for the at, delete, + goto, link, list and run commands. #map flag asciigraphics Takes up more space but draws a more detailed @@ -2468,7 +2571,9 @@ #map flag nofollow When you enter movement commands the map will no longer automatically follow along. Useful for MSDP and GMCP - automapping scripts. + automapping scripts. When you use #map find in nofollow + mode it will store the exit command instead of the exit + name into the path. #map flag static Will make the map static so new rooms are no longer @@ -2506,8 +2611,9 @@ Takes you to the given room name, if you provide exits those must match. - #map info - Gives information about the map and room you are in. + #map info [save] + Gives information about the map and room you are in. If the save + argument is given the map data is saved to the info[map] variable. #map insert <direction> [roomflag] Insert a room in the given direction. Most useful for inserting @@ -2663,7 +2769,7 @@ #map undo Will undo your last move. If this created a room or a link they will be deleted, otherwise you'll simply move back a - room. Useful if you walked into a non existant direction. + room. Useful if you walked into a non-existent direction. #map uninsert <direction> Exact opposite of the insert command. @@ -2829,7 +2935,7 @@ - 3 integer subtraction << 4 bitwise shift >> 4 bitwise shift - .. 4 bitwise ellipsis + .. 4 integer range > 5 logical greater than >= 5 logical greater than or equal < 5 logical less than @@ -3189,13 +3295,13 @@ If you use %1 in an action to perform a match the matched string is stored in the %1 variable which can be used in the action body. -Example: %1 says 'Tickle me'} {tickle %1} +Example: #act {%1 says 'Tickle me'} {tickle %1} If you use %2 the match is stored in %2, etc. If you use an unnumbered match like %* or %S the match is stored at the last used index incremented by one. -Example: %3 says '%*'} {#if {"%4" == "Tickle me"} {tickle %3}} +Example: #act {%3 says '%*'} {#if {"%4" == "Tickle me"} {tickle %3}} The maximum variable index is 99. If you begin an action with %* the match is stored in %1. You should never use %0 in the trigger part of @@ -3220,7 +3326,7 @@ You can group alternatives and ranges within a PCRE using brackets. -Example: #act {%* says 'Who is number {[1-9]}} {say $number[%2] is number %2} +Example: #act {%* says 'Who is number {[1-9]}?} {say $number[%2] is number %2} The example only triggers if someone provides a number between 1 and 9. Any other character will cause the action to not trigger. @@ -3245,7 +3351,7 @@ {n,} repeat at least n times, n must be a number. {n,o} repeat between n and o times, n and o must be a number. -Example: #act {%* says 'Who is number {[1-9][0-9]{0,2}} {Say $number[%2] is +Example: #act {%* says 'Who is number {[1-9][0-9]{0,2}}?} {Say $number[%2] is number %2} The example only triggers if someone provides a number between 1 and @@ -3737,10 +3843,10 @@ Starts a telnet session with the given name, host, port, and optional file name. The name can be anything you want, except the name of an - already existant session, a number, or the keywords '+' and '-'. + already existing session, a number, or the keywords '+' and '-'. - If a file name is given the file is only read if the session succesfully - connects. + If a file name is given the file is only read if the session + succesfully connects. Without an argument #session shows the currently defined sessions. @@ -3992,6 +4098,78 @@ Comment: You can remove a substitution with the #unsubstitute command. Related: action, gag, highlight and prompt. + + + SUBSTITUTIONS + + TinTin++ will perform various types of substitions as detailed below. + + Variables + +$ & * @ All variable and function names must begin with an alphabetic + character, followed by any combination of alphanumeric characters and + underscores. + +$ The dollar sign is used to retrieve the value of a variable. + +& The ampersand sign is used to retrieve the index of a variable. + +* The astrix sign is used to retrieve the name of a variable. + +@ The at sign is used for functions. + +[ ] Brackets are used for nested variables which function as an + associative array. Associative arrays are also known as tables and + maps. Regex can be used within brackets to match multiple variables. + ++ - The plus and minus signs are used to access variables by their index, + with the first variable having index +1, and the last variable + having index -1. Variables are ordered alphanumerically. + + All variables and functions can be escaped by doubling the sign, + like $$variable_name or @@function_name. To escape a variable + twice use $$$var_name. One escape is removed each time tintin + needs to substitute a variable or function. + + Arguments + +%0 - %99 The percent sign followed by a number is used for arguments by the + following triggers: + + alias, action, button, event, function, prompt, and substitute. + +&0 - &99 The ampersand sign followed by a number is used for arguments in the + regex and replace commands. + + All trigger and command arguments can be escaped by doubling the + sign like %%1 or &&1. One escape is removed each time tintin + substitutes trigger or command arguments. To escape three times + triple the sign like %%%1, etc. + + Colors + +<000> Three alphanumeric characters encapsulated by the less- and greater- + than signs are used for 4 and 8 bit color codes. + +<0000> Either a B (background) or F (foreground) followed by three + hexadecimal characters encapsulated by < > signs are used for 12 + bit color codes. Requires truecolor capable terminal. + +<0000000> Either a B (background) or F (foreground) followed by six + hexadecimal characters encapsulated by < > signs are used for 24 + bit color codes. Requires truecolor capable terminal. + + More information is available at #help color. + + Escapes + +\ The back slash is used to escape a character. All available options + are listed at #help escape. Escapes are typically escaped when text + leaves the client, by being send to a server, the shell, being + displayed on the screen, or being processed as part of a regex. + Escapes try to mimic escapes in PCRE when possible. + +Related: characters, colors, escapes, info and pcre. SUSPEND @@ -4156,12 +4334,14 @@ You can see the first nest of a variable using $variable[+1] and the last nest using $variable[-1]. Using $variable[-2] will report the second last variable, and so on. To show all indices use *variable[]. - To show all values use $variable[%*] or a less generic regex. To show - all values from index 2 through 4 use $variable[+2..4]. + To show all values use $variable[]. To show all values from index 2 + through 4 use $variable[+2..4]. Nested variables are also known as tables, table generally being used to refer to several variables nested within one specific variable. + It's possible to use regular expressions. + Example: #show {Targets starting with the letter A: $targets[A%*] To see the internal index of a variable use &<variable name>. To see diff --git a/docs/syntax.txt b/docs/syntax.txt index 632ff63..cd8ee22 100644 --- a/docs/syntax.txt +++ b/docs/syntax.txt @@ -16,7 +16,7 @@ CHARACTERS { } Curly brackets aka braces are used for seperating multi word command arguments, nesting commands, and nesting variables. Braces cannot - easily be escaped and must always be used in pairs. + be escaped using \{ \}, to escape { } use \x7B \x7D " " Quote characters are used for strings in the #math, #if, #switch, and #case commands. Instead of " " you can use an extra set of @@ -123,19 +123,20 @@ COORDINATES SQUARES ------- - A square argument takes 4 coordinates. The first two coordinates - define the upper left corner, the last two coordinates define the - bottom right corner. The upper left corner of the terminal is - defined as 1,1 and the bottom right corner as -1,-1. This type - of argument is use by the #draw, #button, #map offset, + A square argument takes 2 coordinates. The first coordinate defines + the upper left corner, the last two coordinates define the bottom + right corner. The upper left corner of the terminal is defines as + 1,1 and the bottom right corner as -1,-1. This type of argument is + used by #draw, #button and #map offset. PANES ----- - A panes argument takes 4 size values, which are: top pane, bottom + A pane argument takes 4 size values, which are: top pane, bottom pane, left pane, right pane. When a negative value is provided the size is the maximum size, minus the value. This type of argument is used by the #split command. + MATH ---- Operators Priority Function @@ -172,6 +173,7 @@ MATH M,K,m,u These four metric suffixes are allowed for numbers. { } Braces can be used in #math to perform string operations. + {a} > {b} This checks if the string "a" is greater than "b". , Commas in numbers are ignored, as well as spaces and tabs. @@ -289,9 +291,8 @@ Example: #showme Lime Pink Orange For 12 bit truecolor use to for foreground colors and to for background colors. - For 24 bit truecolor use \e[38;2;R;G;Bm where R G B are red/green/blue - intensities between 0 and 255. For example: \e[37;2;50;100;150m. Use - \e[48;2;R;G;Bm for background colors. + For 24 bit truecolor use to for foreground + colors and to for background colors. HELP ---- diff --git a/mods/igr.mods b/mods/igr.mods index a828aa7..7f03820 100644 --- a/mods/igr.mods +++ b/mods/igr.mods @@ -1,4 +1,77 @@ -May 2022 2.02.12 +Sep 2021 2.02.20 +------------------------------------------------------------------------------ +main.c Added -H startup option to run tintin in a nohup compatible + mode. + +list.c Changed #list explode to support: + + #list {var} {explode} {separator} + + The separator can be {;} or {\n} or anything else. Variables + and escape codes in the separator are substituted. This turns + a variable into a list using the given separator. + +list.c Updated #list collapse to support: + + #list {var} {collapse} {separator} + + The separator can be {;} or {\n} or anything else. Variables + and escape codes in the separator are substituted. This turns + a list into a variable. + +buffer.c Updated #buffer find to support: + + #buffer {find} {[number]} {} {[variable]} + + The number must now be -1, -2, etc to search starting from the + end of the buffer, and 1, 2, etc to search from the start. + +buffer.c Updated #buffer clear to support: + + #buffer {clear} {[lower bound]} {[upper bound]} + +tokenize.c Increased the buffer size of #foreach to 1 million bytes, can + be adjusted in tintin.h by changing MALLOC_SIZE. + +data.c Added #info arguments [save] option that will display all + arguments / matches of the most recently fired trigger. + +data.c Added #info matches [save] option that will display all + matches of the most recently fired command like #regex. + +data.c #kill all will no longer remove pathdirs. + +telopt_client.c Fixed an incorrect rejection response for the charset telopt. + +mapper.c Fixed #map goto jumping to the room you're currently in on a + failed search. + +telopt_client.c Fixed handling of empty arrays for gmcp. + +mapper.c Added #map flag pancake which will display rooms on the map + above and below you while enabled. You can use #map color + room to display rooms with a white to black color + gradient in pancake mode. To easily view color gradients use: + + #loop 6 0 i #draw scroll bar 1 1 1 40 {$i;6;} + +session.c The SESSION CREATED and SESSION CONNECTED will store the file + name, if provided, in the %4 argument. + +draw.c #draw line now takes a text argument which can be further + manipulated with the CALIGN and RALIGN flags, LALIGN is the + default. + +session.c The SESSION CONNECTED event now triggers after the SESSION + CREATED event. + +session.c Changed GAG SESSION DISCONNECTED to GAG SESSION DESTROYED. + +mapper.c Added the #map info save option. + +utf8.c Updated the cp949 to utf8 table with additional characters. + +May 2021 2.02.12 ------------------------------------------------------------------------------ input.c Added RECEIVED INPUT CHARACTER event that triggers on each character added to the input buffer. %0 holds the character, @@ -33,12 +106,12 @@ data.c Added the #info tokenizer option to have a peek at the stack path.c #path load now automatically adds reverse directions. -map.c Added support for #map list {roomflag} {!void} etc. +mapper.c Added support for #map list {roomflag} {!void} etc. line.c Added #line substitute braces which will turn { and } into \x7B and \x7D. -map.c Added #map list {{distance}{5}} to list all rooms within a +mapper.c Added #map list {{distance}{5}} to list all rooms within a weighted distance of 5. Keep in mind this goes by weight, which starts at 1.0 and increases by 2.0 per room by default. @@ -48,10 +121,10 @@ cursor.c Added #cursor flag eol {cr|lf|crlf|crnul|off} to change the log.c Changed logging to where it logs data before it's wrapped by the client. -map.c Added support for roomsymbol lengths up to 5 characters in +mapper.c Added support for roomsymbol lengths up to 5 characters in unicode, and 6 characters in ascii graphics mode. -map.c Added the option to #map list/find to use * as a roomexit. +mapper.c Added the option to #map list/find to use * as a roomexit. This will make the search ignore non-pathdir exits without an exit direction. @@ -79,8 +152,8 @@ data.c Added the #info environ and #info environ save option. main.c Added SIGUSR event. %0 will contain either 1 or 2. #event {SIGUSR} {#showme RECEIVED SIGUSR %0} - #info system save - #system {kill -USR1 $info[SYSTEM][PID] + #info system save + #system {kill -USR1 $info[SYSTEM][PID] main.c Added SIGHUB event which should trigger when the terminal is closed with TinTin++ still running inside. You can use @@ -114,7 +187,7 @@ draw.c Added color gradient support to #draw bar. To use it you field and based on the min;max value it will pick a color somewhere in between. - #loop 1 9 i #draw scroll bar 1 1 1 40 {$i;9;} + #loop 1 9 i #draw scroll bar 1 1 1 40 {$i;9;} draw.c Added the BAR drawing type. Currently only horizontal bars are supported, but for forward compatibility you should draw @@ -460,7 +533,7 @@ input.c ctrl-v will now correctly capture ctrl-alt-f and similar Example added to the SCRIPTS file. event.c Added GAG SESSION CONNECTED, GAG SESSION CREATED, - GAG SESSION DISCONNECTED, and GAG SESSION TIMED OUT events. + GAG SESSION DESTROYED, and GAG SESSION TIMED OUT events. mapper.c Added #map roomflag fog. Works like #map roomflag hide but the flag is auto cleared on entrance. @@ -494,7 +567,7 @@ screen.c Added basic link support. To create a basic link surround a keyword with the \e[4m keyword \e[24m tags. When clicked with mouse support enabled it'll spawn a LINK mouse event. -map.c Added #map exitflag