/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* This file is distributed subject to a Software License Agreement found
* in the file LICENSE that is included with this distribution. 
\*************************************************************************/

/*
 * $Log: not supported by cvs2svn $
 * Revision 1.3  2003/08/08 20:44:44  soliday
 * Updated code so that this is a dynamically loadable extension.
 *
 * Revision 1.2  2002/08/14 20:44:48  soliday
 * Added Open License
 *
 * Revision 1.1  1999/06/10 19:45:06  soliday
 * Moved to oag tree.
 *
 * Revision 1.14  1999/06/08 21:18:49  soliday
 * Removed compiler warnings under Linux.
 *
 * Revision 1.13  1999/05/13 14:41:54  soliday
 * Added load and save commands
 *
 * Revision 1.12  1999/04/08 15:27:39  soliday
 * Added getDescription and setDescription
 *
 * Revision 1.11  1999/03/12 16:05:56  soliday
 * Added tclSDDSConvert
 *
 * Revision 1.10  1999/03/11 14:38:32  soliday
 * Added tclSDDSExpand
 *
 * Revision 1.9  1999/03/10 21:12:56  soliday
 * Added tclSDDSCollapse
 *
 * Revision 1.8  1999/03/10 16:55:09  soliday
 * Added tclSDDSCheck
 *
 * Revision 1.7  1999/03/09 16:42:46  soliday
 * Added getRowCount
 *
 * Revision 1.6  1997/05/19 16:07:18  borland
 * Increased size of string items to 8192 characters.
 *
 * Revision 1.5  1997/02/16 19:38:28  saunders
 * Added getColumnInformation, getParameterInformation, getArrayInformation
 * commands.
 *
 * Revision 1.4  1996/12/10 16:40:39  saunders
 * Added getArray command.
 *
 * Revision 1.3  1996/12/09 22:23:54  saunders
 * Complete set of SDDS write commands added.
 *
 * Revision 1.2  1996/08/29 15:25:48  saunders
 * Initial release with open/close/getColumn/getParameter/getNames.
 *
 * Revision 1.1  1996/08/28 21:27:02  saunders
 * Initial prototype sdds extension for tcl.
 * */

#include <stdio.h>
#include <string.h>
#include <tcl.h>
#include <SDDS.h>

#define MAX_OPEN_SDDS_FILES 20
#define SDDS_ERROR_MODE (SDDS_VERBOSE_PrintErrors|SDDS_LAST_GetErrorMessages)
#define tclSDDS_BUFSIZE 8192

/***********************/
/* Function Prototypes */
/***********************/
int tclSDDSInit(Tcl_Interp *interp);
int tclSDDSOpen(Tcl_Interp *interp, int argc, char *argv[]);
int tclSDDSClose(Tcl_Interp *interp, int argc, char *argv[]);
int tclSDDSGetRowCount(Tcl_Interp *interp, int argc, char *argv[]);
int tclSDDSGetDescription(Tcl_Interp *interp, int argc, char *argv[]);
int tclSDDSGetColumn(Tcl_Interp *interp, int argc, char *argv[]);
int tclSDDSGetColumnInformation(Tcl_Interp *interp, int argc, char *argv[]);
int tclSDDSGetParameter(Tcl_Interp *interp, int argc, char *argv[]);
int tclSDDSGetParameterInformation(Tcl_Interp *interp, int argc, char *argv[]);
int tclSDDSGetNames(Tcl_Interp *interp, int argc, char *argv[]);
int tclSDDSGetUnits(Tcl_Interp *interp, int argc, char *argv[]);
int tclSDDSGetArray(Tcl_Interp *interp, int argc, char *argv[]);
int tclSDDSGetArrayInformation(Tcl_Interp *interp, int argc, char *argv[]);
int tclSDDSDefineColumn(Tcl_Interp *interp, int argc, char *argv[]);
int tclSDDSDefineParameter(Tcl_Interp *interp, int argc, char *argv[]);
int tclSDDSDefineArray(Tcl_Interp *interp, int argc, char *argv[]);
int tclSDDSStartPage(Tcl_Interp *interp, int argc, char *argv[]);
int tclSDDSWritePage(Tcl_Interp *interp, int argc, char *argv[]);
int tclSDDSWriteLayout(Tcl_Interp *interp, int argc, char *argv[]);
int tclSDDSSetDescription(Tcl_Interp *interp, int argc, char *argv[]);
int tclSDDSSetParameter(Tcl_Interp *interp, int argc, char *argv[]);
int tclSDDSSetArray(Tcl_Interp *interp, int argc, char *argv[]);
int tclSDDSSetRowValues(Tcl_Interp *interp, int argc, char *argv[]);
int tclSDDSSetColumn(Tcl_Interp *interp, int argc, char *argv[]);
int tclSDDSCheck(Tcl_Interp *interp, int argc, char *argv[]);
int tclSDDSCollapse(Tcl_Interp *interp, int argc, char *argv[]);
int tclSDDSExpand(Tcl_Interp *interp, int argc, char *argv[]);
int tclSDDSConvert(Tcl_Interp *interp, int argc, char *argv[]);
int tclSDDSLoad(Tcl_Interp *interp, int argc, char *argv[]);
int tclSDDSSave(Tcl_Interp *interp, int argc, char *argv[]);
