Skip to content

Commit 34c7f87

Browse files
committed
Small fixes in examples
1 parent a714128 commit 34c7f87

File tree

3 files changed

+11
-14
lines changed

3 files changed

+11
-14
lines changed

examples/libgd.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
do ..gd.CallFunction("gdImageColorAllocate", ..gd.#INT, argTypes, im, 255, 255, 255)
9494
set color = ..gd.CallFunction("gdImageColorAllocate", ..gd.#INT, argTypes, im, $r(256), $r(256), $r(256))
9595
96-
set $li(argTypes, *+1) = ..gd.#INT;
96+
set $li(argTypes, *+1) = ..gd.#INT
9797
set d = 50 + $r(250)
9898
do ..gd.CallFunction("gdImageFilledEllipse", ..gd.#VOID, argTypes, im, (d \ 2) + $r(500 - d), (d \ 2) + $r(500 - d), d, d, color)
9999

examples/registry.xml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<Export generator="Cache" version="25" zv="Cache for Windows (x86-64) 2014.1.1 (Build 702U)" ts="2014-09-03 16:10:57">
2+
<Export generator="Cache" version="25" zv="Cache for Windows (x86-64) 2014.1.1 (Build 702U)" ts="2014-09-08 17:44:46">
33
<CSP name="CNARegistryExample.CSP" application="/csp/dev/" default="1"><![CDATA[
44
<html>
55
<head>
6-
76
<title> CNA Registry Example </title>
8-
97
</head>
10-
118
<body>
129
<form action="CNARegistryExample.csp" method="GET">
1310
Subkey of HKEY_CURRENT_USER:<br>
14-
<input type="text" name="subkey" value="#($GET(%request.Data("param", 1)))#"><br>
11+
<input type="text" name="subkey" value="#($GET(%request.Data("subkey", 1)))#"><br>
1512
Parameter:<br>
16-
<input type="text" name="param" value="#($GET(%request.Data("subkey", 1)))#"><br>
13+
<input type="text" name="param" value="#($GET(%request.Data("param", 1)))#"><br>
1714
Path to libcna.dll:<br>
1815
<input type="text" name="path" value="#($GET(%request.Data("path", 1)))#"><br>
1916
<button type="submit">Get key</button>
@@ -31,7 +28,7 @@ if ($Data(%request.Data("subkey", 1)) && $Data(%request.Data("param", 1))) {
3128
set libc = ##class(CNA.CNA).%New(CNAPath)
3229
do libc.LoadLibrary("C:\Windows\System32\msvcrt.dll")
3330
34-
// Вызываем malloc, чтобы выделить память под буферы, кооторые используются в вызовах WinAPI
31+
// Вызываем malloc, чтобы выделить память под буферы, которые используются в вызовах WinAPI
3532
set argTypes = $lb(libc.#SIZET)
3633
set phkey = libc.CallFunction("malloc", libc.#POINTER, argTypes, 4)
3734
set size = 1000
@@ -54,7 +51,7 @@ if ($Data(%request.Data("subkey", 1)) && $Data(%request.Data("param", 1))) {
5451
set argTypes = $lb(advapi.#LONG, advapi.#POINTER)
5552
set res = advapi.CallFunction("RegOpenCurrentUser", advapi.#INT, argTypes, $zhex("20019"), phkey)
5653
if (res '= 0) {
57-
w "RegOpenCurrentUset error: " _ res _ "<br>"
54+
write "<b><font color='red'>RegOpenCurrentUset error: " _ res _ "</font></b>"
5855
return
5956
}
6057
@@ -76,9 +73,9 @@ if ($Data(%request.Data("subkey", 1)) && $Data(%request.Data("param", 1))) {
7673
set res = advapi.CallFunction("RegGetValueA", advapi.#LONG, argTypes, hkey, pSubkey, pParam, $zhex("ffff"), advapi.NULL, valueBuf, sizeBuf)
7774
7875
if (res = 0) {
79-
w advapi.ConvertPointerToString(valueBuf), "<br>"
76+
write advapi.ConvertPointerToString(valueBuf), "<br>"
8077
} else {
81-
w "<b><font color='red'>RegGetValue Error: " _ res _ "</font></b>"
78+
write "<b><font color='red'>RegGetValue Error: " _ res _ "</font></b>"
8279
}
8380
8481
@@ -90,9 +87,9 @@ if ($Data(%request.Data("subkey", 1)) && $Data(%request.Data("param", 1))) {
9087
do libc.CallFunction("free", libc.#VOID, argTypes, sizeBuf)
9188
do libc.FreeLibrary()
9289
} catch ex {
93-
w "<b><font color='red'>"
90+
write "<b><font color='red'>"
9491
w $system.Status.GetErrorText(ex.AsStatus())
95-
w "</font></b>"
92+
write "</font></b>"
9693
}
9794
}
9895
</script>

examples/speller.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ Return value is the number of mistakes in all localization .
209209
]]></Implementation>
210210
</Method>
211211

212-
<Description>Checks system russian localizaion.</Description>
212+
<Description>Checks russian system localizaion.</Description>
213213
<Method name="CheckSystemLocalization">
214214
<ReturnType>%Integer</ReturnType>
215215
<Implementation><![CDATA[ return ..CheckLocalization("^%qCacheMsg")

0 commit comments

Comments
 (0)