first stab at loading the register

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@432 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Linas Vepstas 1998-01-14 10:35:37 +00:00
parent 0a01561666
commit d50d3f9191
2 changed files with 18 additions and 3 deletions

View File

@ -3,7 +3,7 @@ srcdir = .
CC = gcc
INCLPATH = -I/usr/include \
-I/usr/X11R6/include/. \
-I./../include \
-I./../../include \
-I./../lib/ComboBox-1.33 \
-I./../lib/XmHTML-1.1.0/src \
-I./../../lib/Xbae-4.6.2-linas
@ -18,16 +18,16 @@ LFLAGS = -O2
LIBS = -lXpm -lXm -lXmu -lXt -lXext -lSM -lICE -lX11 -lm
LIBPATH = -L/lib -L/usr/lib -L/usr/X11R6/lib/.
TARGET = demo
STATIC = xacc-static
# LIBHTMLW = ../lib/libhtmlw/libhtmlw.a
LIBXMHTML= ../lib/XmHTML-1.1.0/src/libXmHTML.a
LIBXBAE = ../../lib/Xbae-4.6.2-linas/libXbae.a
LIBCOMBO = ../lib/ComboBox-1.33/libComboBox.a
LIBTRANS = ../Account.o ../Data.o ../FileIO.o ../Transaction.o ../date.o
######################################################################
SRCS = basiccell.c cellblock.c datecell.c main.c pricecell.c \
recncell.c register.c table.c textcell.c
OBJS = ${SRCS:.c=.o} $(LIBXBAE)
OBJS = ${SRCS:.c=.o} $(LIBTRANS) $(LIBXBAE)
######################################################################
default: $(TARGET)

View File

@ -3,14 +3,25 @@
#include <Xm/Form.h>
#include <Xm/MainW.h>
#include "FileIO.h"
#include "register.h"
void
xaccLoadRegister (BasicRegister *reg, Account *acc)
{
printf ("its %s \n", acc->accountName);
}
/* ================================= */
int loglevel = 1;
main (int argc, char *argv[]) {
Widget toplevel, mainwindow, actionform;
XtAppContext app;
BasicRegister *reg;
AccountGroup * grp;
toplevel = XtVaAppInitialize( &app, "Xacc", NULL, 0,
@ -27,8 +38,12 @@ main (int argc, char *argv[]) {
xmFormWidgetClass, mainwindow,
NULL );
grp = xaccReadData ("../../data/test4.xac");
reg = xaccMallocBasicRegister ();
xaccLoadRegister (reg, grp->account[0]);
xaccCreateTable (reg->table, actionform, "yodudue");
XtManageChild (actionform);