@@ -39,8 +39,8 @@ namespace ReplicationLibrary
3939
4040 public class StringTools
4141
42- .define D_32K 32768
43- .define D_32BIT_MAX 65535
42+ .define D_32K 32768
43+ .define D_32BIT_MAX 65535
4444
4545 private static b64Chars, a*, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
4646
@@ -83,7 +83,7 @@ namespace ReplicationLibrary
8383 endparams
8484
8585 stack record
86- inData ,D_HANDLE
86+ inData ,D_HANDLE
8787 inLength ,int
8888 bits24 ,strBits24
8989 endrecord
@@ -94,7 +94,7 @@ namespace ReplicationLibrary
9494 endstructure
9595
9696 structure outputLine
97- ,a76
97+ ,a76
9898 endstructure
9999
100100 proc
@@ -106,7 +106,7 @@ namespace ReplicationLibrary
106106 begin
107107 data ix ,int
108108 data setsOf4 ,int
109- data unencodedData ,D_HANDLE
109+ data unencodedData ,D_HANDLE
110110 data unencodedDataIx ,int
111111 data fillerCount ,int, 0
112112
@@ -187,8 +187,8 @@ namespace ReplicationLibrary
187187 inData = %mem_proc(DM_FREE,inData)
188188
189189 ;mreturn HandleToString(unencodedData)
190- mreturn %string_from_handle(unencodedData)
191- end
190+ mreturn %string_from_handle(unencodedData)
191+ end
192192 else
193193 mreturn ""
194194
@@ -219,7 +219,7 @@ namespace ReplicationLibrary
219219 ;;(which will be either 2 bits or 4 bits), then that will
220220 ;;equate to either 1 or 2 extra "Filler" characters needed at
221221 ;;the end of the data.
222- data encodedData ,D_HANDLE
222+ data encodedData ,D_HANDLE
223223 data bits24 ,strBits24
224224 data setsOf3 ,int ,inLength/3
225225 data remainingChars ,int ,inLength-(setsOf3*3)
@@ -292,16 +292,16 @@ namespace ReplicationLibrary
292292 ^m(str1byte[b64ctr+=1],encodedData) = b64Chars(65:1)
293293
294294 if (addLineBreaks&&((b64LineLength+=4)==76))
295- begin
296- ^m(str1byte[b64ctr+=1],encodedData) = %char(13)
297- ^m(str1byte[b64ctr+=1],encodedData) = %char(10)
298- b64LineLength = 0
299- end
295+ begin
296+ ^m(str1byte[b64ctr+=1],encodedData) = %char(13)
297+ ^m(str1byte[b64ctr+=1],encodedData) = %char(10)
298+ b64LineLength = 0
299+ end
300300 end
301301
302302 ;;Turn the memory handle into a string and return the data
303- ;mreturn HandleToString(encodedData)
304- mreturn %string_from_handle(encodedData)
303+ ;mreturn HandleToString(encodedData)
304+ mreturn %string_from_handle(encodedData)
305305 end
306306 else
307307 mreturn ""
@@ -316,7 +316,7 @@ namespace ReplicationLibrary
316316 ;;; <param name="addLineBreaks">Add line breaks after every 76th character.</param>
317317 ;;; <returns>Base64 encoded data.</returns>
318318 public static method Base64EncodeHandle, string
319- required in dataToEncode ,D_HANDLE
319+ required in dataToEncode ,D_HANDLE
320320 required in addLineBreaks ,boolean
321321 endparams
322322
@@ -333,7 +333,7 @@ namespace ReplicationLibrary
333333 ;;(which will be either 2 bits or 4 bits), then that will
334334 ;;equate to either 1 or 2 extra "Filler" characters needed at
335335 ;;the end of the data.
336- data encodedData ,D_HANDLE
336+ data encodedData ,D_HANDLE
337337 data bits24 ,strBits24
338338 data setsOf3 ,int ,inLength/3
339339 data remainingChars ,int ,inLength-(setsOf3*3)
@@ -402,19 +402,19 @@ namespace ReplicationLibrary
402402 else
403403 ^m(str1byte[b64ctr+=1],encodedData) = b64Chars(65:1)
404404
405- ^m(str1byte[b64ctr+=1],encodedData) = b64Chars(65:1)
405+ ^m(str1byte[b64ctr+=1],encodedData) = b64Chars(65:1)
406406
407- if (addLineBreaks&&((b64LineLength+=4)==76))
408- begin
409- ^m(str1byte[b64ctr+=1],encodedData) = %char(13)
410- ^m(str1byte[b64ctr+=1],encodedData) = %char(10)
411- b64LineLength = 0
412- end
407+ if (addLineBreaks&&((b64LineLength+=4)==76))
408+ begin
409+ ^m(str1byte[b64ctr+=1],encodedData) = %char(13)
410+ ^m(str1byte[b64ctr+=1],encodedData) = %char(10)
411+ b64LineLength = 0
412+ end
413413 end
414414
415415 ;;Turn the memory handle into a string and return the data
416416 ;mreturn HandleToString(encodedData)
417- mreturn %string_from_handle(encodedData)
417+ mreturn %string_from_handle(encodedData)
418418 end
419419 else
420420 mreturn ""
@@ -427,12 +427,12 @@ namespace ReplicationLibrary
427427 ;;; <param name="handleIn">Memory handle to be copied.</param>
428428 ;;; <param name="handleOut">Memory handle containing copy of data.</param>
429429 public static method CopyHandle, void
430- required in handleIn ,D_HANDLE
431- required out handleOut ,D_HANDLE
430+ required in handleIn ,D_HANDLE
431+ required out handleOut ,D_HANDLE
432432 endparams
433433
434434 structure chunk
435- ,a D_32K
435+ ,a D_32K
436436 endstructure
437437
438438 stack record
@@ -488,7 +488,7 @@ namespace ReplicationLibrary
488488 ;;Copy remaining characters
489489 if (characters)
490490 ^m(chunk[blocks+1](1:characters),handleOut)
491- & = ^m(chunk[blocks+1](1:characters),handleIn)
491+ & = ^m(chunk[blocks+1](1:characters),handleIn)
492492 end
493493
494494 mreturn
@@ -497,7 +497,7 @@ namespace ReplicationLibrary
497497
498498 public static method FileToHandle, boolean
499499 required in fileSpec ,string
500- required out fileData ,D_HANDLE
500+ required out fileData ,D_HANDLE
501501 endparams
502502
503503 stack record
@@ -506,7 +506,7 @@ namespace ReplicationLibrary
506506 endrecord
507507
508508 structure block
509- ,a D_32K
509+ ,a D_32K
510510 endstructure
511511
512512 proc
@@ -515,12 +515,12 @@ namespace ReplicationLibrary
515515 ;;Open the input file
516516 try
517517 begin
518- .ifdef OS_VMS
518+ .ifdef OS_VMS
519519 open(ch=0,i,fileSpec,OPTIONS:"/stream")
520- .else
521- open(ch=0,i,fileSpec)
522- .endc
523- end
520+ .else
521+ open(ch=0,i,fileSpec)
522+ .endc
523+ end
524524 catch (ex)
525525 begin
526526 ok = false
@@ -543,11 +543,11 @@ namespace ReplicationLibrary
543543 ;;Read data from file in "block size" chunks
544544 try
545545 begin
546- repeat
547- begin
548- ;reads(ch,^m(block[blocks+=1],fileData))
549- gets(ch,^m(block[blocks+=1],fileData))
550- end
546+ repeat
547+ begin
548+ ;reads(ch,^m(block[blocks+=1],fileData))
549+ gets(ch,^m(block[blocks+=1],fileData))
550+ end
551551 end
552552 catch (ex, @EndOfFileException)
553553 begin
@@ -572,15 +572,15 @@ namespace ReplicationLibrary
572572
573573 stack record
574574 ok ,boolean
575- dataHandle ,D_HANDLE
575+ dataHandle ,D_HANDLE
576576 endrecord
577577
578578 proc
579579
580580 if (ok = StringTools.FileToHandle(fileSpec,dataHandle))
581581 begin
582- ;dataString = HandleToString(dataHandle)
583- dataString = %string_from_handle(dataHandle)
582+ ;dataString = HandleToString(dataHandle)
583+ dataString = %string_from_handle(dataHandle)
584584 dataHandle = %mem_proc(DM_FREE,dataHandle)
585585 end
586586
@@ -589,7 +589,7 @@ namespace ReplicationLibrary
589589 endmethod
590590
591591 public static method HandleToFile, boolean
592- required in inHandle ,D_HANDLE
592+ required in inHandle ,D_HANDLE
593593 required in fileSpec ,string
594594 endparams
595595
@@ -599,7 +599,7 @@ namespace ReplicationLibrary
599599 endrecord
600600
601601 structure block
602- ,a D_32K
602+ ,a D_32K
603603 endstructure
604604
605605 proc
0 commit comments