diff options
author | Hans Breuer <hans@breuer.org> | 2001-11-23 13:12:51 +0000 |
---|---|---|
committer | Hans Breuer <hans@src.gnome.org> | 2001-11-23 13:12:51 +0000 |
commit | b4b11e4ba669ddfdb54e7da737f9b9b0f22b9e9f (patch) | |
tree | 1b57c4eee70532bfa12651d12a131e7488c68026 /pango/querymodules.c | |
parent | a2c1ae618174619a2b99a7f8e765713be249c5e2 (diff) | |
download | pango-b4b11e4ba669ddfdb54e7da737f9b9b0f22b9e9f.tar.gz |
removed the arbitrary limit to 10 fonts. Instead make the command line
2001-11-23 Hans Breuer <hans@breuer.org>
* testfonts.c : removed the arbitrary limit to 10 fonts.
Instead make the command line params useful again and reduce
the default result bitmap size by decreasing the default
font size.
* pango/pangowin32-fontcache.c (pango_win32_font_cache_load):
Don't always turn on anti-aliasing. Respect the users settings
from 'Properties of Display/Effects'.
* pango/makefile.msc : updated, version 0.22
* pango/pango.def : updated externals
* pango/font.c pango/pango-coverage.c pango-utils.c
pango/pangowin32.c pango/shape.c :
coding style and static correctness
Diffstat (limited to 'pango/querymodules.c')
-rw-r--r-- | pango/querymodules.c | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/pango/querymodules.c b/pango/querymodules.c index 5b86d53a..c8a8b4e9 100644 --- a/pango/querymodules.c +++ b/pango/querymodules.c @@ -22,9 +22,6 @@ #include "config.h" #include <glib.h> -#ifdef HAVE_DIRENT_H -#include <dirent.h> -#endif #include <gmodule.h> #include "pango-break.h" #include "pango-context.h" @@ -40,13 +37,6 @@ #ifdef G_OS_WIN32 #define SOEXT ".dll" -#ifndef PATH_MAX -#include <stdlib.h> -#define PATH_MAX _MAX_PATH -#endif /* PATH_MAX */ -#include <direct.h> /* for getcwd() with MSVC */ -#include <io.h> /* for getcwd() with mingw */ -#define getcwd _getcwd #else #define SOEXT ".so" #endif @@ -126,7 +116,7 @@ query_module (const char *dir, const char *name) int main (int argc, char **argv) { - char cwd[PATH_MAX]; + char *cwd; int i; char *path; @@ -151,28 +141,30 @@ int main (int argc, char **argv) for (i=0; dirs[i]; i++) { - DIR *dir = opendir (dirs[i]); + GDir *dir = g_dir_open (dirs[i], 0, NULL); if (dir) { - struct dirent *dent; + char *dent; - while ((dent = readdir (dir))) + while ((dent = g_dir_read_name (dir))) { - int len = strlen (dent->d_name); - if (len > 3 && strcmp (dent->d_name + len - strlen (SOEXT), SOEXT) == 0) - query_module (dirs[i], dent->d_name); + int len = strlen (dent); + if (len > 3 && strcmp (dent + len - strlen (SOEXT), SOEXT) == 0) + query_module (dirs[i], dent); } - closedir (dir); + g_dir_close (dir); } } } else { - getcwd (cwd, PATH_MAX); + cwd = g_get_current_dir (); for (i=1; i<argc; i++) query_module (cwd, argv[i]); + + g_free (cwd); } return 0; |