Files
harbour-core/harbour/samples/hscript/dir.hs
Viktor Szakats 72526bc283 2007-10-27 01:23 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* include/hbsetup.h
     - Removed HOST_OS_UNIX_COMPATIBLE which was a misleading 
       alias for OS_UNIX_COMPATIBLE.

   * source/compiler/hbcomp.c
     % HOST_OS_UNIX_COMPATIBLE -> OS_UNIX_COMPATIBLE

   * common.mak
   * harbour-ce-spec
   * make_xmingw.sh
   * make_xmingwce.sh
   * makefile.bc
   * makefile.gc
   * makefile.vc
   * source/pp/Makefile
   - source/pp/ppgen.c
   + source/pp/hbppgen.c
     ! executable ppgen renamed to hbppgen.

   * samples/pe/editorlo.c
   * samples/pe/pe.prg
   + samples/pe/bld_b32.bat
     + Added BCC build batch file.
     ! Fixed to compile under current Harbour.
     ! Fixed filename casing.
     ! Fixed several warnings (quite some signedness problem still remain).
     ; This is a very nice editor written in C (Harbour callable),
       I think it is the work of Ryszard.

   * samples/hscript/bld_b32.bat
   * samples/hscript/hscript.prg
   * samples/hscript/dir.hs
   * samples/hscript/multiply.hs
   * samples/hscript/ugly.hs
   * samples/hscript/hello.hs
     ! Fixed build batch file.
     ! Fixed to use NFLib file IO rather than libmisc, because 
       latter was broken (it is a clone of the NFLib file IO).
     ! Fixed scripts to use Start instead of Main as an entry 
       point otherwise __hrbRun() got confused and called the 
       app Main().
     ! Fixed some other problems to make it run.
2007-10-26 23:26:59 +00:00

51 lines
887 B
Haskell

<%
/*
* Written by Felipe Coury <fcoury@flexsys-ci.com>
* www - http://www.harbour-project.org
*
*/
FUNCTION Start()
LOCAL aDir := directory( "c:\*.*" )
LOCAL i
IF !empty( GetEnv( "SERVER_NAME" ) )
OutStd( "HTTP/1.0 200 OK" + chr(10) )
OutStd( "CONTENT-TYPE: TEXT/HTML" + chr(10) + chr(10) )
ENDIF
aSort( aDir,,, { |x, y| x[1] < y[1] } )
%>
<HTML>
<HEAD><TITLE>dir.hs - HarourScript demo of active context</TITLE></HEAD>
<BODY>
<TABLE border=1>
<TR>
<TD><B>File Name</B></TD>
<TD><B>Size</B></TD>
<TD><B>Date</B></TD>
<TD><B>Time</B></TD>
<TD><B>Attributes</B></TD>
</TR>
<%
FOR i := 1 TO len( aDir )
%>
<TR>
<TD><% OutStd( aDir[i,1] ) %></TD>
<TD><% OutStd( aDir[i,2] ) %></TD>
<TD><% OutStd( aDir[i,3] ) %></TD>
<TD><% OutStd( aDir[i,4] ) %></TD>
<TD><% OutStd( aDir[i,5] ) %></TD>
</TR>
<%
NEXT
%>
</TABLE>
</BODY>
</HTML>
<%
RETURN( NIL )
%>