Files
harbour-core/harbour/contrib/hbnf/chdir.c
Viktor Szakats 8fc1cbd0c3 2008-08-25 23:30 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* doc/cmdline.txt
   * doc/hrb_faq.txt
   * doc/en/cmdline.txt
   * doc/en/dir.txt
   * doc/en/file.txt
   * doc/en/set.txt
   * doc/es/cmdline.txt
   * doc/es/dir.txt
   * doc/es/file.txt
   * doc/whatsnew.txt
   * contrib/hbct/disk.c
   * contrib/hbodbc/odbc.txt
   * contrib/hbwhat32/whtmapi.c
   * contrib/hbwhat32/whtsys.c
   * contrib/hbwhat32/whtinet.c
   * contrib/hbziparch/hbziparc.c
   * contrib/hbnf/chdir.c
   * contrib/hbnf/tempfile.prg
   * contrib/hbnf/ftisprn.c
   * contrib/hbnf/getenvrn.c
   * contrib/hbnf/mkdir.c
   * contrib/hbnf/rmdir.c
   * contrib/hbpgsql/readme.txt
   * contrib/hbclipsm/environ.c
   * contrib/hbclipsm/tests/testenv.prg
   * contrib/hbgd/tests/gdtest.prg
   * contrib/hbgd/tests/test_out.prg
   * contrib/hbgd/tests/gdtestcl.prg
   * contrib/hbgd/tests/testdpi.prg
   * contrib/hbgd/tests/counter.prg
   * contrib/hbtip/thtml.prg
   * contrib/hbvpdf/hbvpdf.prg
   * contrib/hbvpdf/tests/pdf_demo.prg
   * contrib/hbvpdf/hbvpdft.prg
   * contrib/examples/guestbk/guestbk.prg
   * contrib/examples/pe/editorlo.c
   * utils/hbdoc/genos2.prg
   * utils/hbdoc/hbdoc.prg
   * utils/hbmake/hbmake.prg
     ! Filename casing fixes. (nothing critical)
2008-08-25 21:36:00 +00:00

88 lines
2.0 KiB
C

/*
* $Id$
*/
/* File......: chdir.asm
* Author....: Ted Means
* CIS ID....: 73067,3332
*
* This is an original work by Ted Means and is placed in the
* public domain.
*
* Modification history:
* ---------------------
*
* Rev 1.2 15 Aug 1991 23:07:20 GLENN
* Forest Belt proofread/edited/cleaned up doc
*
* Rev 1.1 14 Jun 1991 19:54:20 GLENN
* Minor edit to file header
*
* Rev 1.0 01 Apr 1991 01:03:10 GLENN
* Nanforum Toolkit
*
*/
/* $DOC$
* $FUNCNAME$
* FT_CHDIR()
* $CATEGORY$
* DOS/BIOS
* $ONELINER$
* Change the current directory
* $SYNTAX$
* FT_CHDIR( <cDirName> ) -> nResult
* $ARGUMENTS$
* <cDirName> is the name of the desired directory.
* $RETURNS$
* 0 if successful
* 3 if path not found
* 99 if invalid parameters passed
* $DESCRIPTION$
* Use this function if you prefer to change the active directory
* instead of relying on the SET PATH command.
*
* The source code is written to adhere to Turbo Assembler's IDEAL mode.
* To use another assembler, you will need to rearrange the PROC and
* SEGMENT directives, and also the ENDP and ENDS directives (a very
* minor task).
* $EXAMPLES$
* FT_CHDIR( "C:\clipper" )
* FT_CHDIR( "\" )
* FT_CHDIR( "..\source" )
* $END$
*/
/*This is the Original FT_CHDIR() code
IDEAL
MODEL HUGE
Public _HB_FUN_FT_CHDIR
Extrn _hb_ftdir:Far
Segment _NanFor Word Public "CODE"
Assume CS:_NanFor
Proc _HB_FUN_FT_CHDIR Far
Mov AH,3Bh * DOS service -- change directory
Push AX * Save on stack
Call _hb_ftdir * Call generic directory routine
Add SP,2 * Realign stack
RetF
Endp _HB_FUN_FT_CHDIR
Ends _NanFor
End
*/
/* This is the New one Rewriten in C*/
#include "hbapi.h"
#include "hbapifs.h"
HB_FUNC( FT_CHDIR)
{
hb_retl( ISCHAR( 1 ) && hb_fsChDir( ( BYTE * ) hb_parc(1) ) );
}