forked from pyrite-dev/milsko
fix perl files
This commit is contained in:
parent
ad8173d562
commit
a30d306da0
5 changed files with 17 additions and 13 deletions
5
configure
vendored
5
configure
vendored
|
|
@ -82,7 +82,10 @@ my @features_keys = (
|
|||
);
|
||||
|
||||
sub def_platform {
|
||||
if($target ne "Darwin" and $target ne "ClassicMacOS" and $target ne "Windows" and $target ne "Haiku") {
|
||||
if($target eq "Windows") {
|
||||
param_set("freetype2", 0);
|
||||
param_set("stb-truetype", 0);
|
||||
} elsif($target ne "Darwin" and $target ne "ClassicMacOS" and $target ne "Haiku") {
|
||||
param_set("freetype2", 1);
|
||||
param_set("stb-truetype", 0);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -66,7 +66,8 @@ if (grep(/^wayland$/, @backends)) {
|
|||
scan_wayland_protocol("unstable", "primary-selection", "-unstable-v1");
|
||||
scan_wayland_protocol("unstable", "pointer-constraints", "-unstable-v1");
|
||||
scan_wayland_protocol("unstable", "relative-pointer", "-unstable-v1");
|
||||
scan_wayland_protocol_from_file("wlr-layer-shell", "wlr-layer-shell-unstable-v1.xml");
|
||||
scan_wayland_protocol_from_file("wlr-layer-shell",
|
||||
"wlr-layer-shell-unstable-v1.xml");
|
||||
|
||||
$gl_libs = "-lGL -lGLU";
|
||||
}
|
||||
|
|
|
|||
13
pl/utils.pl
13
pl/utils.pl
|
|
@ -125,21 +125,19 @@ sub scan_wayland_protocol {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
sub scan_wayland_protocol_from_file {
|
||||
my $proto = $_[0];
|
||||
my $file = $_[1];
|
||||
my $proto = $_[0];
|
||||
my $file = $_[1];
|
||||
my $proto_c = "src/backend/wayland/wayland-${proto}-protocol.c";
|
||||
|
||||
if (
|
||||
system(
|
||||
"wayland-scanner private-code ./resource/wayland/${file} ${proto_c}"
|
||||
"wayland-scanner private-code ./resource/wayland/${file} ${proto_c}"
|
||||
) != 0
|
||||
)
|
||||
{
|
||||
print(
|
||||
"^ Error on getting private code for ./resource/wayland/${file}\n"
|
||||
);
|
||||
"^ Error on getting private code for ./resource/wayland/${file}\n");
|
||||
}
|
||||
else {
|
||||
new_object($proto_c);
|
||||
|
|
@ -151,12 +149,11 @@ sub scan_wayland_protocol_from_file {
|
|||
)
|
||||
{
|
||||
print(
|
||||
"^ Error on getting client header for ./resource/wayland/${file}\n"
|
||||
"^ Error on getting client header for ./resource/wayland/${file}\n"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
our %params = ();
|
||||
|
||||
sub param_set {
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ static int GDI_MwDrawText(MwWidget handle, MwFLFont ttf, MwPoint* point, const c
|
|||
SetBkMode(handle->lowlevel->gdi.hDC, old_bkmode);
|
||||
SelectObject(handle->lowlevel->gdi.hDC, old_font);
|
||||
|
||||
free(t);
|
||||
free(t);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,9 @@ print(OUT " rgb->green = (v >> 8) & 0xff;");
|
|||
print(OUT " rgb->blue = (v >> 0) & 0xff;");
|
||||
print(OUT "}\n");
|
||||
print(OUT "\n");
|
||||
print(OUT "static void add_color(const char* name, int red, int green, int blue){\n");
|
||||
print(OUT
|
||||
"static void add_color(const char* name, int red, int green, int blue){\n"
|
||||
);
|
||||
print(OUT " MwU32 v = (red << 16) | (green << 8) | (blue << 0);\n");
|
||||
print(OUT " shput(colors, name, v);\n");
|
||||
print(OUT "}\n");
|
||||
|
|
@ -36,10 +38,11 @@ print(OUT "\n");
|
|||
print(OUT "void MwColorTableInit(void){\n");
|
||||
print(OUT " sh_new_strdup(colors);\n");
|
||||
print(OUT " shdefault(colors, 0);\n");
|
||||
|
||||
while (my $l = <IN>) {
|
||||
$l =~ s/\r?\n$//;
|
||||
if ($l =~ /^[ \t]*([0-9]+)[ \t]+([0-9]+)[ \t]+([0-9]+)[ \t]+(.+)$/) {
|
||||
print(OUT " add_color(\"$4\", $1, $2, $3);\n");
|
||||
print(OUT " add_color(\"$4\", $1, $2, $3);\n");
|
||||
}
|
||||
}
|
||||
print(OUT "}\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue