aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* cmenu: fix Login/Password and Kernel Arguments lines (complex.c)Pierre-Alexandre Meyer2009-09-051-7/+9
| | | | | | | | | | | Update the cmenu example complex.c to use clear_line(): cprint behavior has changed w.r.t. cursor positioning (it is automatically advanced now). Note: need to reset the colors before clearing the line since the status bar is printed just before the Kernel Arguments line and it changes the background color. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
* libansi: add reset_colors functionPierre-Alexandre Meyer2009-09-052-0/+7
| | | | | | Purpose of reset_colors is to reset the attribute to VGA 0x07. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
* cmenu: turn off auto wrapPierre-Alexandre Meyer2009-09-041-0/+4
| | | | | | | | Auto wrap made the menu scroll because of the status line (when printing the last character of the bottom right of the screen, the ansicon scrolled the whole menu). Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
* ansi: add support for no-wrap mode, cleanupsH. Peter Anvin2009-09-042-40/+51
| | | | | | | | Add support for nowrap mode CSI ? 7 l (unfortunately, on ANSI.SYS it is CSI = 7 l; which means that the only way to support both is to print both sequences and then erase the resulting garbage.) Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Merge commit 'origin/libansi' into cmenu-videoPierre-Alexandre Meyer2009-09-049-214/+222
|\
| * libansi: fix compiler warningsPierre-Alexandre Meyer2009-09-011-5/+5
| | | | | | | | | | | | Fix "warning: function declaration isn't a prototype" warnings. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * hdt: switch to libansiPierre-Alexandre Meyer2009-09-011-1/+1
| | | | | | | | | | | | Make hdt use libansi. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * cmenu: switch to libansiPierre-Alexandre Meyer2009-09-012-159/+1
| | | | | | | | | | | | Make cmenu use libansi. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * libansi: add missing prototype in the headerPierre-Alexandre Meyer2009-09-011-0/+2
| | | | | | | | | | | | clearwindow() was not presented in libansi.h. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * libansi: build libansi.oPierre-Alexandre Meyer2009-09-012-1/+3
| | | | | | | | | | | | Hook libansi.o into the lib/ build. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * libansi: move to lib directory, as it is MIT, not GPL licensedPierre-Alexandre Meyer2009-09-012-0/+0
| | | | | | | | | | | | | | gplinclude/gpllib should be used for external, GPL, libraries only. libansi has been developed for Syslinux and is MIT licensed. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * gpllib: add more ANSI functionsPierre-Alexandre Meyer2009-09-012-9/+165
| | | | | | | | | | | | Import the functions that I introduced in cmenu. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * gpllib: add a new ansi libraryPierre-Alexandre Meyer2009-09-015-5/+11
| | | | | | | | | | | | | | | | | | | | HDT and cmenu are currently duplicating code: they both define their own mini ansi library. This patch extracts the HDT ansi lib into gpllib as a first step towards unification. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
* | Merge branch 'cmenu-video' of git://git.zytor.com/users/pam/hdt-pierre into ↵Pierre-Alexandre Meyer2009-09-0472-1888/+5222
|\ \ | | | | | | | | | cmenu-video
| * | cmenu: use printf instead of csprint with default attributePierre-Alexandre Meyer2009-09-031-3/+3
| | | | | | | | | | | | | | | | | | | | | We don't change the attribute in the help screen. Refactor the code to simply use printf. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * | cmenu: use putchar instead of putch when using default attributePierre-Alexandre Meyer2009-09-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no real need to do putch('x', 0x07), 0x07 being the default VGA attribute. Use putchar instead. Note that showhelp will trigger a drawbox first with 0x07 as attribute. Since we don't update the attribute, it is guaranteed to still be 0x07 when invoking putch. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * | hdt: remove call to legacy getnumcols (menu)Pierre-Alexandre Meyer2009-09-031-2/+7
| | | | | | | | | | | | | | | | | | Use getscreensize instead. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * | cmenu: use getscreensize to access number of rows/columnsPierre-Alexandre Meyer2009-09-036-680/+702
| |/ | | | | | | | | | | | | | | | | The simple menu system already uses getscreensize. Another step towards unification. Impact: exported getnumcols and getnumrows are now deprecated. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * cmenu: reset attributes instead of using ANSI sequence 22Pierre-Alexandre Meyer2009-09-011-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | hpa advised not to use ANSI sequence 22, as it may not work everywhere. Instead, let's reset attributes and set last_attr to unknown. The next background/foreground tests are then guaranteed to fire. We take a small hit in terms of performance though. Misc.: change initialization of last_attr to 0x300 (unknown) to trigger properly the tests the first time. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * cmenu: fix background colorPierre-Alexandre Meyer2009-09-011-1/+5
| | | | | | | | | | | | | | | | | | | | The menu highlights some characters to mark them as key shortcuts. To switch the bold attribute off, we were printing the reset code, resetting the background color in the same time. Use ANSI sequence 22 instead. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * Revert "ansicon: allow to pass page # to write functions"Pierre-Alexandre Meyer2009-09-013-15/+16
| | | | | | | | | | | | | | We shouldn't be using any pages, as there is no support on the serial line. This reverts commit e9b317fd0dc87dc93a49bc40520f4bdd0264d746.
| * cmenu: use 80x25 as terminal size by defaultPierre-Alexandre Meyer2009-09-011-2/+2
| | | | | | | | | | | | | | | | | | Let's not rely on the geometry returned by the BIOS for the terminal size - we don't know anything about the one used via serial. We now default to 80x25, regardless of what the BIOS returns. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * cmenu: misc. cleanupsPierre-Alexandre Meyer2009-09-012-4/+11
| | | | | | | | | | | | Fix a compiler warning and a header documentation. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * cmenu: remove multi pages supportPierre-Alexandre Meyer2009-09-0110-217/+196
| | | | | | | | | | | | | | | | | | | | The cmenu used to display the help on a separate page. Since we can't have multi pages on the serial line, get rid of them completely. This has a fairly big impact as the external cmenu API has changed. adv_menu.tpl and HDT have been patched accordingly. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * cmenu: use < for menu exit characterPierre-Alexandre Meyer2009-09-011-1/+1
| | | | | | | | | | | | Use plain '<' as the "back" symbol. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * cmenu: fix menu separatorsPierre-Alexandre Meyer2009-09-015-59/+40
| | | | | | | | | | | | | | | | Use the alternate character set to draw horizontal lines (menu separator). Refactor the c*print functions in the same time as they were severely broken. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * cmenu: use > instead of » for submenusPierre-Alexandre Meyer2009-09-013-9/+11
| | | | | | | | | | | | | | | | | | » doesn't exist in the alternate character set. Use plain > instead. Misc.: fix SO/SI invocation, putchar takes a char, fputs a string. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * cmenu: remove extra getboxchars callPierre-Alexandre Meyer2009-09-011-2/+0
| | | | | | | | | | | | getboxchars is not used anymore in drawbox. Let's get rid of it. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * cmenu: build cleanupsPierre-Alexandre Meyer2009-09-011-7/+1
| | | | | | | | | | | | Fix build warnings and remove old cls declaration. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * cmenu: refactor cswprint functionPierre-Alexandre Meyer2009-09-011-26/+1
| | | | | | | | | | | | Now that cprint is smarter, cswprint can be simplified. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * cmenu: refactor printmenuitem functionPierre-Alexandre Meyer2009-09-011-38/+17
| | | | | | | | Simplify the printmenuitem function, now that putch is smarter.
| * cmenu: refactor beep functionPierre-Alexandre Meyer2009-09-012-10/+6
| | | | | | | | | | | | Use \007 to make the system beep. Note "\007" works, but not '\007'. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * cmenu: refactor cprint functionsPierre-Alexandre Meyer2009-09-011-13/+2
| | | | | | | | | | | | | | | | | | Some refactoring: * Make cprint_vga2ansi static, as it is an internal function. * Simplify the logic in cprint(). Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * cmenu: use VT-100 alternate character set for drawing boxesPierre-Alexandre Meyer2009-09-012-14/+36
| | | | | | | | | | | | | | | | | | | | | | | | Use the Special Characters and Line Drawing Character Set as described in http://www.vt100.net/docs/vt102-ug/table5-13.html to draw boxes around the menus. Note that to work in xterm, G1 needs to be initialized (to point to the alternate character set). This is done in the cls function ("\033)0"). Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * cmenu: remove unused bit_reverse functionPierre-Alexandre Meyer2009-09-011-10/+0
| | | | | | | | | | | | | | Not needed anymore: we use a lookup table (ansi_char) in cprint_vga2ansi now to reverse Background and Foreground bits.. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * cmenu: better implementation of vga->ansiPierre-Alexandre Meyer2009-09-011-20/+39
| | | | | | | | | | | | | | hpa suggested a better implementation, that also fixes some color issues and invalid ANSI codes. Thanks hpa! Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * cmenu: implement cprint using printfPierre-Alexandre Meyer2009-09-011-6/+51
| | | | | | | | | | | | | | | | | | | | | | First step towards a usable menu. Color is now sent over serial. Testing Done: launched HDT over serial. The background got drawn blue, as expected. Note: vga attributes need to be converted to ansi codes. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * cmenu: remove unused getchar functionPierre-Alexandre Meyer2009-09-011-7/+0
| | | | | | | | | | | | char getchar(void) doesn't seem to be used. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * cmenu: implement scrollup using SU escape sequencePierre-Alexandre Meyer2009-09-011-1/+1
| | | | | | | | | | | | Use the ANSI SU - Scroll Up escape sequence to scrollup the window. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * cmenu: implement gotoxy using escape sequencesPierre-Alexandre Meyer2009-09-013-9/+12
| | | | | | | | | | | | | | | | | | | | | | Use ansicon and the ANSI CUP - CUrsor Position escape sequence to implement the gotoxy function. Note: page switching is not supported (yet). Testing Done: ran com32/cmenu/test.c32 in qemu. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * ansicon: allow to pass page # to write functionsPierre-Alexandre Meyer2009-09-013-16/+15
| | | | | | | | | | | | | | | | | | | | | | Some video modes support up to 8 different pages, the current one being stored at 0x462. The display page value is passed in BH when invoking the INT 10h Video Service routines. This patch changes the interface of ansicon_write_char and ansicon_set_cursor to allow the caller to specify the page. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * NEWS: update for 3.83H. Peter Anvin2009-08-252-0/+12
| |
| * hdt: enhance error reporting in the CLI (disk)syslinux-3.83-pre9Pierre-Alexandre Meyer2009-08-241-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | parse_partition_table can fail for two reasons: disk I/O error or unrecognized partition layout (non msdos, corrupt, ...). In the latter case, we were displaying Error parsing disk 0x80 parse_partition_table: error 0 which is confusing. We now display Disk 0x80: unrecognized partition layout or the errno_disk in case of I/O errors. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * hdt: make get_error behaves like perrorPierre-Alexandre Meyer2009-08-245-31/+9
| | | | | | | | | | | | | | | | This simplifies buffer handling. Misc.: clean some old error code handling. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * hdt: fix CLI crash when parsing unsupported geometriesPierre-Alexandre Meyer2009-08-241-2/+0
| | | | | | | | | | | | | | | | Remove extra free() calls: these were needed before the introduction of the disklib errno. We apparently forgot to remove them. Reported-by: Gert Hulselmans <hulselmansgert@gmail.com> Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * hdt: 0.3.4syslinux-3.83-pre8hdt-0.3.4erwan2009-08-201-1/+1
| | | | | | | | | | | | Impact: New release 0.3.4 is now out !
| * hdt: fix disklib displayPierre-Alexandre Meyer2009-08-202-2/+2
| | | | | | | | | | | | | | We currently display the first sector after the end of an extended. Fix it (-1). Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * disklib: fix extended partition codePierre-Alexandre Meyer2009-08-201-12/+21
| | | | | | | | | | | | | | | | | | | | | | gert1 reported some issues using disklib with HDT. As it turned out, the code that iterated through ebrs in an extended partition was broken: ebr offsets need to be relative to the start of that partition. Misc.: fix memory leak. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org> Signed-off-by: Erwan Velu <erwan.velu@free.fr>
| * hdt: Fixing memory corruptionerwan2009-08-202-5/+5
| | | | | | | | | | | | | | | | | | Impact: Improve stability In some case, sectors_to_size can return a 8 char long string like "1000 MiB". In such case, some buffer were corrupted. This is now fixed by a size[9] instead of size[8].
| * Merge branch 'master' of git://git.kernel.org/pub/scm/boot/syslinux/syslinux ↵erwan2009-08-1911-3591/+1387
| |\ | | | | | | | | | into origin/master