summaryrefslogtreecommitdiff
path: root/legacy/ecore/src/lib/ecore_fb/ecore_fb_vt.c
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2011-04-20 14:15:33 +0000
committerDaniel Juyung Seo <seojuyung2@gmail.com>2011-04-20 14:15:33 +0000
commit6ef3841a3757edb6a748dd8eed707f493de7283f (patch)
tree253495161269e7383605094ea8c0ce9e9886dc7a /legacy/ecore/src/lib/ecore_fb/ecore_fb_vt.c
parentb44bf7f8ff035d8db72bfc8ab398d6fb69f69922 (diff)
Ecore: Removed trailing whitespaces.
SVN revision: 58753
Diffstat (limited to '')
-rw-r--r--legacy/ecore/src/lib/ecore_fb/ecore_fb_vt.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/legacy/ecore/src/lib/ecore_fb/ecore_fb_vt.c b/legacy/ecore/src/lib/ecore_fb/ecore_fb_vt.c
index ab94f83c52..3d76f14030 100644
--- a/legacy/ecore/src/lib/ecore_fb/ecore_fb_vt.c
+++ b/legacy/ecore/src/lib/ecore_fb/ecore_fb_vt.c
@@ -42,7 +42,7 @@ static Eina_Bool
42_ecore_fb_signal_usr_handler(void *data __UNUSED__, int type __UNUSED__, void *ev) 42_ecore_fb_signal_usr_handler(void *data __UNUSED__, int type __UNUSED__, void *ev)
43{ 43{
44 Ecore_Event_Signal_User *e; 44 Ecore_Event_Signal_User *e;
45 45
46 e = (Ecore_Event_Signal_User *)ev; 46 e = (Ecore_Event_Signal_User *)ev;
47 if (e->number == 1) 47 if (e->number == 1)
48 { 48 {
@@ -82,10 +82,10 @@ static int
82_ecore_fb_vt_setup(void) 82_ecore_fb_vt_setup(void)
83{ 83{
84 char buf[64]; 84 char buf[64];
85// XXX: unused 85// XXX: unused
86// struct termios tio; 86// struct termios tio;
87 struct vt_mode new_vtmode; 87 struct vt_mode new_vtmode;
88 88
89 if (_ecore_fb_vt_current_vt != _ecore_fb_vt_prev_vt) 89 if (_ecore_fb_vt_current_vt != _ecore_fb_vt_prev_vt)
90 { 90 {
91 snprintf(buf, sizeof(buf), "/dev/tty%i", _ecore_fb_vt_current_vt); 91 snprintf(buf, sizeof(buf), "/dev/tty%i", _ecore_fb_vt_current_vt);
@@ -104,7 +104,7 @@ _ecore_fb_vt_setup(void)
104 tcgetattr(_ecore_fb_vt_tty_fd, &_ecore_fb_tty_prev_tio_mode); 104 tcgetattr(_ecore_fb_vt_tty_fd, &_ecore_fb_tty_prev_tio_mode);
105 ioctl(_ecore_fb_vt_tty_fd, KDGETMODE, &_ecore_fb_tty_prev_kd_mode); 105 ioctl(_ecore_fb_vt_tty_fd, KDGETMODE, &_ecore_fb_tty_prev_kd_mode);
106 ioctl(_ecore_fb_vt_tty_fd, VT_GETMODE, &_ecore_fb_vt_prev_mode); 106 ioctl(_ecore_fb_vt_tty_fd, VT_GETMODE, &_ecore_fb_vt_prev_mode);
107 107
108 if (ioctl(_ecore_fb_vt_tty_fd, KDSETMODE, KD_GRAPHICS) < 0) 108 if (ioctl(_ecore_fb_vt_tty_fd, KDSETMODE, KD_GRAPHICS) < 0)
109 { 109 {
110 perror("[ecore_fb:vt_setup] can't set the mode to KD_GRAPHICS"); 110 perror("[ecore_fb:vt_setup] can't set the mode to KD_GRAPHICS");
@@ -113,7 +113,7 @@ _ecore_fb_vt_setup(void)
113 return 0; 113 return 0;
114 } 114 }
115 ioctl(_ecore_fb_vt_tty_fd, KDGKBMODE, &_ecore_fb_tty_prev_mode); 115 ioctl(_ecore_fb_vt_tty_fd, KDGKBMODE, &_ecore_fb_tty_prev_mode);
116 116
117 /* support of switching */ 117 /* support of switching */
118 new_vtmode.mode = VT_PROCESS; 118 new_vtmode.mode = VT_PROCESS;
119 new_vtmode.waitv = 0; 119 new_vtmode.waitv = 0;
@@ -132,7 +132,7 @@ _ecore_fb_vt_setup(void)
132 NULL); 132 NULL);
133 /* What does this do? */ 133 /* What does this do? */
134 _ecore_fb_filter_handler = ecore_event_filter_add(_ecore_fb_event_filter_start, _ecore_fb_event_filter_filter, _ecore_fb_event_filter_end, NULL); 134 _ecore_fb_filter_handler = ecore_event_filter_add(_ecore_fb_event_filter_start, _ecore_fb_event_filter_filter, _ecore_fb_event_filter_end, NULL);
135 135
136 usleep(40000); 136 usleep(40000);
137 if (ioctl(_ecore_fb_vt_tty_fd, VT_ACTIVATE, _ecore_fb_vt_current_vt) < 0) 137 if (ioctl(_ecore_fb_vt_tty_fd, VT_ACTIVATE, _ecore_fb_vt_current_vt) < 0)
138 { 138 {
@@ -156,7 +156,7 @@ int
156ecore_fb_vt_init(void) 156ecore_fb_vt_init(void)
157{ 157{
158 struct vt_stat vtstat; 158 struct vt_stat vtstat;
159 159
160 /* as root you can allocate another tty */ 160 /* as root you can allocate another tty */
161 if (!geteuid()) 161 if (!geteuid())
162 _ecore_fb_vt_do_switch = 1; 162 _ecore_fb_vt_do_switch = 1;
@@ -176,7 +176,7 @@ ecore_fb_vt_init(void)
176 if (_ecore_fb_vt_do_switch) 176 if (_ecore_fb_vt_do_switch)
177 { 177 {
178 int vtno; 178 int vtno;
179 179
180 if ((ioctl(_ecore_fb_vt_tty0_fd, VT_OPENQRY, &vtno) < 0)) 180 if ((ioctl(_ecore_fb_vt_tty0_fd, VT_OPENQRY, &vtno) < 0))
181 { 181 {
182 printf("[ecore_fb:init] can't query for a vt\n"); 182 printf("[ecore_fb:init] can't query for a vt\n");
@@ -214,10 +214,10 @@ ecore_fb_vt_shutdown(void)
214 close(_ecore_fb_vt_tty_fd); 214 close(_ecore_fb_vt_tty_fd);
215 _ecore_fb_vt_tty_fd = -1; 215 _ecore_fb_vt_tty_fd = -1;
216 } 216 }
217 217
218 if (_ecore_fb_user_handler) ecore_event_handler_del(_ecore_fb_user_handler); 218 if (_ecore_fb_user_handler) ecore_event_handler_del(_ecore_fb_user_handler);
219 _ecore_fb_user_handler = NULL; 219 _ecore_fb_user_handler = NULL;
220 220
221 if (_ecore_fb_filter_handler) ecore_event_filter_del(_ecore_fb_filter_handler); 221 if (_ecore_fb_filter_handler) ecore_event_filter_del(_ecore_fb_filter_handler);
222 _ecore_fb_filter_handler = NULL; 222 _ecore_fb_filter_handler = NULL;
223} 223}
@@ -275,12 +275,12 @@ struct _Ecore_Fb_Filter_Data
275{ 275{
276 int last_event_type; 276 int last_event_type;
277}; 277};
278 278
279static void * 279static void *
280_ecore_fb_event_filter_start(void *data __UNUSED__) 280_ecore_fb_event_filter_start(void *data __UNUSED__)
281{ 281{
282 Ecore_Fb_Filter_Data *filter_data; 282 Ecore_Fb_Filter_Data *filter_data;
283 283
284 filter_data = calloc(1, sizeof(Ecore_Fb_Filter_Data)); 284 filter_data = calloc(1, sizeof(Ecore_Fb_Filter_Data));
285 return filter_data; 285 return filter_data;
286} 286}
@@ -289,7 +289,7 @@ static Eina_Bool
289_ecore_fb_event_filter_filter(void *data __UNUSED__, void *loop_data,int type, void *event __UNUSED__) 289_ecore_fb_event_filter_filter(void *data __UNUSED__, void *loop_data,int type, void *event __UNUSED__)
290{ 290{
291 Ecore_Fb_Filter_Data *filter_data; 291 Ecore_Fb_Filter_Data *filter_data;
292 292
293 filter_data = loop_data; 293 filter_data = loop_data;
294 if (!filter_data) return EINA_TRUE; 294 if (!filter_data) return EINA_TRUE;
295 if (type == ECORE_FB_EVENT_MOUSE_MOVE) 295 if (type == ECORE_FB_EVENT_MOUSE_MOVE)
@@ -308,7 +308,7 @@ static void
308_ecore_fb_event_filter_end(void *data __UNUSED__, void *loop_data) 308_ecore_fb_event_filter_end(void *data __UNUSED__, void *loop_data)
309{ 309{
310 Ecore_Fb_Filter_Data *filter_data; 310 Ecore_Fb_Filter_Data *filter_data;
311 311
312 filter_data = loop_data; 312 filter_data = loop_data;
313 if (filter_data) free(filter_data); 313 if (filter_data) free(filter_data);
314} 314}