Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • AppImage
  • WorkSpace
  • cmake
  • evdev
  • exclamation-mark-completion
  • gb.chart2
  • gb.git
  • gb.joystick
  • gb.net.imap
  • gb.spreadsheet
  • gb.test
  • gb.test.tap
  • master
  • newdialogs
  • stable
  • 3.11.0
  • 3.11.1
  • 3.11.2
  • 3.11.3
  • 3.11.4
  • 3.12.0
  • 3.12.1
  • 3.12.2
  • 3.13.0
  • 3.14.0
  • 3.14.1
  • 3.14.2
  • 3.14.3
  • 3.15.0
  • 3.15.1
  • 3.15.2
  • 3.16.0
  • 3.16.1
  • 3.16.2
  • 3.16.3
  • 3.17.0
  • 3.17.1
  • 3.17.2
  • 3.17.3
  • 3.18.0
  • 3.18.1
  • 3.18.2
  • 3.18.3
  • 3.18.4
  • 3.19.0
  • 3.19.1
  • 3.19.2
  • 3.19.3
  • 3.19.4
  • 3.19.5
  • 3.19.6
  • 3.20.0
  • 3.20.1
  • 3.20.2
  • help
  • v1.9.44
  • v1.9.45
  • v1.9.46
  • v1.9.47
  • v1.9.48
  • v1.9.49
  • v1.9.50
  • v1.9.51
  • v1.9.90
  • v1.9.91
  • v1.9.92
  • v2.0.0
  • v2.1
  • v2.1.1
  • v2.10
  • v2.10.1
  • v2.10.2
  • v2.11
  • v2.11.1
  • v2.12
  • v2.13
  • v2.13.1
  • v2.14
  • v2.15
  • v2.15.1
  • v2.15.2
  • v2.16.0
  • v2.17.0
  • v2.18.0
  • v2.19.0
  • v2.2
  • v2.2.1
  • v2.20.0
  • v2.20.1
  • v2.20.2
  • v2.21.0
  • v2.22.0
  • v2.23.0
  • v2.23.1
  • v2.24.0
  • v2.3
  • v2.4
  • v2.4.1
  • v2.5
  • v2.6
  • v2.7
  • v2.8
  • v2.8.1
  • v2.8.2
  • v2.9
  • v2.9.0
  • v2.99.1
  • v2.99.2
  • v2.99.3
  • v2.99.4
  • v2.99.5
  • v2.99.6
  • v2.99.7
  • v3.0.0
  • v3.1.0
115 results

Target

Select target project
  • xmonader/gambas
  • gambas/gambas
  • gbWilly/gambas
  • dtardon/gambas
  • Davidmue/gambas
  • mmu_man/gambas
  • jguardon/gambas
  • tstueker/gambas
  • timsoft/gambas
  • yann64/gambas
  • Matthew-Collins/gambas
  • microhobby/gambas
  • ercoupeflyer/gambas
  • pebauer68/gambas
  • ptmarstech/gambas
  • christhal/gambas
  • tboege/gambas
  • christopherwoo/gambas
  • yusronarif/gambas
  • gen.braga/gambas
  • MelvinG24/gambas
  • Krischel/gambas
  • liang-wei/gambas
  • brucebruen/gambas
  • LibreDWG/gambas
  • SkyN9ne/gambas
  • zxMarce/gambas
  • lordheavy/gambas
  • ddabrahams76/gambas
  • GianluigiOr/gambas
  • rfc1394/gambas
  • wekan/gambas
  • bsteers4/gambas
  • fweimer-rh/gambas
  • CDCDCDCDCDCD/gambas
  • geekdu42/gambas
  • belmotek/gambas
  • jfrank1500/gambas
  • mfischerq/gambas
  • shiny0110/gambas
  • kk667788/gambas
  • bandali/gambas
  • 64sys/gambas
  • justlostintime/gambas
  • aleasto/gambas
  • bgermann/gambas
  • linusky/gambas
