interplane.Get Omega
Read in your language

hop

Hop: a small native macOS launcher. Clipboard history, find, on-device dictation and your coding agent behind one key.

Brought by drakestapleton

branch main Branches Tags History

hop / Linux / apps.om

949 lines · 18424 bytes Raw Blame History
1note Linux application discovery and launch. SPDX-License-Identifier: Apache-2.0
2note Platform contracts: freedesktop Desktop Entry 1.5 and XDG Base Directory 0.8.
3note gio owns Desktop Entry Exec field codes, Terminal and D-Bus activation; build records its exact version.
4note env preserves the desktop session environment without shell evaluation; build records its exact version.
5note Omega successor: native Desktop Entry Exec expansion and D-Bus activation; neither is claimed here.
6note PATH_MAX buffer is Linux pathname syscall boundary. getdents64 record length is a u16 wire field.
7note Tables and input lines grow with input. Executable packed-list boundaries are compiler contracts,
8note checked before exec: 65536 bytes and 1024 records. No environment is silently discarded.
9global ha_path uchar 4096
10global ha_read uchar 4096
11global ha_dent uchar 65536
12global ha_env uchar 131072
13global ha_exec uchar 65536
14global ha_wait uchar 4
15global ha_stat uchar 128
16global ha_line uchar *
17global ha_text uchar *
18global ha_meta ulong *
19global ha_dirs uchar *
20global ha_dmeta ulong *
21global ha_hits ulong *
22global ha_scores ulong *
23global ha_n ulong 1
24global ha_tn ulong 1
25global ha_dn ulong 1
26global ha_db ulong 1
27global ha_ln ulong 1
28global ha_pn ulong 1
29global ha_state ulong 8
30global ha_hn ulong 1
31text ha_home "HOME="
32text ha_data "XDG_DATA_HOME="
33text ha_xdirs "XDG_DATA_DIRS="
34text ha_local "/.local/share"
35text ha_apps "/applications"
36text ha_def "/usr/local/share:/usr/share"
37text ha_ext ".desktop"
38text ha_group "[Desktop Entry]"
39text ha_name "Name"
40text ha_type "Type"
41text ha_hidden "Hidden"
42text ha_nodisp "NoDisplay"
43text ha_cmd "Exec"
44text ha_dbus "DBusActivatable"
45text ha_true "true"
46text ha_app "Application"
47text ha_only "OnlyShowIn"
48text ha_not "NotShowIn"
49text ha_try "TryExec"
50text ha_session "XDG_CURRENT_DESKTOP="
51text ha_pathenv "PATH="
52text ha_defpath "/usr/local/bin:/usr/bin:/bin"
53text ha_envbin "/usr/bin/env"
54text ha_options "--"
55text ha_gio "/usr/bin/gio"
56text ha_launch "launch"
57text ha_open "open"
58text ha_errmem "Hop: Linux application list could not grow.\n"
59text ha_errpath "Hop: application pathname exceeds the Linux pathname boundary.\n"
60text ha_errexec "Hop: application launch exceeds the compiler argument packet boundary.\n"
61text ha_errlaunch "Hop: the desktop could not launch that application.\n"
62text ha_errenv "Hop: an environment entry could not be read in full.\n"
63
64fn ha_die textv view uchar * to void
65x = write 2 textv 0 len textv
66exit 1
67end
68
69fn ha_reserve need ulong which ulong to void
70r = long 0
71if eq which 0
72if gt need len ha_text
73r = enlarge ha_text add need add len ha_text 4096
74end
75end
76if eq which 1
77if gt need len ha_meta
78r = enlarge ha_meta add need add len ha_meta 64
79end
80end
81if eq which 2
82if gt need len ha_dirs
83r = enlarge ha_dirs add need add len ha_dirs 4096
84end
85end
86if eq which 3
87if gt need len ha_dmeta
88r = enlarge ha_dmeta add need add len ha_dmeta 64
89end
90end
91if eq which 4
92if gt need len ha_line
93r = enlarge ha_line add need add len ha_line 256
94end
95end
96if eq which 5
97if gt need len ha_hits
98r = enlarge ha_hits add need add len ha_hits 64
99if ge r 0
100r = enlarge ha_scores len ha_hits
101end
102end
103end
104if lt r 0
105ha_die ha_errmem
106end
107end
108
109fn ha_envkey key view uchar * to bool
110for j ulong len key bound 9223372036854775807
111if ne get ha_env j get key j
112ret false
113end
114end
115ret true
116end
117
118fn ha_envget key view uchar * to long
119for i ulong ulong envcnt bound 9223372036854775807
120n = envread i ha_env 0 len ha_env
121if lt n 0
122ha_die ha_errenv
123end
124if ge ulong n len key
125if ha_envkey key
126amount = sub ulong n len key
127ha_envshift len key amount
128ret long amount
129end
130end
131end
132ret -1
133end
134
135fn ha_envshift start ulong size ulong to void
136for j ulong size bound 9223372036854775807
137c = get ha_env add j start
138put ha_env j c
139end
140end
141
142fn ha_setpath src view uchar * to void
143if ge len src len ha_path
144ha_die ha_errpath
145end
146for i ulong len src bound 9223372036854775807
147put ha_path i get src i
148end
149put ha_pn 0 len src
150end
151
152fn ha_pathadd src view uchar * to void
153p = get ha_pn 0
154if ge add p len src len ha_path
155ha_die ha_errpath
156end
157for i ulong len src bound 9223372036854775807
158put ha_path add p i get src i
159end
160put ha_pn 0 add p len src
161end
162
163fn ha_envpath n ulong to void
164if ge n len ha_path
165ha_die ha_errpath
166end
167for i ulong n bound 9223372036854775807
168put ha_path i get ha_env i
169end
170put ha_pn 0 n
171end
172
173fn ha_queue root ulong to void
174n = get ha_pn 0
175p = get ha_db 0
176k = get ha_dn 0
177ha_reserve add p n 2
178ha_reserve mul add k 1 3 3
179for i ulong n bound 9223372036854775807
180put ha_dirs add p i get ha_path i
181end
182put ha_dmeta mul k 3 p
183put ha_dmeta add mul k 3 1 n
184put ha_dmeta add mul k 3 2 root
185put ha_dn 0 add k 1
186put ha_db 0 add p n
187end
188
189fn ha_lower c uchar to uchar
190if and ge c 65 le c 90
191ret add c 32
192end
193ret c
194end
195
196fn ha_lineeq start ulong size ulong value view uchar * to bool
197if ne size len value
198ret false
199end
200for i ulong size bound 9223372036854775807
201if ne get ha_line add start i get value i
202ret false
203end
204end
205ret true
206end
207
208fn ha_recordline to void
209n = get ha_ln 0
210if eq n 0
211ret
212end
213if eq get ha_line sub n 1 13
214n = sub n 1
215end
216if eq n 0
217ret
218end
219if eq get ha_line 0 91
220active = ha_lineeq 0 n ha_group
221put ha_state 0 0
222if active
223put ha_state 0 1
224end
225ret
226end
227if eq get ha_state 0 0
228ret
229end
230k = ulong 0
231while lt k n bound 9223372036854775807
232if eq get ha_line k 61
233break
234end
235k = add k 1
236end
237if eq k n
238ret
239end
240v = add k 1
241vn = sub n v
242if ha_lineeq 0 k ha_name
243p = get ha_tn 0
244ha_reserve add p vn 0
245j = ulong 0
246while lt j vn bound 9223372036854775807
247c = get ha_line add v j
248if and eq c 92 lt add j 1 vn
249j = add j 1
250c = get ha_line add v j
251if or or eq c 115 eq c 110 or eq c 114 eq c 116
252c = 32
253end
254end
255if or lt c 32 eq c 127
256c = 32
257end
258put ha_text p c
259p = add p 1
260j = add j 1
261end
262put ha_state 1 get ha_tn 0
263put ha_state 2 sub p get ha_tn 0
264put ha_tn 0 p
265end
266if ha_lineeq 0 k ha_type
267put ha_state 3 0
268if ha_lineeq v vn ha_app
269put ha_state 3 1
270end
271end
272if or ha_lineeq 0 k ha_hidden ha_lineeq 0 k ha_nodisp
273if ha_lineeq v vn ha_true
274put ha_state 4 1
275end
276end
277if ha_lineeq 0 k ha_cmd
278if gt vn 0
279put ha_state 5 1
280end
281end
282if ha_lineeq 0 k ha_dbus
283if ha_lineeq v vn ha_true
284put ha_state 5 1
285end
286end
287if ha_lineeq 0 k ha_only
288if not ha_insession v vn
289put ha_state 6 1
290end
291end
292if ha_lineeq 0 k ha_not
293if ha_insession v vn
294put ha_state 6 1
295end
296end
297if ha_lineeq 0 k ha_try
298if not ha_tryexec v vn
299put ha_state 7 1
300end
301end
302end
303
304fn ha_insession start ulong size ulong to bool
305n = ha_envget ha_session
306if le n 0
307ret false
308end
309lo = ulong 0
310for i ulong add size 1 bound 9223372036854775807
311sep = eq i size
312if not sep
313sep = eq get ha_line add start i 59
314end
315if sep
316if ha_sessionhas add start lo sub i lo ulong n
317ret true
318end
319lo = add i 1
320end
321end
322ret false
323end
324
325fn ha_sessionhas start ulong size ulong envsize ulong to bool
326if eq size 0
327ret false
328end
329lo = ulong 0
330for i ulong add envsize 1 bound 9223372036854775807
331sep = eq i envsize
332if not sep
333sep = eq get ha_env i 58
334end
335if sep
336if eq sub i lo size
337if ha_sessioneq start lo size
338ret true
339end
340end
341lo = add i 1
342end
343end
344ret false
345end
346
347fn ha_sessioneq start ulong envstart ulong size ulong to bool
348for j ulong size bound 9223372036854775807
349c = get ha_line add start j
350if ne c get ha_env add envstart j
351ret false
352end
353end
354ret true
355end
356
357fn ha_tryexec start ulong size ulong to bool
358if eq size 0
359ret false
360end
361slash = false
362for i ulong size bound 9223372036854775807
363if eq get ha_line add start i 47
364slash = true
365end
366end
367if slash
368ha_trypath 0 0 start size
369ret ha_executable
370end
371n = ha_envget ha_pathenv
372if le n 0
373for i ulong len ha_defpath
374put ha_env i get ha_defpath i
375end
376n = long len ha_defpath
377end
378lo = ulong 0
379for i ulong add ulong n 1 bound 9223372036854775807
380sep = eq i ulong n
381if not sep
382sep = eq get ha_env i 58
383end
384if sep
385ha_trypath lo sub i lo start size
386if ha_executable
387ret true
388end
389lo = add i 1
390end
391end
392ret false
393end
394
395fn ha_trypath envstart ulong envsize ulong start ulong size ulong to void
396extra = ulong 0
397if gt envsize 0
398extra = 1
399end
400total = add add envsize extra size
401if ge total len ha_path
402ha_die ha_errpath
403end
404for i ulong envsize bound 9223372036854775807
405c = get ha_env add envstart i
406put ha_path i c
407end
408if gt extra 0
409put ha_path envsize 47
410end
411for i ulong size bound 9223372036854775807
412c = get ha_line add start i
413put ha_path add add envsize extra i c
414end
415put ha_pn 0 total
416end
417
418fn ha_regular to bool
419r = stat ha_path 0 get ha_pn 0 ha_stat 0 len ha_stat
420if lt r 0
421ret false
422end
423note asm-generic/stat.h st_mode offset16, bits/stat.h S_IFMT=0170000 and S_IFREG=0100000.
424note Decimal conversions: calc:48b0ef104b499352fffecc0c0f52c5a98d33fcc80282357db3f03dd3c6d51c3d
425note and calc:ee2ba7a0bf702c139c1496ff5510397b56b897779b6783b8158f5f5c15a2511f.
426mode = add ulong get ha_stat 16 shl ulong get ha_stat 17 8
427ret eq and mode 61440 32768
428end
429
430fn ha_executable to bool
431if not ha_regular
432ret false
433end
434ret eq faccess ha_path 0 get ha_pn 0 1 0
435end
436
437fn ha_readentry index ulong to void
438for i ulong 8
439put ha_state i 0
440end
441if not ha_regular
442ret
443end
444fd = int fopen ha_path 0 get ha_pn 0 0 0
445if lt fd 0
446ret
447end
448put ha_ln 0 0
449done = false
450while not done bound 9223372036854775807
451n = read fd ha_read 0 len ha_read
452if lt n 0
453x = fclose fd
454ret
455end
456if eq n 0
457done = true
458ha_recordline
459else
460for i ulong ulong n bound 9223372036854775807
461c = get ha_read i
462if eq c 10
463ha_recordline
464put ha_ln 0 0
465else
466j = get ha_ln 0
467ha_reserve add j 1 4
468put ha_line j c
469put ha_ln 0 add j 1
470end
471end
472end
473end
474x = fclose fd
475if and eq get ha_state 3 1 eq get ha_state 4 0
476if eq get ha_state 5 1
477if and eq get ha_state 6 0 eq get ha_state 7 0
478put ha_meta add mul index 6 4 get ha_state 1
479put ha_meta add mul index 6 5 get ha_state 2
480end
481end
482end
483end
484
485fn ha_addentry root ulong to void
486n = get ha_pn 0
487start = add root 1
488if le n start
489ret
490end
491idn = sub n start
492for i ulong get ha_n 0 bound 9223372036854775807
493m = mul i 6
494if eq get ha_meta add m 1 idn
495if ha_sameid start idn get ha_meta m
496ret
497end
498end
499end
500k = get ha_n 0
501ha_reserve mul add k 1 6 1
502p = get ha_tn 0
503ha_reserve add add p idn n 0
504put ha_meta mul k 6 p
505put ha_meta add mul k 6 1 idn
506for i ulong idn bound 9223372036854775807
507c = get ha_path add start i
508if eq c 47
509c = 45
510end
511put ha_text add p i c
512end
513p = add p idn
514put ha_meta add mul k 6 2 p
515put ha_meta add mul k 6 3 n
516put ha_meta add mul k 6 4 0
517put ha_meta add mul k 6 5 0
518for i ulong n bound 9223372036854775807
519put ha_text add p i get ha_path i
520end
521put ha_tn 0 add p n
522put ha_n 0 add k 1
523ha_readentry k
524end
525
526fn ha_sameid start ulong size ulong offset ulong to bool
527for j ulong size bound 9223372036854775807
528c = get ha_path add start j
529if eq c 47
530c = 45
531end
532if ne c get ha_text add offset j
533ret false
534end
535end
536ret true
537end
538
539fn ha_direntry pos ulong root ulong base ulong to void
540sz = ulong 0
541while ne get ha_dent add add pos 19 sz 0 bound 65536
542sz = add sz 1
543end
544if eq sz 0
545ret
546end
547if eq get ha_dent add pos 19 46
548if eq sz 1
549ret
550end
551if eq sz 2
552if eq get ha_dent add pos 20 46
553ret
554end
555end
556end
557if ge add add base 1 sz len ha_path
558ha_die ha_errpath
559end
560put ha_path base 47
561for i ulong sz bound 9223372036854775807
562put ha_path add add base 1 i get ha_dent add add pos 19 i
563end
564put ha_pn 0 add add base 1 sz
565typ = get ha_dent add pos 18
566if eq typ 4
567ha_queue root
568ret
569end
570if lt sz len ha_ext
571ret
572end
573for i ulong len ha_ext
574if ne get ha_dent add add pos 19 add sub sz len ha_ext i get ha_ext i
575ret
576end
577end
578ha_addentry root
579end
580
581fn ha_scanroot to void
582if eq get ha_pn 0 0
583ret
584end
585if ne get ha_path 0 47
586ret
587end
588ha_pathadd ha_apps
589put ha_dn 0 0
590put ha_db 0 0
591ha_queue get ha_pn 0
592di = ulong 0
593while lt di get ha_dn 0 bound 9223372036854775807
594m = mul di 3
595base = get ha_dmeta add m 1
596root = get ha_dmeta add m 2
597off = get ha_dmeta m
598ha_dirpath off base
599put ha_pn 0 base
600fd = int fopen ha_path 0 base 0 0
601if ge fd 0
602done = false
603while not done bound 9223372036854775807
604n = getdnts fd ha_dent 0 len ha_dent
605if le n 0
606done = true
607else
608ha_parseents ulong n root base off
609end
610end
611x = fclose fd
612end
613di = add di 1
614end
615end
616
617fn ha_parseents size ulong root ulong base ulong offset ulong to void
618pos = ulong 0
619while lt pos size bound 65536
620low = ulong get ha_dent add pos 16
621high = ulong get ha_dent add pos 17
622rec = add low shl high 8
623if or lt rec 20 gt add pos rec size
624ret
625end
626ha_dirpath offset base
627ha_direntry pos root base
628pos = add pos rec
629end
630end
631
632fn ha_dirpath offset ulong size ulong to void
633for j ulong size bound 9223372036854775807
634c = get ha_dirs add offset j
635put ha_path j c
636end
637end
638
639fn ha_init to int
640put ha_n 0 0
641put ha_tn 0 0
642n = ha_envget ha_data
643valid = false
644if gt n 0
645valid = eq get ha_env 0 47
646end
647if valid
648ha_envpath ulong n
649else
650n = ha_envget ha_home
651if gt n 0
652ha_envpath ulong n
653ha_pathadd ha_local
654else
655put ha_pn 0 0
656end
657end
658ha_scanroot
659n = ha_envget ha_xdirs
660if le n 0
661for i ulong len ha_def
662put ha_env i get ha_def i
663end
664n = long len ha_def
665end
666note Preserve the directory list while each scan reads environment-independent files.
667list = new uchar 131072 0
668for i ulong ulong n bound 9223372036854775807
669put list i get ha_env i
670end
671lo = ulong 0
672for i ulong add ulong n 1 bound 9223372036854775807
673sep = eq i ulong n
674if not sep
675sep = eq get list i 58
676end
677if sep
678size = sub i lo
679if gt size 0
680ha_scanpart list lo size
681end
682lo = add i 1
683end
684end
685ret 0
686end
687
688fn ha_scanpart list view uchar * start ulong size ulong to void
689if ge size len ha_path
690ha_die ha_errpath
691end
692for j ulong size bound 9223372036854775807
693c = get list add start j
694put ha_path j c
695end
696put ha_pn 0 size
697ha_scanroot
698end
699
700fn ha_literal nameoff ulong namesize ulong to bool
701qn = get lx_qn 0
702if eq qn 0
703ret true
704end
705if gt qn namesize
706ret false
707end
708for i ulong add sub namesize qn 1 bound 9223372036854775807
709same = true
710for j ulong qn bound 9223372036854775807
711if ne ha_lower get lx_query j ha_lower get ha_text add add nameoff i j
712same = false
713break
714end
715end
716if same
717ret true
718end
719end
720ret false
721end
722
723fn ha_word c uchar to ulong
724v = ulong ha_lower c
725alpha = or and ge c 65 le c 90 and ge c 97 le c 122
726if or alpha and ge c 48 le c 57
727v = or v 4294967296
728end
729if or eq c 32 and ge c 9 le c 13
730v = or v 8589934592
731end
732ret v
733end
734
735fn ha_ascii nameoff ulong namesize ulong to bool
736for j ulong get lx_qn 0 bound 9223372036854775807
737if ge get lx_query j 128
738ret false
739end
740end
741for j ulong namesize bound 9223372036854775807
742if ge get ha_text add nameoff j 128
743ret false
744end
745end
746ret true
747end
748
749fn ha_score nameoff ulong namesize ulong to ulong
750qn = get lx_qn 0
751if eq qn 0
752ret 1
753end
754note Hop's existing helper wire format permits64 query words and184 name words.
755note Longer input and non-ASCII names use full literal matching, never a cut-short fuzzy request.
756if or gt qn 64 gt namesize 184
757if ha_literal nameoff namesize
758ret 1
759end
760ret 0
761end
762if not ha_ascii nameoff namesize
763if ha_literal nameoff namesize
764ret 1
765end
766ret 0
767end
768packet = new ulong 256 0
769put packet 0 1212568922
770put packet 1 1
771put packet 2 qn
772put packet 3 namesize
773for j ulong qn bound 64
774put packet add 8 j ha_word get lx_query j
775end
776for j ulong namesize bound 184
777put packet add 72 j ha_word get ha_text add nameoff j
778end
779ret hp_fuzz packet
780end
781
782fn ha_inserthit index ulong score ulong to void
783k = get ha_hn 0
784ha_reserve add k 1 5
785while gt k 0 bound 9223372036854775807
786prev = get ha_scores sub k 1
787if ge prev score
788break
789end
790old = get ha_hits sub k 1
791put ha_hits k old
792put ha_scores k prev
793k = sub k 1
794end
795put ha_hits k index
796put ha_scores k score
797put ha_hn 0 add get ha_hn 0 1
798end
799
800fn ha_query to void
801put lx_rn 0 0
802put ha_hn 0 0
803for i ulong get ha_n 0 bound 9223372036854775807
804m = mul i 6
805n = get ha_meta add m 5
806if gt n 0
807p = get ha_meta add m 4
808score = ha_score p n
809if gt score 0
810ha_inserthit i score
811end
812end
813end
814for j ulong get ha_hn 0 bound 9223372036854775807
815ha_addrow get ha_hits j
816end
817end
818
819fn ha_addrow index ulong to void
820m = mul index 6
821n = get ha_meta add m 5
822p = get ha_meta add m 4
823pos = get lx_rn 0
824r = enlarge lx_rows add add pos n 1
825if lt r 0
826ha_die ha_errmem
827end
828ha_rowcopy pos p n
829put lx_rows add pos n 10
830put lx_rn 0 add add pos n 1
831end
832
833fn ha_rowcopy dest ulong source ulong size ulong to void
834for j ulong size bound 9223372036854775807
835c = get ha_text add source j
836put lx_rows add dest j c
837end
838end
839
840fn ha_packetrec pos ulong value view uchar * to ulong
841if or gt len value 65535 gt add add pos 2 len value len ha_exec
842ha_die ha_errexec
843end
844put ha_exec pos uchar and len value 255
845put ha_exec add pos 1 uchar shr len value 8
846for j ulong len value bound 9223372036854775807
847put ha_exec add add pos 2 j get value j
848end
849ret add add pos 2 len value
850end
851
852fn ha_activate to int
853k = get lx_pick 0
854if ge k get ha_hn 0
855ret 0
856end
857index = get ha_hits k
858p = get ha_meta add mul index 6 2
859n = get ha_meta add mul index 6 3
860if ge n len ha_path
861ha_die ha_errpath
862end
863for i ulong n bound 9223372036854775807
864put ha_path i get ha_text add p i
865end
866put ha_pn 0 n
867ret ha_runpath ha_launch
868end
869
870fn ha_openfile path view uchar * to int
871ha_setpath path
872ret ha_runpath ha_open
873end
874
875fn ha_privateenv entry view uchar * to bool
876note Hop's private settings belong to Hop and its configured model, never a desktop program.
877if lt len entry 4
878ret false
879end
880if ne get entry 0 72
881ret false
882end
883if ne get entry 1 79
884ret false
885end
886if ne get entry 2 80
887ret false
888end
889ret eq get entry 3 95
890end
891
892fn ha_runpath action view uchar * to int
893note env is an external platform wrapper: no shell parses the environment or pathname.
894pos = ha_packetrec 2 ha_envbin
895pos = ha_packetrec pos ha_options
896nc = ulong 5
897envbuf = new uchar 131072 0
898for i ulong ulong envcnt bound 9223372036854775807
899n = envread i envbuf 0 len envbuf
900if lt n 0
901ha_die ha_errenv
902end
903if not ha_privateenv part envbuf 0 ulong n
904nc = add nc 1
905if gt nc 1024
906ha_die ha_errexec
907end
908pos = ha_packetrec pos part envbuf 0 ulong n
909end
910end
911pos = ha_packetrec pos ha_gio
912pos = ha_packetrec pos action
913pos = ha_packetpath pos get ha_pn 0
914put ha_exec 0 uchar and nc 255
915put ha_exec 1 uchar shr nc 8
916pid = int fork
917if eq pid 0
918x = execprog ha_exec 0 pos
919x = write 2 ha_errlaunch 0 len ha_errlaunch
920exit 1
921end
922if lt pid 0
923x = write 2 ha_errlaunch 0 len ha_errlaunch
924ret 0
925end
926status = waitpid pid ha_wait 0 4 0
927if lt status 0
928x = write 2 ha_errlaunch 0 len ha_errlaunch
929ret 0
930end
931if ne or get ha_wait 0 get ha_wait 1 0
932x = write 2 ha_errlaunch 0 len ha_errlaunch
933ret 0
934end
935ret 1
936end
937
938fn ha_packetpath pos ulong size ulong to ulong
939if or gt size 65535 gt add add pos 2 size len ha_exec
940ha_die ha_errexec
941end
942put ha_exec pos uchar and size 255
943put ha_exec add pos 1 uchar shr size 8
944for i ulong size bound 9223372036854775807
945c = get ha_path i
946put ha_exec add add pos 2 i c
947end
948ret add add pos 2 size
949end