Skip to content

Commit 768e2cb

Browse files
committed
Fix errors in libgd example
1 parent 7691dca commit 768e2cb

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

examples/libgd.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
<FormalSpec>path:%String</FormalSpec>
6464
<Implementation><![CDATA[
6565
try {
66-
set prev = gd.NULL
66+
set prev = ..gd.NULL
6767
6868
set argTypes = ##class(%ListOfDataTypes).%New()
6969
do argTypes.Insert(..libc.#POINTER)
@@ -73,7 +73,7 @@
7373
set pMode = ..libc.ConvertStringToPointer("wb")
7474
7575
set out = ..libc.CallFunction("fopen", ..libc.#POINTER, argTypes, pPath, pMode)
76-
if (out = libc.NULL) {
76+
if (out = ..libc.NULL) {
7777
write "Can't open file " _ path _ "for writing", !
7878
return
7979
}
@@ -127,7 +127,7 @@
127127
do argTypes.Insert(..gd.#POINTER)
128128
do ..gd.CallFunction("gdImageGifAnimAdd", ..gd.#VOID, argTypes, im, out, 1, 0, 0, 10, 1, prev)
129129
130-
if (prev '= gd.NULL) {
130+
if (prev '= ..gd.NULL) {
131131
do argTypes.Clear()
132132
do argTypes.Insert(..gd.#POINTER)
133133
do ..gd.CallFunction("gdImageDestroy", ..gd.#VOID, argTypes, prev)
@@ -160,15 +160,15 @@
160160
do argTypes.Insert(..libc.#POINTER)
161161
162162
set fd = ..libc.CallFunction("fopen", ..libc.#POINTER, argTypes, pPath, rb)
163-
if (fd = libc.NULL) {
163+
if (fd = ..libc.NULL) {
164164
write "Can't open file " _ path _ "for reading", !
165165
return
166166
}
167167
168168
do argTypes.Clear()
169169
do argTypes.Insert(..gd.#POINTER)
170170
set im = ..gd.CallFunction("gdImageCreateFromPng", ..gd.#POINTER, argTypes, fd)
171-
if (im = gd.NULL) {
171+
if (im = ..gd.NULL) {
172172
write "Can't open png " _ path _ ". File may be corrupt or it does not contain PNG image", !
173173
return
174174
}
@@ -198,7 +198,7 @@
198198
199199
do argTypes.Insert(..libc.#POINTER)
200200
set fd = ..libc.CallFunction("fopen", ..libc.#POINTER, argTypes, out, wb)
201-
if (fd = libc.NULL) {
201+
if (fd = ..libc.NULL) {
202202
write "Can't open file " _ saveTo _ "for writing", !
203203
return
204204
}

tests/tests.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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-08-15 17:17:19">
2+
<Export generator="Cache" version="25" zv="Cache for Windows (x86-64) 2014.1.1 (Build 702U)" ts="2014-08-25 11:51:29">
33
<Class name="CNA.Tests">
44
<Super>%UnitTest.TestCase</Super>
55
<TimeChanged>63414,62233.33017</TimeChanged>

0 commit comments

Comments
 (0)