Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalwareutils.git;a=commitdiff;h=874e7e8104a43c759351747d723bf88eb919e09f

commit 874e7e8104a43c759351747d723bf88eb919e09f
Author: Miklos Vajna <vmik...@frugalware.org>
Date:   Wed May 11 02:39:01 2011 +0200

retire xconfig

diff --git a/Makefile b/Makefile
index 97114f4..41e5701 100644
--- a/Makefile
+++ b/Makefile
@@ -24,7 +24,6 @@ SUBDIRS = doc apidoc libfwutil libfwdialog setup \
libfwtimeconfig timeconfig \
libfwraidconfig raidconfig \
libfwmouseconfig mouseconfig \
-         libfwxconfig xconfig \
libfwxwmconfig xwmconfig

ifneq ($(CARCH),ppc)
diff --git a/README b/README
index 4ab146a..b6f91b2 100644
--- a/README
+++ b/README
@@ -13,7 +13,6 @@ The following components are available at the moment:
* netconfig
* raidconfig
* timeconfig
-* xconfig
* xwmconfig

All of these can be listed and started from the central `setup` command.
@@ -26,6 +25,7 @@ All of these can be listed and started from the central 
`setup` command.
* ncurses
* libparted
* libpacman
+  * libudev

- To build them, you need libdialog.

diff --git a/apidoc/frugalwareutils.txt b/apidoc/frugalwareutils.txt
index caa9515..0d25800 100644
--- a/apidoc/frugalwareutils.txt
+++ b/apidoc/frugalwareutils.txt
@@ -14,7 +14,6 @@ libfwnetconfig::      Functions to make network configuration 
easier.
libfwtimeconfig::       Functions to make time configuration easier.
libfwraidconfig::       Functions to make RAID configuration easier.
libfwmouseconfig::      Functions to make mouse configuration easier.
-libfwxconfig:: Functions to make X configuration easier.
libfwxwmonfig:: Functions to make XDM configuration easier.
libfwgrubonfig::        Functions to make GRUB configuration easier.

