aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rwxr-xr-xscripts/gitAR.sh4
-rw-r--r--scripts/install/opensim.tmux.conf6
-rw-r--r--src/NOTES.txt8
-rw-r--r--src/boxes/BOXES.txt26
-rw-r--r--src/boxes/boxes.c38
-rw-r--r--src/boxes/dumbsh.c2
-rw-r--r--src/boxes/handlekeys.c14
-rw-r--r--src/boxes/handlekeys.h2
8 files changed, 50 insertions, 50 deletions
diff --git a/scripts/gitAR.sh b/scripts/gitAR.sh
index d988077..ce7d441 100755
--- a/scripts/gitAR.sh
+++ b/scripts/gitAR.sh
@@ -3,8 +3,8 @@
3# Work around OpenSims slow database corruption bug by using git to store all old backups. 3# Work around OpenSims slow database corruption bug by using git to store all old backups.
4# Try to squeeze every last byte out of the tarballs. Seems to cut the total storage size down to one third the size of just the raw I/OAR files. 4# Try to squeeze every last byte out of the tarballs. Seems to cut the total storage size down to one third the size of just the raw I/OAR files.
5# Saves even more if there's been no changes. 5# Saves even more if there's been no changes.
6# On the other hand, these backup files will grow indefinately, the more changes, the faster it grows. I can live with that for more reliable backups that go back further. 6# On the other hand, these backup files will grow indefinitely, the more changes, the faster it grows. I can live with that for more reliable backups that go back further.
7# Tries to avoid loosing data if things go wrong. I think the main remaining problem would be running out of space, in which case you have bigger problems to deal with. 7# Tries to avoid losing data if things go wrong. I think the main remaining problem would be running out of space, in which case you have bigger problems to deal with.
8 8
9# Strategy - unpack the last one, unpack and commit any old I/OARs, pack up the result, delete it's working directory, THEN run the save i/oar. 9# Strategy - unpack the last one, unpack and commit any old I/OARs, pack up the result, delete it's working directory, THEN run the save i/oar.
10# Avoids having to sync with OpenSim finishing the current I/OAR, and as a bonus, an easy to deliver latest I/OAR for people that want it. 10# Avoids having to sync with OpenSim finishing the current I/OAR, and as a bonus, an easy to deliver latest I/OAR for people that want it.
diff --git a/scripts/install/opensim.tmux.conf b/scripts/install/opensim.tmux.conf
index 1b4da52..c264d51 100644
--- a/scripts/install/opensim.tmux.conf
+++ b/scripts/install/opensim.tmux.conf
@@ -47,13 +47,13 @@ set-option -g history-limit 100000
47 47
48# All this mouse stuff is unreliable in UTF8 mode. At least on roxterm. 48# All this mouse stuff is unreliable in UTF8 mode. At least on roxterm.
49# Also keep in mind the terminal specs mouse report limit of 256 characters, being less than my typical terminal width. 49# Also keep in mind the terminal specs mouse report limit of 256 characters, being less than my typical terminal width.
50# Hmm, still wont pass mouse through like the docs say they will. 50# Hmm, still won't pass mouse through like the docs say they will.
51# Ah, mc needs "mc -x". Though once again, watch that right edge on huge terminals. 51# Ah, mc needs "mc -x". Though once again, watch that right edge on huge terminals.
52# These three wont work under Ubuntu 16.04. 52# These three won't work under Ubuntu 16.04.
53##set-option -g mouse-resize-pane on 53##set-option -g mouse-resize-pane on
54##set-option -g mouse-select-pane on 54##set-option -g mouse-select-pane on
55##set-option -g mouse-select-window on 55##set-option -g mouse-select-window on
56# This wont work under Ubuntu 16.04. 56# This won't work under Ubuntu 16.04.
57##set-option -g mode-mouse on # on - mouse does copy mode stuff; copy-mode - mouse can't go into copy mode, but does stuff once in there; off - mouse is unmolested. 57##set-option -g mode-mouse on # on - mouse does copy mode stuff; copy-mode - mouse can't go into copy mode, but does stuff once in there; off - mouse is unmolested.
58# Instead do this (also defaults to turning on the above three mouse things) - 58# Instead do this (also defaults to turning on the above three mouse things) -
59set-option -g mouse on 59set-option -g mouse on
diff --git a/src/NOTES.txt b/src/NOTES.txt
index a72e7c8..19f3097 100644
--- a/src/NOTES.txt
+++ b/src/NOTES.txt
@@ -35,7 +35,7 @@ After much research, FastCGI / FCGI seems to be the most portable way of
35interfacing with existing web servers. FCGI protocol closes STDERR and 35interfacing with existing web servers. FCGI protocol closes STDERR and
36STDOUT, and uses STDIN as it's two way communications channel to the web 36STDOUT, and uses STDIN as it's two way communications channel to the web
37server, so our FCGI module can't be used as the text management front 37server, so our FCGI module can't be used as the text management front
38end. This is probably a good idea to keep them seperate anyway, for 38end. This is probably a good idea to keep them separate anyway, for
39security, coz the web server is exposed to the world, the console isn't. 39security, coz the web server is exposed to the world, the console isn't.
40 40
41Currently sledjchisl.c tests to see if it's running in tmux already, if 41Currently sledjchisl.c tests to see if it's running in tmux already, if
@@ -145,7 +145,7 @@ Account creation process in the database.
145 145
146UserAccounts table - 146UserAccounts table -
147 UserFlags 64 is "allow gods to log in as me" 147 UserFlags 64 is "allow gods to log in as me"
148 0xf00 is membershipType, unles there's a title. Only sent to viewers I think. 148 0xf00 is membershipType, unless there's a title. Only sent to viewers I think.
149 32 is Minors for estate banning purposes. 149 32 is Minors for estate banning purposes.
150 4 is Anonymous for estate banning purposes. 150 4 is Anonymous for estate banning purposes.
151 1 is AllowPublish in profile, but userprofile has this as separate field. 151 1 is AllowPublish in profile, but userprofile has this as separate field.
@@ -349,7 +349,7 @@ Coffee Grid -
349 349
350Destiny Grid - 350Destiny Grid -
351 Auto add Hypergrid visitors group to "partner" grids. 351 Auto add Hypergrid visitors group to "partner" grids.
352 Estate has "Allow parcel access overide?". Not sure what that means. 352 Estate has "Allow parcel access override?". Not sure what that means.
353 Which does fuck all, and turns itself off. 353 Which does fuck all, and turns itself off.
354 354
355Infinite Grid - 355Infinite Grid -
@@ -366,7 +366,7 @@ Check length in database values.
366Names are case insensitive in world, should be on the web page to? 366Names are case insensitive in world, should be on the web page to?
367 I think they are on the database side, so I should store the Lua files with lower case file names, but use the case from within the files for display. 367 I think they are on the database side, so I should store the Lua files with lower case file names, but use the case from within the files for display.
368 I may have seen case insensitive grid logins fail, so should test this. 368 I may have seen case insensitive grid logins fail, so should test this.
369 Now I have seen them work. Viewer dependant? 369 Now I have seen them work. Viewer dependent?
370 370
371The autogroup thing seems to have broke. Doesn't work for gods. 371The autogroup thing seems to have broke. Doesn't work for gods.
372 Or I did that on purpose, should check. lol 372 Or I did that on purpose, should check. lol
diff --git a/src/boxes/BOXES.txt b/src/boxes/BOXES.txt
index 745b7c9..7cded87 100644
--- a/src/boxes/BOXES.txt
+++ b/src/boxes/BOXES.txt
@@ -128,7 +128,7 @@ Common bits / differences.
128 Files - passed as arguments, or can add / remove them from the running editor. 128 Files - passed as arguments, or can add / remove them from the running editor.
129 Process the file through some proggy, or just some function of the editor script. 129 Process the file through some proggy, or just some function of the editor script.
130 Save / save as / backups. 130 Save / save as / backups.
131 Modelines are actualy discouraged as a security issue by the standard, but encouraged by toybox to use vi modelines. 131 Modelines are actually discouraged as a security issue by the standard, but encouraged by toybox to use vi modelines.
132 Filename completion. 132 Filename completion.
133 Filename prompts could have a couple of features. 133 Filename prompts could have a couple of features.
134 Can pass things in and out of a shell command, append to the file, edit a specific fixed section of a file or special file (disk block editing!), or use stdin and stdout (joe in a pipe). 134 Can pass things in and out of a shell command, append to the file, edit a specific fixed section of a file or special file (disk block editing!), or use stdin and stdout (joe in a pipe).
@@ -184,7 +184,7 @@ Common bits / differences.
184 Nano has essentially two status lines. 184 Nano has essentially two status lines.
185 Expert mode to turn it off, disable it for more screen space. 185 Expert mode to turn it off, disable it for more screen space.
186 Regexs - basic / extra / extended 186 Regexs - basic / extra / extended
187 Replacable stuff in search & replace. Ex/vi has this as an option. 187 Replaceable stuff in search & replace. Ex/vi has this as an option.
188 Commands - invoked immediately with no echo, or typed via readline. 188 Commands - invoked immediately with no echo, or typed via readline.
189 Pre command numbers (usually not echoed) / post command arguments. Also pre command regexs and other things to select the lines to work on. 189 Pre command numbers (usually not echoed) / post command arguments. Also pre command regexs and other things to select the lines to work on.
190 Methods of repeating commands. Repeat last / next command, possibly X times. 190 Methods of repeating commands. Repeat last / next command, possibly X times.
@@ -251,7 +251,7 @@ Common bits / differences.
251 File / all files / within selection. Wrap around searching. 251 File / all files / within selection. Wrap around searching.
252 Incremental. Interactive / all replace. Inverted (find non matches). 252 Incremental. Interactive / all replace. Inverted (find non matches).
253 Highlight / filter found. 253 Highlight / filter found.
254 Regex for the replace bit. Replacable stuff in search & replace. Ex/vi has this as an option. 254 Regex for the replace bit. Replaceable stuff in search & replace. Ex/vi has this as an option.
255 Can search mixed hex and strings. 255 Can search mixed hex and strings.
256 History, repeat, repeat in other direction. 256 History, repeat, repeat in other direction.
257 Modified state. 257 Modified state.
@@ -290,7 +290,7 @@ Common bits / differences.
290 Email quote handling. 290 Email quote handling.
291 Count / highlight lines matching or not matching regexes. 291 Count / highlight lines matching or not matching regexes.
292 Sort block. 292 Sort block.
293 Persistant cursor position and selection. 293 Persistent cursor position and selection.
294 Complete the word being typed based on other words in the file. 294 Complete the word being typed based on other words in the file.
295 Code editing. 295 Code editing.
296 Ctags - basically lookup a symbol (word cursor is on) in the ctags files, which gives you a position in some other file that defines this symbol. Then display this other file somehow, probably allowing editing. 296 Ctags - basically lookup a symbol (word cursor is on) in the ctags files, which gives you a position in some other file that defines this symbol. Then display this other file somehow, probably allowing editing.
@@ -367,7 +367,7 @@ less
367 Filter found lines. 367 Filter found lines.
368 Option to NOT do regex search. 368 Option to NOT do regex search.
369 Change the command line arguments while running. 369 Change the command line arguments while running.
370 Shell commands with replacable params. 370 Shell commands with replaceable params.
371 Input processor - some proggy that the input file is processed through, the output of that is shown. 371 Input processor - some proggy that the input file is processed through, the output of that is shown.
372 Um, why not use pipes and input redirection? 372 Um, why not use pipes and input redirection?
373 373
@@ -426,7 +426,7 @@ ex - obsolete for toybox, but part of vi.
426 Execute a buffer as ex commands. 426 Execute a buffer as ex commands.
427 Regexs have extra thingies. 427 Regexs have extra thingies.
428 Replace commands can refer to other bits of text using parameters. See the manual. 428 Replace commands can refer to other bits of text using parameters. See the manual.
429 Autowrite - basicaly save the file after certain commands. 429 Autowrite - basically save the file after certain commands.
430 Mode that strips out non printables on file read. 430 Mode that strips out non printables on file read.
431 Can be made ed compatible. lol 431 Can be made ed compatible. lol
432 Can display line numbers. 432 Can display line numbers.
@@ -438,7 +438,7 @@ ex - obsolete for toybox, but part of vi.
438 Margin auto wrap and end of line blanks removal. 438 Margin auto wrap and end of line blanks removal.
439 Can wrap searches. 439 Can wrap searches.
440 "modelines" (as used at the top of toybox source files) are apparently is strongly discouraged by the standard. shrugs 440 "modelines" (as used at the top of toybox source files) are apparently is strongly discouraged by the standard. shrugs
441 Overlaping copies are allowed. 441 Overlapping copies are allowed.
442 Automatic marks created sometimes. 442 Automatic marks created sometimes.
443 443
444vi 444vi
@@ -538,7 +538,7 @@ microemacs (microGNUemacs lol)
538 Save some buffers - looks for buffers that need saving and prompts user. 538 Save some buffers - looks for buffers that need saving and prompts user.
539 Just one space - delete all white space around cursor, then insert one single space. 539 Just one space - delete all white space around cursor, then insert one single space.
540 Query replace - an interactive search and replace. Also a replace all with no interaction. 540 Query replace - an interactive search and replace. Also a replace all with no interaction.
541 Oh nice - can do a search and replace with a regex for both the search string, AND for the replacable strings (selecting which ones get replaced with that regex). 541 Oh nice - can do a search and replace with a regex for both the search string, AND for the replaceable strings (selecting which ones get replaced with that regex).
542 Beginning / end of buffer. 542 Beginning / end of buffer.
543 Capitalize / upper / lower word. 543 Capitalize / upper / lower word.
544 Delete word. 544 Delete word.
@@ -598,7 +598,7 @@ wordstar (joe, turbo C) - Using joe, which also comes in emacs and pico flavours
598 Option to not use X lines at the top, for embedding in a BBS. 598 Option to not use X lines at the top, for embedding in a BBS.
599 Multi level undo and redo. 599 Multi level undo and redo.
600 Scrolling. 600 Scrolling.
601 Automatic detection of source code files, other types get word wraping and autoindent by default. 601 Automatic detection of source code files, other types get word wrapping and autoindent by default.
602 Can set left and right margins for word wrapping. 602 Can set left and right margins for word wrapping.
603 Can center between them to. 603 Can center between them to.
604 Can manually indent lines, highlighted blocks, or autodetected code blocks. 604 Can manually indent lines, highlighted blocks, or autodetected code blocks.
@@ -640,7 +640,7 @@ mcedit / cool edit
640 Bookmarks, toggle, next, previous, "flush" (meaning to remove all bookmarks.) 640 Bookmarks, toggle, next, previous, "flush" (meaning to remove all bookmarks.)
641 Copy / cut insert clipfile as well as prompting for a file. 641 Copy / cut insert clipfile as well as prompting for a file.
642 Highlight all lines with found text. 642 Highlight all lines with found text.
643 Search for hexidecimal, within selection, for whole words, and in "all charsets". 643 Search for hexadecimal, within selection, for whole words, and in "all charsets".
644 Goto matching bracket. 644 Goto matching bracket.
645 Show line numbers. 645 Show line numbers.
646 Find "declaration", back from and forward to declaration. 646 Find "declaration", back from and forward to declaration.
@@ -655,7 +655,7 @@ mcedit / cool edit
655 Run external format script on selection. 655 Run external format script on selection.
656 Insert date/time. 656 Insert date/time.
657 Half tabs. 657 Half tabs.
658 Persistant cursor position and selection. 658 Persistent cursor position and selection.
659 Visible white space. 659 Visible white space.
660 Optional go beyond end of line. 660 Optional go beyond end of line.
661 Learn keys. 661 Learn keys.
@@ -1047,10 +1047,10 @@ struct item
1047 1047
1048struct menu 1048struct menu
1049{ 1049{
1050 *items[] // Circular pointer definiton for sub menus. 1050 *items[] // Circular pointer definition for sub menus.
1051} 1051}
1052 1052
1053struct context // Somehow I get the feeling I'm having a failure of imagination here with the menus and function keys. Might be better to manage them seperately per box, but have common ones available? Nano might have a problem with this. 1053struct context // Somehow I get the feeling I'm having a failure of imagination here with the menus and function keys. Might be better to manage them separately per box, but have common ones available? Nano might have a problem with this.
1054{ 1054{
1055 *commands[] // The master list, the ones pointed to by the menu structs should be in this list. 1055 *commands[] // The master list, the ones pointed to by the menu structs should be in this list.
1056 menu *menu // Can be NULL. 1056 menu *menu // Can be NULL.
diff --git a/src/boxes/boxes.c b/src/boxes/boxes.c
index 4f542e1..b1c6e55 100644
--- a/src/boxes/boxes.c
+++ b/src/boxes/boxes.c
@@ -58,7 +58,7 @@ GLOBALS(
58 * The things it is targeting are - vi and more (part of the standards, so 58 * The things it is targeting are - vi and more (part of the standards, so
59 * part of the toybox TODO), less (also on the toybox TODO), joe and 59 * part of the toybox TODO), less (also on the toybox TODO), joe and
60 * wordstar (coz Rob said they would be good to include), nano (again Rob 60 * wordstar (coz Rob said they would be good to include), nano (again Rob
61 * thinks it would be good and I agree), microemacs (to avoid religous 61 * thinks it would be good and I agree), microemacs (to avoid religious
62 * wars), and mcedit (coz that's what I actually use). The ex editor comes 62 * wars), and mcedit (coz that's what I actually use). The ex editor comes
63 * along for the ride coz vi is basically a screen editor wrapper around 63 * along for the ride coz vi is basically a screen editor wrapper around
64 * the ex line editor. Sed might be supported coz I'll need to do basic 64 * the ex line editor. Sed might be supported coz I'll need to do basic
@@ -117,7 +117,7 @@ GLOBALS(
117 * few examples. A context holds a list of command to C function mappings, 117 * few examples. A context holds a list of command to C function mappings,
118 * key to command mappings, and a list of modes. 118 * key to command mappings, and a list of modes.
119 * 119 *
120 * Most of the editors targetted include a command line where the user 120 * Most of the editors targeted include a command line where the user
121 * types in editor commands, and each of those editors has different 121 * types in editor commands, and each of those editors has different
122 * commands. They would mostly use the same editing C functions though, or 122 * commands. They would mostly use the same editing C functions though, or
123 * short wrappers around them. The vi context at the end of this file is a 123 * short wrappers around them. The vi context at the end of this file is a
@@ -132,7 +132,7 @@ GLOBALS(
132 * menu to command mappings, and a list of displayed key/command pairs. 132 * menu to command mappings, and a list of displayed key/command pairs.
133 * Menu and key/command pair display is not written yet. Most editors have 133 * Menu and key/command pair display is not written yet. Most editors have
134 * a system for remapping key to command mappings, that's not supported 134 * a system for remapping key to command mappings, that's not supported
135 * yet. Emacs has a heirarchy of key to command mappings, that's not 135 * yet. Emacs has a hierarchy of key to command mappings, that's not
136 * supported yet. Some twiddling of the current design would be needed for 136 * supported yet. Some twiddling of the current design would be needed for
137 * those. 137 * those.
138 * 138 *
@@ -159,7 +159,7 @@ GLOBALS(
159 * command" function. Using most of the system with not much special casing. 159 * command" function. Using most of the system with not much special casing.
160 * 160 *
161 * 161 *
162 * I assume that there wont be a terribly large number of boxes. 162 * I assume that there won't be a terribly large number of boxes.
163 * Things like minimum box sizes, current maximum screen sizes, and the fact 163 * Things like minimum box sizes, current maximum screen sizes, and the fact
164 * that they all have to be on the screen mean that this assumption should 164 * that they all have to be on the screen mean that this assumption should
165 * be safe. It's likely that most of the time there will be only a few at 165 * be safe. It's likely that most of the time there will be only a few at
@@ -174,7 +174,7 @@ GLOBALS(
174 * My usual terminal is 104 x 380 characters. 174 * My usual terminal is 104 x 380 characters.
175 * There will be people with bigger monitors and smaller fonts. 175 * There will be people with bigger monitors and smaller fonts.
176 * So use sixteen bits for storing screen positions and the like. 176 * So use sixteen bits for storing screen positions and the like.
177 * Eight bits wont cut it. 177 * Eight bits won't cut it.
178 * 178 *
179 * 179 *
180 * These are the escape sequences we send - 180 * These are the escape sequences we send -
@@ -222,7 +222,7 @@ editing the contents of those lines, one line at a time. For persistent
222line history, they both have to save and load those lines to a file. 222line history, they both have to save and load those lines to a file.
223Other than that "readline" adds other behaviour, like moving the 223Other than that "readline" adds other behaviour, like moving the
224current line to the end when you hit return and presenting that line to 224current line to the end when you hit return and presenting that line to
225the caller (here's the command). So just making "readline" wont cut 225the caller (here's the command). So just making "readline" won't cut
226out much of the code. In fact, my "readline" is really just a thin 226out much of the code. In fact, my "readline" is really just a thin
227wrapper around the rest of the code. 227wrapper around the rest of the code.
228 228
@@ -257,7 +257,7 @@ On Thu, 27 Dec 2012 06:06:53 -0600 Rob Landley <rob@landley.net> wrote:
257> On 12/27/2012 12:56:07 AM, David Seikel wrote: 257> On 12/27/2012 12:56:07 AM, David Seikel wrote:
258> > On Thu, 27 Dec 2012 00:37:46 -0600 Rob Landley <rob@landley.net> 258> > On Thu, 27 Dec 2012 00:37:46 -0600 Rob Landley <rob@landley.net>
259> > wrote: 259> > wrote:
260> > > Since ls isn't doiing any of that, probing would just be awkward 260> > > Since ls isn't doing any of that, probing would just be awkward
261> > > so toysh should set COLUMNS to a sane value. The problem is, 261> > > so toysh should set COLUMNS to a sane value. The problem is,
262> > > we're not using toysh yet because it's still just a stub... 262> > > we're not using toysh yet because it's still just a stub...
263> > 263> >
@@ -378,7 +378,7 @@ struct context // Defines a context for content. Text viewer, editor, file br
378{ 378{
379 struct function *commands; // The master list, the ones pointed to by the menus etc should be in this list. 379 struct function *commands; // The master list, the ones pointed to by the menus etc should be in this list.
380 struct mode *modes; // A possible empty array of modes, indexed by the view. 380 struct mode *modes; // A possible empty array of modes, indexed by the view.
381 // OR might be better to have these as a linked list, so that things like Emacs can have it's mode keymap hierarcy. 381 // OR might be better to have these as a linked list, so that things like Emacs can have it's mode keymap hierarchy.
382 eventHandler handler; // TODO - Might be better to put this in the modes. I think vi will need that. 382 eventHandler handler; // TODO - Might be better to put this in the modes. I think vi will need that.
383 // Should set the damage list if it needs a redraw, and flags if border or status line needs updating. 383 // Should set the damage list if it needs a redraw, and flags if border or status line needs updating.
384 // Keyboard / mouse events if the box did not handle them itself. 384 // Keyboard / mouse events if the box did not handle them itself.
@@ -412,7 +412,7 @@ struct damage
412{ 412{
413 struct damage *next; // A list for faster draws? 413 struct damage *next; // A list for faster draws?
414 uint16_t X, Y, W, H; // The rectangle to be redrawn. 414 uint16_t X, Y, W, H; // The rectangle to be redrawn.
415 uint16_t offset; // Offest from the left for showing lines. 415 uint16_t offset; // Offset from the left for showing lines.
416 struct line *lines; // Pointer to a list of text lines, or NULL. 416 struct line *lines; // Pointer to a list of text lines, or NULL.
417 // Note - likely a pointer into the middle of the line list in a content. 417 // Note - likely a pointer into the middle of the line list in a content.
418}; 418};
@@ -462,7 +462,7 @@ struct _box
462{ 462{
463 box *sub1, *sub2, *parent; 463 box *sub1, *sub2, *parent;
464 view *view; // This boxes view into it's content. For sharing contents, like a split pane editor for instance, there might be more than one box with this content, but a different view. 464 view *view; // This boxes view into it's content. For sharing contents, like a split pane editor for instance, there might be more than one box with this content, but a different view.
465 // If it's just a parent box, it wont have this, so just make it a damn pointer, that's the simplest thing. lol 465 // If it's just a parent box, it won't have this, so just make it a damn pointer, that's the simplest thing. lol
466 // TODO - Are parent boxes getting a view anyway? 466 // TODO - Are parent boxes getting a view anyway?
467 uint16_t X, Y, W, H; // Position and size of the box itself, not the content. Calculated, but cached coz that might be needed for speed. 467 uint16_t X, Y, W, H; // Position and size of the box itself, not the content. Calculated, but cached coz that might be needed for speed.
468 float split; // Ratio of sub1's part of the split, the sub2 box gets the rest. 468 float split; // Ratio of sub1's part of the split, the sub2 box gets the rest.
@@ -475,7 +475,7 @@ void drawBox(box *box);
475 475
476 476
477#define BOX_HSPLIT 1 // Marks if it's a horizontally or vertically split. 477#define BOX_HSPLIT 1 // Marks if it's a horizontally or vertically split.
478#define BOX_BORDER 2 // Mark if it has a border, often full screen boxes wont. 478#define BOX_BORDER 2 // Mark if it has a border, often full screen boxes won't.
479 479
480static int overWriteMode; 480static int overWriteMode;
481static box *rootBox; // Parent of the rest of the boxes, or the only box. Always a full screen. 481static box *rootBox; // Parent of the rest of the boxes, or the only box. Always a full screen.
@@ -543,7 +543,7 @@ void loadFile(struct content *content)
543 543
544 do 544 do
545 { 545 {
546 // TODO - get_line() is slow, and wont help much with DOS and Mac line endings. 546 // TODO - get_line() is slow, and won't help much with DOS and Mac line endings.
547 temp = get_line(fd); 547 temp = get_line(fd);
548 if (temp) 548 if (temp)
549 addLine(content, NULL, temp, len); 549 addLine(content, NULL, temp, len);
@@ -691,7 +691,7 @@ void drawLine(int y, int start, int end, char *left, char *internal, char *conte
691 691
692 if (contents) 692 if (contents)
693 { 693 {
694 // strncpy wont add a null at the end if the source is longer, but will pad with nulls if source is shorter. 694 // strncpy won't add a null at the end if the source is longer, but will pad with nulls if source is shorter.
695 // So it's best to put a safety null in first. 695 // So it's best to put a safety null in first.
696 line[len] = '\0'; 696 line[len] = '\0';
697 strncpy(line, contents, len); 697 strncpy(line, contents, len);
@@ -955,7 +955,7 @@ int moveCursorAbsolute(view *view, long cX, long cY, long sX, long sY)
955 } 955 }
956 else if (lX < cX) // Trying to move beyond end of line. 956 else if (lX < cX) // Trying to move beyond end of line.
957 { 957 {
958 // See if we can move to the begining of the next line. 958 // See if we can move to the beginning of the next line.
959 if (view->line->next != &(view->content->lines)) 959 if (view->line->next != &(view->content->lines))
960 { 960 {
961 cY++; 961 cY++;
@@ -1147,7 +1147,7 @@ void drawBox(box *box)
1147 bchars = (toys.optflags & FLAG_a) ? borderCharsCurrent[0] : borderCharsCurrent[1]; 1147 bchars = (toys.optflags & FLAG_a) ? borderCharsCurrent[0] : borderCharsCurrent[1];
1148 1148
1149 // Slow and laborious way to figure out where in the linked list of lines we start from. 1149 // Slow and laborious way to figure out where in the linked list of lines we start from.
1150 // Wont scale well, but is simple. 1150 // Won't scale well, but is simple.
1151 if (box->view && box->view->content) 1151 if (box->view && box->view->content)
1152 { 1152 {
1153 int i = box->view->offsetY; 1153 int i = box->view->offsetY;
@@ -1352,7 +1352,7 @@ void splitBox(box *box, float split)
1352 } 1352 }
1353 1353
1354 // Note that a split box is actually three boxes. The parent, which is not drawn, and the two subs, which are. 1354 // Note that a split box is actually three boxes. The parent, which is not drawn, and the two subs, which are.
1355 // Based on the assumption that there wont be lots of boxes, this keeps things simple. 1355 // Based on the assumption that there won't be lots of boxes, this keeps things simple.
1356 // It's possible that the box has already been split, and this is called just to update the split. 1356 // It's possible that the box has already been split, and this is called just to update the split.
1357 box->split = split; 1357 box->split = split;
1358 if (NULL == box->sub1) // If not split already, do so. 1358 if (NULL == box->sub1) // If not split already, do so.
@@ -2405,7 +2405,7 @@ void boxes_main(void)
2405 context = &simpleVi; 2405 context = &simpleVi;
2406 } 2406 }
2407 2407
2408 // TODO - Should do an isatty() here, though not sure about the usefullness of driving this from a script or redirected input, since it's supposed to be a UI for terminals. 2408 // TODO - Should do an isatty() here, though not sure about the usefulness of driving this from a script or redirected input, since it's supposed to be a UI for terminals.
2409 // It would STILL need the terminal size for output though. Perhaps just bitch and abort if it's not a tty? 2409 // It would STILL need the terminal size for output though. Perhaps just bitch and abort if it's not a tty?
2410 // On the other hand, sed don't need no stinkin' UI. And things like more or less should be usable on the end of a pipe. 2410 // On the other hand, sed don't need no stinkin' UI. And things like more or less should be usable on the end of a pipe.
2411 2411
@@ -2440,7 +2440,7 @@ void boxes_main(void)
2440 2440
2441 IGNBRK ignore BREAK 2441 IGNBRK ignore BREAK
2442 BRKINT complicated, bet in this context, sends BREAK as '\x00' 2442 BRKINT complicated, bet in this context, sends BREAK as '\x00'
2443 PARMRK characters with parity or frame erors are sent as '\x00' 2443 PARMRK characters with parity or frame errors are sent as '\x00'
2444 ISTRIP strip 8th byte 2444 ISTRIP strip 8th byte
2445 INLCR translate LF to CR in input 2445 INLCR translate LF to CR in input
2446 IGLCR ignore CR 2446 IGLCR ignore CR
@@ -2490,7 +2490,7 @@ void boxes_main(void)
2490 // http://leonerds-code.blogspot.co.uk/2012/04/wide-mouse-support-in-libvterm.html is helpful. 2490 // http://leonerds-code.blogspot.co.uk/2012/04/wide-mouse-support-in-libvterm.html is helpful.
2491 // Enable mouse (VT200 normal tracking mode, UTF8 encoding). The limit is 2015. Seems to only be in later xterms. 2491 // Enable mouse (VT200 normal tracking mode, UTF8 encoding). The limit is 2015. Seems to only be in later xterms.
2492// fputs("\x1B[?1005h", stdout); 2492// fputs("\x1B[?1005h", stdout);
2493 // Enable mouse (VT340 locator reporting mode). In theory has no limit. Wont actually work though. 2493 // Enable mouse (VT340 locator reporting mode). In theory has no limit. Won't actually work though.
2494 // On the other hand, only allows for four buttons, so only half a mouse wheel. 2494 // On the other hand, only allows for four buttons, so only half a mouse wheel.
2495 // Responds with "\1B[e;p;r;c;p&w" where e is event type, p is a bitmap of buttons pressed, r and c are the mouse coords in decimal, and p is the "page number". 2495 // Responds with "\1B[e;p;r;c;p&w" where e is event type, p is a bitmap of buttons pressed, r and c are the mouse coords in decimal, and p is the "page number".
2496// fputs("\x1B[1;2'z\x1B[1;3'{", stdout); 2496// fputs("\x1B[1;2'z\x1B[1;3'{", stdout);
diff --git a/src/boxes/dumbsh.c b/src/boxes/dumbsh.c
index 9ad0204..8ef56e7 100644
--- a/src/boxes/dumbsh.c
+++ b/src/boxes/dumbsh.c
@@ -3,7 +3,7 @@
3 * Copyright 2014 David Seikel <won_fang@yahoo.com.au> 3 * Copyright 2014 David Seikel <won_fang@yahoo.com.au>
4 * 4 *
5 * Not a real shell, so doesn't follow any standards, 5 * Not a real shell, so doesn't follow any standards,
6 * coz it wont implement them anyway. 6 * coz it won't implement them anyway.
7 7
8USE_DUMBSH(NEWTOY(dumbsh, "", TOYFLAG_USR|TOYFLAG_BIN)) 8USE_DUMBSH(NEWTOY(dumbsh, "", TOYFLAG_USR|TOYFLAG_BIN))
9 9
diff --git a/src/boxes/handlekeys.c b/src/boxes/handlekeys.c
index 8bae529..115b7c6 100644
--- a/src/boxes/handlekeys.c
+++ b/src/boxes/handlekeys.c
@@ -26,7 +26,7 @@ struct key
26// TODO - Add other miscelany that does not use an escape sequence. 26// TODO - Add other miscelany that does not use an escape sequence.
27 27
28// This is sorted by type, though there is some overlap. 28// This is sorted by type, though there is some overlap.
29// Human typing speeds wont need fast searching speeds on this small table. 29// Human typing speeds won't need fast searching speeds on this small table.
30// So simple wins out over speed, and sorting by terminal type wins 30// So simple wins out over speed, and sorting by terminal type wins
31// the simple test. 31// the simple test.
32static struct key keys[] = 32static struct key keys[] =
@@ -242,7 +242,7 @@ void handle_keys(long extra, int (*handle_event)(long extra, struct keyevent *ev
242 strcat(sequence, "Esc"); 242 strcat(sequence, "Esc");
243 buffer[0] = buffIndex = 0; 243 buffer[0] = buffIndex = 0;
244 } 244 }
245 // TODO - Call some sort of timer tick callback. This wont be 245 // TODO - Call some sort of timer tick callback. This won't be
246 // a precise timed event, but don't think we need one. 246 // a precise timed event, but don't think we need one.
247 } 247 }
248 else if ((0 < p) && FD_ISSET(0, &selectFds)) 248 else if ((0 < p) && FD_ISSET(0, &selectFds))
@@ -292,8 +292,8 @@ void handle_keys(long extra, int (*handle_event)(long extra, struct keyevent *ev
292 292
293 // Check for known key sequences. 293 // Check for known key sequences.
294 // For a real timeout checked Esc, buffer is now empty, so this for loop 294 // For a real timeout checked Esc, buffer is now empty, so this for loop
295 // wont find it anyway. While it's true we could avoid it by checking, 295 // won't find it anyway. While it's true we could avoid it by checking,
296 // the user already had to wait for a time out, and this loop wont take THAT long. 296 // the user already had to wait for a time out, and this loop won't take THAT long.
297 for (j = 0; j < ARRAY_LEN(keys); j++) 297 for (j = 0; j < ARRAY_LEN(keys); j++)
298 { 298 {
299 if (strcmp(keys[j].code, buffer) == 0) 299 if (strcmp(keys[j].code, buffer) == 0)
@@ -322,7 +322,7 @@ void handle_keys(long extra, int (*handle_event)(long extra, struct keyevent *ev
322 * Next is a semi colon separated list of parameters (n1, n2, etc), which 322 * Next is a semi colon separated list of parameters (n1, n2, etc), which
323 * can be any characters from this set "01234567890:;<=>?". What the non 323 * can be any characters from this set "01234567890:;<=>?". What the non
324 * digit ones mean is up to the command. Parameters can be left out, but 324 * digit ones mean is up to the command. Parameters can be left out, but
325 * their defaults are command dependant. 325 * their defaults are command dependent.
326 * 326 *
327 * Next is an optional [extra] part from this set of characters 327 * Next is an optional [extra] part from this set of characters
328 * "!#$%&'()*+,-./", which includes double quotes. Can be many of these, 328 * "!#$%&'()*+,-./", which includes double quotes. Can be many of these,
@@ -361,7 +361,7 @@ void handle_keys(long extra, int (*handle_event)(long extra, struct keyevent *ev
361 csFinal[0] = 0; 361 csFinal[0] = 0;
362 p = 0; 362 p = 0;
363 363
364 // Unspecified params default to a value that is command dependant. 364 // Unspecified params default to a value that is command dependent.
365 // However, they will never be negative, so we can use -1 to flag 365 // However, they will never be negative, so we can use -1 to flag
366 // a default value. 366 // a default value.
367 for (j = 0; j < ARRAY_LEN(csParams); j++) 367 for (j = 0; j < ARRAY_LEN(csParams); j++)
@@ -381,7 +381,7 @@ void handle_keys(long extra, int (*handle_event)(long extra, struct keyevent *ev
381 { 381 {
382 // So we know when we get to the end of parameter space. 382 // So we know when we get to the end of parameter space.
383 t = index("01234567890:;<=>?", buffer[j + 1]); 383 t = index("01234567890:;<=>?", buffer[j + 1]);
384 // See if we passed a paremeter. 384 // See if we passed a parameter.
385 if ((';' == buffer[j]) || (!t)) 385 if ((';' == buffer[j]) || (!t))
386 { 386 {
387 // Only stomp on the ; if it's really the ;. 387 // Only stomp on the ; if it's really the ;.
diff --git a/src/boxes/handlekeys.h b/src/boxes/handlekeys.h
index 868183f..96893d9 100644
--- a/src/boxes/handlekeys.h
+++ b/src/boxes/handlekeys.h
@@ -51,7 +51,7 @@ struct keyevent {
51 * count is the count of translated CSI parameters. 51 * count is the count of translated CSI parameters.
52 * params is an array of translateted CSI parameters. 52 * params is an array of translateted CSI parameters.
53 * Empty parameters are set to -1, coz -1 parameters are not legal, 53 * Empty parameters are set to -1, coz -1 parameters are not legal,
54 * and empty ones should default to something that is command dependant. 54 * and empty ones should default to something that is command dependent.
55 * 55 *
56 * HK_KEYS 56 * HK_KEYS
57 * sequence the keystrokes as ASCII, either translated or not. 57 * sequence the keystrokes as ASCII, either translated or not.