Home » Archimedes archive » Acorn User » AU 1996-08.adf » Regulars » StarInfo/Boura/Files/AppEnsure
StarInfo/Boura/Files/AppEnsure
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Acorn User » AU 1996-08.adf » Regulars |
Filename: | StarInfo/Boura/Files/AppEnsure |
Read OK: | ✔ |
File size: | 096E bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10REM (c) ArmAge software (Malcolm Boura), 1995 20REM This program is placed in the public domain, subject to the conditions 30REM given in the !help file in !Director by Nick Craig-Wood, except the first 40REM which applies to me, not Nick! 50 60REM this program is primarily for use with !Director but may have wider application 70 80REM Syntax: AppEnsure <name> <command> 90REM <name> that may be registered with task manager 100REM <command> to execute if <name> found 110 120REM it would be useful to add an optional automatic iconbar click 130REM but that will require more thought 140 150REM ON ERROR PRINT "AppEnsure: "; REPORT$; " at line "; ERL/10: END 160ON ERROR: ON ERROR OFF: ERROR EXT ERR,"AppEnsure: "+REPORT$: REM +" at "+STR$ERL 170 180DIM buffer 256 190 200SYS "OS_GetEnv" TO string 210string$ = FNstring_c(string) 220i = INSTR(string$, """") 230i = INSTR(string$, """", i+1) 240string$ = FNstring_strip(MID$(string$, i+1)) 250 260REM find the task name 270i = 1 280task$ = FNstring_commandItem(string$, i) 290IF task$ = "" ERROR 0, "AppEnsure: No application given so pointless" 300 310REM find the command to run 320com$ = FNstring_commandItem(string$, i) 330IF com$ = "" ERROR 0, "AppEnsure: No command given so pointless" 340 350r0 = 0 360count = 0 370REPEAT 380 SYS "TaskManager_EnumerateTasks", r0, buffer, 16 TO r0 390 IF FNstring_c(buffer!4) = task$ THEN count += 1 400UNTIL r0 <= 0 410 420IF count = 0 THEN OSCLI com$ 430END 440 450DEF FNstring_commandItem(string$, RETURN i) 460LOCAL item$, j 470i = FNstring_skip(string$, " ", i) 480IF MID$(string$, i, 1) = """" THEN 490 j = INSTR(string$, """", i+1) 500 WHILE MID$(string$, j+1, 1) = """" 510 j = INSTR(string$, """", j+2) 520 ENDWHILE 530 IF j = 0 ERROR 0, "Mismatched quotes" 540 item$ = MID$(string$, i+1, j-i-1) 550 i = j+1 560ELSE 570 item$ = FNstring_token(string$, " ", i) 580ENDIF 590= item$ 600 610DEF FNstring_skip(string$, skip$, from%) 620WHILE MID$(string$, from%, 1) = skip$ 630 from% += 1 640ENDWHILE 650= from% 660 670DEF FNstring_strip(a$) 680REM 1.0 16/6/91 690WHILE LEFT$(a$,1)=" " 700 a$=MID$(a$,2) 710 ENDWHILE 720WHILE RIGHT$(a$,1)=" " 730 a$=LEFT$(a$,LENa$-1) 740 ENDWHILE 750=a$ 760 770DEF FNstring_token(string$, token$, RETURN i%) 780REM 2/3/93 790LOCAL p%, a$ 800IF i% = -1 THEN ="" 810IF i% = 0 THEN i% = 1 820p% = INSTR(string$, token$, i%) 830IF p% = 0 THEN 840 a$ = MID$(string$, i%) 850 i% = -1 860ELSE 870 a$ = MID$(string$, i%, p%-i%) 880 i% = p% + 1 890ENDIF 900= FNstring_strip(a$) 910 920DEF FNstring_c(p%) 930REM 1.0 16/6/91 940REM return zero terminated string pointed to by p% 950LOCAL a$ 960WHILE ?p% > 31 970 a$ = a$ + CHR$ ?p% 980 p% += 1 990ENDWHILE 1000= a$
/� (c) ArmAge software (Malcolm Boura), 1995 L� This program is placed in the public domain, subject to the conditions O� given in the !help file in !Director by Nick Craig-Wood, except the first ($� which applies to me, not Nick! 2 <U� this program is primarily for use with !Director but may have wider application F P(� Syntax: AppEnsure <name> <command> Z5� <name> that may be registered with task manager d*� <command> to execute if <name> found n xC� it would be useful to add an optional automatic iconbar click �(� but that will require more thought � �E� ON ERROR PRINT "AppEnsure: "; REPORT$; " at line "; ERL/10: END �9� �: � � �: � � �,"AppEnsure: "+�$: � +" at "+STR$ERL � �� buffer 256 � �ș "OS_GetEnv" � string �string$ = �string_c(string) �i = �string$, """") �i = �string$, """", i+1) �+string$ = �string_strip(�string$, i+1)) � � find the task name i = 1 +task$ = �string_commandItem(string$, i) "D� task$ = "" � 0, "AppEnsure: No application given so pointless" , 6� find the command to run @*com$ = �string_commandItem(string$, i) J?� com$ = "" � 0, "AppEnsure: No command given so pointless" T ^ r0 = 0 h count = 0 r� |: ș "TaskManager_EnumerateTasks", r0, buffer, 16 � r0 �0 � �string_c(buffer!4) = task$ � count += 1 � � r0 <= 0 � �� count = 0 � � com$ �� � �'� �string_commandItem(string$, � i) �� item$, j �%i = �string_skip(string$, " ", i) �� �string$, i, 1) = """" � � j = �string$, """", i+1) �! ȕ �string$, j+1, 1) = """" � j = �string$, """", j+2) � & � j = 0 � 0, "Mismatched quotes" # item$ = �string$, i+1, j-i-1) & i = j+1 0� :, item$ = �string_token(string$, " ", i) D� N= item$ X b)� �string_skip(string$, skip$, from%) l"ȕ �string$, from%, 1) = skip$ v from% += 1 �� �= from% � �� �string_strip(a$) �� 1.0 16/6/91 �ȕ �a$,1)=" " � a$=�a$,2) � � �ȕ �a$,1)=" " � a$=�a$,�a$-1) � � �=a$ � *� �string_token(string$, token$, � i%) � 2/3/93 � p%, a$ � i% = -1 � ="" *� i% = 0 � i% = 1 4p% = �string$, token$, i%) >� p% = 0 � H a$ = �string$, i%) R i% = -1 \� f a$ = �string$, i%, p%-i%) p i% = p% + 1 z� �= �string_strip(a$) � �� �string_c(p%) �� 1.0 16/6/91 �4� return zero terminated string pointed to by p% �� a$ �ȕ ?p% > 31 � a$ = a$ + � ?p% � p% += 1 �� �= a$ �
00000000 0d 00 0a 2f f4 20 28 63 29 20 41 72 6d 41 67 65 |.../. (c) ArmAge| 00000010 20 73 6f 66 74 77 61 72 65 20 28 4d 61 6c 63 6f | software (Malco| 00000020 6c 6d 20 42 6f 75 72 61 29 2c 20 31 39 39 35 0d |lm Boura), 1995.| 00000030 00 14 4c f4 20 54 68 69 73 20 70 72 6f 67 72 61 |..L. This progra| 00000040 6d 20 69 73 20 70 6c 61 63 65 64 20 69 6e 20 74 |m is placed in t| 00000050 68 65 20 70 75 62 6c 69 63 20 64 6f 6d 61 69 6e |he public domain| 00000060 2c 20 73 75 62 6a 65 63 74 20 74 6f 20 74 68 65 |, subject to the| 00000070 20 63 6f 6e 64 69 74 69 6f 6e 73 0d 00 1e 4f f4 | conditions...O.| 00000080 20 67 69 76 65 6e 20 69 6e 20 74 68 65 20 21 68 | given in the !h| 00000090 65 6c 70 20 66 69 6c 65 20 69 6e 20 21 44 69 72 |elp file in !Dir| 000000a0 65 63 74 6f 72 20 62 79 20 4e 69 63 6b 20 43 72 |ector by Nick Cr| 000000b0 61 69 67 2d 57 6f 6f 64 2c 20 65 78 63 65 70 74 |aig-Wood, except| 000000c0 20 74 68 65 20 66 69 72 73 74 0d 00 28 24 f4 20 | the first..($. | 000000d0 77 68 69 63 68 20 61 70 70 6c 69 65 73 20 74 6f |which applies to| 000000e0 20 6d 65 2c 20 6e 6f 74 20 4e 69 63 6b 21 0d 00 | me, not Nick!..| 000000f0 32 04 0d 00 3c 55 f4 20 74 68 69 73 20 70 72 6f |2...<U. this pro| 00000100 67 72 61 6d 20 69 73 20 70 72 69 6d 61 72 69 6c |gram is primaril| 00000110 79 20 66 6f 72 20 75 73 65 20 77 69 74 68 20 21 |y for use with !| 00000120 44 69 72 65 63 74 6f 72 20 62 75 74 20 6d 61 79 |Director but may| 00000130 20 68 61 76 65 20 77 69 64 65 72 20 61 70 70 6c | have wider appl| 00000140 69 63 61 74 69 6f 6e 0d 00 46 04 0d 00 50 28 f4 |ication..F...P(.| 00000150 20 53 79 6e 74 61 78 3a 20 41 70 70 45 6e 73 75 | Syntax: AppEnsu| 00000160 72 65 20 3c 6e 61 6d 65 3e 20 3c 63 6f 6d 6d 61 |re <name> <comma| 00000170 6e 64 3e 0d 00 5a 35 f4 20 3c 6e 61 6d 65 3e 20 |nd>..Z5. <name> | 00000180 74 68 61 74 20 6d 61 79 20 62 65 20 72 65 67 69 |that may be regi| 00000190 73 74 65 72 65 64 20 77 69 74 68 20 74 61 73 6b |stered with task| 000001a0 20 6d 61 6e 61 67 65 72 0d 00 64 2a f4 20 3c 63 | manager..d*. <c| 000001b0 6f 6d 6d 61 6e 64 3e 20 74 6f 20 65 78 65 63 75 |ommand> to execu| 000001c0 74 65 20 69 66 20 3c 6e 61 6d 65 3e 20 66 6f 75 |te if <name> fou| 000001d0 6e 64 0d 00 6e 04 0d 00 78 43 f4 20 69 74 20 77 |nd..n...xC. it w| 000001e0 6f 75 6c 64 20 62 65 20 75 73 65 66 75 6c 20 74 |ould be useful t| 000001f0 6f 20 61 64 64 20 61 6e 20 6f 70 74 69 6f 6e 61 |o add an optiona| 00000200 6c 20 61 75 74 6f 6d 61 74 69 63 20 69 63 6f 6e |l automatic icon| 00000210 62 61 72 20 63 6c 69 63 6b 0d 00 82 28 f4 20 62 |bar click...(. b| 00000220 75 74 20 74 68 61 74 20 77 69 6c 6c 20 72 65 71 |ut that will req| 00000230 75 69 72 65 20 6d 6f 72 65 20 74 68 6f 75 67 68 |uire more though| 00000240 74 0d 00 8c 04 0d 00 96 45 f4 20 4f 4e 20 45 52 |t.......E. ON ER| 00000250 52 4f 52 20 50 52 49 4e 54 20 22 41 70 70 45 6e |ROR PRINT "AppEn| 00000260 73 75 72 65 3a 20 22 3b 20 52 45 50 4f 52 54 24 |sure: "; REPORT$| 00000270 3b 20 22 20 61 74 20 6c 69 6e 65 20 22 3b 20 45 |; " at line "; E| 00000280 52 4c 2f 31 30 3a 20 45 4e 44 0d 00 a0 39 ee 20 |RL/10: END...9. | 00000290 85 3a 20 ee 20 85 20 87 3a 20 85 20 a2 20 9f 2c |.: . . .: . . .,| 000002a0 22 41 70 70 45 6e 73 75 72 65 3a 20 22 2b f6 24 |"AppEnsure: "+.$| 000002b0 3a 20 f4 20 2b 22 20 61 74 20 22 2b 53 54 52 24 |: . +" at "+STR$| 000002c0 45 52 4c 0d 00 aa 04 0d 00 b4 10 de 20 62 75 66 |ERL......... buf| 000002d0 66 65 72 20 32 35 36 0d 00 be 04 0d 00 c8 1b c8 |fer 256.........| 000002e0 99 20 22 4f 53 5f 47 65 74 45 6e 76 22 20 b8 20 |. "OS_GetEnv" . | 000002f0 73 74 72 69 6e 67 0d 00 d2 1f 73 74 72 69 6e 67 |string....string| 00000300 24 20 3d 20 a4 73 74 72 69 6e 67 5f 63 28 73 74 |$ = .string_c(st| 00000310 72 69 6e 67 29 0d 00 dc 17 69 20 3d 20 a7 73 74 |ring)....i = .st| 00000320 72 69 6e 67 24 2c 20 22 22 22 22 29 0d 00 e6 1c |ring$, """")....| 00000330 69 20 3d 20 a7 73 74 72 69 6e 67 24 2c 20 22 22 |i = .string$, ""| 00000340 22 22 2c 20 69 2b 31 29 0d 00 f0 2b 73 74 72 69 |"", i+1)...+stri| 00000350 6e 67 24 20 3d 20 a4 73 74 72 69 6e 67 5f 73 74 |ng$ = .string_st| 00000360 72 69 70 28 c1 73 74 72 69 6e 67 24 2c 20 69 2b |rip(.string$, i+| 00000370 31 29 29 0d 00 fa 04 0d 01 04 18 f4 20 66 69 6e |1))......... fin| 00000380 64 20 74 68 65 20 74 61 73 6b 20 6e 61 6d 65 0d |d the task name.| 00000390 01 0e 09 69 20 3d 20 31 0d 01 18 2b 74 61 73 6b |...i = 1...+task| 000003a0 24 20 3d 20 a4 73 74 72 69 6e 67 5f 63 6f 6d 6d |$ = .string_comm| 000003b0 61 6e 64 49 74 65 6d 28 73 74 72 69 6e 67 24 2c |andItem(string$,| 000003c0 20 69 29 0d 01 22 44 e7 20 74 61 73 6b 24 20 3d | i).."D. task$ =| 000003d0 20 22 22 20 85 20 30 2c 20 22 41 70 70 45 6e 73 | "" . 0, "AppEns| 000003e0 75 72 65 3a 20 4e 6f 20 61 70 70 6c 69 63 61 74 |ure: No applicat| 000003f0 69 6f 6e 20 67 69 76 65 6e 20 73 6f 20 70 6f 69 |ion given so poi| 00000400 6e 74 6c 65 73 73 22 0d 01 2c 04 0d 01 36 1d f4 |ntless"..,...6..| 00000410 20 66 69 6e 64 20 74 68 65 20 63 6f 6d 6d 61 6e | find the comman| 00000420 64 20 74 6f 20 72 75 6e 0d 01 40 2a 63 6f 6d 24 |d to run..@*com$| 00000430 20 3d 20 a4 73 74 72 69 6e 67 5f 63 6f 6d 6d 61 | = .string_comma| 00000440 6e 64 49 74 65 6d 28 73 74 72 69 6e 67 24 2c 20 |ndItem(string$, | 00000450 69 29 0d 01 4a 3f e7 20 63 6f 6d 24 20 3d 20 22 |i)..J?. com$ = "| 00000460 22 20 85 20 30 2c 20 22 41 70 70 45 6e 73 75 72 |" . 0, "AppEnsur| 00000470 65 3a 20 4e 6f 20 63 6f 6d 6d 61 6e 64 20 67 69 |e: No command gi| 00000480 76 65 6e 20 73 6f 20 70 6f 69 6e 74 6c 65 73 73 |ven so pointless| 00000490 22 0d 01 54 04 0d 01 5e 0a 72 30 20 3d 20 30 0d |"..T...^.r0 = 0.| 000004a0 01 68 0d 63 6f 75 6e 74 20 3d 20 30 0d 01 72 05 |.h.count = 0..r.| 000004b0 f5 0d 01 7c 3a 20 20 c8 99 20 22 54 61 73 6b 4d |...|: .. "TaskM| 000004c0 61 6e 61 67 65 72 5f 45 6e 75 6d 65 72 61 74 65 |anager_Enumerate| 000004d0 54 61 73 6b 73 22 2c 20 72 30 2c 20 62 75 66 66 |Tasks", r0, buff| 000004e0 65 72 2c 20 31 36 20 b8 20 72 30 0d 01 86 30 20 |er, 16 . r0...0 | 000004f0 20 e7 20 a4 73 74 72 69 6e 67 5f 63 28 62 75 66 | . .string_c(buf| 00000500 66 65 72 21 34 29 20 3d 20 74 61 73 6b 24 20 8c |fer!4) = task$ .| 00000510 20 63 6f 75 6e 74 20 2b 3d 20 31 0d 01 90 0d fd | count += 1.....| 00000520 20 72 30 20 3c 3d 20 30 0d 01 9a 04 0d 01 a4 18 | r0 <= 0........| 00000530 e7 20 63 6f 75 6e 74 20 3d 20 30 20 8c 20 ff 20 |. count = 0 . . | 00000540 63 6f 6d 24 0d 01 ae 05 e0 0d 01 b8 04 0d 01 c2 |com$............| 00000550 27 dd 20 a4 73 74 72 69 6e 67 5f 63 6f 6d 6d 61 |'. .string_comma| 00000560 6e 64 49 74 65 6d 28 73 74 72 69 6e 67 24 2c 20 |ndItem(string$, | 00000570 f8 20 69 29 0d 01 cc 0e ea 20 69 74 65 6d 24 2c |. i)..... item$,| 00000580 20 6a 0d 01 d6 25 69 20 3d 20 a4 73 74 72 69 6e | j...%i = .strin| 00000590 67 5f 73 6b 69 70 28 73 74 72 69 6e 67 24 2c 20 |g_skip(string$, | 000005a0 22 20 22 2c 20 69 29 0d 01 e0 1e e7 20 c1 73 74 |" ", i)..... .st| 000005b0 72 69 6e 67 24 2c 20 69 2c 20 31 29 20 3d 20 22 |ring$, i, 1) = "| 000005c0 22 22 22 20 8c 0d 01 ea 1e 20 20 6a 20 3d 20 a7 |""" ..... j = .| 000005d0 73 74 72 69 6e 67 24 2c 20 22 22 22 22 2c 20 69 |string$, """", i| 000005e0 2b 31 29 0d 01 f4 21 20 20 c8 95 20 c1 73 74 72 |+1)...! .. .str| 000005f0 69 6e 67 24 2c 20 6a 2b 31 2c 20 31 29 20 3d 20 |ing$, j+1, 1) = | 00000600 22 22 22 22 0d 01 fe 20 20 20 20 20 6a 20 3d 20 |""""... j = | 00000610 a7 73 74 72 69 6e 67 24 2c 20 22 22 22 22 2c 20 |.string$, """", | 00000620 6a 2b 32 29 0d 02 08 07 20 20 ce 0d 02 12 26 20 |j+2).... ....& | 00000630 20 e7 20 6a 20 3d 20 30 20 85 20 30 2c 20 22 4d | . j = 0 . 0, "M| 00000640 69 73 6d 61 74 63 68 65 64 20 71 75 6f 74 65 73 |ismatched quotes| 00000650 22 0d 02 1c 23 20 20 69 74 65 6d 24 20 3d 20 c1 |"...# item$ = .| 00000660 73 74 72 69 6e 67 24 2c 20 69 2b 31 2c 20 6a 2d |string$, i+1, j-| 00000670 69 2d 31 29 0d 02 26 0d 20 20 69 20 3d 20 6a 2b |i-1)..&. i = j+| 00000680 31 0d 02 30 05 cc 0d 02 3a 2c 20 20 69 74 65 6d |1..0....:, item| 00000690 24 20 3d 20 a4 73 74 72 69 6e 67 5f 74 6f 6b 65 |$ = .string_toke| 000006a0 6e 28 73 74 72 69 6e 67 24 2c 20 22 20 22 2c 20 |n(string$, " ", | 000006b0 69 29 0d 02 44 05 cd 0d 02 4e 0b 3d 20 69 74 65 |i)..D....N.= ite| 000006c0 6d 24 0d 02 58 04 0d 02 62 29 dd 20 a4 73 74 72 |m$..X...b). .str| 000006d0 69 6e 67 5f 73 6b 69 70 28 73 74 72 69 6e 67 24 |ing_skip(string$| 000006e0 2c 20 73 6b 69 70 24 2c 20 66 72 6f 6d 25 29 0d |, skip$, from%).| 000006f0 02 6c 22 c8 95 20 c1 73 74 72 69 6e 67 24 2c 20 |.l".. .string$, | 00000700 66 72 6f 6d 25 2c 20 31 29 20 3d 20 73 6b 69 70 |from%, 1) = skip| 00000710 24 0d 02 76 10 20 20 66 72 6f 6d 25 20 2b 3d 20 |$..v. from% += | 00000720 31 0d 02 80 05 ce 0d 02 8a 0b 3d 20 66 72 6f 6d |1.........= from| 00000730 25 0d 02 94 04 0d 02 9e 17 dd 20 a4 73 74 72 69 |%......... .stri| 00000740 6e 67 5f 73 74 72 69 70 28 61 24 29 0d 02 a8 11 |ng_strip(a$)....| 00000750 f4 20 31 2e 30 20 31 36 2f 36 2f 39 31 0d 02 b2 |. 1.0 16/6/91...| 00000760 11 c8 95 20 c0 61 24 2c 31 29 3d 22 20 22 0d 02 |... .a$,1)=" "..| 00000770 bc 10 20 20 20 61 24 3d c1 61 24 2c 32 29 0d 02 |.. a$=.a$,2)..| 00000780 c6 08 20 20 20 ce 0d 02 d0 11 c8 95 20 c2 61 24 |.. ....... .a$| 00000790 2c 31 29 3d 22 20 22 0d 02 da 14 20 20 20 61 24 |,1)=" ".... a$| 000007a0 3d c0 61 24 2c a9 61 24 2d 31 29 0d 02 e4 08 20 |=.a$,.a$-1).... | 000007b0 20 20 ce 0d 02 ee 07 3d 61 24 0d 02 f8 04 0d 03 | .....=a$......| 000007c0 02 2a dd 20 a4 73 74 72 69 6e 67 5f 74 6f 6b 65 |.*. .string_toke| 000007d0 6e 28 73 74 72 69 6e 67 24 2c 20 74 6f 6b 65 6e |n(string$, token| 000007e0 24 2c 20 f8 20 69 25 29 0d 03 0c 0c f4 20 32 2f |$, . i%)..... 2/| 000007f0 33 2f 39 33 0d 03 16 0c ea 20 70 25 2c 20 61 24 |3/93..... p%, a$| 00000800 0d 03 20 13 e7 20 69 25 20 3d 20 2d 31 20 8c 20 |.. .. i% = -1 . | 00000810 3d 22 22 0d 03 2a 15 e7 20 69 25 20 3d 20 30 20 |=""..*.. i% = 0 | 00000820 8c 20 69 25 20 3d 20 31 0d 03 34 1e 70 25 20 3d |. i% = 1..4.p% =| 00000830 20 a7 73 74 72 69 6e 67 24 2c 20 74 6f 6b 65 6e | .string$, token| 00000840 24 2c 20 69 25 29 0d 03 3e 0e e7 20 70 25 20 3d |$, i%)..>.. p% =| 00000850 20 30 20 8c 0d 03 48 18 20 20 61 24 20 3d 20 c1 | 0 ...H. a$ = .| 00000860 73 74 72 69 6e 67 24 2c 20 69 25 29 0d 03 52 0d |string$, i%)..R.| 00000870 20 20 69 25 20 3d 20 2d 31 0d 03 5c 05 cc 0d 03 | i% = -1..\....| 00000880 66 1f 20 20 61 24 20 3d 20 c1 73 74 72 69 6e 67 |f. a$ = .string| 00000890 24 2c 20 69 25 2c 20 70 25 2d 69 25 29 0d 03 70 |$, i%, p%-i%)..p| 000008a0 11 20 20 69 25 20 3d 20 70 25 20 2b 20 31 0d 03 |. i% = p% + 1..| 000008b0 7a 05 cd 0d 03 84 17 3d 20 a4 73 74 72 69 6e 67 |z......= .string| 000008c0 5f 73 74 72 69 70 28 61 24 29 0d 03 8e 04 0d 03 |_strip(a$)......| 000008d0 98 13 dd 20 a4 73 74 72 69 6e 67 5f 63 28 70 25 |... .string_c(p%| 000008e0 29 0d 03 a2 11 f4 20 31 2e 30 20 31 36 2f 36 2f |)..... 1.0 16/6/| 000008f0 39 31 0d 03 ac 34 f4 20 72 65 74 75 72 6e 20 7a |91...4. return z| 00000900 65 72 6f 20 74 65 72 6d 69 6e 61 74 65 64 20 73 |ero terminated s| 00000910 74 72 69 6e 67 20 70 6f 69 6e 74 65 64 20 74 6f |tring pointed to| 00000920 20 62 79 20 70 25 0d 03 b6 08 ea 20 61 24 0d 03 | by p%..... a$..| 00000930 c0 0f c8 95 20 3f 70 25 20 3e 20 33 31 0d 03 ca |.... ?p% > 31...| 00000940 15 20 20 61 24 20 3d 20 61 24 20 2b 20 bd 20 3f |. a$ = a$ + . ?| 00000950 70 25 0d 03 d4 0d 20 20 70 25 20 2b 3d 20 31 0d |p%.... p% += 1.| 00000960 03 de 05 ce 0d 03 e8 08 3d 20 61 24 0d ff |........= a$..| 0000096e