diff --git a/doc/po4a.cfg b/doc/po4a.cfg
index 6828bcf..9a5f5b3 100644
--- a/doc/po4a.cfg
+++ b/doc/po4a.cfg
@@ -17,5 +17,4 @@
[type: simpletext] netconfig.txt $lang:$lang/netconfig.txt
[type: simpletext] raidconfig.txt $lang:$lang/raidconfig.txt
[type: simpletext] timeconfig.txt $lang:$lang/timeconfig.txt
-[type: simpletext] xconfig.txt $lang:$lang/xconfig.txt
[type: simpletext] xwmconfig.txt $lang:$lang/xwmconfig.txt
diff --git a/doc/xconfig.txt b/doc/xconfig.txt
deleted file mode 100644
index d585feb..0000000
--- a/doc/xconfig.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-= xconfig(1)
-
-== NAME
-
-xconfig - creates your XOrg configuration file
-
-== SYNOPSIS
-
-xconfig [options]
-
-== DESCRIPTION
-
-`xconfig` is a front-end to `X -configure`. It asks for a resolution and a
-colour depth and does the rest of the configuration automatically for you.
-
-== OPTIONS
-
---help::
-       Display this manpage.
-
---live <resolution> <depth>::
-       Non-interactive mode, used by ie. FWLive.
-
---version::
-       Display the package version.
diff --git a/libfwxconfig/.gitignore b/libfwxconfig/.gitignore
deleted file mode 100644
index 593e59c..0000000
--- a/libfwxconfig/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-xconfig-helper
diff --git a/libfwxconfig/Makefile b/libfwxconfig/Makefile
deleted file mode 100644
index 6232354..0000000
--- a/libfwxconfig/Makefile
+++ /dev/null
@@ -1,42 +0,0 @@
-# Makefile for frugalwareutils
-#
-# Copyright (C) 2006 Miklos Vajna <vmik...@frugalware.org>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-
--include ../config.mak
-CFLAGS = $(LIB_CFLAGS)
-
-# fwutil
-CFLAGS += -I../libfwutil
-LDFLAGS += -L../libfwutil -lfwutil
-
-SUBDIRS = po
-LIBNAME = xconfig
-
--include ../Makefile.inc
--include ../Makefile.lib.inc
-
-compile: xconfig-helper
-
-install: xconfig-helper-install
-
-clean: xconfig-helper-clean
-
-xconfig-helper-install:
-       $(INSTALL) xconfig-helper $(DESTDIR)$(libexecdir)/xconfig-helper
-
-xconfig-helper-clean:
-       rm -f xconfig-helper
diff --git a/libfwxconfig/libfwxconfig.c b/libfwxconfig/libfwxconfig.c
deleted file mode 100644
index 04017ae..0000000
--- a/libfwxconfig/libfwxconfig.c
+++ /dev/null
@@ -1,281 +0,0 @@
-/*
- *  libfwxconfig.c for frugalwareutils
- *
- *  Copyright (c) 2006, 2007, 2008, 2009 by Miklos Vajna 
<vmik...@frugalware.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- *  USA.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <limits.h>
-#include <regex.h>
-#include <sys/stat.h>
-
-#include "xconfig-helper.h"
-
-#define XORGCONFIG "/etc/X11/xorg.conf"
-#define NEWCONFIG "/root/xorg.conf.new"
-#define COREPOINTER "\"CorePointer\""
-#define HORIZSYNC "31.5 - 64.3"
-#define REFRESH "60-75"
-
-/** @defgroup libfwxconfig Frugalware X Configuration library
- * @brief Functions to make X configuration easier
- * @{
- */
-
-static void print_mouse_options(FILE *fp)
-{
-       fprintf(fp, "Option      \"ZAxisMapping\" \"4 5\"\n"
-               "Option      \"Buttons\" \"3\"\n");
-}
-
-static void print_kbd_options(FILE *fp)
-{
-       char *ptr, *lang=NULL;
-
-#ifdef __powerpc__
-       // we want capslock and command == altgr
-       fprintf(fp, "Option \"XkbOptions\" \"ctrl:showcaps, 
lv3:lwin_switch\"\n");
-#endif
-
-       ptr = getenv("LANG");
-       if(ptr)
-               lang = strdup(ptr);
-
-       if(!lang || !strlen(lang) || !strncmp(lang, "en_", 3))
-               fprintf(fp, "Option      \"XkbLayout\" \"us\"\n");
-       else if(!strncmp(lang, "da_", 3))
-               fprintf(fp, "Option      \"XkbLayout\" \"dk\"\n");
-       else
-       {
-               ptr = strstr(lang, "_");
-               *ptr = '\0';
-               fprintf(fp, "Option      \"XkbLayout\" \"%s\"\n", lang);
-       }
-       if(lang)
-               free(lang);
-}
-
-static void print_mouse_identifier(FILE *fp, int num, char *device, char 
*proto)
-{
-       int auto_proto = 0;
-
-       if(!proto) {
-               proto = strdup("auto");
-               auto_proto = 1;
-       }
-       fprintf(fp, "Identifier  \"Mouse%d\"\n", num);
-       fprintf(fp, "Driver      \"mouse\"\n");
-       print_mouse_options(fp);
-       fprintf(fp, "Option      \"Protocol\" \"%s\"\n", proto);
-       fprintf(fp, "Option      \"Device\" \"%s\"\n", device);
-       fprintf(fp, "EndSection\n\n"
-                       "Section \"InputDevice\"\n");
-       if (auto_proto)
-               free(proto);
-}
-
-/** Creates a config draft, which will be an input fro fwx_doconfig()
- * @return 0 on success, 1 on failure
- */
-int fwx_doprobe()
-{
-       return(system("X -configure :1 2>/dev/null"));
-}
-
-static int reg_match(char *str, char *pattern)
-{
-       int result;
-       regex_t reg;
-
-       if(regcomp(&reg, pattern, REG_EXTENDED | REG_NOSUB | REG_ICASE) != 0)
-               return(-1);
-
-       result = regexec(&reg, str, 0, 0, 0);
-       regfree(&reg);
-       return(!(result));
-}
-
-/** Creates a configuration from the draft
- * @return 1 on success, 0 on failure
- */
-int fwx_doconfig(char *mousedev, char *res, char *depth)
-{
-       char line[PATH_MAX+1], *drv = NULL;
-       FILE *ofp, *nfp;
-       struct stat buf;
-       int start_looking=0;
-       int vga_seen = 0, drv_wrote = 0;
-
-       unlink(XORGCONFIG);
-
-       /*
-        * If we see a vga driver and an other video driver later, then we
-        * should fix the order.
-        */
-       ofp = fopen(NEWCONFIG, "r");
-       while (fgets(line, PATH_MAX, ofp)) {
-               if (!strcmp(line, "\tDriver      \"vga\"\n")) {
-                       vga_seen = 1;
-                       continue;
-               }
-               if (vga_seen && !strncmp(line, "\tDriver      \"", 14)) {
-                       char *ptr;
-                       drv = strdup(line+14);
-                       ptr = drv + strlen(drv)-2;
-                       *ptr = '\0';
-                       printf("'%s'\n", drv);
-               }
-       }
-       fclose(ofp);
-
-       ofp = fopen(NEWCONFIG, "r");
-       if(!ofp)
-               return(1);
-       nfp = fopen(XORGCONFIG, "w");
-       if(!nfp)
-               return(1);
-       while(fgets(line, PATH_MAX, ofp))
-       {
-               if(reg_match(line, "Protocol.*auto"))
-               {
-                       print_mouse_options(nfp);
-                       fprintf(nfp, "Option      \"Protocol\" \"auto\"\n");
-                       line[0]='\0';
-               }
-               if(reg_match(line, "Identifier.*Mouse"))
-               {
-                       print_mouse_identifier(nfp, 0, "/dev/psaux", "imps/2");
-                       print_mouse_identifier(nfp, 1, "/dev/tts/0", NULL);
-                       fprintf(nfp, "Identifier  \"Mouse3\"\n");
-                       line[0]='\0';
-               }
-               if(reg_match(line, "CorePointer"))
-               {
-                       char cp[PATH_MAX+1] = "";
-                       if(!stat("/dev/psaux", &buf))
-                               sprintf(cp, "%s", COREPOINTER);
-                       fprintf(nfp, "InputDevice    \"Mouse0\" %s\n", cp);
-                       cp[0]='\0';
-                       if(!stat("/dev/tts/0", &buf))
-                               sprintf(cp, "%s", COREPOINTER);
-                       fprintf(nfp, "InputDevice    \"Mouse1\" %s\n", cp);
-                       line[0]='\0';
-               }
-               if(reg_match(line, "Screen +1"))
-                       // To disable multihead setups by default
-                       continue;
-               if(drv && reg_match(line, "driver.*vga"))
-               {
-                       fprintf(nfp, "\tDriver      \"%s\"\n", drv);
-                       drv_wrote = 1;
-                       continue;
-               }
-               if(drv_wrote && reg_match(line, "driver.*\""))
-               {
-                       fprintf(nfp, "\tDriver      \"vga\"\n");
-                       continue;
-               }
-               fprintf(nfp, "%s", line);
-               if(reg_match(line, "usebios"))
-               {
-                       // To disable blinking on some savage cards
-                       fprintf(nfp, "Option     \"UseBIOS\" \"No\"\n");
-               }
-               if(reg_match(line, "boardname"))
-               {
-                       char *ptr = strstr(line, "\"");
-                       // S3 Virge/GX2, 2x AGP, TVOut - workaround for broken 
DDC
-                       if(!strcmp(ptr, "ViRGE/GX2"))
-                               fprintf(nfp, "Option          \"NoDDC\"\n");
-               }
-               if(reg_match(line, "Section.*Monitor"))
-               {
-                       // X -configure leaves out the refresh frequency
-                       // We'll work around this.
-#ifndef __powerpc__
-                       fprintf(nfp, "HorizSync    %s\n", HORIZSYNC);
-                       fprintf(nfp, "VertRefresh  %s\n", REFRESH);
-#endif
-                       fprintf(nfp, "Option \"PreferredMode\" \"%s\"\n", res);
-                       fprintf(nfp, "Option       \"DPMS\"\n");
-               }
-               if(reg_match(line, "driver.*kbd"))
-               {
-                       print_kbd_options(nfp);
-               }
-               if(reg_match(line, "Depth.*(16|24)"))
-               {
-                       fprintf(nfp, "Modes \"%s\" \"800x600\" \"640x480\"\n", 
res);
-               }
-               if(reg_match(line, "Load.*type1"))
-                       // X -configure leaves out the freetype module.
-                       // We'll work around this.
-                       fprintf(nfp, "Load  \"freetype\"\n");
-               if(reg_match(line, "Section.*Screen"))
-                       start_looking=1;
-               if(start_looking)
-                       if(reg_match(line, "Monitor"))
-                       {
-                               fprintf(nfp, "DefaultDepth %s\n", depth);
-                               start_looking=0;
-                       }
-       }
-       fprintf(nfp, "Section \"DRI\"\n"
-                       "        Group        0\n"
-                       "        Mode         0666\n"
-                       "EndSection\n");
-       fclose(ofp);
-       fclose(nfp);
-       return(0);
-
-}
-
-/** Performs a probe with the new config
- * @return 1 on success, 0 on failure
- */
-int fwx_dotest()
-{
-       struct stat buf;
-
-       system("XINITRC=/usr/libexec/xconfig-helper xinit -- :1");
-       if(!stat(CLICKFILE, &buf))
-       {
-               unlink(CLICKFILE);
-               return(0);
-       }
-       else
-               return(1);
-}
-
-/** Get the name of the device used by gpm
- * @return the name of the device. Returned string should be freed.
- */
-char *fwx_get_mousedev()
-{
-       FILE *pp;
-       char line[256];
-
-       pp = popen("source /etc/sysconfig/gpm; echo $dev", "r");
-       fgets(line, 255, pp);
-       pclose(pp);
-       return(strdup(line));
-}
-/* @} */
diff --git a/libfwxconfig/libfwxconfig.h b/libfwxconfig/libfwxconfig.h
deleted file mode 100644
index 02d7a61..0000000
--- a/libfwxconfig/libfwxconfig.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- *  libfwxconfig.h for frugalwareutils
- *
- *  Copyright (c) 2006 by Miklos Vajna <vmik...@frugalware.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- *  USA.
- */
-
-int fwx_doprobe();
-int fwx_doconfig(char *mousedev, char *res, char *depth);
-int fwx_dotest();
-char *fwx_get_mousedev();
diff --git a/libfwxconfig/po/Makefile b/libfwxconfig/po/Makefile
deleted file mode 100644
index 6f194d7..0000000
--- a/libfwxconfig/po/Makefile
+++ /dev/null
@@ -1,26 +0,0 @@
-# Makefile for frugalwareutils
-#
-# Copyright (C) 2006 Miklos Vajna <vmik...@frugalware.org>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-
-LANGS=fr hu pl
-DOMAIN=xconfig-helper
-
-top_srcdir = ..
-
--include ../../config.mak
--include ../../Makefile.inc
--include ../../Makefile.po.inc
diff --git a/libfwxconfig/po/POTFILES.in b/libfwxconfig/po/POTFILES.in
deleted file mode 100644
index 60cc22b..0000000
--- a/libfwxconfig/po/POTFILES.in
+++ /dev/null
@@ -1 +0,0 @@
-xconfig-helper.c
diff --git a/libfwxconfig/xconfig-helper.c b/libfwxconfig/xconfig-helper.c
deleted file mode 100644
index 88885de..0000000
--- a/libfwxconfig/xconfig-helper.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- *  xconfig-helper.c for frugalwareutils
- *
- *  Copyright (c) 2006 by Miklos Vajna <vmik...@frugalware.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- *  USA.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <libfwutil.h>
-#include <libintl.h>
-
-#include "xconfig-helper.h"
-
-int main(int argc, char **argv)
-{
-       int i, ret=0, fd;
-       char buf[256];
-
-       fwutil_i18ninit(__FILE__);
-
-       system("xsetroot -solid SteelBlue");
-       for(i=10;i>0;i--)
-       {
-               snprintf(buf, 255, _("xmessage -buttons OK:1 -center -timeout 1 
\""
-               "If you see this message, click OK within 10 seconds. "
-               "Elapsed time: %d second(s).\""), i);
-               if(system(buf))
-               {
-                       ret=1;
-                       break;
-               }
-       }
-       if(ret)
-               fd = open(CLICKFILE, O_WRONLY | O_CREAT | O_EXCL, 0000);
-       return(0);
-}
diff --git a/libfwxconfig/xconfig-helper.h b/libfwxconfig/xconfig-helper.h
deleted file mode 100644
index 7141b2a..0000000
--- a/libfwxconfig/xconfig-helper.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- *  xconfig-helper.h for frugalwareutils
- *
- *  Copyright (c) 2006 by Miklos Vajna <vmik...@frugalware.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- *  USA.
- */
-
-#define CLICKFILE "/tmp/_xconfig_clicked"
diff --git a/xconfig/Makefile b/xconfig/Makefile
deleted file mode 100644
index a45e3ff..0000000
--- a/xconfig/Makefile
+++ /dev/null
@@ -1,44 +0,0 @@
-# Makefile for frugalwareutils
-#
-# Copyright (C) 2006 Miklos Vajna <vmik...@frugalware.org>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-
--include ../config.mak
-CFLAGS = $(LIB_CFLAGS) -DVERSION="\"$(VERSION)\""
-LDFLAGS=-ldialog -lcurses -lm
-CFLAGS += $(shell pkg-config --cflags glib-2.0)
-LDFLAGS += $(shell pkg-config --libs glib-2.0)
-
-# fwutil
-CFLAGS += -I../libfwutil
-LDFLAGS += -L../libfwutil -lfwutil
-
-# fwdialog
-CFLAGS += -I../libfwdialog
-LDFLAGS += -L../libfwdialog -lfwdialog
-
-# fwxconfig
-CFLAGS += -I../libfwxconfig
-LDFLAGS += -L../libfwxconfig -lfwxconfig
-
-# setup
-CFLAGS += -I../setup
-
-SUBDIRS = po
-CONFNAME = xconfig
-
--include ../Makefile.inc
--include ../Makefile.conf.inc
diff --git a/xconfig/po/Makefile b/xconfig/po/Makefile
deleted file mode 100644
index e3be65d..0000000
--- a/xconfig/po/Makefile
+++ /dev/null
@@ -1,26 +0,0 @@
-# Makefile for frugalwareutils
-#
-# Copyright (C) 2006 Miklos Vajna <vmik...@frugalware.org>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-
-LANGS=de fr hu pl
-DOMAIN=xconfig
-
-top_srcdir = ..
-
--include ../../config.mak
--include ../../Makefile.inc
--include ../../Makefile.po.inc
diff --git a/xconfig/po/POTFILES.in b/xconfig/po/POTFILES.in
deleted file mode 100644
index e152251..0000000
--- a/xconfig/po/POTFILES.in
+++ /dev/null
@@ -1 +0,0 @@
-xconfig.c
diff --git a/xconfig/xconfig.c b/xconfig/xconfig.c
deleted file mode 100644
index 6ee658e..0000000
--- a/xconfig/xconfig.c
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- *  xconfig.c for frugalwareutils
- *
- *  Copyright (c) 2006 by Miklos Vajna <vmik...@frugalware.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- *  USA.
- */
-
-#include <stdio.h>
-#include <glib.h>
-#include <libfwdialog.h>
-#include <libfwutil.h>
-#include <libfwxconfig.h>
-#include <setup.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <libintl.h>
-
-int run(int argc, char **argv)
-{
-       FILE *input = stdin;
-       dialog_state.output = stderr;
-       char *mdev, *res=NULL, *depth=NULL;
-       struct stat buf;
-       int needrelease, ret, silent=0;
-
-       fwutil_i18ninit(__FILE__);
-       if(argc > 1)
-       {
-               if(!strcmp(argv[1], "--live"))
-               {
-                       if(argc!=4)
-                       {
-                               printf(_("usage: %s [--live <resolution> 
<depth>\n"), argv[0]);
-                               return(1);
-                       }
-                       res = argv[2];
-                       depth = argv[3];
-                       silent=1;
-               }
-               else if(!strcmp(argv[1], "--help"))
-               {
-                       system("man xconfig");
-                       return(0);
-               }
-               else if(!strcmp(argv[1], "--version"))
-               {
-                       printf("%s %s\n", argv[0], VERSION);
-                       return(0);
-               }
-       }
-
-       init_dialog(input, dialog_state.output);
-       fwdialog_backtitle(_("X configuration"));
-
-       // sanility checks
-       if(stat("/usr/bin/xinit", &buf))
-       {
-               dialog_msgbox(_("xinit missing"), _("Could not find xinit, 
please install "
-                       "it with pacman -S xinit."), 0, 0, 1);
-               end_dialog();
-               return(1);
-       }
-
-       if(stat("/usr/bin/xmessage", &buf))
-       {
-               dialog_msgbox(_("xmessage missing"), _("Could not find 
xmessage, please install "
-                       "it with pacman -S xmessage."), 0, 0, 1);
-               end_dialog();
-               return(1);
-       }
-
-       if(stat("/usr/bin/xsetroot", &buf))
-       {
-               dialog_msgbox(_("xsetroot missing"), _("Could not find 
xsetroot, please install "
-                       "it with pacman -S xsetroot."), 0, 0, 1);
-               end_dialog();
-               return(1);
-       }
-
-       if(!silent)
-               dialog_msgbox(_("Configuring the X server"), _("Attempting to 
create "
-                       "an X config file..."), 0, 0, 0);
-       needrelease = fwutil_init();
-       mdev = fwx_get_mousedev();
-
-       if(fwx_doprobe())
-       {
-               if(needrelease)
-                       fwutil_release();
-               end_dialog();
-               return(1);
-       }
-       if(!silent)
-       {
-               while(1)
-               {
-                       res = fwdialog_ask(_("Selecting resolution"),
-                               _("Please enter the screen resolution you want 
to use. "
-                               "You can use values such as 1024x768, 800x600 
or 640x480. If unsure, just press ENTER."),
-                               "1024x768");
-                       depth = fwdialog_ask(_("Selecting color depth"),
-                               _("Please enter the color depth you want to 
use. If unsure, just press ENTER."),
-                               "24");
-                       fwx_doconfig(mdev, res, depth);
-                       end_dialog();
-                       ret = fwx_dotest();
-                       init_dialog(input, dialog_state.output);
-                       fwdialog_backtitle(_("X configuration"));
-                       if(!ret)
-                               break;
-               }
-       }
-       else
-               fwx_doconfig(mdev, res, depth);
-       unlink("/root/xorg.conf.new");
-
-       free (mdev);
-       if(needrelease)
-               fwutil_release();
-       end_dialog();
-       return(0);
-}
-
-plugin_t plugin =
-{
-       "xconfig",
-       "X configuration",
-       run,
-       NULL // dlopen handle
-};
-
-plugin_t *info()
-{
-       return &plugin;
-}
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to