/* GLIB - Library of useful routines for C programming
 * Copyright (C) 1995-1997  Peter Mattis, Spencer Kimball and Josh MacDonald
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */

/*
 * Modified by the GLib Team and others 1997-2000.  See the AUTHORS
 * file for a list of people on the GLib Team.  See the ChangeLog
 * files for a list of changes.  These files are distributed with
 * GLib at ftp://ftp.gtk.org/pub/gtk/. 
 */

#ifndef __G_LIB_H__
#define __G_LIB_H__
#pragma package <chgtk>
#pragma _ipath <glib>
#pragma package _fpath <chgtk/lib/glib>


#include <galloca.h>
#include <garray.h>
#include <gasyncqueue.h>
#include <gbacktrace.h>
#include <gcache.h>
#include <gcompat.h>
#include <gcompletion.h>
#include <gconvert.h>
#include <gdataset.h>
#include <gdate.h>
#include <gerror.h>
#include <gfileutils.h>
#include <ghash.h>
#include <ghook.h>
#include <giochannel.h>
#include <glist.h>
#include <gmacros.h>
#include <gmain.h>
#include <gmarkup.h>
#include <gmem.h>
#include <gmessages.h>
#include <gnode.h>
#include <gprimes.h>
#include <gqsort.h>
#include <gquark.h>
#include <gqueue.h>
#include <grand.h>
#include <grel.h>
#include <gscanner.h>
#include <gshell.h>
#include <gslist.h>
#include <gspawn.h>
#include <gstrfuncs.h>
#include <gstring.h>
#include <gthread.h>
#include <gthreadpool.h>
#include <gtimer.h>
#include <gtree.h>
#include <gtypes.h>
#include <gunicode.h>
#include <gutils.h>
#ifdef G_OS_WIN32
#include <gwin32.h>
#endif

#include <dlfcn.h>
typedef struct _GRealRelation      GRealRelation;
struct _GRealRelation
{
  gint fields;
  gint current_field;

  GHashTable   *all_tuples;
  GHashTable  **hashed_tuple_tables;
  GMemChunk    *tuple_chunk;

  gint count;
};

guint glib_major_version;
guint glib_minor_version;
guint glib_micro_version;
guint glib_interface_age;
guint glib_binary_age;
void *_ChGlib_handle = dlopen("libglib.dl", RTLD_LAZY);
if(_ChGlib_handle == NULL) {
   fprintf(_stderr, "Error: dlopen(): %s\n", dlerror());
   fprintf(_stderr, "       cannot get _ChGlib_handle in glib.h\n");
   exit(-1);
}
else {
    void *fptr;
    fptr = dlsym(_ChGlib_handle , "ChGlib_hInitialize");
    if(fptr == NULL) {
       fprintf(_stderr, "Error: dlsym(): ChGlib_hInitialize() in glib.h: %s\n", dlerror());
       exit(1);
    }
    dlrunfun(fptr, NULL, NULL, &glib_major_version, &glib_minor_version,
             &glib_micro_version, &glib_interface_age, &glib_binary_age);
}
void _dlclose_glib(void) {
    dlclose(_ChGlib_handle);
}
atexit(_dlclose_glib);


#endif /* __G_LIB_H__ */
