* src/pp/ppcore.c
* src/pp/pplib.c
* some uncrustify formattings applied
* tests/testbrw.prg
* website/samples/testbrw.prg.html
* cleanup
* website/menu/harbour-menu.js
! fixed menu links to work when used under a subdir
* website/samples/array16.prg.html
* website/samples/arreval.prg.html
* website/samples/begin.prg.html
* website/samples/byref.prg.html
* website/samples/codebl.prg.html
* website/samples/codebloc.prg.html
* website/samples/dates3.prg.html
* website/samples/foreach.prg.html
* website/samples/hello.prg.html
* website/samples/initexit.prg.html
* website/samples/longdev.prg.html
* website/samples/mousetst.prg.html
* website/samples/onidle.prg.html
* website/samples/osshell.prg.html
* website/samples/parseini.prg.html
* website/samples/switch.prg.html
* website/samples/testbrdb.prg.html
* website/samples/testbrw.prg.html
* website/samples/testhtml.prg.html
* website/samples/testidle.prg.html
* website/samples/tstmacro.prg.html
* enabled light mode to disable gutter, so now
the code can be copy pasted easily
61 lines
2.0 KiB
HTML
61 lines
2.0 KiB
HTML
<!DOCTYPE html>
|
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/xregexp/2.0.0/xregexp-min.js"></script>
|
|
<script type="text/javascript" src="http://www.xregexp.com/addons/backcompat.js"></script>
|
|
<script type="text/javascript" src="/js/shCore.js"></script>
|
|
<script type="text/javascript" src="/js/shBrushHarbour.js"></script>
|
|
<link href="/css/shCore.css" rel="stylesheet" type="text/css" />
|
|
<link href="/css/shThemeDefault.css" rel="stylesheet" type="text/css" />
|
|
<script type="text/javascript">SyntaxHighlighter.all()</script>
|
|
</head>
|
|
<body>
|
|
|
|
<script type="syntaxhighlighter" class="brush: harbour; light: true"><![CDATA[
|
|
|
|
// Testing Harbour long string handling with device output.
|
|
|
|
/* Harbour Project source code
|
|
http://harbour-project.org/
|
|
Donated to the public domain on 2001-03-08 by David G. Holm <dholm jsd-llc com>
|
|
*/
|
|
|
|
PROCEDURE Main()
|
|
|
|
LOCAL cShort := "1234567890"
|
|
LOCAL i, cLong, cBuffer, nHandle
|
|
|
|
// Create an 80 KB string (Clipper is limited to 64 KB).
|
|
cLong := cShort
|
|
FOR i := 1 TO 13
|
|
cLong += cLong
|
|
NEXT
|
|
|
|
// Write the long string to file long_str.prn
|
|
SET PRINTER TO long_str
|
|
SET DEVICE TO PRINTER
|
|
DevOut( cLong )
|
|
SET PRINTER OFF
|
|
SET DEVICE TO SCREEN
|
|
|
|
// Confirm the string length and that a copy is exactly identical.
|
|
? "The length of the long string is", iif( Len( cLong ) == 80 * 1024, "correct", "wrong" )
|
|
cBuffer := cLong
|
|
? "The length of a copy of the long string is", iif( Len( cLong ) == 80 * 1024, "correct", "wrong" )
|
|
? "The copy of the long string is", iif( cLong == cBuffer, "equal", "not equal" ), "to the long string"
|
|
|
|
// Read the string back in and compare it to the original.
|
|
nHandle := FOpen( "long_str.prn" )
|
|
cBuffer := FReadStr( nHandle, 90000 )
|
|
? "Original:", Len( cLong )
|
|
? "From file:", Len( cBuffer )
|
|
? "The strings are", iif( cLong == cBuffer, "equal", "not equal" )
|
|
|
|
RETURN
|
|
|
|
]]></script>
|
|
|
|
</body>
|
|
</html>
|