reactos/base/applications/cmdutils
Hermès Bélusca-Maïto 31322f5df9
[CONUTILS:PAGER][MORE] Implement text line caching + fix some bugs.
- Implement caching of individual (newline-separated) text lines; this
  behaviour can be enabled with a flag (enabled by MORE):
  CON_PAGER_CACHE_INCOMPLETE_LINE.
  This feature is necessary when reading a text file, whose text lines
  may span across two or more successive temporary read buffers, and is
  required for correctly determining whether the lines being read are
  blank and may be squeezed.

- When squeezing blank lines, the blank-line check must be done for each
  line segment corresponding to the screen line (and following) that
  need to be displayed. This matches the behaviour of MS MORE.COM.

- Fix the IsBlankLine() check to not consider FORM-FEEDs as being blank
  characters: This is necessary for correctly handling FORM-FEED
  expansion. Also note that MS MORE.COM only checks for spaces and TABs,
  so we are slightly overdoing these checks (considering other types of
  whitespace).

- Get rid of ConCallPagerLine() and the intermediate CON_PAGER_DONT_OUTPUT
  state flag that were used repeatedly for each and every small line
  chunks. Instead, call directly the user-specified 'PagerLine' callback
  when we are about to start treating the next line segment to be
  displayed (see comment above).

- Fix the exit return condition of ConPagerWorker(): it should return
  TRUE whenever we displayed all the required lines, and FALSE otherwise.
  Otherwise, the previous (buggy) condition on the data being read from
  the text file, may lead to the prompt not showing when a screenful of
  text has been displayed, if it happened that the current text buffer
  becomes empty at the same time (even if, overall, the text file hasn't
  been fully displayed).

- In MorePagerLine(), when we encounter for the first time a blank line
  that will be squeezed with other successive ones, display a single
  blank line. But for that, just display one space and a newline: this
  single space is especially needed in order to force line wrapping when
  the ENABLE_VIRTUAL_TERMINAL_PROCESSING or DISABLE_NEWLINE_AUTO_RETURN
  console modes are enabled. Otherwise the cursor remains at the
  previous line (without wrapping), and just outputting one newline will
  not make it move past 2 lines as one would naively expect.
2021-06-28 21:26:32 +02:00
..
at [TRANSLATION][INF] Update Chinese Traditional (zh-TW) translation (#3468) 2021-03-09 16:51:37 +01:00
attrib [attrib] pl-pl lang update 2020-04-16 18:32:22 +02:00
certutil [CERTUTIL] Add skeleton application with support for -hashfile 2020-09-11 15:29:28 +02:00
chcp [CHCP] Reset the current thread UI language and streams codepage after changing the console codepage. 2021-05-26 01:42:11 +02:00
clip Replace my E-mail with the ReactOS org one (#3475) 2021-02-22 18:26:55 +03:00
comp [TRANSLATION][INF] Update Chinese Traditional (zh-TW) translation (#3468) 2021-03-09 16:51:37 +01:00
cscript [CSCRIPT][WSCRIPT] Sync with Wine Staging 3.17. CORE-15127 2018-10-01 00:11:58 +01:00
dbgprint [APPLICATIONS] Fix 64 bit issues 2018-08-04 19:19:34 +02:00
doskey [REACTOS] Fix remaining ' \n' typos, in *.rc (#2393) 2020-03-06 19:08:25 +01:00
eventcreate [REACTOS] Fix remaining ' \n' typos, in *.rc (#2393) 2020-03-06 19:08:25 +01:00
fc [CMDUTILS][FC] Implement FC wildcard handling (#3640) 2021-05-05 12:23:16 +09:00
find [TRANSLATION][INF] Update Chinese Traditional (zh-TW) translation (#3468) 2021-03-09 16:51:37 +01:00
fsutil [FSUTIL] Mark some functions as static (only used in this file) 2020-03-26 16:39:16 +01:00
help [TRANSLATION][INF] Update Chinese Traditional (zh-TW) translation (#3468) 2021-03-09 16:51:37 +01:00
hostname [HOSTNAME] Retrieve the DNS *host name* of the computer, and not the computer name. 2019-06-16 01:00:40 +02:00
label [TRANSLATION][INF] Update Chinese Traditional (zh-TW) translation (#3468) 2021-03-09 16:51:37 +01:00
lodctr
mode [MODE] Reset the current thread UI language and streams codepage after changing the console codepage. Add extra error handling. 2021-05-26 01:42:11 +02:00
mofcomp
more [CONUTILS:PAGER][MORE] Implement text line caching + fix some bugs. 2021-06-28 21:26:32 +02:00
reg [TRANSLATION] Spanish minor fixes (#2547) 2020-04-15 13:27:36 +02:00
schtasks [SCHTASKS] Sync with Wine Staging 3.3. CORE-14434 2018-03-25 12:53:36 +01:00
sort
taskkill Replace my E-mail with the ReactOS org one (#3475) 2021-02-22 18:26:55 +03:00
tasklist [TRANSLATION] Chinese Traditional (zh-TW) translation update (#3526) 2021-04-11 10:59:19 +02:00
timeout Replace my E-mail with the ReactOS org one (#3475) 2021-02-22 18:26:55 +03:00
tree [TRANSLATIONS] Estonian for various base applications 2018-11-07 16:58:16 +01:00
where [CMDUTILS][WHERE] Implement WHERE command (#3642) 2021-05-11 14:37:49 +09:00
whoami [TRANSLATION][INF] Update Chinese Traditional (zh-TW) translation (#3468) 2021-03-09 16:51:37 +01:00
wmic Replace my E-mail with the ReactOS org one (#3475) 2021-02-22 18:26:55 +03:00
wscript [CSCRIPT][WSCRIPT] Sync with Wine Staging 4.18. CORE-16441 2019-12-23 00:58:01 +01:00
xcopy [TRANSLATION] Spanish minor fixes (#2547) 2020-04-15 13:27:36 +02:00
CMakeLists.txt [CMDUTILS][WHERE] Implement WHERE command (#3642) 2021-05-11 14:37:49 +09:00