/*
* tclFHandle.c --
*
* This file contains functions for manipulating Tcl file handles.
*
* Copyright (c) 1995 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* SCCS: @(#) tclFHandle.c 1.8 96/06/27 15:31:34
*/
#include "tcl.h"
#include "tclInt.h"
#include "tclPort.h"
/*
* The FileHashKey structure is used to associate the OS file handle and type
* with the corresponding notifier data in a FileHandle.
*/
typedef struct FileHashKey {
} FileHashKey;
typedef struct FileHandle {
} FileHandle;
/*
* Static variables used in this file:
*/
/*
* Static procedures used in this file:
*/
/*
*----------------------------------------------------------------------
*
* Tcl_GetFile --
*
* This function retrieves the file handle associated with a
* platform specific file handle of the given type. It creates
* a new file handle if needed.
*
* Results:
* Returns the file handle associated with the file descriptor.
*
* Side effects:
* Initializes the file handle table if necessary.
*
*----------------------------------------------------------------------
*/
int type; /* Type of file handle. */
{
int new;
if (!initialized) {
initialized = 1;
}
if (new) {
}
}
/*
*----------------------------------------------------------------------
*
* Tcl_FreeFile --
*
* Deallocates an entry in the file handle table.
*
* Results:
* None.
*
* Side effects:
* None.
*
*----------------------------------------------------------------------
*/
void
{
/*
* Invoke free procedure, then delete the handle.
*/
}
/*
* Tcl_File structures may be freed as a result of running the
* channel table exit handler. The file table is freed by the file
* table exit handler, which may run before the channel table exit
* handler. The file table exit handler sets the "initialized"
* variable back to zero, so that the Tcl_FreeFile (when invoked
* from the channel table exit handler) can notice that the file
* table has already been destroyed. Otherwise, accessing a
* deleted hash table would cause a panic.
*/
if (initialized) {
if (entryPtr) {
}
}
}
/*
*----------------------------------------------------------------------
*
* Tcl_GetFileInfo --
*
* This function retrieves the platform specific file data and
* type from the file handle.
*
* Results:
* If typePtr is not NULL, sets *typePtr to the type of the file.
* Returns the platform specific file data.
*
* Side effects:
* None.
*
*----------------------------------------------------------------------
*/
int *typePtr;
{
if (!handlePtr)
return 0;
if (typePtr) {
}
}
/*
*----------------------------------------------------------------------
*
* Tcl_SetNotifierData --
*
* This function is used by the notifier to associate platform
* specific notifier information and a deletion procedure with
* a file handle.
*
* Results:
* None.
*
* Side effects:
* Updates the data and delProc slots in the file handle.
*
*----------------------------------------------------------------------
*/
void
{
}
/*
*----------------------------------------------------------------------
*
* Tcl_GetNotifierData --
*
* This function is used by the notifier to retrieve the platform
* specific notifier information associated with a file handle.
*
* Results:
* Returns the data stored in a file handle by a previous call to
* Tcl_SetNotifierData, and places a pointer to the free proc
* in the location referred to by procPtr.
*
* Side effects:
* None.
*
*----------------------------------------------------------------------
*/
{
}
}
/*
*----------------------------------------------------------------------
*
* FileExitProc --
*
* This function an exit handler that frees any memory allocated
* for the file handle table.
*
* Results:
* None.
*
* Side effects:
* Cleans up the file handle table.
*
*----------------------------------------------------------------------
*/
static void
{
initialized = 0;
}