summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2020-06-24 22:48:39 +0200
committerBoris Faure <billiob@gmail.com>2020-06-24 22:49:17 +0200
commit26e91924d9e9b6f4a7f10d573106a791463f18f2 (patch)
tree2d69641754a685f7a651305bf881ed27176b05a0
parentb3d13674a5b45d1e2867cf03ca80e338bb882faf (diff)
Get rid of trailing whitespaces
Summary: Remove trailing whitespaces Reviewers: billiob Reviewed By: billiob Differential Revision: https://phab.enlightenment.org/D12025
-rw-r--r--src/bin/ipc.c8
-rw-r--r--src/bin/md5.c2
-rw-r--r--src/bin/miniview.c10
-rw-r--r--src/bin/options_themepv.c36
-rw-r--r--src/bin/termpty.c16
-rw-r--r--src/bin/termptygfx.c6
-rw-r--r--src/bin/theme.c2
7 files changed, 40 insertions, 40 deletions
diff --git a/src/bin/ipc.c b/src/bin/ipc.c
index e45d934..110532d 100644
--- a/src/bin/ipc.c
+++ b/src/bin/ipc.c
@@ -20,7 +20,7 @@ _ipc_cb_client_data(void *_data EINA_UNUSED,
20 void *event) 20 void *event)
21{ 21{
22 Ecore_Ipc_Event_Client_Data *e = event; 22 Ecore_Ipc_Event_Client_Data *e = event;
23 23
24 if (ecore_ipc_client_server_get(e->client) != ipc) 24 if (ecore_ipc_client_server_get(e->client) != ipc)
25 return ECORE_CALLBACK_PASS_ON; 25 return ECORE_CALLBACK_PASS_ON;
26 if ((e->major == TY_IPC_MAJOR) && 26 if ((e->major == TY_IPC_MAJOR) &&
@@ -28,7 +28,7 @@ _ipc_cb_client_data(void *_data EINA_UNUSED,
28 (e->data) && (e->size > 0)) 28 (e->data) && (e->size > 0))
29 { 29 {
30 Ipc_Instance *inst; 30 Ipc_Instance *inst;
31 31
32 inst = eet_data_descriptor_decode(new_inst_edd, e->data, e->size); 32 inst = eet_data_descriptor_decode(new_inst_edd, e->data, e->size);
33 if (inst) 33 if (inst)
34 { 34 {
@@ -62,8 +62,8 @@ _ipc_hash_get(void)
62 if (!xdg_seat) xdg_seat = "@unknown@"; 62 if (!xdg_seat) xdg_seat = "@unknown@";
63 xdg_vt = getenv("XDG_VTNR"); 63 xdg_vt = getenv("XDG_VTNR");
64 if (!xdg_vt) xdg_vt = "!unknown!"; 64 if (!xdg_vt) xdg_vt = "!unknown!";
65 snprintf(buf, sizeof(buf), "%s.%s.%s.%s.%s.%s", 65 snprintf(buf, sizeof(buf), "%s.%s.%s.%s.%s.%s",
66 disp, session, xdg_session, 66 disp, session, xdg_session,
67 xdg_id, xdg_seat, xdg_vt); 67 xdg_id, xdg_seat, xdg_vt);
68 memcpy(hash, "terminology-", 12); 68 memcpy(hash, "terminology-", 12);
69 memset(hash+12, 'x', 32); 69 memset(hash+12, 'x', 32);
diff --git a/src/bin/md5.c b/src/bin/md5.c
index 12e65bc..a219d40 100644
--- a/src/bin/md5.c
+++ b/src/bin/md5.c
@@ -105,7 +105,7 @@ void MD5Update(MD5_CTX *ctx, unsigned char const *buf, unsigned len)
105} 105}
106 106
107/* 107/*
108 * Final wrapup - pad to 64-byte boundary with the bit pattern 108 * Final wrapup - pad to 64-byte boundary with the bit pattern
109 * 1 0* (64-bit count of bits processed, MSB-first) 109 * 1 0* (64-bit count of bits processed, MSB-first)
110 */ 110 */
111void MD5Final(unsigned char digest[16], MD5_CTX *ctx) 111void MD5Final(unsigned char digest[16], MD5_CTX *ctx)
diff --git a/src/bin/miniview.c b/src/bin/miniview.c
index 4ac49d1..7af6060 100644
--- a/src/bin/miniview.c
+++ b/src/bin/miniview.c
@@ -115,7 +115,7 @@ _draw_cell(const Termpty *ty, unsigned int *pixel, const Termcell *cell, unsigne
115 } 115 }
116 if ((cell->att.bold) && (!fgext)) fg += 12; 116 if ((cell->att.bold) && (!fgext)) fg += 12;
117 if ((cell->att.faint) && (!fgext)) fg += 24; 117 if ((cell->att.faint) && (!fgext)) fg += 24;
118 118
119 if (bgext) *pixel = colors[bg + 256]; 119 if (bgext) *pixel = colors[bg + 256];
120 else if (bg && ((bg % 12) != COL_INVIS)) *pixel = colors[bg]; 120 else if (bg && ((bg % 12) != COL_INVIS)) *pixel = colors[bg];
121 else if ((codepoint > 32) && (codepoint < 0x00110000)) 121 else if ((codepoint > 32) && (codepoint < 0x00110000))
@@ -425,14 +425,14 @@ _do_configure(Evas_Object *obj)
425 mv->img_h = oh; 425 mv->img_h = oh;
426 mv->rows = oh / font_h; 426 mv->rows = oh / font_h;
427 mv->cols = ow / font_w; 427 mv->cols = ow / font_w;
428 428
429 if ((mv->rows == 0) || (mv->cols == 0)) return; 429 if ((mv->rows == 0) || (mv->cols == 0)) return;
430 430
431 mv->screen.size = (double) mv->rows / (double) mv->img_h; 431 mv->screen.size = (double) mv->rows / (double) mv->img_h;
432 edje_object_part_drag_size_set(mv->base, "miniview_screen", 1.0, mv->screen.size); 432 edje_object_part_drag_size_set(mv->base, "miniview_screen", 1.0, mv->screen.size);
433 433
434 w = (mv->cols * font_w) / font_h; 434 w = (mv->cols * font_w) / font_h;
435 435
436 evas_object_resize(mv->base, w, mv->img_h); 436 evas_object_resize(mv->base, w, mv->img_h);
437 evas_object_move(mv->base, ox + ow - w, oy); 437 evas_object_move(mv->base, ox + ow - w, oy);
438} 438}
@@ -495,7 +495,7 @@ miniview_colors_get(Miniview *mv, unsigned int *colors)
495{ 495{
496 Evas_Object *tg = termio_textgrid_get(mv->termio); 496 Evas_Object *tg = termio_textgrid_get(mv->termio);
497 int r, g, b, a, c; 497 int r, g, b, a, c;
498 498
499 for (c = 0; c < 256; c++) 499 for (c = 0; c < 256; c++)
500 { 500 {
501 evas_object_textgrid_palette_get 501 evas_object_textgrid_palette_get
diff --git a/src/bin/options_themepv.c b/src/bin/options_themepv.c
index 58618a1..7a2cccc 100644
--- a/src/bin/options_themepv.c
+++ b/src/bin/options_themepv.c
@@ -17,7 +17,7 @@ _row_set(Evas_Object *o, int y, const char *txt)
17 int x, tw, th; 17 int x, tw, th;
18 const char *s; 18 const char *s;
19 int fg, bg; 19 int fg, bg;
20 20
21 evas_object_textgrid_size_get(o, &tw, &th); 21 evas_object_textgrid_size_get(o, &tw, &th);
22 if (y >= th) return; 22 if (y >= th) return;
23 tc = evas_object_textgrid_cellrow_get(o, y); 23 tc = evas_object_textgrid_cellrow_get(o, y);
@@ -27,7 +27,7 @@ _row_set(Evas_Object *o, int y, const char *txt)
27 for (s = txt, x = 0; x < tw; x++) 27 for (s = txt, x = 0; x < tw; x++)
28 { 28 {
29 unsigned int codepoint = ' '; 29 unsigned int codepoint = ' ';
30 30
31 if ((s) && (*s == 0)) 31 if ((s) && (*s == 0))
32 { 32 {
33 s = NULL; 33 s = NULL;
@@ -83,7 +83,7 @@ _cb_resize(void *_data EINA_UNUSED,
83 Evas_Object *cursor = evas_object_data_get(grid, "cursor"); 83 Evas_Object *cursor = evas_object_data_get(grid, "cursor");
84 Evas_Object *selection = evas_object_data_get(grid, "selection"); 84 Evas_Object *selection = evas_object_data_get(grid, "selection");
85 Evas_Coord w, h, ww, hh; 85 Evas_Coord w, h, ww, hh;
86 86
87 evas_object_geometry_get(grid, NULL, NULL, &w, &h); 87 evas_object_geometry_get(grid, NULL, NULL, &w, &h);
88 evas_object_textgrid_cell_size_get(textgrid, &ww, &hh); 88 evas_object_textgrid_cell_size_get(textgrid, &ww, &hh);
89 elm_grid_size_set(grid, w, h); 89 elm_grid_size_set(grid, w, h);
@@ -124,9 +124,9 @@ options_theme_preview_add(Evas_Object *parent, Config *config, const char *file,
124 edje_object_part_text_set(oe, "terminology.tabmissed.label", "2"); 124 edje_object_part_text_set(oe, "terminology.tabmissed.label", "2");
125 elm_grid_pack(obase, o, 0, 0, w, h); 125 elm_grid_pack(obase, o, 0, 0, w, h);
126 evas_object_show(o); 126 evas_object_show(o);
127 127
128 oo = o; 128 oo = o;
129 129
130 // create a bg and swallow into core frame 130 // create a bg and swallow into core frame
131 o = elm_layout_add(parent); 131 o = elm_layout_add(parent);
132 oe = elm_layout_edje_get(o); 132 oe = elm_layout_edje_get(o);
@@ -139,7 +139,7 @@ options_theme_preview_add(Evas_Object *parent, Config *config, const char *file,
139 edje_object_signal_emit(oe, "focus,in", "terminology"); 139 edje_object_signal_emit(oe, "focus,in", "terminology");
140 evas_object_show(o); 140 evas_object_show(o);
141 elm_layout_content_set(oo, "terminology.content", o); 141 elm_layout_content_set(oo, "terminology.content", o);
142 142
143 oo = o; 143 oo = o;
144 144
145 // create a grid proportional layout to hold selection, textgrid and cursor 145 // create a grid proportional layout to hold selection, textgrid and cursor
@@ -148,9 +148,9 @@ options_theme_preview_add(Evas_Object *parent, Config *config, const char *file,
148 elm_grid_size_set(o, 100, 100); 148 elm_grid_size_set(o, 100, 100);
149 evas_object_show(o); 149 evas_object_show(o);
150 elm_layout_content_set(oo, "terminology.content", o); 150 elm_layout_content_set(oo, "terminology.content", o);
151 151
152 oo = o; 152 oo = o;
153 153
154 // create a texgrid and swallow pack into grid 154 // create a texgrid and swallow pack into grid
155 o = evas_object_textgrid_add(evas); 155 o = evas_object_textgrid_add(evas);
156 colors_term_init(o, obg, config); 156 colors_term_init(o, obg, config);
@@ -158,7 +158,7 @@ options_theme_preview_add(Evas_Object *parent, Config *config, const char *file,
158 if (config->font.bitmap) 158 if (config->font.bitmap)
159 { 159 {
160 char buf[PATH_MAX]; 160 char buf[PATH_MAX];
161 161
162 snprintf(buf, sizeof(buf), "%s/fonts/%s", 162 snprintf(buf, sizeof(buf), "%s/fonts/%s",
163 elm_app_data_dir_get(), config->font.name); 163 elm_app_data_dir_get(), config->font.name);
164 evas_object_textgrid_font_set(o, buf, config->font.size); 164 evas_object_textgrid_font_set(o, buf, config->font.size);
@@ -166,7 +166,7 @@ options_theme_preview_add(Evas_Object *parent, Config *config, const char *file,
166 else 166 else
167 evas_object_textgrid_font_set(o, config->font.name, config->font.size); 167 evas_object_textgrid_font_set(o, config->font.name, config->font.size);
168 evas_object_textgrid_size_set(o, 80, 24); 168 evas_object_textgrid_size_set(o, 80, 24);
169 169
170 evas_object_textgrid_cell_size_get(o, &ww, &hh); 170 evas_object_textgrid_cell_size_get(o, &ww, &hh);
171 if (ww < 1) ww = 1; 171 if (ww < 1) ww = 1;
172 if (hh < 1) hh = 1; 172 if (hh < 1) hh = 1;
@@ -174,21 +174,21 @@ options_theme_preview_add(Evas_Object *parent, Config *config, const char *file,
174 // cmds: 174 // cmds:
175 // \x01 = set fg 175 // \x01 = set fg
176 // \x02 = set bg 176 // \x02 = set bg
177 // 177 //
178 // cols: 178 // cols:
179 // 179 //
180 // \x01 = def 180 // \x01 = def
181 // \x02 = black 181 // \x02 = black
182 // \x03 = red 182 // \x03 = red
183 // ... 183 // ...
184 // \x09 = white 184 // \x09 = white
185 // 185 //
186 // \x11 = def BRIGHT 186 // \x11 = def BRIGHT
187 // \x12 = black BRIGHT 187 // \x12 = black BRIGHT
188 // \x13 = red BRIGHT 188 // \x13 = red BRIGHT
189 // ... 189 // ...
190 // \x19 = white BRIGHT 190 // \x19 = white BRIGHT
191 191
192#define F(_x) "\x01"_x 192#define F(_x) "\x01"_x
193#define B(_x) "\x01"_x 193#define B(_x) "\x01"_x
194#define X "\x01\x01\x02\x10" 194#define X "\x01\x01\x02\x10"
@@ -198,11 +198,11 @@ options_theme_preview_add(Evas_Object *parent, Config *config, const char *file,
198 _row_set(o, 3, F("\x12")"black"X" "F("\x13")"red"X" "F("\x14")"green"X" "F("\x15")"yellow"); 198 _row_set(o, 3, F("\x12")"black"X" "F("\x13")"red"X" "F("\x14")"green"X" "F("\x15")"yellow");
199 _row_set(o, 4, F("\x16")"blue"X" "F("\x17")"magenta"X" "F("\x18")"cyan"X" "F("\x19")"white"); 199 _row_set(o, 4, F("\x16")"blue"X" "F("\x17")"magenta"X" "F("\x18")"cyan"X" "F("\x19")"white");
200 for (y = 5; y < 24; y++) _row_set(o, y, ""); 200 for (y = 5; y < 24; y++) _row_set(o, y, "");
201 201
202 evas_object_show(o); 202 evas_object_show(o);
203 evas_object_data_set(oo, "textgrid", o); 203 evas_object_data_set(oo, "textgrid", o);
204 elm_grid_pack(oo, o, 0, 0, 100, 100); 204 elm_grid_pack(oo, o, 0, 0, 100, 100);
205 205
206 // create a cursor and put it in the grid 206 // create a cursor and put it in the grid
207 o = elm_layout_add(parent); 207 o = elm_layout_add(parent);
208 oe = elm_layout_edje_get(o); 208 oe = elm_layout_edje_get(o);
@@ -212,7 +212,7 @@ options_theme_preview_add(Evas_Object *parent, Config *config, const char *file,
212 evas_object_show(o); 212 evas_object_show(o);
213 evas_object_data_set(oo, "cursor", o); 213 evas_object_data_set(oo, "cursor", o);
214 elm_grid_pack(oo, o, 0, 0, 10, 10); 214 elm_grid_pack(oo, o, 0, 0, 10, 10);
215 215
216 // create a selection and put it in the grid 216 // create a selection and put it in the grid
217 o = edje_object_add(evas); 217 o = edje_object_add(evas);
218 oe = o; 218 oe = o;
@@ -223,7 +223,7 @@ options_theme_preview_add(Evas_Object *parent, Config *config, const char *file,
223 evas_object_show(o); 223 evas_object_show(o);
224 evas_object_data_set(oo, "selection", o); 224 evas_object_data_set(oo, "selection", o);
225 elm_grid_pack(oo, o, 0, 0, 10, 10); 225 elm_grid_pack(oo, o, 0, 0, 10, 10);
226 226
227 evas_object_size_hint_min_set(obase, w, h); 227 evas_object_size_hint_min_set(obase, w, h);
228 return obase; 228 return obase;
229} 229}
diff --git a/src/bin/termpty.c b/src/bin/termpty.c
index 841ae47..5d0ec45 100644
--- a/src/bin/termpty.c
+++ b/src/bin/termpty.c
@@ -1474,7 +1474,7 @@ termpty_block_new(Termpty *ty, int w, int h, const char *path, const char *link)
1474{ 1474{
1475 Termblock *tb; 1475 Termblock *tb;
1476 int id; 1476 int id;
1477 1477
1478 id = ty->block.curid; 1478 id = ty->block.curid;
1479 if (!ty->block.blocks) 1479 if (!ty->block.blocks)
1480 ty->block.blocks = eina_hash_int32_new((Eina_Free_Cb)termpty_block_free); 1480 ty->block.blocks = eina_hash_int32_new((Eina_Free_Cb)termpty_block_free);
@@ -1507,12 +1507,12 @@ termpty_block_insert(Termpty *ty, int ch, Termblock *blk)
1507 // bit 9-17 = x (9b 0->511) 1507 // bit 9-17 = x (9b 0->511)
1508 // bit 18-30 = id (13b 0->8191) 1508 // bit 18-30 = id (13b 0->8191)
1509 // bit 31 = 1 1509 // bit 31 = 1
1510 // 1510 //
1511 // fg/bg = 8+8bit unused. (use for extra id bits? so 16 + 13 == 29bit?) 1511 // fg/bg = 8+8bit unused. (use for extra id bits? so 16 + 13 == 29bit?)
1512 // 1512 //
1513 // cp = (1 << 31) | ((id 0x1fff) << 18) | ((x & 0x1ff) << 9) | (y & 0x1ff); 1513 // cp = (1 << 31) | ((id 0x1fff) << 18) | ((x & 0x1ff) << 9) | (y & 0x1ff);
1514 Termexp *ex; 1514 Termexp *ex;
1515 1515
1516 ex = calloc(1, sizeof(Termexp)); 1516 ex = calloc(1, sizeof(Termexp));
1517 if (!ex) return; 1517 if (!ex) return;
1518 ex->ch = ch; 1518 ex->ch = ch;
@@ -1527,7 +1527,7 @@ int
1527termpty_block_id_get(const Termcell *cell, int *x, int *y) 1527termpty_block_id_get(const Termcell *cell, int *x, int *y)
1528{ 1528{
1529 int id; 1529 int id;
1530 1530
1531 if (!(cell->codepoint & 0x80000000)) return -1; 1531 if (!(cell->codepoint & 0x80000000)) return -1;
1532 id = (cell->codepoint >> 18) & 0x1fff; 1532 id = (cell->codepoint >> 18) & 0x1fff;
1533 *x = (cell->codepoint >> 9) & 0x1ff; 1533 *x = (cell->codepoint >> 9) & 0x1ff;
@@ -1556,7 +1556,7 @@ Termblock *
1556termpty_block_chid_get(const Termpty *ty, const char *chid) 1556termpty_block_chid_get(const Termpty *ty, const char *chid)
1557{ 1557{
1558 Termblock *tb; 1558 Termblock *tb;
1559 1559
1560 tb = eina_hash_find(ty->block.chid_map, chid); 1560 tb = eina_hash_find(ty->block.chid_map, chid);
1561 return tb; 1561 return tb;
1562} 1562}
@@ -1570,7 +1570,7 @@ termpty_handle_block_codepoint_overwrite_heavy(Termpty *ty, int oldc, int newc)
1570 if (oldc & 0x80000000) ido = (oldc >> 18) & 0x1fff; 1570 if (oldc & 0x80000000) ido = (oldc >> 18) & 0x1fff;
1571 if (newc & 0x80000000) idn = (newc >> 18) & 0x1fff; 1571 if (newc & 0x80000000) idn = (newc >> 18) & 0x1fff;
1572 if (((oldc & 0x80000000) && (newc & 0x80000000)) && (idn == ido)) return; 1572 if (((oldc & 0x80000000) && (newc & 0x80000000)) && (idn == ido)) return;
1573 1573
1574 if (oldc & 0x80000000) 1574 if (oldc & 0x80000000)
1575 { 1575 {
1576 tb = termpty_block_get(ty, ido); 1576 tb = termpty_block_get(ty, ido);
@@ -1583,7 +1583,7 @@ termpty_handle_block_codepoint_overwrite_heavy(Termpty *ty, int oldc, int newc)
1583 eina_hash_del(ty->block.blocks, &ido, tb); 1583 eina_hash_del(ty->block.blocks, &ido, tb);
1584 } 1584 }
1585 } 1585 }
1586 1586
1587 if (newc & 0x80000000) 1587 if (newc & 0x80000000)
1588 { 1588 {
1589 tb = termpty_block_get(ty, idn); 1589 tb = termpty_block_get(ty, idn);
diff --git a/src/bin/termptygfx.c b/src/bin/termptygfx.c
index 055a47c..03d86a2 100644
--- a/src/bin/termptygfx.c
+++ b/src/bin/termptygfx.c
@@ -19,13 +19,13 @@ static const unsigned short vt100_to_unicode[62] =
19// ? ? v->0 v->1 v->2 v->3 v->4 19// ? ? v->0 v->1 v->2 v->3 v->4
20// ]= ^= _=SPC `=DIAMN a=HSMED b=HT c=FF 20// ]= ^= _=SPC `=DIAMN a=HSMED b=HT c=FF
21 0, 0, 0x0020, 0x25c6, 0x2592, 0x2409, 0x240c, 21 0, 0, 0x0020, 0x25c6, 0x2592, 0x2409, 0x240c,
22// v->5 v->6 v->7 v->8 v->9 v->a v->b 22// v->5 v->6 v->7 v->8 v->9 v->a v->b
23// d=CR e=LF f=DEGRE g=PLSMN h=NL i=VT j=SL-BR 23// d=CR e=LF f=DEGRE g=PLSMN h=NL i=VT j=SL-BR
24 0x240d, 0x240a, 0x00b0, 0x00b1, 0x2424, 0x240b, 0x2518, 24 0x240d, 0x240a, 0x00b0, 0x00b1, 0x2424, 0x240b, 0x2518,
25// v->c v->d v->e v->f v->10 v->11 v->12 25// v->c v->d v->e v->f v->10 v->11 v->12
26// k=SL-TR l=SL-TL m=SL-BL n=SL-+ o=SL-T1 p=SL-T2 q=SL-HZ 26// k=SL-TR l=SL-TL m=SL-BL n=SL-+ o=SL-T1 p=SL-T2 q=SL-HZ
27 0x2510, 0x250c, 0x2514, 0x253c, 0x23ba, 0x23bb, 0x2500, 27 0x2510, 0x250c, 0x2514, 0x253c, 0x23ba, 0x23bb, 0x2500,
28// v->13 v->14 v->15 v->16 v->17 v->18 v->19 28// v->13 v->14 v->15 v->16 v->17 v->18 v->19
29// r=SL-T4 s=SL-T5 t=SL-VR u=SL-VL v=SL-HU w=Sl-HD x=SL-VT 29// r=SL-T4 s=SL-T5 t=SL-VR u=SL-VL v=SL-HU w=Sl-HD x=SL-VT
30 0x23bc, 0x23bd, 0x251c, 0x2524, 0x2534, 0x252c, 0x2502, 30 0x23bc, 0x23bd, 0x251c, 0x2524, 0x2534, 0x252c, 0x2502,
31// v->1a v->1b b->1c v->1d v->1e/a3 v->1f 31// v->1a v->1b b->1c v->1d v->1e/a3 v->1f
diff --git a/src/bin/theme.c b/src/bin/theme.c
index 582ac4f..4bbb8d4 100644
--- a/src/bin/theme.c
+++ b/src/bin/theme.c
@@ -140,7 +140,7 @@ theme_reload_cb(void *_data EINA_UNUSED,
140{ 140{
141 void (*func) (void *d); 141 void (*func) (void *d);
142 void *func_data; 142 void *func_data;
143 143
144 theme_reload(obj); 144 theme_reload(obj);
145 func = evas_object_data_get(obj, "theme_reload_func"); 145 func = evas_object_data_get(obj, "theme_reload_func");
146 func_data = evas_object_data_get(obj, "theme_reload_func_data"); 146 func_data = evas_object_data_get(obj, "theme_reload_func_data");