build: Fix build and behaviour on OpenBSD.
Summary: OpenBSD does not have strchrnul. Also, fix range issue with window size. The geometry is broken on OpenBSD and DragonFlyBSD. A previous patch solved this issue. Range was changed to <= 0, but needs to be <= 1 to ensure the terminal opens and displays content. Reviewers: billiob Reviewed By: billiob Differential Revision: https://phab.enlightenment.org/D9157
This commit is contained in:
parent
253446db49
commit
18bff78895
|
@ -3010,7 +3010,7 @@ _smart_size(Evas_Object *obj, int w, int h, Eina_Bool force)
|
||||||
|
|
||||||
EINA_SAFETY_ON_NULL_RETURN(sd);
|
EINA_SAFETY_ON_NULL_RETURN(sd);
|
||||||
|
|
||||||
if ((w <= 0) || (h <= 0))
|
if ((w <= 1) || (h <= 1))
|
||||||
{
|
{
|
||||||
w = 80;
|
w = 80;
|
||||||
h = 24;
|
h = 24;
|
||||||
|
|
|
@ -3409,6 +3409,23 @@ _eina_unicode_to_hex(Eina_Unicode u)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(__OpenBSD__)
|
||||||
|
char *
|
||||||
|
strchrnul(const char *s, int c)
|
||||||
|
{
|
||||||
|
const char *p = s;
|
||||||
|
|
||||||
|
while (*p)
|
||||||
|
{
|
||||||
|
if (*p == c)
|
||||||
|
return (char *)p;
|
||||||
|
|
||||||
|
++p;
|
||||||
|
}
|
||||||
|
return (char *) (p);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_xterm_parse_color(Termpty *ty, Eina_Unicode **ptr,
|
_xterm_parse_color(Termpty *ty, Eina_Unicode **ptr,
|
||||||
unsigned char *r, unsigned char *g, unsigned char *b,
|
unsigned char *r, unsigned char *g, unsigned char *b,
|
||||||
|
|
Loading…
Reference in New Issue