* check.t: add new regression test "typeset-padding-1" according to TFM

* edit.c: remove debug stuff again; next time better use shl.c functions ;)
* sh.h: add format attributes to a few shf functions
* histrap.c, var.c: fix format string mistakes
* main.c, sh.h: error_prefix and warningf take bool not int
* misc.c: make chvt() stuff use shf_* functions
* misc.c: rewrite the TIOCSTTY stuff to be better integrated in mksh,
  since it originally was an external patch
* misc.c: chvt() no longer fails if e.g. chown fails due to e.g. R/O / fs
* var.c: fix typeset padding for right-justified zero-filled
This commit is contained in:
tg
2006-11-10 01:13:52 +00:00
parent c2aec39358
commit 273ca89019
7 changed files with 81 additions and 100 deletions

24
edit.c
View File

@ -5,7 +5,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.63 2006/11/09 22:38:31 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.64 2006/11/10 01:13:50 tg Exp $");
/* tty driver characters we are interested in */
typedef struct {
@ -56,28 +56,6 @@ static int x_file_glob(int, const char *, int, char ***);
static int x_command_glob(int, const char *, int, char ***);
static int x_locate_word(const char *, int, int, int *, int *);
#if 0
static void D(const char *, ...)
__attribute__((__format__ (printf, 1, 2)));
static void
D(const char *fmt, ...)
{
static FILE *_Dfp = NULL;
va_list ap;
if (_Dfp == NULL) {
if ((_Dfp = fopen("/tmp/mksh.dbg", "ab+")) == NULL)
abort();
fprintf(_Dfp, "\n\nOpening from %ld\n", (long)getpid());
}
va_start(ap, fmt);
vfprintf(_Dfp, fmt, ap);
fflush(_Dfp);
}
#else
#define D(x) /* nothing */
#endif
/* +++ generic editing functions +++ */
/* Called from main */