]> Dogcows Code - chaz/openbox/blobdiff - util/xftlsfonts.cc
give the grips cursors
[chaz/openbox] / util / xftlsfonts.cc
index 4f33737f168e66e59881ef807c3ece9253e477e0..d02758e28b5dfbc21012c5d42217e91785ac98c5 100644 (file)
@@ -1,3 +1,24 @@
+const char *NAME = "xftlsfonts";
+const char *VERSION = "1.0";
+
+#ifdef    HAVE_CONFIG_H
+#include "../config.h"
+#endif // HAVE_CONFIG_H
+
+#ifndef   XFT
+#include <iostream>
+using std::cout;
+using std::endl;
+
+int main(int, char **) {
+  cout << NAME << " version " << VERSION << endl;
+  cout << "Copyright (c) 2002, Ben Jansens <ben@orodu.net>" << endl;
+  cout << endl;
+  cout << "Openbox was built without support for Xft fonts. This utility must"
+    << endl;
+  cout << "must be built with Xft support in order to function." << endl;
+}
+#else  // XFT
 extern "C" {
 #include <X11/Xlib.h>
 #include <X11/Xft/Xft.h>
@@ -7,9 +28,6 @@ extern "C" {
 #include <string>
 #include <vector>
 
-const char *NAME = "xftlsfonts";
-const char *VERSION = "1.0";
-
 using std::string;
 using std::cout;
 using std::endl;
@@ -110,12 +128,14 @@ int main(int argc, char **argv) {
           cout << val.u.b;
           break;
 
+#ifdef XFT_UTF8
         case XftTypeMatrix:
           cout << "xx(" << val.u.m->xx << ") ";
           cout << "xy(" << val.u.m->xy << ") ";
           cout << "yx(" << val.u.m->yx << ") ";
           cout << "yy(" << val.u.m->yy << ")";
           break;
+#endif
         }
       } while ((vallist = vallist->next));
       cout << endl;
@@ -129,3 +149,5 @@ int main(int argc, char **argv) {
   XCloseDisplay(display);
   return 0;
 }
+#endif // XFT
+
This page took 0.02116 seconds and 4 git commands to generate.