Commit Graph

73 Commits

Author SHA1 Message Date
Xiang Xiao
deaa6c5b7b build: Replace $(TOPDIR)/Make.defs with $(APPDIR)/Make.defs
and move NUTTXLIB defintion to the common place

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-07-09 15:17:37 -03:00
Xiang Xiao
69f013e74e build: Remve the unnecessary .gitignore
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-23 15:56:35 +01:00
Xiang Xiao
ead498a788 build: Remove the workaround for the inexistence of .config/Make.defs
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-21 17:43:42 +01:00
Xiang Xiao
7a99d62ca1 Fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaox
iang@xiaomi.com>
2020-05-06 07:31:10 -06:00
Xiang Xiao
8a1f5ee34c debug: Reduce CONFIG_CPP_HAVE_VARARGS usage
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-06 07:31:10 -06:00
YAMAMOTO Takashi
e7156be066 Change the defaults of stack size configs to DEFAULT_TASK_STACKSIZE
This commit changes only ones with the default 2048 and
leaves the others.
E.g. this leaves SYSTEM_RAMTEST_STACKSIZE, whose default is 1024.
I guess those need to be inspected one-by-one.
2020-03-27 02:43:11 -05:00
Xiang Xiao
1511403fdf Revert "Don't generate .depend anymore"
This reverts commit cc5ad09caa.
2020-03-22 23:09:40 -05:00
Xiang Xiao
cc5ad09caa
Don't generate .depend anymore 2020-03-22 18:15:21 +00:00
Xiang Xiao
41d88f06e7 Run codespell -w with the latest dictonary again 2020-02-23 07:10:14 -06:00
Xiang Xiao
d660492289 Run codespell -w against all files
and fix the wrong correction
2020-02-22 14:41:36 -06:00
Xiang Xiao
1154735ca6 Refine the preprocess conditional guard style 2020-01-31 11:04:10 -06:00
Xiang Xiao
e0dcfa0c55 Remove extra whitespace from files (#43)
* Remove multiple newlines at the end of file
* Remove the white space from the end of line
2020-01-31 08:29:24 -06:00
Xiang Xiao
857158451b Unify the void cast usage
1.Remove void cast for function because many place ignore the returned value witout cast
2.Replace void cast for variable with UNUSED macro

Change-Id: Ie644129a563244a6397036789c4c3ea83c4e9b09
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-02 23:21:01 +08:00
Xiang Xiao
7808eb62d2 apps/: In all Make.def files, append to CONFIGURED_APPS patch with the absolute path. 2019-10-17 11:33:59 -06:00
Gregory Nutt
3a23523147 Makefiles: This reverts part of commit cf0365ea9. It restores 'conditional' inclusion of TOPDIR/Make.defs. Otherwise all make targets fail if the board has not been configured. That is okay most of the time, but not for things like clean and distclean which should not depend on being configured. 2019-10-15 09:25:48 +08:00
Xiang Xiao
e806097c70 Application.mk and main.c files: Change builtin's entry point from main to xxx_main by macro expansion. This change make the entry point fully compliant with POSIX/ANSI standard. 2019-10-06 06:14:56 -06:00
Xiang Xiao
cf0365ea92 Clean up Makefile under apps folder no functional changes. 2019-10-04 08:35:46 -06:00
Anthony Merlino
9fbc93ec9f Merged in antmerlino/apps/vi-build-fix (pull request #169)
system/vi: Condition KEY_CMDMODE_REPEAT with CONFIG_SYSTEM_VI_INCLUDE_COMMAND_REPEAT to avoid build error when option is not selected.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-02-23 19:08:46 +00:00
Ken Pettit
1a82551036 apps/system/vi/vi.c: Fix an infinite loop bug that can show up in some coases (plus a couple of other items). 2019-01-22 08:51:32 -06:00
Ken Pettit ‎
cc8beb8578 Bug fixes and changes to existing functionality
===============================================

1.  Deletion of last line in file using 'dd' caused infinite loop searching for
    'nextline'.  Fixed.

2.  Insertion of line above 1st line using 'O' caused line to be inserted on
    2nd line.  Fixed.

3.  Paste buffer from 'dd' was being free'd after the 'p'aste operation,
    preventing multiple paste opportunity.  Fixed.

4.  The cursor was not being bound to the line end and was allowed to 'hover'
    over the '\n' EOL character.  This caused wierd (relative to standard vi)
    insertion locations and cursor movement with 'a'ppend and 'i'nsert.  Fixed.

5.  The 'vi_shrinkpos' position didn't take the end of file pointer into
    account when calculating 'curpos', 'prevpos' variables causing wierdness
    when deleting things near the end of the file.  Fixed.

6.  The 'yy'ank command was improperly deleting the text from the document
    instead of simply yanking to the paste buffer.  Fixed.

7.  The 'dd'elete line funciton was not copying the deleted line to the paste
    buffer as part of the delete operation.  Fixed.

8.  The bottom line of the screen was sometimes being used for document text
    and other times for command / find entry.  Fixed by reserving the bottom
    the bottom line for status / command only.

9.  When scrolling up / down through a file, the cursor position was not
    preserved and moved further and further to the left column based on the
    line lengths of the lines visited.  Fixed.

10. The display was being COMPLETELY redrawn with each keystroke, causing the
    responsiveness to be imbearable.  Fixed.  Added logic to dynamicall
    indicated which portions of the screen need to be updated (full display,
    current line to end of screen, current line only, none).

11. The individual display line updates were being performed a character at
    a time by calling the vi_putch() function, causing slow performance,
    especially in telnet or USBCDC sessions where there is a lot of overhead
    per packet.  Fixed by calling vi_write() instead with a block of
    characters with breaks as needed for TAB exansion.

12. The forward delete 'x' operation allowed deletion through '\n' characters
    causing lines to be joined.  This is different from standard vi where
    'x' at the end of a line performs a delete backward operation.  Fixed.

13. When in 'ex' or find sub-modes (':' or '/' bottom line modes), hitting
    backspace with empty text did not return the operation to command mode
    like it does in standard vi.  Fixed.

14. Performing a 'find' opertation would only search from the current cursor
    position to the end of the file and did not wrap like in standard vi.
    Fixed.

15. Loading a file that was larger than the initial text allocation would
    force a call to 'vi_extendtext', marking the file as modified when in
    fact it hadn't even been loaded yet.  Fixed.

16. Combined vi_insert_mode and vi_replace_mode into a single function to
    save code space since they are nearly identical routines.

17. In command mode, backspace was deleting characters which is different
    from standard vi.  Backspace in command mode normally simply moves the
    cursor left / to the previous line.  Fixed.

18. Added code to handle boundry conditions when the file is new and
    commands are applied to an empty file.

19. Fixed vi_shrinktext so it doesn't allocate a zero-length buffer when
    the last character in the file is deleted.

20. The 'x' command was not copying to the paste buffer.  Fixed.

21. Fixed parsecolon routine to properly deal with ":wq" command sequence.

New feature additions
=====================

1.  Vi startup feature to prepend the current working directory to the
    supplied filename if it does not start with '/' absolute path specifier.
    This allows editing files in the current directory without needing to
    fully qualify the filename.

2.  Standard '~' empty screen line characters for proper identification
    of empty '\n' only lines at the end of the file.

3.  Moving into insert or append mode now prints '--INSERT--' in the status
    line and clears it upon exit.

4.  Integration with termcurses to detect special keystrokes and to
    handle terminal type differences.  Haven't yet converted all vt100 print
    codes to termcurses equivalents.

5.  Support for up, down, left, right arrows, page-up, page-down keys
    in command mode.

6.  Added 'b' command to move cursor 'b'ack to previous word.  Honors the
    command repeat value for multiple word moves.

7.  Added 'w' command to move cursor to next 'w'ord.  Honors the command
    repeat value for multiple word moves.

8.  Added 'f' and 't' commands to find characters on the current line.
    Honors the command repeat value.

9.  Added the find 'n'ext command to repeat the previous find operation.

10. Added the 'H', 'M', and 'L' commands to move the cursor to top,
    middle and bottom of the display.

11. Extended yank/paste to manage a paste buffer with character mode in
    addition to line mode.  Character mode allows cut / paste of
    individual characters or groups of characters vs. full lines.

12. Added support in the 'd'elete and 'y'ank commands for character mode
    deletions such as 'dw', 'dfa', '2yw', etc.

13. Added support in paste routine for multiple paste using command value
    argument.

14. Added support for the 'D' and 'C' delete and change to end of line
    commands.

15. Added support for 's'ubstitute key ('x' followed by insert mode).

16. Modified yank / paste allocation scheme to avoid repeated alloc
    and free of paste buffer.  Uses a minimum allocation size scheme and
    only does free / realloc when paste does not fit.  If the paste is
    smaller than the current allocation and the current allocation is
    larger than the threshold, then the buffer is freed and a smaller
    buffer allocated.  Otherwise the existing buffer is used.

17. Support for 'P'aste before current cursor position.

18. Support for '?' reverse search mode.

19. Support for 'J'oin next line with current line command.

20. Printing of current row,col in status line of display.

21. Command repeat '.' support for commands that modifiy text.

22. Support in replace  / insert mode for arrow keys, PGUP / PGDN, HOME,
    and END.  Using these will cause the command repeat buffer to
    reset such that only the last text addition after a cursor movement
    is saved.

23. Added 'X' delete previous command.

24. Added "gg" go to top of document command sequence.

25. Added "ZZ" save and quit command (equivalent to :wq).

26. Implemented '^' goto first non-whitespace on current line, along
    with '+' and '-' goto first non-whitespace on next / previous line.

27. Added CR / LF goto first non-whitespace on next line in command mode.
2019-01-16 19:25:04 -06:00
anchao
42ce384259 apps/system/vi/vi.c: Do not print error if the file does not exist. 2018-11-07 11:43:04 -06:00
anchao
b5cfd93444 apps/: Modification to build system: Unified application compilation rules 2018-09-03 09:29:56 -06:00
anchao
220653f21c Squashed commit of the following:
Author: anchao <anchao@pinecone.net>

     apps/, most main() function: Correct CONFIG_BUILD_LOADABLE usage
     Loadable apps/: Correct loadable symbol table generate
     apps/system/ubloxmodem:  Fix build break
     apps/examples/ostest: start restart/waitpid/user test from main loop
     apps/nshlib:  Expand reboot and poweroff commands to include a second, optional mode argument

    Author: Gregory Nutt <gnutt@nuttx.org>

     An attempt to fix build issues.  Does not work.
     apps/examples/ostest:  Fix some inappropriate renaming of static functions introduced with recent patches.
     apps/builtin/exec_builtin.c:  Fix a error introduced by recent comments.  Found in build testing.

    Author: anchao <anchao@pinecone.net>

     apps/builtin/exec_builtin.c:  Try posix_spawn if builtin apps do not have have an entry point.
     apps/Application.mk: introduce MODULE config to simplify tristate(m)
     apps/nsh:  Change the nuttx shell module type to tristate
     apps:  Add loadable application support
     script/mksymtab:  Generate symbol table name by default
     apps/builtin:  Allow loadable applications can register with apps/builtin.
2018-08-23 11:06:15 -06:00
Gregory Nutt
2f982e9c77 Revert "Squashed commit of the following:"
This reverts commit 25b92edd9f.
2018-08-22 12:06:32 -06:00
anchao
25b92edd9f Squashed commit of the following:
apps/builtin/exec_builtin.c:  Try posix_spawn if builtin apps do not have have an entry point.
    apps/Application.mk: introduce MODULE config to simplify tristate(m)
    apps/nsh:  Change the nuttx shell module type to tristate
    apps:  Add loadable application support
    script/mksymtab:  Generate symbol table name by default
    apps/builtin:  Allow loadable applications can register with apps/builtin.
2018-08-22 09:30:38 -06:00
Gregory Nutt
a89f0e3a07 Add missing function names in function headers. 2018-08-13 15:52:59 -06:00
Gregory Nutt
7a8561728c The last change added .PRECIOUS: $(BIN) to everyway Makefile in hopes the libapps.a will not be deleted on Control-C (unproven so far). However, $(BIN) may contain back slashes in some build platforms and that causes problems for make: It can't handle the backslashes in the .PRECIOUS dependency list. $(BIN) replaced with ../../libapp.a, where the number of ../ depends on the depth of the Makefile in the apps/ source tree. 2017-08-13 11:03:17 -06:00
Gregory Nutt
a66da34f18 All Makefiles: Add .PRECIOUS: apps/libapps.a to every Makefile. Hopefully this will end awkward problems when you Control-C out of a build and libapps.a is deleted. 2017-08-13 09:35:14 -06:00
Gregory Nutt
13911d9b17 Fix lots of occurrences of 'the the', 'the there', 'the these', 'the then', 'the they. 2017-05-11 13:40:03 -06:00
Gregory Nutt
ac018597e4 Fix a syntax error in a Kconfig file. Update comments in another. 2016-07-29 13:12:28 -06:00
Gregory Nutt
3e83aa7388 Add apps/include to include path in top-level Make.defs file. Remove multiple definitions of INCDIR opt. 2016-07-11 10:45:17 -06:00
Gregory Nutt
344c92e2a4 Replace all occurrences of vdbg with vinfo 2016-06-11 11:55:38 -06:00
Sebastien Lorquet
bfff5e7179 Add empty preconfig rules to 'leaf' makefiles 2016-06-02 16:24:30 +02:00
Sebastien Lorquet
9a406515d7 make the full tree use wildcards make.defs 2016-06-02 16:21:21 +02:00
Gregory Nutt
d5b6949c9f Fix references to the no-longer-existent misc/ directory in comments, README files, and documentation 2015-06-28 08:14:53 -06:00
Gregory Nutt
6e462908ba apps/system: Clean up Kconfig menuing 2015-04-07 13:23:39 -06:00
Gregory Nutt
b2c867f214 More ccpcheck-related fixes 2014-11-25 17:28:22 -06:00
Gregory Nutt
ecc8c70f77 Fixes for more cppcheck complaints. 2014-11-25 15:41:34 -06:00
Gregory Nutt
2719815dd9 Update everything under apps/ to use the corrected syslog interfaces 2014-10-08 11:34:22 -06:00
Gregory Nutt
0a4258db6d MAINOBJ needs to be added to object list in many Makefile 2014-09-11 06:48:11 -06:00
Gregory Nutt
681b3baf96 Changes to many Makefiles. For kernel buil object containing main cannot go into library because of name collisions. The object file must be handled as a special case in every Makefile 2014-09-07 09:17:23 -06:00
Gregory Nutt
043d6898db Determine the main object name from the main source name in every kernel build Makefile 2014-09-07 07:19:19 -06:00
Gregory Nutt
2881b73f3d Add an nm command after every kernel build link to show if there are any undefined symbols 2014-09-07 07:15:59 -06:00
Gregory Nutt
70765b94fc Add the main object to the list objects to link in every kernel build link command 2014-09-07 07:12:55 -06:00
Gregory Nutt
22720d5eb3 Add the main object to the dependencies for the kernel build 2014-09-07 07:09:22 -06:00
Gregory Nutt
b65500c289 If now a kernel build, then add the main object in with all of the rest 2014-09-07 07:05:54 -06:00
Gregory Nutt
22eb5d5c46 Update apps/examples/helloxx/Makefile 2014-09-07 06:59:30 -06:00
Gregory Nutt
181b75301f Customize the program name in the generic setup that was added to each makefile that installs a program 2014-09-06 13:30:44 -06:00
Gregory Nutt
3454362678 Add generic setup logic to every Makefile that installs a program. Each will need customization 2014-09-06 13:19:02 -06:00
Gregory Nutt
cedf1d7369 Fix all install targets 2014-09-06 13:01:44 -06:00