aboutsummaryrefslogtreecommitdiff
path: root/devel/omake/files
diff options
context:
space:
mode:
Diffstat (limited to 'devel/omake/files')
-rw-r--r--devel/omake/files/patch-OMakefile15
-rw-r--r--devel/omake/files/patch-lib_build_OCaml.om19
-rw-r--r--devel/omake/files/patch-mk_make__config13
-rw-r--r--devel/omake/files/patch-src_build_omake_rule.ml25
-rw-r--r--devel/omake/files/patch-src_builtin_omake__builtin__target.ml17
-rw-r--r--devel/omake/files/patch-src_clib_omake__shell__sys.c177
-rw-r--r--devel/omake/files/patch-src_clib_readline.c127
-rw-r--r--devel/omake/files/patch-src_env_omake__env.ml45
-rw-r--r--devel/omake/files/patch-src_ir_omake__value__type.ml15
-rw-r--r--devel/omake/files/patch-src_libmojave-external_cutil_fam__pseudo.h15
-rw-r--r--devel/omake/files/patch-src_libmojave-external_cutil_lm__channel.c24
-rw-r--r--devel/omake/files/patch-src_libmojave-external_cutil_lm__ctype.c15
-rw-r--r--devel/omake/files/patch-src_libmojave-external_cutil_lm__notify.c90
-rw-r--r--devel/omake/files/patch-src_libmojave-external_cutil_lm__printf.c96
-rw-r--r--devel/omake/files/patch-src_libmojave-external_cutil_lm__terminfo.c18
-rw-r--r--devel/omake/files/patch-src_libmojave-external_cutil_lm__termsize.c33
-rw-r--r--devel/omake/files/patch-src_libmojave-external_cutil_lm__uname__ext.c35
-rw-r--r--devel/omake/files/patch-src_libmojave-external_cutil_lm__unix__cutil.c117
-rw-r--r--devel/omake/files/patch-src_libmojave-external_stdlib_lm__debug.ml58
-rw-r--r--devel/omake/files/patch-src_libmojave-external_stdlib_lm__string__util.ml125
-rw-r--r--devel/omake/files/patch-src_libmojave-external_unix_lm__notify.ml127
-rw-r--r--devel/omake/files/patch-src_libmojave-external_util_lm__channel.ml364
-rw-r--r--devel/omake/files/patch-src_libmojave-external_util_lm__filename__util.ml24
-rw-r--r--devel/omake/files/patch-src_libmojave-external_util_lm__glob.ml20
-rw-r--r--devel/omake/files/patch-src_libmojave-external_util_lm__lexer.ml343
-rw-r--r--devel/omake/files/patch-src_libmojave-external_util_lm__parser.ml366
26 files changed, 13 insertions, 2310 deletions
diff --git a/devel/omake/files/patch-OMakefile b/devel/omake/files/patch-OMakefile
deleted file mode 100644
index 73ebb8ae60a1..000000000000
--- a/devel/omake/files/patch-OMakefile
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-aa,v 1.2 2010/12/17 09:40:14 wiz Exp $
-
-From upstream SVN.
-
---- OMakefile.orig 2010-10-27 00:42:37 UTC
-+++ OMakefile
-@@ -57,7 +57,7 @@ if $(not $(defined CAMLLIB))
- #
- # OCaml options
- #
--OCAMLFLAGS[] += -w Ae$(if $(OCAML_ACCEPTS_Z_WARNING), z)
-+OCAMLFLAGS[] += -w Ae$(if $(OCAML_ACCEPTS_Z_WARNING), z-9-29)
- if $(THREADS_ENABLED)
- OCAMLFLAGS += -thread
- export
diff --git a/devel/omake/files/patch-lib_build_OCaml.om b/devel/omake/files/patch-lib_build_OCaml.om
deleted file mode 100644
index d1d70465deaf..000000000000
--- a/devel/omake/files/patch-lib_build_OCaml.om
+++ /dev/null
@@ -1,19 +0,0 @@
-$NetBSD: patch-lib_build_OCaml.om,v 1.1 2012/11/23 22:55:22 marino Exp $
-
-Omake will break in over a dozen places on gcc 4.7.x if warnings are
-treated as errors. All valid but unreferenced functions and constants
-are warned about in gcc 4.7, and the alternative to removing the
-warn-error flag is to remove all these unreferenced functions and
-constants via patches.
-
---- lib/build/OCaml.om.orig 2008-03-05 01:07:25 UTC
-+++ lib/build/OCaml.om
-@@ -176,7 +176,7 @@ public.PREFIXED_OCAMLPACKS =\
- #
- declare OCAMLDEPFLAGS
- public.OCAMLPPFLAGS =
--public.OCAMLFLAGS = -warn-error A
-+public.OCAMLFLAGS =
- public.OCAMLCFLAGS = -g
- public.OCAMLOPTFLAGS =
- public.OCAMLCPPFLAGS =
diff --git a/devel/omake/files/patch-mk_make__config b/devel/omake/files/patch-mk_make__config
new file mode 100644
index 000000000000..57f7a95b300c
--- /dev/null
+++ b/devel/omake/files/patch-mk_make__config
@@ -0,0 +1,13 @@
+Manual patch for MANDIR, configure lacks -mandir option
+
+--- mk/make_config.orig 2024-02-23 18:54:11 UTC
++++ mk/make_config
+@@ -35,7 +35,7 @@ MakeConfig(CONFIG_FILE) =
+ include $(PRECONFIG_FILE)
+ BINDIR = $(PREFIX)/bin
+ LIBDIR = $(PREFIX)/lib
+- MANDIR = $(PREFIX)/man
++ MANDIR = $(PREFIX)/share/man
+ export
+
+ #
diff --git a/devel/omake/files/patch-src_build_omake_rule.ml b/devel/omake/files/patch-src_build_omake_rule.ml
deleted file mode 100644
index 626faf6877ad..000000000000
--- a/devel/omake/files/patch-src_build_omake_rule.ml
+++ /dev/null
@@ -1,25 +0,0 @@
-$NetBSD: patch-ac,v 1.1 2010/12/17 09:40:14 wiz Exp $
-
-From upstream SVN.
-
---- src/build/omake_rule.ml.orig 2010-10-07 19:59:08 UTC
-+++ src/build/omake_rule.ml
-@@ -768,7 +768,7 @@ let lazy_command venv pos command =
- let fv = free_vars_exp_list el in
- CommandSection (eval_string_exp venv pos s, fv, el)
- | ShellExp (loc, s) ->
-- CommandValue (loc, ValStringExp (venv_get_env venv, s))
-+ CommandValue (loc, venv_get_env venv, s)
- | _ ->
- let fv = free_vars_exp command in
- CommandSection (ValData "eval", fv, [command])
-@@ -1121,7 +1121,8 @@ and eval_rule venv loc target sources sl
- let commands = ([], CommandEval e) :: commands in
- let fv = free_vars_union fv fv' in
- commands, fv
-- | CommandValue (loc, v) ->
-+ | CommandValue (loc, env, s) ->
-+ let v = ValStringExp (env, s) in
- let commands =
- try
- let flags, pipe = pipe_of_value venv find_alias options pos loc v in
diff --git a/devel/omake/files/patch-src_builtin_omake__builtin__target.ml b/devel/omake/files/patch-src_builtin_omake__builtin__target.ml
deleted file mode 100644
index 3083143ef13f..000000000000
--- a/devel/omake/files/patch-src_builtin_omake__builtin__target.ml
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD: patch-ad,v 1.1 2010/12/17 09:40:14 wiz Exp $
-
-From upstream SVN.
-
---- src/builtin/omake_builtin_target.ml.orig 2008-01-15 19:57:00 UTC
-+++ src/builtin/omake_builtin_target.ml
-@@ -221,8 +221,8 @@ let split_command venv (values1, lines1)
- match line with
- CommandSection (_, _, e) ->
- ValBody (e, ExportNone)
-- | CommandValue (_, v) ->
-- v
-+ | CommandValue (_, exp, v) ->
-+ ValStringExp(exp,v)
- in
- v :: lines) lines1 lines2
- in
diff --git a/devel/omake/files/patch-src_clib_omake__shell__sys.c b/devel/omake/files/patch-src_clib_omake__shell__sys.c
deleted file mode 100644
index fba825a985ef..000000000000
--- a/devel/omake/files/patch-src_clib_omake__shell__sys.c
+++ /dev/null
@@ -1,177 +0,0 @@
-$NetBSD: patch-ae,v 1.1 2010/12/17 09:40:14 wiz Exp $
-
-From upstream SVN.
-
---- src/clib/omake_shell_sys.c.orig 2007-12-01 21:32:13 UTC
-+++ src/clib/omake_shell_sys.c
-@@ -551,7 +551,7 @@ value omake_shell_sys_suspend(value v_pg
- fflush(stderr);
- #endif
- if(process_group_map(suspend_process, Int_val(v_pgrp)) < 0)
-- failwith("omake_shell_sys_suspend");
-+ caml_failwith("omake_shell_sys_suspend");
- CAMLreturn(Val_unit);
- }
-
-@@ -563,7 +563,7 @@ value omake_shell_sys_resume(value v_pgr
- fflush(stderr);
- #endif
- if(process_group_map(resume_process, Int_val(v_pgrp)) < 0)
-- failwith("omake_shell_sys_resume");
-+ caml_failwith("omake_shell_sys_resume");
- CAMLreturn(Val_unit);
- }
-
-@@ -575,7 +575,7 @@ value omake_shell_sys_kill(value v_pgrp)
- fflush(stderr);
- #endif
- if(process_group_map(kill_process, Int_val(v_pgrp)) < 0)
-- failwith("omake_shell_sys_kill");
-+ caml_failwith("omake_shell_sys_kill");
- CAMLreturn(Val_unit);
- }
-
-@@ -600,14 +600,14 @@ value omake_shell_sys_create_thread_pid(
- /* Allocate the process data */
- processp = (Process *) malloc(sizeof(Process));
- if(processp == 0)
-- failwith("omake_shell_sys_create_thread_pid: out of memory");
-+ caml_failwith("omake_shell_sys_create_thread_pid: out of memory");
- memset(processp, 0, sizeof(Process));
-
- /* Create an event for waiting on the thread */
- event = CreateEvent(NULL, FALSE, FALSE, NULL);
- if(event == NULL) {
- free(processp);
-- failwith("omake_shell_sys_create_thread_pid: can't create event");
-+ caml_failwith("omake_shell_sys_create_thread_pid: can't create event");
- }
-
- pgrp = Int_val(v_pgrp);
-@@ -645,7 +645,7 @@ value omake_shell_sys_init_thread_pid(va
- break;
- }
- if(processp == 0)
-- raise_not_found();
-+ caml_raise_not_found();
-
- /* Process has terminated */
- processp->thread = GetCurrentThreadId();
-@@ -679,7 +679,7 @@ value omake_shell_sys_release_thread_pid
- break;
- }
- if(processp == 0)
-- raise_not_found();
-+ caml_raise_not_found();
-
- /* Process has terminated */
- processp->changed = 1;
-@@ -771,7 +771,7 @@ value omake_shell_sys_wait(value v_pgrp,
- goto done;
- else {
- if(ncount == MAXIMUM_WAIT_OBJECTS)
-- invalid_argument("omake_shell_sys_wait: too many processes");
-+ caml_invalid_argument("omake_shell_sys_wait: too many processes");
- processes[ncount] = processp->pid;
- handles[ncount] = processp->handle;
- ncount++;
-@@ -787,11 +787,11 @@ value omake_shell_sys_wait(value v_pgrp,
- /* Wait for an event */
- while(1) {
- /* Perform the wait */
-- enter_blocking_section();
-+ caml_enter_blocking_section();
- index = WaitForMultipleObjects(ncount, handles, FALSE, timeout);
- if(index == WAIT_FAILED)
- code = GetLastError();
-- leave_blocking_section();
-+ caml_leave_blocking_section();
-
- /* See if something has changed */
- if(index == WAIT_OBJECT_0) {
-@@ -810,7 +810,7 @@ value omake_shell_sys_wait(value v_pgrp,
- else if(index >= WAIT_ABANDONED_0 + 1 && index < WAIT_ABANDONED_0 + ncount)
- index -= WAIT_ABANDONED_0;
- else
-- raise_not_found();
-+ caml_raise_not_found();
-
- /* Adjust process */
- pid = processes[index];
-@@ -863,7 +863,7 @@ value omake_shell_sys_wait(value v_pgrp,
- break;
- case STATUS_RUNNING:
- default:
-- invalid_argument("wait_process: process is running");
-+ caml_invalid_argument("wait_process: process is running");
- break;
- }
-
-@@ -908,7 +908,7 @@ value omake_shell_sys_create_process(val
- strp = String_val(Field(v_envp, i));
- length = strlen(strp);
- if(index + length + 2 > SIZEOF_ENVIRONMENT)
-- failwith("omake_shell_sys_create_process: environment is too big");
-+ caml_failwith("omake_shell_sys_create_process: environment is too big");
- strcpy(env + index, strp);
- index += length + 1;
- }
-@@ -919,7 +919,7 @@ value omake_shell_sys_create_process(val
- v_argvp = Field(v_info, CREATE_PROCESS_ARGV);
- count = Wosize_val(v_argvp);
- if(count == 0)
-- invalid_argument("omake_shell_sys_create_process: command line is empty");
-+ caml_invalid_argument("omake_shell_sys_create_process: command line is empty");
- index = 0;
- for(i = 0; i != count; i++) {
- /* Win32 doesn't deal well when the command name differs from the executable */
-@@ -930,7 +930,7 @@ value omake_shell_sys_create_process(val
- length = strlen(argp);
- white = string_escape_length(argp);
- if(index + length + white + 4 >= SIZEOF_COMMAND)
-- failwith("omake_shell_sys_create_process: command line is too long");
-+ caml_failwith("omake_shell_sys_create_process: command line is too long");
- if(index)
- argv[index++] = ' ';
- if(white)
-@@ -1019,13 +1019,13 @@ value omake_shell_sys_create_process(val
- if ((bufLen < 1) || (bufLen > 1024)) {
- if (lpMsgBuf != NULL)
- LocalFree( lpMsgBuf );
-- failwith("omake_shell_sys_create_process: process creation failed");
-+ caml_failwith("omake_shell_sys_create_process: process creation failed");
- } else {
- char err[2048];
- sprintf(err, "omake_shell_sys_create_process: process creation failed: %s", (char *)lpMsgBuf);
- if (lpMsgBuf != NULL)
- LocalFree( lpMsgBuf );
-- failwith(err);
-+ caml_failwith(err);
- }
- }
- CloseHandle(process.hThread);
-@@ -1034,7 +1034,7 @@ value omake_shell_sys_create_process(val
- processp = (Process *) malloc(sizeof(Process));
- if(processp == 0) {
- CloseHandle(process.hProcess);
-- failwith("omake_shell_sys_create_process: out of memory");
-+ caml_failwith("omake_shell_sys_create_process: out of memory");
- }
- memset(processp, 0, sizeof(Process));
- processp->pid = pid;
-@@ -1129,13 +1129,13 @@ value omake_shell_sys_init(value v_unit)
- /* Allocate a struct for the current process */
- processp = (Process *) malloc(sizeof(Process));
- if(processp == 0)
-- failwith("Omake_shell_csys.create_state: out of memory");
-+ caml_failwith("Omake_shell_csys.create_state: out of memory");
- memset(processp, 0, sizeof(Process));
-
- /* Allocate the state */
- state = (ShellState *) malloc(sizeof(ShellState));
- if(state == 0)
-- failwith("Omake_shell_csys.create_state: out of memory");
-+ caml_failwith("Omake_shell_csys.create_state: out of memory");
- memset(state, 0, sizeof(ShellState));
- state->pid_counter = INIT_PID;
- state->changed = CreateEvent(NULL, FALSE, FALSE, NULL);
diff --git a/devel/omake/files/patch-src_clib_readline.c b/devel/omake/files/patch-src_clib_readline.c
deleted file mode 100644
index c0c67e1db266..000000000000
--- a/devel/omake/files/patch-src_clib_readline.c
+++ /dev/null
@@ -1,127 +0,0 @@
-$NetBSD: patch-af,v 1.1 2010/12/17 09:40:14 wiz Exp $
-
-From upstream SVN.
-
---- src/clib/readline.c.orig 2007-05-15 19:03:03 UTC
-+++ src/clib/readline.c
-@@ -134,7 +134,7 @@ static char **readline_completion(char *
- CAMLreturnT(char **, 0);
-
- /* The callback returns an array of strings */
-- request = copy_string(text);
-+ request = caml_copy_string(text);
- response = caml_callback(*callbackp, request);
-
- /* Copy the array of strings */
-@@ -726,9 +726,9 @@ static ProcessCode processor(ReadLine *r
-
- /* Input loop */
- while(1) {
-- enter_blocking_section();
-+ caml_enter_blocking_section();
- status = ReadConsoleInput(readp->console_in, input, INPUT_COUNT, &count);
-- leave_blocking_section();
-+ caml_leave_blocking_section();
- if(status == 0) {
- print_error("ReadConsoleInput");
- return CODE_EOF;
-@@ -766,11 +766,11 @@ static void readline_cooked(ReadLine *re
- {
- char *s;
-
-- enter_blocking_section();
-+ caml_enter_blocking_section();
- s = fgets(readp->current.buffer, LINE_MAX, stdin);
-- leave_blocking_section();
-+ caml_leave_blocking_section();
- if(s == 0)
-- raise_end_of_file();
-+ caml_raise_end_of_file();
- readp->current.length = strlen(readp->current.buffer);
- }
-
-@@ -1053,7 +1053,7 @@ value omake_readline(value v_prompt)
-
- /* Copy it to a string */
- linep = &readp->current;
-- v_str = alloc_string(linep->length);
-+ v_str = caml_alloc_string(linep->length);
- memcpy(String_val(v_str), linep->buffer, linep->length);
-
- /* Reset the current buffer */
-@@ -1105,7 +1105,7 @@ value omake_readline_init(value v_unit)
- c_stdin = GetStdHandle(STD_INPUT_HANDLE);
- c_stdout = GetStdHandle(STD_OUTPUT_HANDLE);
- if(c_stdin == INVALID_HANDLE_VALUE || c_stdout == INVALID_HANDLE_VALUE)
-- failwith("omake_readline_init: no standard channels");
-+ caml_failwith("omake_readline_init: no standard channels");
-
- /* Check if it is a console */
- is_console = 1;
-@@ -1179,18 +1179,18 @@ static ReadLine *AllocReadLine(int is_co
- /* Allocate */
- readp = (ReadLine *) malloc(sizeof(ReadLine));
- if(readp == NULL)
-- failwith("AllocReadLine: out of memory");
-+ caml_failwith("AllocReadLine: out of memory");
- memset(readp, 0, sizeof(ReadLine));
-
- /* Initialize */
- readp->buffer = malloc(LINE_MAX);
- if (readp->buffer == NULL)
-- failwith("AllocReadLine: out of memory");
-+ caml_failwith("AllocReadLine: out of memory");
- readp->buffer_size = LINE_MAX;
-
- readp->prompt = malloc(MAX_PROMPT_LENGTH);
- if (readp->prompt == NULL)
-- failwith("AllocReadLine: out of memory");
-+ caml_failwith("AllocReadLine: out of memory");
- readp->prompt_size = MAX_PROMPT_LENGTH;
-
- readp->console_in = console_in;
-@@ -1262,7 +1262,7 @@ static void readline_raw(ReadLine *readp
- if(length >= readp->buffer_size) {
- char *new_buffer = malloc(length + 1);
- if(new_buffer == NULL)
-- failwith("readline_raw: out of memory");
-+ caml_failwith("readline_raw: out of memory");
- free(readp->buffer);
- readp->buffer = new_buffer;
- readp->buffer_size = length + 1;
-@@ -1307,7 +1307,7 @@ static void do_readline(ReadLine *readp,
- readp->prompt = malloc(new_size);
- if (readp->prompt == NULL) {
- readp->prompt = old_prompt;
-- failwith("do_readline: out of memory");
-+ caml_failwith("do_readline: out of memory");
- } else {
- memcpy(readp->prompt, old_prompt, i);
- free(old_prompt);
-@@ -1545,7 +1545,7 @@ value omake_readline(value v_prompt)
- do_readline(readp, String_val(v_prompt));
-
- /* Copy it to the buffer */
-- v_str = alloc_string(readp->length);
-+ v_str = caml_alloc_string(readp->length);
- memcpy(String_val(v_str), readp->buffer, readp->length);
-
- /* Reset the current buffer */
-@@ -1609,7 +1609,7 @@ value omake_rl_prompt_wrappers(value v_u
- CAMLlocal2(s1, s2);
- s1 = caml_copy_string(begin);
- s2 = caml_copy_string(end);
-- buf = alloc_tuple(2);
-+ buf = caml_alloc_tuple(2);
- Field(buf, 0) = s1;
- Field(buf, 1) = s2;
- }
-@@ -1617,7 +1617,7 @@ value omake_rl_prompt_wrappers(value v_u
- {
- CAMLlocal1(emptystr);
- emptystr = caml_copy_string("");
-- buf = alloc_tuple(2);
-+ buf = caml_alloc_tuple(2);
- Field(buf, 0) = emptystr;
- Field(buf, 1) = emptystr;
- }
diff --git a/devel/omake/files/patch-src_env_omake__env.ml b/devel/omake/files/patch-src_env_omake__env.ml
deleted file mode 100644
index f50dc40081dd..000000000000
--- a/devel/omake/files/patch-src_env_omake__env.ml
+++ /dev/null
@@ -1,45 +0,0 @@
-$NetBSD: patch-ag,v 1.1 2010/12/17 09:40:14 wiz Exp $
-
-From upstream SVN.
-
---- src/env/omake_env.ml.orig 2008-01-15 19:57:00 UTC
-+++ src/env/omake_env.ml
-@@ -404,8 +404,8 @@ let rec pp_print_command buf command =
- match command with
- CommandSection (arg, fv, e) ->
- fprintf buf "@[<hv 3>section %a@ %a@]" pp_print_value arg pp_print_exp_list e
-- | CommandValue (_, v) ->
-- pp_print_value buf v
-+ | CommandValue (_, _, v) ->
-+ pp_print_string_exp buf v
-
- and pp_print_commands buf commands =
- List.iter (fun command -> fprintf buf "@ %a" pp_print_command command) commands
-@@ -1928,6 +1928,14 @@ let venv_save_explicit_rules venv loc er
- let venv_add_wild_match venv v =
- venv_add_var venv wild_var v
-
-+let command_add_wild venv wild command =
-+ match command with
-+ CommandSection _ ->
-+ command
-+ | CommandValue(loc, env, s) ->
-+ let env = venv_get_env (venv_add_wild_match (venv_with_env venv env) wild) in
-+ CommandValue(loc, env, s)
-+
- (*
- * This is the standard way to add results of a pattern match.
- *)
-@@ -2699,8 +2707,10 @@ let venv_find_implicit_rules_inner venv
- let scanner_args = List.map (subst_source venv target_dir subst) irule.irule_scanners in
- let scanners = node_set_of_list scanner_args in
- let core = wild_core subst in
-- let venv = venv_add_wild_match venv (ValData core) in
-- let commands = make_command_info venv source_args irule.irule_values irule.irule_body in
-+ let core_val = ValData core in
-+ let venv = venv_add_wild_match venv core_val in
-+ let commands = List.map (command_add_wild venv core_val) irule.irule_body in
-+ let commands = make_command_info venv source_args irule.irule_values commands in
- let effects =
- List.fold_left (fun effects pattern ->
- let effect = wild_subst_in subst pattern in
diff --git a/devel/omake/files/patch-src_ir_omake__value__type.ml b/devel/omake/files/patch-src_ir_omake__value__type.ml
deleted file mode 100644
index 69fac6b050d5..000000000000
--- a/devel/omake/files/patch-src_ir_omake__value__type.ml
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-ah,v 1.1 2010/12/17 09:40:14 wiz Exp $
-
-From upstream SVN.
-
---- src/ir/omake_value_type.ml.orig 2010-10-07 19:59:08 UTC
-+++ src/ir/omake_value_type.ml
-@@ -162,7 +162,7 @@ type path =
- *)
- type command =
- CommandSection of value * free_vars * exp list (* Name of the section, its free variables, and the expression *)
-- | CommandValue of loc * value
-+ | CommandValue of loc * env * string_exp
-
- (*
- * Kinds of rules.
diff --git a/devel/omake/files/patch-src_libmojave-external_cutil_fam__pseudo.h b/devel/omake/files/patch-src_libmojave-external_cutil_fam__pseudo.h
deleted file mode 100644
index fed44692507d..000000000000
--- a/devel/omake/files/patch-src_libmojave-external_cutil_fam__pseudo.h
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-src_libmojave-external_cutil_fam__pseudo.h,v 1.1 2012/11/16 00:46:04 joerg Exp $
-
---- src/libmojave-external/cutil/fam_pseudo.h.orig 2006-07-15 17:23:37 UTC
-+++ src/libmojave-external/cutil/fam_pseudo.h
-@@ -43,7 +43,10 @@
- /*
- * Maximum file name length.
- */
-+#include <limits.h>
-+#ifndef NAME_MAX
- #define NAME_MAX 1024
-+#endif
-
- /*
- * Possible events.
diff --git a/devel/omake/files/patch-src_libmojave-external_cutil_lm__channel.c b/devel/omake/files/patch-src_libmojave-external_cutil_lm__channel.c
deleted file mode 100644
index 335cf9ffda74..000000000000
--- a/devel/omake/files/patch-src_libmojave-external_cutil_lm__channel.c
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD: patch-ai,v 1.1 2010/12/17 09:40:14 wiz Exp $
-
-From upstream SVN.
-
---- src/libmojave-external/cutil/lm_channel.c.orig 2006-07-15 17:23:37 UTC
-+++ src/libmojave-external/cutil/lm_channel.c
-@@ -57,7 +57,7 @@ value omake_shell_peek_pipe(value v_fd)
- &total, // Total number of bytes available
- NULL); // Number of bytes in the next message
- if(status == 0)
-- failwith("Not a pipe");
-+ caml_failwith("Not a pipe");
- return total ? Val_int(1) : Val_int(0);
- }
-
-@@ -83,7 +83,7 @@ value omake_shell_pipe_kind(value v_fd)
-
- value omake_shell_peek_pipe(value v_fd)
- {
-- failwith("omake_shell_peek_pipe: not available on Unix systems");
-+ caml_failwith("omake_shell_peek_pipe: not available on Unix systems");
- return Val_unit;
- }
-
diff --git a/devel/omake/files/patch-src_libmojave-external_cutil_lm__ctype.c b/devel/omake/files/patch-src_libmojave-external_cutil_lm__ctype.c
deleted file mode 100644
index e928c25b41b7..000000000000
--- a/devel/omake/files/patch-src_libmojave-external_cutil_lm__ctype.c
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-aj,v 1.1 2010/12/17 09:40:14 wiz Exp $
-
-From upstream SVN.
-
---- src/libmojave-external/cutil/lm_ctype.c.orig 2006-12-01 21:13:14 UTC
-+++ src/libmojave-external/cutil/lm_ctype.c
-@@ -59,7 +59,7 @@ static value get_chars(int (*f)(int))
- if(f(i))
- *p++ = (char) i;
- }
-- s = alloc_string(p - buf);
-+ s = caml_alloc_string(p - buf);
- memcpy(String_val(s), buf, p - buf);
- return s;
- }
diff --git a/devel/omake/files/patch-src_libmojave-external_cutil_lm__notify.c b/devel/omake/files/patch-src_libmojave-external_cutil_lm__notify.c
deleted file mode 100644
index ffcd6e628f2a..000000000000
--- a/devel/omake/files/patch-src_libmojave-external_cutil_lm__notify.c
+++ /dev/null
@@ -1,90 +0,0 @@
-$NetBSD: patch-ak,v 1.1 2010/12/17 09:40:14 wiz Exp $
-
-From upstream SVN.
-
---- src/libmojave-external/cutil/lm_notify.c.orig 2007-07-27 17:58:13 UTC
-+++ src/libmojave-external/cutil/lm_notify.c
-@@ -74,13 +74,13 @@ typedef struct {
-
- #define CheckCode(fmt, expr) \
- do { \
-- enter_blocking_section(); \
-+ caml_enter_blocking_section(); \
- code = expr; \
-- leave_blocking_section(); \
-+ caml_leave_blocking_section(); \
- if(code < 0) { \
- char buffer[256]; \
- ErrFmt(buffer, fmt); \
-- failwith(buffer); \
-+ caml_failwith(buffer); \
- } \
- } while(0)
-
-@@ -145,11 +145,11 @@ value om_notify_open(value v_unit)
- FAMInfo *info;
- int code;
-
-- v = alloc_custom(&fam_connection_ops, sizeof(FAMInfo), 0, 1);
-+ v = caml_alloc_custom(&fam_connection_ops, sizeof(FAMInfo), 0, 1);
- info = FAMInfo_val(v);
- fc = malloc(sizeof(FAMConnection));
- if(fc == 0)
-- invalid_argument("om_notify_open: out of memory");
-+ caml_invalid_argument("om_notify_open: out of memory");
- info->fc = fc;
- CheckCode("om_notify_open", FAMOpen(fc));
- #ifdef HAVE_FAMNOEXISTS
-@@ -180,7 +180,7 @@ value om_notify_fd(value v_fc)
- fc = FAMConnection_val(v_fc);
- return Val_int(fc->id);
- #else /* FAM_PSEUDO && !FAM_INOTIFY */
-- failwith("No file descriptors in pseudo-FAM");
-+ caml_failwith("No file descriptors in pseudo-FAM");
- return Val_unit;
- #endif /* FAM_INOTIFY */
- #else /* FAM_PSEUDO */
-@@ -209,7 +209,7 @@ value om_notify_monitor_directory(value
- #ifdef WIN32
- CheckCode("om_notify_monitor_directory", FAMMonitorDirectoryTree(fc, name, &request, 0));
- #else /* WIN32 */
-- failwith("om_notify_monitor_directory: recursive monitoring is not allowed");
-+ caml_failwith("om_notify_monitor_directory: recursive monitoring is not allowed");
- #endif /* !WIN32 */
- }
- else
-@@ -294,13 +294,13 @@ value om_notify_next_event(value v_fc)
- CheckCode("om_notify_next_event", FAMNextEvent(fc, &event));
- code = event.code;
- if(code < 1 || code > 10)
-- failwith("om_notify_next_event: code out of bounds");
-+ caml_failwith("om_notify_next_event: code out of bounds");
-
- /* Allocate the string name */
-- v_name = copy_string(event.filename);
-+ v_name = caml_copy_string(event.filename);
-
- /* Allocate the tuple */
-- v_tuple = alloc_tuple(3);
-+ v_tuple = caml_alloc_tuple(3);
- Field(v_tuple, 0) = Val_int(event.fr.reqnum);
- Field(v_tuple, 1) = v_name;
- Field(v_tuple, 2) = Val_int(code - 1);
-@@ -330,7 +330,7 @@ value om_notify_open(value v_unit)
- */
- value om_notify_fd(value v_fc)
- {
-- invalid_argument("FAM not enabled");
-+ caml_invalid_argument("FAM not enabled");
- return Val_unit;
- }
-
-@@ -389,7 +389,7 @@ value om_notify_pending(value v_fc)
- */
- value om_notify_next_event(value v_fc)
- {
-- invalid_argument("FAM not enabled");
-+ caml_invalid_argument("FAM not enabled");
- return Val_unit;
- }
-
diff --git a/devel/omake/files/patch-src_libmojave-external_cutil_lm__printf.c b/devel/omake/files/patch-src_libmojave-external_cutil_lm__printf.c
deleted file mode 100644
index 8081874fa3e9..000000000000
--- a/devel/omake/files/patch-src_libmojave-external_cutil_lm__printf.c
+++ /dev/null
@@ -1,96 +0,0 @@
-$NetBSD: patch-al,v 1.1 2010/12/17 09:40:14 wiz Exp $
-
-From upstream SVN.
-
---- src/libmojave-external/cutil/lm_printf.c.orig 2009-02-06 16:41:21 UTC
-+++ src/libmojave-external/cutil/lm_printf.c
-@@ -61,12 +61,12 @@ value ml_print_char(value v_fmt, value v
- char c = (char) Int_val(v_char);
- #ifdef HAVE_SNPRINTF
- if(snprintf(buffer, sizeof(buffer), fmt, c) < 0)
-- failwith("ml_print_char");
-+ caml_failwith("ml_print_char");
- #else
- if(sprintf(buffer, fmt, c) < 0)
-- failwith("ml_print_char");
-+ caml_failwith("ml_print_char");
- #endif
-- return copy_string(buffer);
-+ return caml_copy_string(buffer);
- }
-
- /*
-@@ -79,12 +79,12 @@ value ml_print_int(value v_fmt, value v_
- int i = Int_val(v_int);
- #ifdef HAVE_SNPRINTF
- if(snprintf(buffer, sizeof(buffer), fmt, i) < 0)
-- failwith("ml_print_int");
-+ caml_failwith("ml_print_int");
- #else
- if(sprintf(buffer, fmt, i) < 0)
-- failwith("ml_print_int");
-+ caml_failwith("ml_print_int");
- #endif
-- return copy_string(buffer);
-+ return caml_copy_string(buffer);
- }
-
-
-@@ -98,12 +98,12 @@ value ml_print_float(value v_fmt, value
- double x = Double_val(v_float);
- #ifdef HAVE_SNPRINTF
- if(snprintf(buffer, sizeof(buffer), fmt, x) < 0)
-- failwith("ml_print_float");
-+ caml_failwith("ml_print_float");
- #else
- if(sprintf(buffer, fmt, x) < 0)
-- failwith("ml_print_float");
-+ caml_failwith("ml_print_float");
- #endif
-- return copy_string(buffer);
-+ return caml_copy_string(buffer);
- }
-
- /*
-@@ -132,7 +132,7 @@ value ml_print_string(value v_fmt, value
- size = len * 2;
- bufp = malloc(size);
- if(bufp == 0)
-- failwith("ml_print_string");
-+ caml_failwith("ml_print_string");
- }
-
- #ifdef HAVE_SNPRINTF
-@@ -143,9 +143,9 @@ value ml_print_string(value v_fmt, value
- if(code < 0) {
- if(bufp != buffer)
- free(bufp);
-- failwith("ml_print_string");
-+ caml_failwith("ml_print_string");
- }
-- v_result = copy_string(bufp);
-+ v_result = caml_copy_string(bufp);
- if(bufp != buffer)
- free(bufp);
- return v_result;
-@@ -180,7 +180,7 @@ value ml_print_string2(value v_width, va
- size = len * 2;
- bufp = malloc(size);
- if(bufp == 0)
-- failwith("ml_print_string");
-+ caml_failwith("ml_print_string");
- }
-
- #ifdef HAVE_SNPRINTF
-@@ -191,9 +191,9 @@ value ml_print_string2(value v_width, va
- if(code < 0) {
- if(bufp != buffer)
- free(bufp);
-- failwith("ml_print_string");
-+ caml_failwith("ml_print_string");
- }
-- v_result = copy_string(bufp);
-+ v_result = caml_copy_string(bufp);
- if(bufp != buffer)
- free(bufp);
- return v_result;
diff --git a/devel/omake/files/patch-src_libmojave-external_cutil_lm__terminfo.c b/devel/omake/files/patch-src_libmojave-external_cutil_lm__terminfo.c
deleted file mode 100644
index 920c11177868..000000000000
--- a/devel/omake/files/patch-src_libmojave-external_cutil_lm__terminfo.c
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD: patch-am,v 1.1 2010/12/17 09:40:14 wiz Exp $
-
-From upstream SVN.
-
---- src/libmojave-external/cutil/lm_terminfo.c.orig 2007-05-15 19:03:32 UTC
-+++ src/libmojave-external/cutil/lm_terminfo.c
-@@ -75,9 +75,9 @@ value caml_tgetstr(value id) {
-
- /* Note that tigetstr will return either 0 or -1 on error. */
- if(termdata == NULL || termdata == (char *)(-1)) {
-- result = copy_string("");
-+ result = caml_copy_string("");
- } else {
-- result = copy_string(termdata);
-+ result = caml_copy_string(termdata);
- /* apparently we're not supposed to free termdata here */
- /* TEMP: I cannot find specs on this! */
- //free(termdata);
diff --git a/devel/omake/files/patch-src_libmojave-external_cutil_lm__termsize.c b/devel/omake/files/patch-src_libmojave-external_cutil_lm__termsize.c
deleted file mode 100644
index 9f113de1b463..000000000000
--- a/devel/omake/files/patch-src_libmojave-external_cutil_lm__termsize.c
+++ /dev/null
@@ -1,33 +0,0 @@
-$NetBSD: patch-an,v 1.1 2010/12/17 09:40:14 wiz Exp $
-
-From upstream SVN.
-
---- src/libmojave-external/cutil/lm_termsize.c.orig 2008-03-19 00:44:12 UTC
-+++ src/libmojave-external/cutil/lm_termsize.c
-@@ -45,7 +45,7 @@ value caml_term_size(value arg)
- CAMLlocal1(buf);
-
- /* Return a pair of numbers */
-- buf = alloc_small(2, 0);
-+ buf = caml_alloc_small(2, 0);
-
- /* Get the terminal size, return None on failure */
- #ifdef WIN32
-@@ -53,7 +53,7 @@ value caml_term_size(value arg)
- HANDLE fd = *(HANDLE *)Data_custom_val(arg);
- CONSOLE_SCREEN_BUFFER_INFO ConsoleInfo;
- if (! GetConsoleScreenBufferInfo(fd, &ConsoleInfo))
-- failwith("lm_termsize.c: caml_term_size: GetConsoleScreenBufferInfo failed");
-+ caml_failwith("lm_termsize.c: caml_term_size: GetConsoleScreenBufferInfo failed");
-
- Field(buf, 0) = Val_int(ConsoleInfo.dwSize.Y);
- Field(buf, 1) = Val_int(ConsoleInfo.dwSize.X);
-@@ -65,7 +65,7 @@ value caml_term_size(value arg)
- struct winsize ws;
-
- if(ioctl(fd, TIOCGWINSZ, &ws) < 0)
-- failwith("lm_termsize.c: caml_term_size: not a terminal");
-+ caml_failwith("lm_termsize.c: caml_term_size: not a terminal");
-
- /* Return the pair of numbers */
- Field(buf, 0) = Val_int(ws.ws_row);
diff --git a/devel/omake/files/patch-src_libmojave-external_cutil_lm__uname__ext.c b/devel/omake/files/patch-src_libmojave-external_cutil_lm__uname__ext.c
deleted file mode 100644
index 53098946504c..000000000000
--- a/devel/omake/files/patch-src_libmojave-external_cutil_lm__uname__ext.c
+++ /dev/null
@@ -1,35 +0,0 @@
-$NetBSD: patch-ao,v 1.1 2010/12/17 09:40:14 wiz Exp $
-
-From upstream SVN.
-
---- src/libmojave-external/cutil/lm_uname_ext.c.orig 2006-12-08 19:21:40 UTC
-+++ src/libmojave-external/cutil/lm_uname_ext.c
-@@ -147,21 +147,21 @@ value lm_uname(value x)
-
- /* Get sysinfo */
- if(uname(&name) < 0)
-- failwith("uname");
-+ caml_failwith("uname");
-
- /* Copy data */
-- result = alloc_tuple(5);
-+ result = caml_alloc_tuple(5);
- Field(result, 0) = Val_unit;
- Field(result, 1) = Val_unit;
- Field(result, 2) = Val_unit;
- Field(result, 3) = Val_unit;
- Field(result, 4) = Val_unit;
-
-- Field(result, 0) = copy_string(name.sysname);
-- Field(result, 1) = copy_string(name.nodename);
-- Field(result, 2) = copy_string(name.release);
-- Field(result, 3) = copy_string(name.version);
-- Field(result, 4) = copy_string(name.machine);
-+ Field(result, 0) = caml_copy_string(name.sysname);
-+ Field(result, 1) = caml_copy_string(name.nodename);
-+ Field(result, 2) = caml_copy_string(name.release);
-+ Field(result, 3) = caml_copy_string(name.version);
-+ Field(result, 4) = caml_copy_string(name.machine);
-
- /* Return it */
- CAMLreturn(result);
diff --git a/devel/omake/files/patch-src_libmojave-external_cutil_lm__unix__cutil.c b/devel/omake/files/patch-src_libmojave-external_cutil_lm__unix__cutil.c
deleted file mode 100644
index 020f6c50a634..000000000000
--- a/devel/omake/files/patch-src_libmojave-external_cutil_lm__unix__cutil.c
+++ /dev/null
@@ -1,117 +0,0 @@
-$NetBSD: patch-ap,v 1.1 2010/12/17 09:40:14 wiz Exp $
-
-From upstream SVN.
-
---- src/libmojave-external/cutil/lm_unix_cutil.c.orig 2007-07-18 17:42:32 UTC
-+++ src/libmojave-external/cutil/lm_unix_cutil.c
-@@ -87,9 +87,9 @@ value home_win32(value v_unit)
- TCHAR path[MAX_PATH];
-
- if(SUCCEEDED(CompatSHGetFolderPath(NULL, CSIDL_LOCAL_APPDATA | CSIDL_FLAG_CREATE, NULL, 0, path)))
-- CAMLreturn(copy_string(path));
-+ CAMLreturn(caml_copy_string(path));
-
-- failwith("home_win32");
-+ caml_failwith("home_win32");
- return Val_unit;
- }
-
-@@ -138,7 +138,7 @@ value lockf_win32(value v_fd, value v_ki
- flags = LOCKFILE_FAIL_IMMEDIATELY;
- break;
- default:
-- invalid_argument("lockf_win32");
-+ caml_invalid_argument("lockf_win32");
- break;
- }
-
-@@ -147,11 +147,11 @@ value lockf_win32(value v_fd, value v_ki
- overlapped.Offset = pos;
-
- /* Perform the lock */
-- enter_blocking_section();
-+ caml_enter_blocking_section();
- code = LockFileEx(fd, flags, 0, len, 0, &overlapped);
- if(code == 0)
- error = GetLastError();
-- leave_blocking_section();
-+ caml_leave_blocking_section();
-
- /* Fail if the lock was not successful */
- if(code == 0) {
-@@ -165,14 +165,14 @@ value lockf_win32(value v_fd, value v_ki
- * XXX: HACK: this exception is being caught
- * Do not change the string w/o changing the wrapper code.
- */
-- failwith("lockf_win32: already locked");
-+ caml_failwith("lockf_win32: already locked");
- break;
- case ERROR_POSSIBLE_DEADLOCK:
- /*
- * XXX: HACK: this exception is being caught
- * Do not change the string w/o changing the wrapper code.
- */
-- failwith("lockf_win32: possible deadlock");
-+ caml_failwith("lockf_win32: possible deadlock");
- break;
- default:
- FormatMessage(
-@@ -187,7 +187,7 @@ value lockf_win32(value v_fd, value v_ki
- sprintf(szBuf, "lockf_win32 failed with error %d: %s", error, lpMsgBuf);
- LocalFree(lpMsgBuf);
-
-- failwith(szBuf);
-+ caml_failwith(szBuf);
- break;
- }
- }
-@@ -289,7 +289,7 @@ value caml_registry_find(value v_hkey, v
- #endif
-
- /* Got the value */
-- return copy_string(buffer);
-+ return caml_copy_string(buffer);
- }
-
- #else /* WIN32 */
-@@ -381,9 +381,9 @@ value lm_flock(value v_fd, value v_op)
- op = Int_val(v_op);
- #if defined(FLOCK_ENABLED)
- cmd = flock_of_flock[op];
-- enter_blocking_section();
-+ caml_enter_blocking_section();
- code = flock(fd, cmd);
-- leave_blocking_section();
-+ caml_leave_blocking_section();
- #elif defined(FCNTL_ENABLED)
- {
- struct flock info;
-@@ -392,9 +392,9 @@ value lm_flock(value v_fd, value v_op)
- info.l_whence = SEEK_SET;
- info.l_start = 0;
- info.l_len = FLOCK_LEN;
-- enter_blocking_section();
-+ caml_enter_blocking_section();
- code = fcntl(fd, cmd, &info);
-- leave_blocking_section();
-+ caml_leave_blocking_section();
- }
- #elif defined(LOCKF_ENABLED)
- cmd = lockf_of_flock[op];
-@@ -457,12 +457,12 @@ value lm_getpwents(value v_unit)
- Store_field(entry, 2, Val_int(entryp->pw_uid));
- Store_field(entry, 3, Val_int(entryp->pw_gid));
- #ifdef __BEOS__
-- Store_field(entry, 4, copy_string(""));
-+ Store_field(entry, 4, caml_copy_string(""));
- #else
-- Store_field(entry, 4, copy_string(entryp->pw_gecos));
-+ Store_field(entry, 4, caml_copy_string(entryp->pw_gecos));
- #endif
-- Store_field(entry, 5, copy_string(entryp->pw_dir));
-- Store_field(entry, 6, copy_string(entryp->pw_shell));
-+ Store_field(entry, 5, caml_copy_string(entryp->pw_dir));
-+ Store_field(entry, 6, caml_copy_string(entryp->pw_shell));
- cons = caml_alloc_tuple(2);
- Store_field(cons, 0, entry);
- Store_field(cons, 1, users);
diff --git a/devel/omake/files/patch-src_libmojave-external_stdlib_lm__debug.ml b/devel/omake/files/patch-src_libmojave-external_stdlib_lm__debug.ml
deleted file mode 100644
index 897e373d2c20..000000000000
--- a/devel/omake/files/patch-src_libmojave-external_stdlib_lm__debug.ml
+++ /dev/null
@@ -1,58 +0,0 @@
-$NetBSD: patch-aq,v 1.1 2010/12/17 09:40:14 wiz Exp $
-
-From upstream SVN.
-
---- src/libmojave-external/stdlib/lm_debug.ml.orig 2006-08-03 22:51:52 UTC
-+++ src/libmojave-external/stdlib/lm_debug.ml
-@@ -173,11 +173,10 @@ let create_debug
- *)
- let load_debug name =
- let rec search = function
-- { info_name = name'; info_flag = flag } :: t ->
-- if name' = name then
-- flag
-- else
-- search t
-+ info :: _ when info.info_name = name ->
-+ info.info_flag
-+ | _ :: t ->
-+ search t
- | [] ->
- raise (Failure (sprintf "Lm_debug.load_debug: variable '%s' has not been created" name))
- in
-@@ -189,11 +188,10 @@ let load_debug name =
- let set_debug name flag =
- let rec search = function
- h :: t ->
-- let { info_name = name'; info_flag = flag' } = h in
-- if name' = name then
-- flag' := flag
-- else
-- search t
-+ if h.info_name = name then
-+ h.info_flag := flag
-+ else
-+ search t
- | [] ->
- (*
- (* Try a C function *)
-@@ -227,9 +225,8 @@ let get_debug name =
- let rec search = function
- h :: t ->
- if h.info_name = name then
-- let { info_info = description; info_flag = flag } = h in
- let description =
-- match description with
-+ match h.info_info with
- Some desc ->
- desc
- | None ->
-@@ -237,7 +234,7 @@ let get_debug name =
- in
- { debug_name = name;
- debug_description = description;
-- debug_value = !flag
-+ debug_value = !(h.info_flag)
- }
- else
- search t
diff --git a/devel/omake/files/patch-src_libmojave-external_stdlib_lm__string__util.ml b/devel/omake/files/patch-src_libmojave-external_stdlib_lm__string__util.ml
deleted file mode 100644
index 738e8ed19f43..000000000000
--- a/devel/omake/files/patch-src_libmojave-external_stdlib_lm__string__util.ml
+++ /dev/null
@@ -1,125 +0,0 @@
-$NetBSD: patch-ar,v 1.1 2010/12/17 09:40:14 wiz Exp $
-
-From upstream SVN.
-
---- src/libmojave-external/stdlib/lm_string_util.ml.orig 2008-06-28 01:21:34 UTC
-+++ src/libmojave-external/stdlib/lm_string_util.ml
-@@ -613,18 +613,13 @@ let tokens_create wrap group =
- * Get the tokens list.
- *)
- let tokens_flush info =
-- let { tokens_group = group;
-- tokens_list = tokens;
-- tokens_prefix = prefix
-- } = info
-- in
- let tokens =
-- match prefix with
-+ match info.tokens_prefix with
- NoPrefix ->
-- tokens
-+ info.tokens_list
- | WordPrefix prefix
- | QuotePrefix (_, prefix) ->
-- group prefix :: tokens
-+ info.tokens_group prefix :: info.tokens_list
- in
- List.rev tokens
-
-@@ -632,38 +627,29 @@ let tokens_flush info =
- * End the current word.
- *)
- let tokens_break info =
-- let { tokens_group = group;
-- tokens_list = tokens;
-- tokens_prefix = prefix
-- } = info
-- in
-- match prefix with
-- NoPrefix ->
-- info
-- | WordPrefix prefix
-- | QuotePrefix (_, prefix) ->
-- { info with tokens_list = group prefix :: tokens;
-- tokens_prefix = NoPrefix
-- }
-+ match info.tokens_prefix with
-+ NoPrefix ->
-+ info
-+ | WordPrefix prefix
-+ | QuotePrefix (_, prefix) ->
-+ { info with tokens_list = info.tokens_group prefix :: info.tokens_list;
-+ tokens_prefix = NoPrefix
-+ }
-
- (*
- * Add a value directly.
- * This also performs a break.
- *)
- let tokens_atomic info x =
-- let { tokens_group = group;
-- tokens_list = tokens;
-- tokens_prefix = prefix
-- } = info
-- in
-- match prefix with
-+ let tokens = info.tokens_list in
-+ match info.tokens_prefix with
- NoPrefix ->
- { info with tokens_list = x :: tokens;
- tokens_prefix = NoPrefix
- }
- | WordPrefix prefix
- | QuotePrefix (_, prefix) ->
-- { info with tokens_list = x :: group prefix :: tokens;
-+ { info with tokens_list = x :: info.tokens_group prefix :: tokens;
- tokens_prefix = NoPrefix
- }
-
-@@ -758,11 +744,8 @@ let tokens_string info s =
- if len = 0 then
- info
- else
-- let { tokens_list = tokens;
-- tokens_prefix = prefix
-- } = info
-- in
-- match prefix with
-+ let tokens = info.tokens_list in
-+ match info.tokens_prefix with
- NoPrefix ->
- scan_white tokens 0
- | WordPrefix prefix ->
-@@ -809,13 +792,11 @@ let buffer_get_token lexer s i len =
- BufChar
-
- let tokens_lex info s =
-- let { tokens_lexer = lexer;
-- tokens_wrap_string = wrap_string;
-- tokens_wrap_data = wrap_data;
-- tokens_wrap_token = wrap_token;
-- tokens_group = group
-- } = info
-- in
-+ let lexer = info.tokens_lexer in
-+ let wrap_string = info.tokens_wrap_string in
-+ let wrap_data = info.tokens_wrap_data in
-+ let wrap_token = info.tokens_wrap_token in
-+ let group = info.tokens_group in
- let len = String.length s in
-
- (* Don't add empty strings *)
-@@ -902,11 +883,8 @@ let tokens_lex info s =
- if len = 0 then
- info
- else
-- let { tokens_list = tokens;
-- tokens_prefix = prefix
-- } = info
-- in
-- match prefix with
-+ let tokens = info.tokens_list in
-+ match info.tokens_prefix with
- NoPrefix ->
- scan_white tokens 0
- | WordPrefix prefix ->
diff --git a/devel/omake/files/patch-src_libmojave-external_unix_lm__notify.ml b/devel/omake/files/patch-src_libmojave-external_unix_lm__notify.ml
deleted file mode 100644
index a088f4837334..000000000000
--- a/devel/omake/files/patch-src_libmojave-external_unix_lm__notify.ml
+++ /dev/null
@@ -1,127 +0,0 @@
-$NetBSD: patch-as,v 1.1 2010/12/17 09:40:14 wiz Exp $
-
-From upstream SVN.
-
---- src/libmojave-external/unix/lm_notify.ml.orig 2007-07-19 21:06:05 UTC
-+++ src/libmojave-external/unix/lm_notify.ml
-@@ -153,10 +153,8 @@ let is_path_prefix (root1, path1) (root2
- let is_monitored_name requests name =
- let new_path = path_of_name name in
- IntTable.exists (fun _ job ->
-- let { job_path = path;
-- job_recursive = recursive
-- } = job
-- in
-+ let path = job.job_path in
-+ let recursive = job.job_recursive in
- new_path = path || (recursive && is_path_prefix path new_path)) requests
-
- (************************************************************************
-@@ -215,18 +213,16 @@ let close notify =
- (*
- * Get the file descriptor.
- *)
--let file_descr { notify_fd = fd } =
-- fd
-+let file_descr notify =
-+ notify.notify_fd
-
- (*
- * Monitoring.
- *)
- let monitor notify dir recursive =
-- let { notify_info = info;
-- notify_dirs = dirs;
-- notify_requests = requests
-- } = notify
-- in
-+ let info = notify.notify_info in
-+ let dirs = notify.notify_dirs in
-+ let requests = notify.notify_requests in
- let name = name_of_dir dir in
- if not (is_monitored_name requests name) then begin
- if !debug_notify then
-@@ -250,11 +246,9 @@ let monitor notify dir recursive =
- * Suspend notifications.
- *)
- let suspend notify dir =
-- let { notify_info = info;
-- notify_dirs = dirs;
-- notify_requests = requests
-- } = notify
-- in
-+ let info = notify.notify_info in
-+ let dirs = notify.notify_dirs in
-+ let requests = notify.notify_requests in
- let dir = name_of_dir dir in
- let request =
- try StringTable.find dirs dir with
-@@ -269,10 +263,8 @@ let suspend notify dir =
- end
-
- let suspend_all notify =
-- let { notify_info = info;
-- notify_requests = requests
-- } = notify
-- in
-+ let info = notify.notify_info in
-+ let requests = notify.notify_requests in
- IntTable.iter (fun _ job ->
- if job.job_running then
- begin
-@@ -281,11 +273,9 @@ let suspend_all notify =
- end) requests
-
- let resume notify dir =
-- let { notify_info = info;
-- notify_dirs = dirs;
-- notify_requests = requests
-- } = notify
-- in
-+ let info = notify.notify_info in
-+ let dirs = notify.notify_dirs in
-+ let requests = notify.notify_requests in
- let dir = name_of_dir dir in
- let request =
- try StringTable.find dirs dir with
-@@ -300,10 +290,8 @@ let resume notify dir =
- end
-
- let resume_all notify =
-- let { notify_info = info;
-- notify_requests = requests
-- } = notify
-- in
-+ let info = notify.notify_info in
-+ let requests = notify.notify_requests in
- IntTable.iter (fun _ job ->
- if not job.job_running then
- begin
-@@ -315,11 +303,9 @@ let resume_all notify =
- * Cancel a request.
- *)
- let cancel notify dir =
-- let { notify_info = info;
-- notify_dirs = dirs;
-- notify_requests = requests
-- } = notify
-- in
-+ let info = notify.notify_info in
-+ let dirs = notify.notify_dirs in
-+ let requests = notify.notify_requests in
- let dir = name_of_dir dir in
- let request =
- try StringTable.find dirs dir with
-@@ -332,10 +318,8 @@ let cancel notify dir =
- notify.notify_requests <- IntTable.remove requests request
-
- let cancel_all notify =
-- let { notify_info = info;
-- notify_requests = requests
-- } = notify
-- in
-+ let info = notify.notify_info in
-+ let requests = notify.notify_requests in
- IntTable.iter (fun request _ -> notify_cancel info request) requests;
- notify.notify_dirs <- StringTable.empty;
- notify.notify_requests <- IntTable.empty
diff --git a/devel/omake/files/patch-src_libmojave-external_util_lm__channel.ml b/devel/omake/files/patch-src_libmojave-external_util_lm__channel.ml
deleted file mode 100644
index b5d390c5cb7a..000000000000
--- a/devel/omake/files/patch-src_libmojave-external_util_lm__channel.ml
+++ /dev/null
@@ -1,364 +0,0 @@
-$NetBSD: patch-at,v 1.1 2010/12/17 09:40:14 wiz Exp $
-
-From upstream SVN.
-
---- src/libmojave-external/util/lm_channel.ml.orig 2007-07-16 21:10:43 UTC
-+++ src/libmojave-external/util/lm_channel.ml
-@@ -337,12 +337,10 @@ let of_string s =
- of_string string_sym 1 0 (String.copy s)
-
- let info channel =
-- let { channel_id = id;
-- channel_kind = kind;
-- channel_mode = mode;
-- channel_binary = binary
-- } = channel
-- in
-+ let id = channel.channel_id in
-+ let kind = channel.channel_kind in
-+ let mode = channel.channel_mode in
-+ let binary = channel.channel_binary in
- id, kind, mode, binary
-
- let name channel =
-@@ -468,13 +466,11 @@ let squash_text buffer off amount =
- * Get the line/char for a particular point in the input buffer.
- *)
- let line_of_index info buffer index =
-- let { start_line = start_line;
-- start_char = start_char;
-- middle_index = middle_index;
-- middle_line = middle_line;
-- middle_char = middle_char
-- } = info
-- in
-+ let start_line = info.start_line in
-+ let start_char = info.start_char in
-+ let middle_index = info.middle_index in
-+ let middle_line = info.middle_line in
-+ let middle_char = info.middle_char in
- let rec search line char i =
- if i = index then
- begin
-@@ -509,12 +505,10 @@ let reset_input_buffer info =
- info.lex_index <- 0
-
- let shift_input_buffer info =
-- let { in_buffer = in_buffer;
-- in_index = in_index;
-- lex_index = lex_index;
-- in_max = in_max
-- } = info
-- in
-+ let in_buffer = info.in_buffer in
-+ let in_index = info.in_index in
-+ let lex_index = info.lex_index in
-+ let in_max = info.in_max in
- let line, char = line_of_index info in_buffer in_index in
- String.blit in_buffer in_index in_buffer 0 (in_max - in_index);
- info.start_line <- line;
-@@ -562,10 +556,8 @@ let reset_output_buffer info =
- * flushing.
- *)
- let expand_output info =
-- let { out_buffer = buffer;
-- out_max = max
-- } = info
-- in
-+ let buffer = info.out_buffer in
-+ let max = info.out_max in
- if max = String.length buffer then begin
- let buffer2 = String.create (max * 2) in
- String.blit buffer 0 buffer2 0 max;
-@@ -575,10 +567,8 @@ let expand_output info =
- end
-
- let to_string info =
-- let { out_buffer = buffer;
-- out_max = max
-- } = info
-- in
-+ let buffer = info.out_buffer in
-+ let max = info.out_max in
- String.sub buffer 0 max
-
- (************************************************************************
-@@ -614,12 +604,10 @@ let setup_write_buffer info =
- *)
- let flush_output_once info =
- setup_write_buffer info;
-- let { write_index = off;
-- write_max = max;
-- write_buffer = buf;
-- write_fun = write
-- } = info
-- in
-+ let off = info.write_index in
-+ let max = info.write_max in
-+ let buf = info.write_buffer in
-+ let write = info.write_fun in
- let count = write buf off (max - off) in
- let off' = off + count in
- if off' = max then
-@@ -632,17 +620,13 @@ let flush_output_once info =
- *)
- let flush_aux info =
- setup_write_buffer info;
-- let { write_buffer = buf;
-- write_fun = writer
-- } = info
-- in
-+ let buf = info.write_buffer in
-+ let writer = info.write_fun in
-
- (* Now write the data directly *)
- let rec write () =
-- let { write_index = index;
-- write_max = max
-- } = info
-- in
-+ let index = info.write_index in
-+ let max = info.write_max in
- let len = max - index in
- if len <> 0 then
- let count = writer buf index len in
-@@ -701,10 +685,8 @@ let close info =
- * Print a byte.
- *)
- let rec output_char info c =
-- let { out_max = max;
-- out_buffer = buffer
-- } = info
-- in
-+ let max = info.out_max in
-+ let buffer = info.out_buffer in
- flush_input info;
- if max = String.length buffer then
- begin
-@@ -724,10 +706,8 @@ let output_byte info c =
- * Write a substring.
- *)
- let rec output_buffer info buf off len =
-- let { out_max = max;
-- out_buffer = buffer
-- } = info
-- in
-+ let max = info.out_max in
-+ let buffer = info.out_buffer in
- let avail = String.length buffer - max in
- flush_input info;
- if len <> 0 then
-@@ -758,21 +738,17 @@ let write info buf off len =
- * Check if there is input already in the buffer.
- *)
- let poll info =
-- let { in_index = index;
-- in_max = max
-- } = info
-- in
-+ let index = info.in_index in
-+ let max = info.in_max in
- index <> max
-
- (*
- * Get data when the buffer is empty.
- *)
- let fillbuf info =
-- let { channel_binary = binary;
-- in_buffer = buf;
-- read_fun = reader
-- } = info
-- in
-+ let binary = info.channel_binary in
-+ let buf = info.in_buffer in
-+ let reader = info.read_fun in
- let count = reader buf 0 buf_size in
- let count =
- if count = 0 then
-@@ -797,11 +773,9 @@ let fillbuf info =
- * Get a single char.
- *)
- let rec input_char info =
-- let { in_index = index;
-- in_max = max;
-- in_buffer = buf;
-- } = info
-- in
-+ let index = info.in_index in
-+ let max = info.in_max in
-+ let buf = info.in_buffer in
- flush_output info;
- if index = max then
- begin
-@@ -823,11 +797,9 @@ let input_byte info =
- * Read data into a buffer.
- *)
- let rec input_buffer info s off len =
-- let { in_index = index;
-- in_max = max;
-- in_buffer = buf
-- } = info
-- in
-+ let index = info.in_index in
-+ let max = info.in_max in
-+ let buf = info.in_buffer in
- let avail = max - index in
- flush_output info;
- if len <> 0 then
-@@ -884,12 +856,10 @@ let input_entire_line info =
- * Read allows for partial reading.
- *)
- let read info s off len =
-- let { in_index = index;
-- in_max = max;
-- in_buffer = buf;
-- read_fun = reader
-- } = info
-- in
-+ let index = info.in_index in
-+ let max = info.in_max in
-+ let buf = info.in_buffer in
-+ let reader = info.read_fun in
- let avail = max - index in
- flush_output info;
- if avail = 0 then
-@@ -925,13 +895,11 @@ let seek info pos whence =
- * Get the current location.
- *)
- let loc info =
-- let { out_max = out_max;
-- in_index = in_index;
-- in_buffer = in_buffer;
-- out_buffer = out_buffer;
-- channel_file = file
-- } = info
-- in
-+ let out_max = info.out_max in
-+ let in_index = info.in_index in
-+ let in_buffer = info.in_buffer in
-+ let out_buffer = info.out_buffer in
-+ let file = info.channel_file in
- let line, char =
- if out_max <> 0 then
- line_of_index info out_buffer out_max
-@@ -1132,10 +1100,8 @@ struct
- * Start lex mode.
- *)
- let lex_start channel =
-- let { in_index = index;
-- in_buffer = buffer
-- } = channel
-- in
-+ let index = channel.in_index in
-+ let buffer = channel.in_buffer in
- let prev =
- if index = 0 then
- bof
-@@ -1149,10 +1115,8 @@ struct
- * Restart at a previous position.
- *)
- let lex_restart channel pos =
-- let { in_max = max;
-- in_index = index
-- } = channel
-- in
-+ let max = channel.in_max in
-+ let index = channel.in_index in
- assert (pos >= 0 && pos <= max - index);
- channel.lex_index <- index + pos
-
-@@ -1168,20 +1132,16 @@ struct
- * Get the string matched by the lexer.
- *)
- let lex_string channel pos =
-- let { in_index = start;
-- in_buffer = buffer
-- } = channel
-- in
-+ let start = channel.in_index in
-+ let buffer = channel.in_buffer in
- String.sub buffer start pos
-
- (*
- * Get the string matched by the lexer.
- *)
- let lex_substring channel off len =
-- let { in_index = start;
-- in_buffer = buffer
-- } = channel
-- in
-+ let start = channel.in_index in
-+ let buffer = channel.in_buffer in
- String.sub buffer (start + off) len
-
- (*
-@@ -1189,13 +1149,11 @@ struct
- * We can't discard any of the existing data.
- *)
- let rec lex_fill channel =
-- let { in_max = max;
-- in_buffer = buffer;
-- in_index = start;
-- read_fun = reader;
-- channel_binary = binary
-- } = channel
-- in
-+ let max = channel.in_max in
-+ let buffer = channel.in_buffer in
-+ let start = channel.in_index in
-+ let reader = channel.read_fun in
-+ let binary = channel.channel_binary in
- let len = String.length buffer in
- let amount = len - max in
- (* If we have space, fill it *)
-@@ -1245,11 +1203,9 @@ struct
- * Get the next character in lex mode.
- *)
- let lex_next channel =
-- let { in_max = max;
-- in_buffer = buffer;
-- lex_index = index
-- } = channel
-- in
-+ let max = channel.in_max in
-+ let buffer = channel.in_buffer in
-+ let index = channel.lex_index in
- if index = max then
- lex_fill channel
- else
-@@ -1267,14 +1223,12 @@ struct
- * Get the location of the buffer.
- *)
- let lex_loc channel off =
-- let { start_line = line;
-- start_char = char;
-- channel_file = file;
-- lex_index = index;
-- in_buffer = buffer;
-- in_max = max
-- } = channel
-- in
-+ let line = channel.start_line in
-+ let char = channel.start_char in
-+ let file = channel.channel_file in
-+ let index = channel.lex_index in
-+ let buffer = channel.in_buffer in
-+ let max = channel.in_max in
- let line1, char1 =
- if index > max then
- line, char
-@@ -1293,11 +1247,9 @@ struct
- * Add any remaining buffered text to a buffer.
- *)
- let lex_buffer channel buf =
-- let { in_max = max;
-- in_buffer = buffer;
-- in_index = start
-- } = channel
-- in
-+ let max = channel.in_max in
-+ let buffer = channel.in_buffer in
-+ let start = channel.in_index in
- Buffer.add_substring buf buffer start (max - start);
- channel.in_index <- max
- end
diff --git a/devel/omake/files/patch-src_libmojave-external_util_lm__filename__util.ml b/devel/omake/files/patch-src_libmojave-external_util_lm__filename__util.ml
deleted file mode 100644
index 24901baeb175..000000000000
--- a/devel/omake/files/patch-src_libmojave-external_util_lm__filename__util.ml
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD: patch-au,v 1.1 2010/12/17 09:40:14 wiz Exp $
-
-From upstream SVN.
-
---- src/libmojave-external/util/lm_filename_util.ml.orig 2007-01-29 20:14:42 UTC
-+++ src/libmojave-external/util/lm_filename_util.ml
-@@ -48,12 +48,11 @@ let groups =
- let unix_is_executable s =
- let flag =
- try
-- let { Unix.LargeFile.st_kind = kind;
-- Unix.LargeFile.st_perm = perm;
-- Unix.LargeFile.st_uid = uid;
-- Unix.LargeFile.st_gid = gid
-- } = Unix.LargeFile.stat s
-- in
-+ let st = Unix.LargeFile.stat s in
-+ let kind = st.Unix.LargeFile.st_kind in
-+ let perm = st.Unix.LargeFile.st_perm in
-+ let uid = st.Unix.LargeFile.st_uid in
-+ let gid = st.Unix.LargeFile.st_gid in
- (kind = Unix.S_REG)
- && ((perm land 0o001) <> 0
- || (List.mem gid groups && (perm land 0o010) <> 0)
diff --git a/devel/omake/files/patch-src_libmojave-external_util_lm__glob.ml b/devel/omake/files/patch-src_libmojave-external_util_lm__glob.ml
deleted file mode 100644
index 00086345bbfb..000000000000
--- a/devel/omake/files/patch-src_libmojave-external_util_lm__glob.ml
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD: patch-av,v 1.1 2010/12/17 09:40:14 wiz Exp $
-
-From upstream SVN.
-
---- src/libmojave-external/util/lm_glob.ml.orig 2007-09-04 16:12:33 UTC
-+++ src/libmojave-external/util/lm_glob.ml
-@@ -157,11 +157,8 @@ let home_dir =
- let getusers () =
- let users = Lm_unix_util.getpwents () in
- List.map (fun entry ->
-- let { Unix.pw_name = name;
-- Unix.pw_dir = dir
-- } = entry
-- in
-- tilde_insert dir name;
-+ let name = entry.Unix.pw_name in
-+ tilde_insert entry.Unix.pw_dir name;
- name) users
-
- (************************************************************************
diff --git a/devel/omake/files/patch-src_libmojave-external_util_lm__lexer.ml b/devel/omake/files/patch-src_libmojave-external_util_lm__lexer.ml
deleted file mode 100644
index bd4a5b48a019..000000000000
--- a/devel/omake/files/patch-src_libmojave-external_util_lm__lexer.ml
+++ /dev/null
@@ -1,343 +0,0 @@
-$NetBSD: patch-aw,v 1.1 2010/12/17 09:40:14 wiz Exp $
-
-From upstream SVN.
-
---- src/libmojave-external/util/lm_lexer.ml.orig 2007-01-25 18:31:18 UTC
-+++ src/libmojave-external/util/lm_lexer.ml
-@@ -1325,10 +1325,8 @@ struct
- * Expressions.
- *)
- let pp_print_exp buf exp =
-- let { exp_clauses = clauses;
-- exp_id = id
-- } = exp
-- in
-+ let clauses = exp.exp_clauses in
-+ let id = exp.exp_id in
- fprintf buf "Id: %d" id;
- List.iter (fun (action, id, regex) ->
- fprintf buf "@ @[<hv 3>Clause:@ id = %d@ action = %a@ @[<hv 3>regex =@ %a@]@]" (**)
-@@ -1370,10 +1368,8 @@ struct
- let add_clause_exp exp action s =
- let regex = regex_of_string s in
- let arity = regex_arg_count 0 regex in
-- let { exp_clauses = clauses;
-- exp_id = id
-- } = exp
-- in
-+ let clauses = exp.exp_clauses in
-+ let id = exp.exp_id in
- let exp =
- { exp_clauses = (action, id, regex) :: clauses;
- exp_id = succ id
-@@ -1395,11 +1391,9 @@ struct
- * Take the union of two expression lists.
- *)
- let union_exp exp1 exp2 =
-- let { exp_clauses = clauses1;
-- exp_id = id1
-- } = exp1
-- in
-- let { exp_clauses = clauses2 } = exp2 in
-+ let clauses1 = exp1.exp_clauses in
-+ let id1 = exp1.exp_id in
-+ let clauses2 = exp2.exp_clauses in
- let actions =
- List.fold_left (fun actions (action, _, _) ->
- ActionSet.add actions action) ActionSet.empty clauses1
-@@ -1474,20 +1468,16 @@ struct
- counter min final max start
-
- let pp_print_nfa_state buf nfa_state =
-- let { nfa_state_index = index;
-- nfa_state_action = action
-- } = nfa_state
-- in
-+ let index = nfa_state.nfa_state_index in
-+ let action = nfa_state.nfa_state_action in
- fprintf buf "@[<hv 3>NFA state %d:@ action %a@]" index pp_print_nfa_action action
-
- let pp_print_nfa buf nfa =
-- let { nfa_hash = hash;
-- nfa_start = start;
-- nfa_search_start = search;
-- nfa_search_states = search_states;
-- nfa_table = table
-- } = nfa
-- in
-+ let hash = nfa.nfa_hash in
-+ let start = nfa.nfa_start in
-+ let search = nfa.nfa_search_start in
-+ let search_states = nfa.nfa_search_states in
-+ let table = nfa.nfa_table in
- fprintf buf "@[<hv 3>NFA:@ start = %a@ search = %a@ @[<b 3>search-states =%a@]" (**)
- (pp_print_nfa_id hash) start
- (pp_print_nfa_id hash) search
-@@ -1500,7 +1490,7 @@ struct
- * Construct a new state.
- *)
- let nfa_state accum action =
-- let { nfa_index = index } = accum in
-+ let index = accum.nfa_index in
- let state =
- { nfa_state_index = index;
- nfa_state_action = action
-@@ -1582,7 +1572,7 @@ struct
- in
- accum, info, start, start1 :: final1 :: states
- | RegexInterval (regex, min, max) ->
-- let { nfa_counter = counter } = accum in
-+ let counter = accum.nfa_counter in
- let accum, start1 = nfa_state accum NfaActionNone in
- let accum, final1 =
- nfa_state accum (NfaActionIncrCounter (counter, min, final.nfa_state_index, max, start1.nfa_state_index))
-@@ -1605,11 +1595,11 @@ struct
-
- (* Arguments *)
- | RegexArg regex ->
-- let { nfa_arg_index = argindex } = accum in
-+ let argindex = accum.nfa_arg_index in
- let accum, final1 = nfa_state accum (NfaActionArgStop (argindex, final.nfa_state_index)) in
- let accum, start1 = nfa_state accum NfaActionNone in
- let start = set_action start (NfaActionArgStart (argindex, start1.nfa_state_index)) in
-- let { nfa_arg_number = argnumber } = info in
-+ let argnumber = info.nfa_arg_number in
- let accum = { accum with nfa_arg_index = succ argindex } in
- let info = { info with nfa_arg_number = succ argnumber } in
- let accum, info, start1, states =
-@@ -1783,10 +1773,8 @@ struct
- fprintf buf "search-stop at %d" off
-
- let pp_print_dfa_actions nfa_hash buf action =
-- let { dfa_action_final = final;
-- dfa_action_actions = actions
-- } = action
-- in
-+ let final = action.dfa_action_final in
-+ let actions = action.dfa_action_actions in
- let () =
- fprintf buf "@[<hv 3>(action"
- in
-@@ -1798,20 +1786,16 @@ struct
- ()
- in
- NfaStateTable.iter (fun dst action ->
-- let { dfa_action_src = src;
-- dfa_action_args = args
-- } = action
-- in
-+ let src = action.dfa_action_src in
-+ let args = action.dfa_action_args in
- fprintf buf "@ @[<hv 3>(%a -> %a" (pp_print_nfa_id nfa_hash) src (pp_print_nfa_id nfa_hash) dst;
- List.iter (fun action -> fprintf buf "@ %a" pp_print_dfa_arg_action action) args;
- fprintf buf ")@]") actions;
- fprintf buf ")@]"
-
- let pp_print_pre_actions buf action =
-- let { pre_action_final = final;
-- pre_action_args = args
-- } = action
-- in
-+ let final = action.pre_action_final in
-+ let args = action.pre_action_args in
- let () =
- fprintf buf "@[<hv 3>(pre-action@ "
- in
-@@ -1897,10 +1881,10 @@ struct
- * DFA actions.
- *)
- let dfa_action_is_empty action =
-- match action with
-- { dfa_action_final = None; dfa_action_actions = actions } ->
-- NfaStateTable.is_empty actions
-- | { dfa_action_final = Some _ } ->
-+ match action.dfa_action_final with
-+ None ->
-+ NfaStateTable.is_empty action.dfa_action_actions
-+ | Some _ ->
- false
-
- (*
-@@ -1920,21 +1904,15 @@ struct
- ArgTable.add args ArgSearch pos
-
- let dfa_eval_action dfa info action =
-- let { dfa_channel = channel;
-- dfa_args = args_table
-- } = info
-- in
-- let { dfa_action_final = final;
-- dfa_action_actions = actions
-- } = action
-- in
-+ let channel = info.dfa_channel in
-+ let args_table = info.dfa_args in
-+ let final = action.dfa_action_final in
-+ let actions = action.dfa_action_actions in
- let pos = Input.lex_pos channel in
- let args_table =
- NfaStateTable.map (fun action ->
-- let { dfa_action_src = src;
-- dfa_action_args = actions
-- } = action
-- in
-+ let src = action.dfa_action_src in
-+ let actions = action.dfa_action_args in
- let args =
- try NfaStateTable.find args_table src with
- Not_found ->
-@@ -2140,10 +2118,8 @@ struct
- * the DFA state.
- *)
- let close_state dfa table nids c =
-- let { dfa_search_states = search_states;
-- dfa_nfa_hash = nfa_hash
-- } = dfa
-- in
-+ let search_states = dfa.dfa_search_states in
-+ let nfa_hash = dfa.dfa_nfa_hash in
- let final, actions =
- List.fold_left (fun final_actions nid ->
- let frontier =
-@@ -2152,10 +2128,8 @@ struct
- if !debug_lexgen then
- eprintf "@[<v 3>Frontier:@ %a@]@." (pp_print_frontier nfa_hash) frontier;
- NfaStateTable.fold (fun (final', actions) id action ->
-- let { pre_action_final = final;
-- pre_action_args = args
-- } = action
-- in
-+ let final = action.pre_action_final in
-+ let args = action.pre_action_args in
- let final =
- match final', final with
- Some (clause_id', _nid'), Some clause_id ->
-@@ -2264,11 +2238,9 @@ struct
- extend_args ("" :: args) (succ len1) len2
-
- let dfa_args dfa_info lexeme =
-- let { dfa_start_pos = start;
-- dfa_stop_pos = stop;
-- dfa_stop_args = args
-- } = dfa_info
-- in
-+ let start = dfa_info.dfa_start_pos in
-+ let stop = dfa_info.dfa_stop_pos in
-+ let args = dfa_info.dfa_stop_args in
-
- (* Get the pairs of argument info *)
- let info, start_pos =
-@@ -2326,11 +2298,9 @@ struct
- * Add a state to the DFA. It is initially empty.
- *)
- let dfa_find_state dfa nids =
-- let { dfa_map = map;
-- dfa_length = dfa_id;
-- dfa_states = states
-- } = dfa
-- in
-+ let map = dfa.dfa_map in
-+ let dfa_id = dfa.dfa_length in
-+ let states = dfa.dfa_states in
- try DfaStateTable.find map nids with
- Not_found ->
- (* Make a new state *)
-@@ -2362,14 +2332,10 @@ struct
- * an entry in the transition table yet.
- *)
- let create_entry dfa dfa_state c =
-- let { dfa_dfa_hash = dfa_hash;
-- dfa_table = table
-- } = dfa
-- in
-- let { dfa_state_set = nids;
-- dfa_state_delta = delta
-- } = dfa_state
-- in
-+ let dfa_hash = dfa.dfa_dfa_hash in
-+ let table = dfa.dfa_table in
-+ let nids = dfa_state.dfa_state_set in
-+ let delta = dfa_state.dfa_state_delta in
- let frontier, actions = close_next_state dfa table (DfaState.get dfa_hash nids) c in
- if frontier = [] && dfa_action_is_empty actions then
- dfa_state.dfa_state_delta <- TransTable.add delta c DfaNoTransition
-@@ -2437,10 +2403,8 @@ struct
- let () = loop dfa_state c in
-
- (* Now figure out what happened *)
-- let { dfa_stop_clause = clause;
-- dfa_stop_pos = stop;
-- } = dfa_info
-- in
-+ let clause = dfa_info.dfa_stop_clause in
-+ let stop = dfa_info.dfa_stop_pos in
- (*
- * If we did not get a match, return the channel to
- * the starting position, and raise an exception.
-@@ -2489,10 +2453,8 @@ struct
- let () = loop dfa_state c in
-
- (* Now figure out what happened *)
-- let { dfa_stop_clause = clause;
-- dfa_stop_pos = stop;
-- } = dfa_info
-- in
-+ let clause = dfa_info.dfa_stop_clause in
-+ let stop = dfa_info.dfa_stop_pos in
- (*
- * If we did not get a match, return the channel to
- * the starting position, and raise an exception.
-@@ -2551,10 +2513,8 @@ struct
- let () = loop dfa_state c in
-
- (* Now figure out what happened *)
-- let { dfa_stop_clause = clause;
-- dfa_stop_pos = stop;
-- } = dfa_info
-- in
-+ let clause = dfa_info.dfa_stop_clause in
-+ let stop = dfa_info.dfa_stop_pos in
- (*
- * If we did not get a match, return all the text to
- * the end of the channel.
-@@ -2610,14 +2570,12 @@ struct
- if !debug_lexgen || !debug_lex then
- eprintf "%a@." pp_print_nfa nfa
- in
-- let { nfa_hash = nfa_hash;
-- nfa_table = nfa_table;
-- nfa_start = nfa_start;
-- nfa_actions = actions;
-- nfa_search_start = nfa_search_start;
-- nfa_search_states = nfa_search_states
-- } = nfa
-- in
-+ let nfa_hash = nfa.nfa_hash in
-+ let nfa_table = nfa.nfa_table in
-+ let nfa_start = nfa.nfa_start in
-+ let actions = nfa.nfa_actions in
-+ let nfa_search_start = nfa.nfa_search_start in
-+ let nfa_search_states = nfa.nfa_search_states in
- let dfa_hash = DfaState.create_state () in
- let nfa_start = DfaState.create dfa_hash [nfa_start] in
- let start =
-@@ -2673,8 +2631,8 @@ struct
- * then we have seen all the rest of the clauses too.
- *)
- let union info1 info2 =
-- let { lex_exp = exp1 } = info1 in
-- let { lex_exp = exp2 } = info2 in
-+ let exp1 = info1.lex_exp in
-+ let exp2 = info2.lex_exp in
- (* Catch degenerate cases first *)
- match exp1.exp_clauses, exp2.exp_clauses with
- [], _ -> info2
-@@ -2711,7 +2669,7 @@ struct
- ignore (dfa_of_info info)
-
- let pp_print_lexer buf info =
-- let { lex_exp = exp } = info in
-+ let exp = info.lex_exp in
- let dfa = dfa_of_info info in
- fprintf buf "@[<v 0>@[<hv 3>Lexer:@ %a@]" pp_print_exp exp;
- fprintf buf "@ @[<hv 3>NFA:";
diff --git a/devel/omake/files/patch-src_libmojave-external_util_lm__parser.ml b/devel/omake/files/patch-src_libmojave-external_util_lm__parser.ml
deleted file mode 100644
index 40845a9de863..000000000000
--- a/devel/omake/files/patch-src_libmojave-external_util_lm__parser.ml
+++ /dev/null
@@ -1,366 +0,0 @@
-$NetBSD: patch-ax,v 1.1 2010/12/17 09:40:14 wiz Exp $
-
-From upstream SVN.
-
---- src/libmojave-external/util/lm_parser.ml.orig 2007-01-25 18:31:18 UTC
-+++ src/libmojave-external/util/lm_parser.ml
-@@ -282,15 +282,11 @@ struct
- let debug = "ProdItem"
-
- let hash item =
-- let { prod_item_name = name;
-- prod_item_left = left;
-- prod_item_right = right;
-- prod_item_action = action
-- } = item
-- in
-+ let name = item.prod_item_name in
-+ let action = item.prod_item_action in
- let hash = hash_combine (IVar.hash name) (IAction.hash action) in
-- let hash = ivar_list_hash hash left in
-- let hash = ivar_list_hash hash right in
-+ let hash = ivar_list_hash hash item.prod_item_left in
-+ let hash = ivar_list_hash hash item.prod_item_right in
- hash
-
- let compare item1 item2 =
-@@ -657,18 +653,12 @@ struct
- fprintf buf "@ %a: %a" (pp_print_ivar info) v (pp_print_pda_action info) action) actions
-
- let pp_print_prod_item_core info buf item =
-- let { prod_item_action = action;
-- prod_item_name = name;
-- prod_item_left = left;
-- prod_item_right = right
-- } = item
-- in
- let hash = info.info_hash in
- fprintf buf "%a ::=%a .%a (%a)" (**)
-- (pp_print_ivar hash) name
-- (pp_print_ivars hash) (List.rev left)
-- (pp_print_ivars hash) right
-- (pp_print_iaction hash) action
-+ (pp_print_ivar hash) item.prod_item_name
-+ (pp_print_ivars hash) (List.rev item.prod_item_left)
-+ (pp_print_ivars hash) item.prod_item_right
-+ (pp_print_iaction hash) item.prod_item_action
-
- let pp_print_prod_item info buf item =
- pp_print_prod_item_core info buf (ProdItem.get info.info_hash.hash_prod_item_state item)
-@@ -678,40 +668,27 @@ struct
- fprintf buf "@ %a" (pp_print_prod_item info) item) items
-
- let pp_print_state info buf state =
-- let { info_state_items = items } = State.get info.info_hash.hash_state_state state in
-+ let items = (State.get info.info_hash.hash_state_state state).info_state_items in
- eprintf "@[<v 3>State %d" (State.hash state);
- pp_print_prod_item_set info buf items;
- eprintf "@]"
-
- let pp_print_info_item info buf info_item =
-- let { info_hash = hash;
-- info_hash_state_item = hash_state_item
-- } = info
-- in
-- let { info_item_index = index;
-- info_item_entries = entries
-- } = info_item
-- in
-- fprintf buf "@[<v 3>State %d:" index;
-+ let hash = info.info_hash in
-+ let hash_state_item = info.info_hash_state_item in
-+ fprintf buf "@[<v 3>State %d:" info_item.info_item_index;
- Array.iter (fun entry ->
-- let { prop_state_item = state_item;
-- prop_vars = lookahead
-- } = entry
-- in
-+ let state_item = entry.prop_state_item in
-+ let lookahead = entry.prop_vars in
- let _, prod_item = StateItem.get hash_state_item state_item in
-- fprintf buf "@ @[<hv 3>%a@ @[<b 2>#%a@]@]" (pp_print_prod_item info) prod_item (pp_print_ivar_set hash) lookahead) entries;
-+ fprintf buf "@ @[<hv 3>%a@ @[<b 2>#%a@]@]" (pp_print_prod_item info) prod_item (pp_print_ivar_set hash) lookahead) info_item.info_item_entries;
- fprintf buf "@]"
-
- let pp_print_info buf info =
-- let { info_grammar = gram;
-- info_nullable = nullable;
-- info_first = first;
-- info_hash = hash
-- } = info
-- in
-- fprintf buf "@[<v 0>%a" pp_print_grammar gram;
-- fprintf buf "@ @[<b 3>Nullable:%a@]" (pp_print_ivar_set hash) nullable;
-- fprintf buf "@ @[<v 3>First:%a@]" (pp_print_ivar_table hash) first;
-+ let hash = info.info_hash in
-+ fprintf buf "@[<v 0>%a" pp_print_grammar info.info_grammar;
-+ fprintf buf "@ @[<b 3>Nullable:%a@]" (pp_print_ivar_set hash) info.info_nullable;
-+ fprintf buf "@ @[<v 3>First:%a@]" (pp_print_ivar_table hash) info.info_first;
- fprintf buf "@]"
-
- let pp_print_lookahead hash buf look =
-@@ -917,16 +894,11 @@ struct
- let changed, prods =
- VarMTable.fold_all (fun (changed, prods) _ prodlist ->
- List.fold_left (fun (changed, prods) prod ->
-- let { prod_action = action;
-- prod_name = name;
-- prod_prec = pre
-- } = prod
-- in
-- if ActionSet.mem actions action then
-- changed, prods
-- else
-- let prod = { prod with prod_prec = PrecTable.find prec_translate pre } in
-- true, VarMTable.add prods name prod) (changed, prods) prodlist) (false, prod1) prod2
-+ if ActionSet.mem actions prod.prod_action then
-+ changed, prods
-+ else
-+ let prod = { prod with prod_prec = PrecTable.find prec_translate prod.prod_prec } in
-+ true, VarMTable.add prods prod.prod_name prod) (changed, prods) prodlist) (false, prod1) prod2
- in
-
- (* Union of the start symbols *)
-@@ -1012,12 +984,10 @@ struct
- let step first prods =
- IVarTable.fold (fun (first, changed) _ prods ->
- List.fold_left (fun (first, changed) prod ->
-- let { prod_item_name = x;
-- prod_item_right = rhs
-- } = ProdItem.get prod_state prod
-- in
-+ let prod_item = ProdItem.get prod_state prod in
-+ let x = prod_item.prod_item_name in
- let set = IVarTable.find first x in
-- let set' = first_rhs nullable first set rhs in
-+ let set' = first_rhs nullable first set prod_item.prod_item_right in
- let set, changed =
- if changed || IVarSet.cardinal set' <> IVarSet.cardinal set then
- set', true
-@@ -1059,10 +1029,8 @@ struct
- * Get the set of first symbols that can begin a list.
- *)
- let lookahead info rhs =
-- let { info_first = first;
-- info_nullable = nullable
-- } = info
-- in
-+ let first = info.info_first in
-+ let nullable = info.info_nullable in
- let rec search set rhs =
- match rhs with
- v :: rhs ->
-@@ -1274,14 +1242,10 @@ struct
- let hash = info.info_hash.hash_prod_item_state in
- ProdItemSet.fold (fun delta prod_item ->
- let core = ProdItem.get hash prod_item in
-- let { prod_item_left = left;
-- prod_item_right = right
-- } = core
-- in
-- match right with
-+ match core.prod_item_right with
- v :: right ->
- let core =
-- { core with prod_item_left = v :: left;
-+ { core with prod_item_left = v :: core.prod_item_left;
- prod_item_right = right
- }
- in
-@@ -1517,11 +1481,7 @@ struct
- let goto_table = StateTable.find shift_table state in
- let prod_item_hash = info.info_hash.hash_prod_item_state in
- let prod_item_core = ProdItem.get prod_item_hash prod_item in
-- let { prod_item_left = left;
-- prod_item_right = right
-- } = prod_item_core
-- in
-- match right with
-+ match prod_item_core.prod_item_right with
- v :: right ->
- (* If v is a nonterminal, then also propagate to initial items *)
- let prop_items =
-@@ -1534,7 +1494,7 @@ struct
- (* Propagate directly to the next state *)
- let next_state = IVarTable.find goto_table v in
- let next_item_core =
-- { prod_item_core with prod_item_left = v :: left;
-+ { prod_item_core with prod_item_left = v :: prod_item_core.prod_item_left;
- prod_item_right = right
- }
- in
-@@ -1833,8 +1793,8 @@ struct
- item :: items ->
- let core = ProdItem.get hash item in
- let empty_flag =
-- match core with
-- { prod_item_left = []; prod_item_right = [] } ->
-+ match core.prod_item_left, core.prod_item_right with
-+ [], [] ->
- true
- | _ ->
- false
-@@ -1865,14 +1825,12 @@ struct
- look)
-
- let reduce_actions info empties prop_table =
-- let { info_head_lookahead = look_table } = info in
-+ let look_table = info.info_head_lookahead in
- let hash = info.info_hash.hash_prod_item_state in
- let hash_state_item = info.info_hash_state_item in
- Array.fold_left (fun actions entry ->
-- let { prop_state_item = state_item;
-- prop_vars = look3
-- } = entry
-- in
-+ let state_item = entry.prop_state_item in
-+ let look3 = entry.prop_vars in
- let state, item = StateItem.get hash_state_item state_item in
- let core = ProdItem.get hash item in
- match core.prod_item_right with
-@@ -1902,8 +1860,8 @@ struct
- * Error messages.
- *)
- let shift_reduce_conflict info state v shift_state reduce_item =
-- let { info_hash = hash } = info in
-- let { hash_prod_item_state = hash_prod_item } = hash in
-+ let hash = info.info_hash in
-+ let hash_prod_item = hash.hash_prod_item_state in
- let pp_print_ivar = pp_print_ivar hash in
- let pp_print_iaction = pp_print_iaction hash in
- let reduce_core = ProdItem.get hash_prod_item reduce_item in
-@@ -1917,8 +1875,8 @@ struct
- raise (Invalid_argument "Lm_parser.shift_reduce_conflict\n\tset MP_DEBUG=parse_conflict_is_warning to ignore this error")
-
- let reduce_reduce_conflict info state v reduce_item action =
-- let { info_hash = hash } = info in
-- let { hash_prod_item_state = hash_prod_item } = hash in
-+ let hash = info.info_hash in
-+ let hash_prod_item = hash.hash_prod_item_state in
- let pp_print_ivar = pp_print_ivar hash in
- let pp_print_iaction = pp_print_iaction hash in
- let reduce_core = ProdItem.get hash_prod_item reduce_item in
-@@ -1936,24 +1894,18 @@ struct
- * This is finally the stage where we check for conflicts.
- *)
- let process_reduce_actions info reduce_actions action_table =
-- let { info_grammar = gram;
-- info_prec = var_prec_table;
-- info_hash = { hash_prod_item_state = hash_prod_item }
-- } = info
-- in
-- let { gram_prec_table = prec_table } = gram in
-+ let gram = info.info_grammar in
-+ let var_prec_table = info.info_prec in
-+ let hash_prod_item = info.info_hash.hash_prod_item_state in
-+ let prec_table = gram.gram_prec_table in
- let state_item_hash = info.info_hash_state_item in
- StateItemTable.fold (fun action_table state_item look ->
- let look = lookahead_set look in
- let state, item = StateItem.get state_item_hash state_item in
-- let { prod_item_name = name;
-- prod_item_action = action;
-- prod_item_left = left;
-- prod_item_prec = prec_name
-- } = ProdItem.get hash_prod_item item
-- in
-+ let prod_item = ProdItem.get hash_prod_item item in
-+ let prec_name = prod_item.prod_item_prec in
- let assoc = Precedence.assoc prec_table prec_name in
-- let reduce = ReduceAction (action, name, List.length left) in
-+ let reduce = ReduceAction (prod_item.prod_item_action, prod_item.prod_item_name, List.length prod_item.prod_item_left) in
- let actions = StateTable.find action_table state in
- let actions =
- IVarSet.fold (fun actions v ->
-@@ -2006,7 +1958,8 @@ struct
- { prod_item_right = [];
- prod_item_action = action;
- prod_item_name = name;
-- prod_item_left = left
-+ prod_item_left = left;
-+ prod_item_prec = _
- } ->
- let state_item = StateItem.create info.info_hash_state_item (state, item) in
- let lookahead = prop_table.(StateItem.hash state_item).prop_vars in
-@@ -2027,18 +1980,14 @@ struct
- * Flatten a production state to a pda description.
- *)
- let pda_info_of_items info prop_table state items =
-- let { info_first = first;
-- info_hash_state_item = hash_state_item;
-- info_hash = { hash_prod_item_state = hash_prod_item }
-- } = info
-- in
-+ let first = info.info_first in
-+ let hash_state_item = info.info_hash_state_item in
-+ let hash_prod_item = info.info_hash.hash_prod_item_state in
- let items, next =
- ProdItemSet.fold (fun (items, next) prod_item ->
- let core = ProdItem.get hash_prod_item prod_item in
-- let { prod_item_left = left;
-- prod_item_right = right
-- } = core
-- in
-+ let left = core.prod_item_left in
-+ let right = core.prod_item_right in
- let item =
- { pda_item_left = left;
- pda_item_right = right
-@@ -2094,7 +2043,7 @@ struct
- (* Build the PDA states *)
- let table =
- State.map_array (fun state core ->
-- let { info_state_items = items } = core in
-+ let items = core.info_state_items in
- { pda_delta = pda_delta (StateTable.find trans_table state);
- pda_reduce = reduce_early info prop_table state items;
- pda_info = pda_info_of_items info prop_table state items
-@@ -2155,7 +2104,7 @@ struct
- * Exceptions.
- *)
- let parse_error loc hash run _stack state (v : ivar) =
-- let { pda_info = { pda_items = items; pda_next = next } } = run.run_states.(state) in
-+ let { pda_items = items; pda_next = next } = run.run_states.(state).pda_info in
- let pp_print_ivar = pp_print_ivar hash in
- let buf = stdstr in
- fprintf buf "@[<v 0>Syntax error on token %a" pp_print_ivar v;
-@@ -2188,7 +2137,7 @@ struct
-
- let pda_loop hash run arg start =
- let rec pda_lookahead arg stack state tok =
-- let { pda_delta = delta } = run.run_states.(state) in
-+ let delta = run.run_states.(state).pda_delta in
- let v, loc, x = tok in
- match
- (try IVarTable.find delta v with
-@@ -2323,24 +2272,24 @@ struct
- let prec_max = Precedence.prec_max
-
- let add_assoc info pre assoc =
-- let { parse_grammar = gram } = info in
-- let { gram_prec_table = prec_table } = gram in
-+ let gram = info.parse_grammar in
-+ let prec_table = gram.gram_prec_table in
- let prec_table = Precedence.add_assoc prec_table pre assoc in
- let gram = { gram with gram_prec_table = prec_table } in
- let info = { parse_grammar = gram; parse_pda = None } in
- info
-
- let create_prec_lt info pre assoc =
-- let { parse_grammar = gram } = info in
-- let { gram_prec_table = prec_table } = gram in
-+ let gram = info.parse_grammar in
-+ let prec_table = gram.gram_prec_table in
- let prec_table, pre = Precedence.create_prec_lt prec_table pre assoc in
- let gram = { gram with gram_prec_table = prec_table } in
- let info = { parse_grammar = gram; parse_pda = None } in
- info, pre
-
- let create_prec_gt info pre assoc =
-- let { parse_grammar = gram } = info in
-- let { gram_prec_table = prec_table } = gram in
-+ let gram = info.parse_grammar in
-+ let prec_table = gram.gram_prec_table in
- let prec_table, pre = Precedence.create_prec_gt prec_table pre assoc in
- let gram = { gram with gram_prec_table = prec_table } in
- let info = { parse_grammar = gram; parse_pda = None } in