Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37650313
en ru br
Репозитории ALT
S:1.07-alt1
5.1: 1.03-alt1
4.1: 1.02-alt1
4.0: 0.96-alt1
www.altlinux.org/Changes

Группа :: Система/X11
Пакет: xautomation

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: xautomation-1.07-alt1.patch
Скачать


 Makefile.am | 2 +-
 Makefile.in | 2 +-
 png2pat.c   | 7 +++----
 visgrep.c   | 2 +-
 xte.c       | 9 ++++-----
 5 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 7c2b006..f248f5a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@
 bin_PROGRAMS = xte rgb2pat png2pat visgrep pat2ppm patextract xmousepos
 man_MANS = pat2ppm.1 patextract.1 png2pat.1 rgb2pat.1 visgrep.1 xautomation.7 xmousepos.1 xte.1
 xte_SOURCES = xte.c debug.c kbd.h keysym_map.h multikey_map.h
-xte_LDADD = $(X_LIBS) $(X_EXTRALIBS) -lXtst -lX11
+xte_LDADD = $(X_LIBS) $(X_EXTRALIBS) -lXtst -lXi -lX11
 rgb2pat_SOURCES = rgb2pat.c image.c image.h debug.c debug.h
 rgb2pat_LDADD = -lpng
 png2pat_SOURCES = png2pat.c image.c image.h debug.c debug.h
diff --git a/Makefile.in b/Makefile.in
index d9ea551..44de2a5 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -252,7 +252,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 man_MANS = pat2ppm.1 patextract.1 png2pat.1 rgb2pat.1 visgrep.1 xautomation.7 xmousepos.1 xte.1
 xte_SOURCES = xte.c debug.c kbd.h keysym_map.h multikey_map.h
-xte_LDADD = $(X_LIBS) $(X_EXTRALIBS) -lXtst -lX11
+xte_LDADD = $(X_LIBS) $(X_EXTRALIBS) -lXtst -lXi -lX11
 rgb2pat_SOURCES = rgb2pat.c image.c image.h debug.c debug.h
 rgb2pat_LDADD = -lpng
 png2pat_SOURCES = png2pat.c image.c image.h debug.c debug.h
diff --git a/png2pat.c b/png2pat.c
index b8ba554..3d38236 100644
--- a/png2pat.c
+++ b/png2pat.c
@@ -41,21 +41,20 @@ int main( int argc, char *argv[] ) {
                         "\n"
                         , argv[ 0 ] );
 
-        exit( 1 );
+        return 1;
     }
 
     dmsg( 1, "Reading image...\n" );
     in = img_load_from_png( argv[ 1 ] );
     if( ! in ) {
         printf( "Failed to load %s\n", argv[ 1 ] );
-        exit( 1 );
+        return 1;
     }
 
     dmsg( 1, "Image attribs: %dx%d\n", in -> width, in -> height );
     dmsg( 1, "Writing image to img.out...\n" );
     img_write_fd( in, stdout );
     img_destroy( in );
-  
-  
 
+    return 0;
 }
diff --git a/visgrep.c b/visgrep.c
index dfa3a8e..c7f33d6 100644
--- a/visgrep.c
+++ b/visgrep.c
@@ -111,7 +111,7 @@ int main( int argc, char *argv[] ) {
                         "Showing that match_a.pat (index 0) is at 10,10 on the screen.  If no match\n"
                         "is found even though the detection image is found, the index will be -1.\n"
                         "\n"
-                        "The first match was 100\% accurate, while the second and third were very slightly\n"
+                        "The first match was 100%% accurate, while the second and third were very slightly\n"
                         "inaccurate, probably due to anti-aliasing on the fonts.\n"
                         "\n"
                         "Exit status is 0 for successful match, 1 for no match, and 2 for error.\n"
diff --git a/xte.c b/xte.c
index 6e32b40..8dfebd3 100644
--- a/xte.c
+++ b/xte.c
@@ -104,17 +104,17 @@ KeySym get_keysym(wchar_t c) {
     if ( c <= 0xff ) {
             /* keysym = wchar value for Latin-1 (ISO-8859-1) characters */
             keysym = c;
-            dmsg( 2, "Keysym = %d (Latin-1 character)\n", keysym);
+            dmsg( 2, "Keysym = %lu (Latin-1 character)\n", (unsigned long)keysym);
     } else {
             if ( c-0x0100 < WCHAR_TO_KEYSYM_MAP_SIZE ) {
                     /* Look up keysym in table */
                     keysym = wchar_to_keysym_map[ c - 0x0100 ];
             }
-            dmsg( 2, "Keysym = %d (from keysym_map)\n", keysym);
+            dmsg( 2, "Keysym = %lu (from keysym_map)\n", (unsigned long)keysym);
             if (!keysym) {
                     /* Not found -> assume that it's a newer unicode character */
                     keysym = c + 0x01000000;
-                    dmsg( 2, "Keysym = %d (newer UTF-8 character)\n", keysym);
+                    dmsg( 2, "Keysym = %lu (newer UTF-8 character)\n", (unsigned long)keysym);
             }
     }
     if( keysym >= MAX_KEYSYM ) {
@@ -194,7 +194,7 @@ void send_string( Display *d, XDevice *device, char *thing_in ) {
         if (keysym[0]) {
             if (keysym[1]) {
                 /* Multi key sequence */
-                dmsg( 1, "Sending Multi_key sequence first_keysym=%d, second_keysym=%d\n", keysym[0], keysym[1]);
+                dmsg( 1, "Sending Multi_key sequence first_keysym=%lu, second_keysym=%lu\n", (unsigned long)keysym[0], (unsigned long)keysym[1]);
                 send_key(d,device,"Multi_key");
                 send_char(d,device,keysym[0]);
                 send_char(d,device,keysym[1]);
@@ -227,7 +227,6 @@ void mouse_move( Display *d, XDevice *device, int x, int y ) {
 }
 
 void mouse_rel_move( Display *d, XDevice *device, int x, int y ) {
-    int axes[] = {x,y};
     dmsg( 1, "Moving mouse relatively by %d,%d\n", x, y );
     xte_FakeRelativeMotionEvent( d, device, x, y, CurrentTime );
 }
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin