From cbe786e8a217f6bb97d6bd07dfd1cc9cae9122b8 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Thu, 9 Jun 2005 10:45:18 +0000 Subject: [PATCH] (surely_lseek): more verbosity. --- ChangeLog | 2 ++ ttftool/ttfps.c | 4 +++- ttftool/util.c | 10 ++++++++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 41a0e326a7..f6f55e400d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2005-06-09 Han-Wen Nienhuys + * ttftool/util.c (surely_lseek): more verbosity. + * lily/include/lily-proto.hh: add Context_def. This fixes FC4 compile. diff --git a/ttftool/ttfps.c b/ttftool/ttfps.c index 0cdc73627e..4b0e09e26f 100644 --- a/ttftool/ttfps.c +++ b/ttftool/ttfps.c @@ -42,7 +42,9 @@ create_type42 (const char *infile, void *out) endianness_test (); if ((fd = open (infile, O_RDONLY)) < 0) - syserror ("Error opening input file"); + { + syserror ("Error opening input file"); + } td = readDirectory (fd, &ot); if (verbosity >= 2) diff --git a/ttftool/util.c b/ttftool/util.c index b64aae9bc8..fa6e7b3add 100644 --- a/ttftool/util.c +++ b/ttftool/util.c @@ -64,7 +64,11 @@ surely_lseek (int fildes, off_t offset, int whence) { off_t result; if ((result = lseek (fildes, offset, whence)) < 0) - syserror ("Cannot seek"); + { + char s[100]; + sprintf (s, "Cannot seek to %d %ld", whence, offset); + syserror (s); + } return result; } @@ -74,7 +78,9 @@ surely_read (int fildes, void *buf, size_t nbyte) ssize_t n; if ((n = read (fildes, buf, nbyte)) < nbyte) { - syserror ("read too little in surely_read()"); + char s[100]; + sprintf (s, "read too little in surely_read(), expect %d got %d", nbyte, n); + syserror (s); } return n; } -- 2.39.5