Main Page   Modules   Alphabetical List   Data Structures   File List   Data Fields   Globals   Related Pages  

workspace.c File Reference

Workspace manager to load and save the applications state. More...

#include "../config.h"
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "buf.h"
#include "guiapi.h"
#include "queries.h"
#include "luaif.h"
#include "workspace.h"

Include dependency graph for workspace.c:

Include dependency graph

Go to the source code of this file.

Defines

#define CR_CHAR   '\\'
 Character to map CR's in the SQL to.


Functions

void map_chars (char *sql, char c1, char c2)
 Replace all of the 'c1' chars in txt to 'c2'.

void ws_load_file (char *fn)
 Load a workspace from a file.

int ws_save_file (char *fn)
 Save the workspace to a file.


Detailed Description

Workspace manager to load and save the applications state.

Author:
Darryl Luff

Definition in file workspace.c.


Function Documentation

void ws_load_file char *    fn
 

Load a workspace from a file.

Sets up the workspace variable, and loads the queries, but does NOT disconnect the old database.

Parameters:
fn  The filename to open.

Definition at line 70 of file workspace.c.

References luaif_runfile().

Referenced by gui_get_workspace().

int ws_save_file char *    fn
 

Save the workspace to a file.

Parameters:
fn  The filename to save the file to.
Returns:
An integer error code. -1 = error opening file. 0 = success.

Definition at line 84 of file workspace.c.

References _a_buf::b_dat, buf_free(), buf_new(), buf_strcat(), buf_strcpy(), cfg_get_default_wsname(), gui_connection_ok(), gui_get_connection_url(), map_chars(), and query_get_text_no().


Generated on Sun May 9 19:19:26 2004 for GtkSQL by doxygen1.2.18