47 results
Select Git revision
  • AppImage
  • WorkSpace
  • cmake
  • evdev
  • exclamation-mark-completion
  • gb.chart2
  • gb.git
  • gb.joystick
  • gb.net.imap
  • gb.spreadsheet
  • gb.test
  • gb.test.tap
  • master
  • newdialogs
  • stable
  • 3.11.0
  • 3.11.1
  • 3.11.2
  • 3.11.3
  • 3.11.4
  • 3.12.0
  • 3.12.1
  • 3.12.2
  • 3.13.0
  • 3.14.0
  • 3.14.1
  • 3.14.2
  • 3.14.3
  • 3.15.0
  • 3.15.1
  • 3.15.2
  • 3.16.0
  • 3.16.1
  • 3.16.2
  • 3.16.3
  • 3.17.0
  • 3.17.1
  • 3.17.2
  • 3.17.3
  • 3.18.0
  • 3.18.1
  • 3.18.2
  • 3.18.3
  • 3.18.4
  • 3.19.0
  • 3.19.1
  • 3.19.2
  • 3.19.3
  • 3.19.4
  • 3.19.5
  • 3.19.6
  • 3.20.0
  • 3.20.1
  • 3.20.2
  • help
  • v1.9.44
  • v1.9.45
  • v1.9.46
  • v1.9.47
  • v1.9.48
  • v1.9.49
  • v1.9.50
  • v1.9.51
  • v1.9.90
  • v1.9.91
  • v1.9.92
  • v2.0.0
  • v2.1
  • v2.1.1
  • v2.10
  • v2.10.1
  • v2.10.2
  • v2.11
  • v2.11.1
  • v2.12
  • v2.13
  • v2.13.1
  • v2.14
  • v2.15
  • v2.15.1
  • v2.15.2
  • v2.16.0
  • v2.17.0
  • v2.18.0
  • v2.19.0
  • v2.2
  • v2.2.1
  • v2.20.0
  • v2.20.1
  • v2.20.2
  • v2.21.0
  • v2.22.0
  • v2.23.0
  • v2.23.1
  • v2.24.0
  • v2.3
  • v2.4
  • v2.4.1
  • v2.5
  • v2.6
  • v2.7
  • v2.8
  • v2.8.1
  • v2.8.2
  • v2.9
  • v2.9.0
  • v2.99.1
  • v2.99.2
  • v2.99.3
  • v2.99.4
  • v2.99.5
  • v2.99.6
  • v2.99.7
  • v3.0.0
  • v3.1.0
115 results
Show changes
Commits on Source (2)
......@@ -857,7 +857,9 @@ char *gt_html_to_pango_string(const char *html, int len_html, bool newline_are_b
char c;
const char *token;
const char *markup;
GB_ARRAY attr_array;
char **attr;
int attr_count;
const char *pp;
gsize len;
bool start_token = false;
......@@ -868,6 +870,7 @@ char *gt_html_to_pango_string(const char *html, int len_html, bool newline_are_b
int size_stack_ptr = 0;
bool newline = true;
bool inside_par = false;
int i;
//fprintf(stderr, "gt_html_to_pango_string: %.*s\n", len_html, html);
......@@ -932,14 +935,17 @@ char *gt_html_to_pango_string(const char *html, int len_html, bool newline_are_b
}
markup = g_strndup(p_markup, len);
attr = g_strsplit(markup, " ", -1);
attr_array = GB.String.Split(markup, len, " ", 1, "\"", 1, FALSE, TRUE);
attr_count = GB.Array.Count(attr_array);
attr = (char **)GB.Array.Get(attr_array, 0);
token = NULL;
for (pt = (const char **)attr; *pt; pt++)
for (i = 0; i < attr_count; i++)
{
if ((*pt)[0])
if (attr[i][0])
{
token = *pt;
token = attr[i];
break;
}
}
......@@ -1013,20 +1019,20 @@ char *gt_html_to_pango_string(const char *html, int len_html, bool newline_are_b
size_stack_ptr++;
g_string_append(pango, "<span");
for (pt = (const char **)attr; *pt; pt++)
for (i = 0; i < attr_count; i++)
{
if (!strncasecmp(*pt, "color=", 6))
if (!strncasecmp(attr[i], "color=", 6))
{
add_attr(pango, "foreground", *pt + 6);
add_attr(pango, "foreground", attr[i] + 6);
}
else if (!strncasecmp(*pt, "face=", 5))
else if (!strncasecmp(attr[i], "face=", 5))
{
add_attr(pango, "face", *pt + 5);
add_attr(pango, "face", attr[i] + 5);
}
else if (!strncasecmp(*pt, "size=", 5))
else if (!strncasecmp(attr[i], "size=", 5))
{
g_string_append(pango, " size=");
pp = *pt + 6;
pp = attr[i] + 6;
if (*pp == '"')
pp++;
if (isdigit(*pp))
......@@ -1090,7 +1096,7 @@ char *gt_html_to_pango_string(const char *html, int len_html, bool newline_are_b
__FOUND_TOKEN:
g_strfreev(attr);
GB.Unref(POINTER(&attr_array));
p_markup = NULL;
continue;
}
......
......@@ -63,6 +63,7 @@
#include "gbx_struct.h"
#include "gbx_signal.h"
#include "gbx_jit.h"
#include "gbx_split.h"
#include "gbx.h"
#include "gambas.h"
#include "gbx_api.h"
......@@ -299,6 +300,7 @@ const void *const GAMBAS_Api[] =
(void *)STRING_start_len,
(void *)STRING_end,
(void *)STRING_make,
(void *)STRING_split,
(void *)DEBUG_get_current_position,
(void *)DEBUG_enter_event_loop,
......
......@@ -2418,7 +2418,7 @@ void *GB_ArrayAdd(GB_ARRAY array)
void *GB_ArrayGet(GB_ARRAY array, int index)
{
return get_data((CARRAY *)array, index);
return CARRAY_get_data_unsafe((CARRAY *)array, index);
}
TYPE GB_ArrayType(GB_ARRAY array)
......
......@@ -1200,6 +1200,7 @@ typedef
void (*Start)(int length);
char *(*End)(void);
void (*Add)(const char *src, int len);
GB_ARRAY (*Split)(const char *str, int lstr, const char *sep, int lsep, const char *esc, int lesc, bool no_void, bool keep_esc);
}
String;
......