upload tizen2.0 source 2.0alpha master 2.0_alpha submit/master/20120920.151130
authorBoram Park <boram1288.park@samsung.com>
Tue, 21 Aug 2012 09:04:13 +0000 (18:04 +0900)
committerBoram Park <boram1288.park@samsung.com>
Tue, 21 Aug 2012 09:04:13 +0000 (18:04 +0900)
doc/xrestop.1
packaging/xorg-x11-utils-xrestop.spec [deleted file]
packaging/xrestop.spec [new file with mode: 0644]
xrestop.c

index 3239080..4cbaf2f 100644 (file)
@@ -28,7 +28,7 @@ Run in batch mode. Slightly more detailed infomation is streamed to
 stdout rather than the usual curses interface. This mode is intended
 for debugging a single client with something like 
 .br
-  xrestop \-b | grep \-A 15 appname
+  xrestop \-b | grep \-A 14 appname
 .TP
 \fB\-\-max\-samples, \-m\fP <count>
 Specify number of times to gather and display results.
diff --git a/packaging/xorg-x11-utils-xrestop.spec b/packaging/xorg-x11-utils-xrestop.spec
deleted file mode 100644 (file)
index 1f78d72..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-
-Name:       xorg-x11-utils-xrestop
-Summary:    X11 server resource usage monitor
-Version:    0.4
-Release:    7
-Group:      System/X11
-License:    MIT
-URL:        http://www.x.org
-Source0:    http://xorg.freedesktop.org/releases/individual/app/xrestop-%{version}.tar.gz
-BuildRequires:  pkgconfig(xorg-macros)
-BuildRequires:  pkgconfig(ncurses)
-BuildRequires:  pkgconfig(xext)
-BuildRequires:  pkgconfig(x11)
-BuildRequires:  pkgconfig(xres)
-BuildRequires:  pkgconfig(xproto)
-BuildRequires:  pkgconfig(ice)
-
-
-%description
-xrestop uses the X-Resource extension to provide top(1)-like statistics
-for each connected X11 client's server-side resource usage. It is intended
-as a developer tool to aid more efficient server resource usage and debug
-server-side resource leakage.
-.
-xrestop requires the X-Resource extension, supported by XFree86 4.3 and
-above, and by the freedesktop.org X server.
-
-
-%prep
-%setup -q -n xrestop-%{version}
-
-
-%build
-
-%reconfigure --disable-static \
-    --libdir=%{_datadir}
-
-make %{?jobs:-j%jobs}
-
-%install
-rm -rf %{buildroot}
-%make_install
-
-
-
-
-
-%files
-%defattr(-,root,root,-)
-%{_bindir}/xrestop
-%{_mandir}/man1/xrestop.1.gz
-
diff --git a/packaging/xrestop.spec b/packaging/xrestop.spec
new file mode 100644 (file)
index 0000000..9287333
--- /dev/null
@@ -0,0 +1,41 @@
+Summary: X Resource Monitor
+Name: xrestop
+Version: 0.4
+Release: 10
+License: GPLv2+
+Group: Development/Tools
+URL: http://www.freedesktop.org/Software/xrestop
+Source0: %{name}-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+
+BuildRequires: ncurses-devel libXres-devel libXext-devel libX11-devel
+BuildRequires: libXau-devel
+
+%description
+A utility to monitor application usage of X resources in the X Server, and
+display them in a manner similar to 'top'.  This is a very useful utility
+for tracking down application X resource usage leaks.
+
+%prep
+%setup -q
+
+%build
+%reconfigure
+make %{?jobs:-j%jobs}
+# SUBDIRS=
+
+%install
+rm -rf "$RPM_BUILD_ROOT"
+make DESTDIR="$RPM_BUILD_ROOT" install
+#SUBDIRS=
+
+%remove_docs
+
+%clean
+rm -rf "$RPM_BUILD_ROOT"
+
+%files
+%defattr(-,root,root,-)
+#%doc AUTHORS COPYING NEWS README
+%{_bindir}/xrestop
+#%{_mandir}/man1/xrestop.1*
index d9bd425..51ad638 100644 (file)
--- a/xrestop.c
+++ b/xrestop.c
@@ -528,8 +528,8 @@ xrestop_display(XResTopApp *app)
 
       clear();
 
-      mvprintw(0, 0, "xrestop - Display: %s", 
-              app->dpy_name);
+      mvprintw(0, 0, "xrestop - Display: %s:%i", 
+              app->dpy_name ? app->dpy_name : "localhost", app->screen);
 
       mvprintw(1, 0, "          Monitoring %i clients. XErrors: %i", app->n_clients, app->n_xerrors);
       mvprintw(2, 0, "          Pixmaps: %8s total, Other: %8s total, All: %8s total", 
@@ -695,11 +695,6 @@ main(int argc, char **argv)
     usage(argv[0]);
   }
 
-  if (app->dpy_name == NULL)
-    {
-      app->dpy_name = getenv("DISPLAY");
-    }
-
   if ((app->dpy = XOpenDisplay(app->dpy_name)) == NULL)
     {
       fprintf(stderr, "%s: Unable to open display!\n", argv[0]);