1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
/*
* tclUnixFile.c --
*
* This file contains wrappers around UNIX file handling functions.
* These wrappers mask differences between Windows and UNIX.
*
* Copyright (c) 1995-1998 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* RCS: @(#) $Id: tclUnixFile.c,v 1.8 1999/12/13 03:05:52 hobbs Exp $
*/
#include "tclInt.h"
#include "tclPort.h"
/*
|
|
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
/*
* tclUnixFile.c --
*
* This file contains wrappers around UNIX file handling functions.
* These wrappers mask differences between Windows and UNIX.
*
* Copyright (c) 1995-1998 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* RCS: @(#) $Id: tclUnixFile.c,v 1.9 2000/01/11 22:09:19 hobbs Exp $
*/
#include "tclInt.h"
#include "tclPort.h"
/*
|
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
|
* Side effects:
* None.
*
*----------------------------------------------------------------------
*/
int
TclpMatchFilesTypes(
Tcl_Interp *interp, /* Interpreter to receive results. */
char *separators, /* Directory separators to pass to TclDoGlob. */
Tcl_DString *dirPtr, /* Contains path to directory to search. */
char *pattern, /* Pattern to match against. */
char *tail, /* Pointer to end of pattern. Tail must
* point to a location in pattern and must
* not be static.*/
GlobTypeData *types) /* Object containing list of acceptable types.
* May be NULL. */
{
char *native, *fname, *dirName, *patternEnd = tail;
char savedChar = 0; /* lint. */
DIR *d;
Tcl_DString ds;
struct stat statBuf;
|
|
|
|
|
|
|
|
|
|
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
|
* Side effects:
* None.
*
*----------------------------------------------------------------------
*/
int
TclpMatchFilesTypes(interp, separators, dirPtr, pattern, tail, types)
Tcl_Interp *interp; /* Interpreter to receive results. */
char *separators; /* Directory separators to pass to TclDoGlob */
Tcl_DString *dirPtr; /* Contains path to directory to search. */
char *pattern; /* Pattern to match against. */
char *tail; /* Pointer to end of pattern. Tail must
* point to a location in pattern and must
* not be static. */
GlobTypeData *types; /* Object containing list of acceptable types.
* May be NULL. */
{
char *native, *fname, *dirName, *patternEnd = tail;
char savedChar = 0; /* lint. */
DIR *d;
Tcl_DString ds;
struct stat statBuf;
|
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
|
/*
* TclpMatchFiles --
*
* This function is now obsolete. Call the above function
* 'TclpMatchFilesTypes' instead.
*/
int
TclpMatchFiles(
Tcl_Interp *interp, /* Interpreter to receive results. */
char *separators, /* Directory separators to pass to TclDoGlob. */
Tcl_DString *dirPtr, /* Contains path to directory to search. */
char *pattern, /* Pattern to match against. */
char *tail) /* Pointer to end of pattern. Tail must
* point to a location in pattern and must
* not be static.*/
{
return TclpMatchFilesTypes(interp,separators,dirPtr,pattern,tail,NULL);
}
/*
*---------------------------------------------------------------------------
*
|
|
|
|
|
|
|
|
|
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
|
/*
* TclpMatchFiles --
*
* This function is now obsolete. Call the above function
* 'TclpMatchFilesTypes' instead.
*/
int
TclpMatchFiles(interp, separators, dirPtr, pattern, tail)
Tcl_Interp *interp; /* Interpreter to receive results. */
char *separators; /* Directory separators to pass to TclDoGlob */
Tcl_DString *dirPtr; /* Contains path to directory to search. */
char *pattern; /* Pattern to match against. */
char *tail; /* Pointer to end of pattern. Tail must
* point to a location in pattern and must
* not be static. */
{
return TclpMatchFilesTypes(interp,separators,dirPtr,pattern,tail,NULL);
}
/*
*---------------------------------------------------------------------------
*
|