[hackers] [st] foo

From: Anselm R. Garbe <arg_AT_suckless.org>
Date: Mon Mar 05 15:59:24 2007

changeset: 64:f56af848b3b0
tag: tip
user: Anselm R. Garbe <arg_AT_suckless.org>
date: Mon Mar 05 15:55:24 2007 +0100
summary: foo

diff -r b4382ab109d5 -r f56af848b3b0 event.c
--- a/event.c Mon Mar 05 15:28:41 2007 +0100
+++ b/event.c Mon Mar 05 15:55:24 2007 +0100
@@ -14,6 +14,13 @@
 #include <X11/keysym.h>
 #include <X11/Xmd.h>
 
+int application_keypad_mode = 0;
+int insert_mode = 0;
+int decckm_mode = 0;
+int wraparound_mode = 0;
+int cursor_visible = 1;
+int using_alternate_screen = 0;
+
 #define REFRESH_NO 0
 #define REFRESH_FULL 1
 #define REFRESH_PARTIALLY 2
@@ -21,16 +28,17 @@
 #define ModMetaMask Mod4Mask
 #define Atom32 CARD32
 
-int refresh_type = 0;
-int saved_cursor_x, saved_cursor_y;
-int application_keypad_mode = 0;
-int insert_mode = 0;
-int decckm_mode = 0;
-int wraparound_mode = 0;
-int cursor_visible = 1;
-int using_alternate_screen = 0;
-
-char *eventnames[] = {
+static int refresh_type = 0;
+static int selection_start_col, selection_start_row, selection_end_col, selection_end_row;
+static int selection_mode = 0;
+static unsigned char *selection_text = NULL;
+
+#define SELECT_NONE 0
+#define SELECT_LETTER 1
+#define SELECT_WORD 2
+#define SELECT_LINE 3
+
+static char *eventnames[] = {
         "",
         "",
         "KeyPress",
@@ -161,16 +169,6 @@ handle_resize(XEvent *xev) {
         }
 }
 
-static int selection_start_col, selection_start_row, selection_end_col, selection_end_row;
-static int selection_mode = 0;
-
-static unsigned char *selection_text = NULL;
-
-#define SELECT_NONE 0
-#define SELECT_LETTER 1
-#define SELECT_WORD 2
-#define SELECT_LINE 3
-
 static void
 selection_reset(void) {
         int i, j;
@@ -403,17 +401,16 @@ handle_x_events(void) {
                         break;
                 case VisibilityNotify:
                         /* Some part of the screen has to be redrawn */
- switch(xev.xvisibility.state)
- {
- case VisibilityUnobscured:
- refresh_type = REFRESH_FULL;
- break;
- case VisibilityPartiallyObscured:
- refresh_type = REFRESH_PARTIALLY;
- break;
- default:
- refresh_type = REFRESH_NO;
- break;
+ switch(xev.xvisibility.state) {
+ case VisibilityUnobscured:
+ refresh_type = REFRESH_FULL;
+ break;
+ case VisibilityPartiallyObscured:
+ refresh_type = REFRESH_PARTIALLY;
+ break;
+ default:
+ refresh_type = REFRESH_NO;
+ break;
                         }
                         break;
                 case MapNotify:
diff -r b4382ab109d5 -r f56af848b3b0 st.h
--- a/st.h Mon Mar 05 15:28:41 2007 +0100
+++ b/st.h Mon Mar 05 15:55:24 2007 +0100
@@ -53,13 +53,14 @@ typedef struct {
         } font;
 } DC;
 
-extern int saved_cursor_x, saved_cursor_y;
 extern int application_keypad_mode;
 extern int insert_mode;
 extern int decckm_mode;
 extern int wraparound_mode;
 extern int cursor_visible;
 extern int using_alternate_screen;
+extern int curr_row, curr_col;
+
 extern int screen_cols;
 extern int screen_rows;
 extern int scroll_region_start;
@@ -75,7 +76,6 @@ extern int screen;
 extern int screen;
 extern int ww;
 extern int wh;
-extern int curr_row, curr_col;
 
 /* event.c */
 int handle_x_events(void);
diff -r b4382ab109d5 -r f56af848b3b0 vt.c
--- a/vt.c Mon Mar 05 15:28:41 2007 +0100
+++ b/vt.c Mon Mar 05 15:55:24 2007 +0100
@@ -10,10 +10,13 @@
 #include <sys/ioctl.h>
 #include <termios.h>
 
+int curr_row, curr_col;
+
 /* Maximum (numerical) parameters to an escape sequence */
 #define NPAR 16
 
 /* static */
+static int saved_cursor_x, saved_cursor_y;
 
 static void
 win_clear_region(int x1, int y1, int x2, int y2, int color) {
@@ -60,7 +63,6 @@ region_scroll_down(int start, int end, i
         win_clear_region(0, (start - 1) * dc.font.height, ww, (start + lines - 1) * dc.font.height, GET_BG_COLOR(text_attrs));
 }
 
-extern int curr_row, curr_col;
 static int cursor_row, cursor_col;
 static int cursor_is_visible = 0;
 
Received on Mon Mar 05 2007 - 15:59:24 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:56:11 UTC