1324 Commits

Author SHA1 Message Date
Marcin Cieślak
cb59b9dac1 Fix [bug #53552] wording in the manpage 2018-05-06 12:27:21 +00:00
Marcin Cieślak
59a33d6ba2 groff warning: can't find font "p" 2018-05-06 12:18:29 +00:00
Marcin Cieślak
22190a161a Fix (login) entry in the default bindings
nroff warning:

tbl:src/doc/screen.1:551: excess data entry `(lastmsg)' discarded
tbl:src/doc/screen.1:553: excess data entry `Repeat the last message displayed in the message line.
' discarded
2018-05-06 12:17:41 +00:00
Marcin Cieślak
c35fe712d4 Provide fallback for Unicode ellipsis 2018-05-06 12:11:03 +00:00
Marcin Cieślak
f0ab72acf0 Fix intendation around "displays"
Remove UTF-8 quotes
2018-05-06 11:57:57 +00:00
Amadeusz Sławiński
ae04c6ace9 fix sort command
I don't even want to look at mails & git log why it was so broken
even before refactoring (probably my fault ... - need to get to
implementing  automated teast at some time)
2018-04-11 21:42:16 +02:00
Amadeusz Sławiński
434b27c128 clean up after refactoring
finally we can get rid of wtab and maxwin
2018-04-11 21:42:16 +02:00
Amadeusz Sławiński
9647cd5a7d simplify collapse command 2018-04-11 21:42:16 +02:00
Amadeusz Sławiński
f12ada8192 refactor SwapWindows
while at it add two helper functions to add and remove windows from list
and reuse it in MakeWindow for creating windows
2018-04-11 21:42:16 +02:00
Amadeusz Sławiński
d995ba7392 refactor AddWindows, so it doesn't use wtab & maxwin 2018-04-11 21:42:16 +02:00
Amadeusz Sławiński
d48fef6544 use list for getting windows in order instead of magic on wtab
also remove comment mentioning using wtab for verification, it will
be impossible when wtab is removed
2018-04-11 21:42:16 +02:00
Amadeusz Sławiński
e269348e0a refactor NextWindow and PreviousWindow to return Window pointer instead of window number 2018-04-11 21:42:16 +02:00
Amadeusz Sławiński
eaf476f54d refactor SwitchWindow to accept Window * as parameter
it makes more sense this way and will make even more when NextWindow and PreviousWindow
return pointer
2018-04-11 21:42:16 +02:00
Amadeusz Sławiński
57ff988d7e use last_window->w_number where we need upper bound instead of maxwin
in places where we call GetWindowByNumber, just pass the number if positive, as
it is checked inside function anyway
2018-04-11 21:42:16 +02:00
Amadeusz Sławiński
a462bc2858 use GetWindowByNumber(n) instead of wtab[n] 2018-04-11 21:42:16 +02:00
Amadeusz Sławiński
033ef5e42a refactor ShowWindowsX to use window list, now that we can 2018-04-11 21:42:16 +02:00
Amadeusz Sławiński
854a6db170 add function to search for window by number 2018-04-11 21:42:16 +02:00
Amadeusz Sławiński
7ecf4f1d3e use linked window list now that we can 2018-04-11 21:42:16 +02:00
Amadeusz Sławiński
da4a425fcc create bidirectional list of windows 2018-04-11 21:42:16 +02:00
Amadeusz Sławiński
8be327be94 rename windows to mru_window and window->w_next to window->w_prev_mru
those variables are used to maintain most recently used list and I want
to reuse w_next to make proper list of windows instead of wtab

when we loop it doesn't make difference in which order we go, so we may
as well keep looping using mru list (and review later when we introduce
in order list)
2018-04-11 21:42:16 +02:00
Amadeusz Sławiński
f11283ffc9 get rid of unneeded variable 2018-04-11 21:42:16 +02:00
Amadeusz Sławiński
6470f7e5be always create C-a [0-9] shortcuts
we now dynamically allocate number of windows, and by default it starts with 16
2018-04-11 21:42:16 +02:00
Amadeusz Sławiński
362aec1da8 use function to get number of perpendicular canvases 2018-04-07 13:29:11 +02:00
Amadeusz Sławiński
452c62988d reduce variables scope 2018-04-07 13:29:11 +02:00
Amadeusz Sławiński
30f1d39ca5 refactor RefreshXtermOSC() 2018-04-07 13:29:11 +02:00
Amadeusz Sławiński
60e19ab26e get rid of (sometype *)0 casts
using NULL makes it clear enough what's going on
2018-04-07 13:29:11 +02:00
Amadeusz Sławiński
12aed9c422 make docs build 2018-04-06 00:30:21 +02:00
Amadeusz Sławiński
2fe567f24d silence clang warnings
warning: implicit conversion from 'int' to 'char' changes value from 255 to -1 [-Wconstant-conversion]
2018-04-06 00:18:33 +02:00
Amadeusz Sławiński
e52b2b45c5 reduce variable scope from global to function 2018-04-06 00:18:33 +02:00
Amadeusz Sławiński
89c4a48756 redefine screen_conv as static function
fixes sparse warning:
socket.c:1124:5: warning: symbol 'screen_conv' was not declared. Should it be static?
2018-04-06 00:18:33 +02:00
Amadeusz Sławiński
c368611c9a fix SetTtyname definition
SetTtyname was forward declared as static, so define it that way
2018-04-06 00:18:33 +02:00
Amadeusz Sławiński
81a2699fdd use NULL instead of 0 where applicable
found with sparse
warning: Using plain integer as NULL pointer
2018-04-06 00:18:33 +02:00
Amadeusz Sławiński
9b5a5ed228 fix non-ANSI function declarations
as per sparse warnings:
warning: non-ANSI function declaration of function '...'
2018-04-06 00:18:33 +02:00
Amadeusz Sławiński
af7e07f970 add comm.h as dependency
fixes failures when doing multijob build
2018-04-06 00:18:33 +02:00
Amadeusz Sławiński
f07f01985d remove now unused key parameter from DoAction 2018-04-06 00:18:33 +02:00
Amadeusz Sławiński
9a546765c6 remove key parameter from command handlers 2018-04-06 00:18:33 +02:00
Amadeusz Sławiński
c6c8cd32dc stop using key argument in pow_detach command handler
adds  pow_detach --command  as alternative way to call pow_detach
command and binds  C-a D  to call it

also changes the way confirmation is asked for, to be in line with
how it is done with kill and quit commands
2018-04-06 00:18:33 +02:00
Amadeusz Sławiński
4fc50b943b stop using key argument in quit command handler
adds  quit --command  as alternative way to call quit command and
binds  C-a C-\  to call it
2018-04-06 00:18:33 +02:00
Amadeusz Sławiński
506477bf85 stop using key argument in kill command handler
adds  kill --command  as alternative way to call kill command and
binds  C-a k  and  C-a C-k  to call it
2018-04-06 00:18:32 +02:00
Amadeusz Sławiński
6461828e34 remove no longer used variables in DoAction 2018-04-06 00:18:32 +02:00
Amadeusz Sławiński
461f0ad0c4 refactor DoAction switch into calling functions
after everything is finished goals are:
* to have table of callbacks to search from and call
* commands to have (char **argv, int argc) in declaration

refactor RC_SELECT into separate function call
refactor RC_MULTIINPUT into separate function call
  also fix some logic while at it
refactor RC_DEFAUTONUKE & RC_AUTONUKE into separate function calls
refactor RC_DEFOBUFLIMIT & RC_OBUFLIMIT into separate function calls
refactor RC_DUMPTERMCAP into separate function call
refactor RC_HARDCOPY into separate function call
refactor RC_DEFLOG & RC_LOG into separate function calls
refactor RC_SUSPEND into separate function calls
refactor RC_PREV & RC_NEXT into separate function calls
refactor RC_KILL into separate function call
refactor RC_QUIT into separate function call
refactor RC_DETACH & RC_POW_DETACH into separate function calls
refactor RC_ZMODEM into separate function call
refactor RC_UNBINDALL into separate function call
refactor RC_ZOMBIE into separate function call
refactor RC_WALL into separate function call
refactor RC_AT into separate function call
refactor RC_READREG into separate function call
refactor RC_REGISTER into separate function call
refactor RC_PROCESS into separate function call
refactor RC_STUFF into separate function call
refactor RC_REDISPLAY into separate function call
refactor RC_WINDOWS inte separate function call
refactor RC_VERSION into separate function call
remove RC_TIME
  should've done this when removing time and loadavg escapes
refactor RC_INFO into separate function call
refactor RC_DINFO into separate function call
refactor RC_COMMAND into separate function call
refactor RC_OTHER into separate function call
refactor RC_META into separate function call
refactor RC_XON & RC_XOFF into separate function calls
refactor RC_BREAKTYPE & RC_DEFBREAKTYPE into separate functions calls
  something to check:
  according to documentation they should have bit different behaviour,
  but are all one single call...
refactor RC_BREAK & RC_POW_BREAK into separate function calls
refactor RC_LOCKSCREEN into separate function call
refactor RC_WIDTH & RC_HEIGHT into separate function calls
refactor RC_DEFDYNAMICTITLE & RC_DYNAMICTITLE into separate function calls
refactor RC_TITLE into separate function call
refactor RC_COLON into separate function call
refactor RC_LASTMSG into separate function call
refactor RC_SCREEN into separate function call
refactor RC_WRAP into separate function call
refactor RC_FLOW into separate function call
refactor RC_DEFWRITELOCK & RC_WRITELOCK into separate function calls
refactor RC_CLEAR into separate function call
refactor RC_RESET into separate function call
refactor RC_MONITOR into separate function call
refactor RC_DISPLAYS into separate function call
refactor RC_WINDOWLIST into separate function call
refactor RC_HELP into separate function call
refactor RC_LICENSE into separate function call
refactor RC_COPY into separate function call
refactor RC_HISTORY & RC_PASTE into separate function calls
refactor RC_READBUF & RC_WRITEBUF into separate function calls
refactor RC_REMOVEBUF into separate function call
refactor RC_IGNORECASE into separate function call
refactor RC_DEFESCAPE & RC_ESCAPE into separate function calls
refactor RC_CHDIR into separate function call
refactor RC_DEFSHELL & RC_SHELL into separate function call
refactor RC_HARDCOPYDIR into separate function call
refactor RC_LOGFILE into separate function call
refactor RC_LOGTSTAMP into separate function call
refactor RC_SHELLTITLE into separate function call
refactor RC_TERMCAP, RC_TERMCAPINFO & RC_TERMINFO into separate function call
refactor RC_SLEEP into separate function call
refactor RC_TERM into separate function call
refactor RC_ECHO into separate function call
refactor RC_BELL into separate function call
refactor RC_BUFFERFILE into separate function call
refactor RC_ACTIVITY into separate function call
refactor RC_POW_DETACH_MSG into separate function call
refactor RC_DEFLOGIN & RC_LOGIN into separate function calls
refactor RC_DEFFLOW into separate function call
refactor RC_DEFWRAP into separate function call
refactor RC_DEFC1 into separate function call
refactor RC_DEFBCE into separate function call
refactor RC_DEFGR into separate function call
refactor RC_DEFMONITOR into separate function call
refactor RC_DEFMOUSETRACK & RC_MOUSETRACK into separate function calls
refactor RC_DEFSILENCE into separate function call
refactor RC_VERBOSE into separate function call
refactor RC_HARDSTATUS into separate function call
refactor RC_STATUS into separate function call
refactor RC_CAPTION into separate function call
refactor RC_CONSOLE into separate function call
refactor RC_ALLPARTIAL & RC_PARTIAL into separate function call
refactor RC_VBELL into separate function call
refactor RC_VBELLWAIT, RC_MSGWAIT, RC_MSGMINWAIT & RC_SILENCEWAIT into separate function calls
refactor RC_BUMPRIGHT & RC_BUMPLEFT into separate function calls
refactor RC_COLLAPSE into separate function call
refactor RC_NUMBER into separate function call
refactor RC_ZOMBIE_TIMEOUT into separate function call
refactor RC_SORT into separate function call
refactor RC_SILENCE into separate function call
  also fixes one bug from adding bool b
refactor RC_DEFSCROLLBACK & RC_SCROLLBACK into separate function calls
refactor RC_SESSIONNAME into separate function call
refactor RC_SETENV & RC_UNSETENV into separate function calls
refactor RC_DEFSLOWPASTE & RC_SLOWPASTE into separate function calls
refactor RC_MARKKEYS into separate function call
refactor RC_PASTEFONT into separate function call
refactor RC_CRLF into separate function call
refactor RC_COMPACTHIST into separate function call
refactor RC_HARDCOPY_APPEND into separate function call
refactor RC_VBELL_MSG into separate function call
refactor RC_DEFMODE into separate function call
refactor RC_AUTODETACH into separate function call
refactor RC_STARTUP_MESSAGE into separate function call
refactor RC_BIND into separate function call
refactor RC_BINDKEY into separate function call
refactor RC_MAPTIMEOUT into separate function call
refactor RC_MAPNOTNEXT into separate function call
refactor RC_MAPDEFAULT into separate function call
refactor RC_ACLCHG, RC_ACLADD, RC_ADDACL & CHACL into separate function call
refactor RC_ACLDEL into separate function call
refactor RC_ACLGRP into separate function call
refactor RC_ACLUMASK & RC_UMASK into separate function call
refactor RC_MULTIUSER into separate function call
refactor RC_EXEC into separate function call
refactor RC_DENONBLOCK & RC_NONBLOCK into separate function call
refactor RC_GR into separate function call
refactor RC_C1 into separate function call
refactor RC_DEFENCONDING & RC_ENCODING into separate function calls
refactor RC_DEFUTF8 & RC_UTF8 into separate function calls
refactor RC_PRINTCMD into separate function call
refactor RC_DIGRAPH into separate function call
refactor RC_DEFHSTATUS & RC_HSTATUS into separate function calls
refactor RC_DEFCHARSET & RC_CHARSET into separate function calls
refactor RC_RENDITION & RC_SORENDITION into separate function calls
refactor RC_SOURCE into separate function call
refactor RC_SU into separate function call
refactor RC_SPLIT into separate function call
refactor RC_REMOVE into separate function call
refactor RC_ONLY into separate function call
refactor RC_FIT into separate function call
refactor RC_FOCUS into separate function call
refactor RC_RESIZE into separate function call
refactor RC_SETSID into separate function call
refactor RC_EVAL into separate function call
refactor RC_ALTSCREEN into separate function call
refactor RC_BACKTICK into separate function call
refactor RC_BLANKER & RC_BLANKERPRG into separate function calls
refactor RC_IDLE into separate function call
refactor RC_FOCUSMINSIZE into separate function call
refactor RC_GROUP into separate function call
refactor RC_LAYOUT into separate function call
refactor RC_CJKWIDTH into separate function call
refactor RC_TRUECOLOR into separate function call
2018-04-06 00:18:32 +02:00
Amadeusz Sławiński
9d711b1433 reduce bool b scope 2018-04-06 00:18:32 +02:00
Amadeusz Sławiński
aaa08ac9af reduce i scope 2018-04-06 00:18:32 +02:00
Amadeusz Sławiński
da6e343a98 Window *p does not need whole function scope 2018-04-06 00:18:32 +02:00
Amadeusz Sławiński
aada2d78ac use ARRAY_SIZE for SocketPath size
while at it make its size more reasonable
2018-04-06 00:18:32 +02:00
Amadeusz Sławiński
22e02cc018 reformat macro, so it's readable 2018-04-04 22:58:44 +02:00
Amadeusz Sławiński
0b74182d28 add row/column report escape sequence
suggested by Micah Cowan

Bug: 23719
2018-03-03 23:33:58 +01:00
Amadeusz Sławiński
e43d6459e1 sort switch cases in raising order 2018-03-03 23:33:58 +01:00
Amadeusz Sławiński
a4363ce197 remove unneeded broken parsing
correct utf8 length is maximally 4 bytes only
2018-03-03 23:33:58 +01:00
Amadeusz Sławiński
b282683867 cast pointer to correct type 2018-03-03 23:33:39 +01:00