Node:Internal structure of kort program, Next:, Previous:Database structure, Up:Top



Internal structure of kort program

Chaos reigns within.
Reflect, repent, and reboot.
Order shall return.1
Err..there is no solutions, there is only adaptation to current situation.

Kort is written in the Objective C language with very little emphasis in object orientation. The data structures of previous version of kort were turned into objc classes with a few protocol classes thrown in. Internal workings are very much the same as in previous version altough the syntax is now very different. Most significant change is that because ncurses form library could not be used for unicode input/output it has been replaced with a non-forms ncurses implementation. Forms library is not linked in any more. Replacement for ncurses forms resides for most parts in files that begin with ciroucset_* and it is used in same manner as original ncurses forms but again, syntax is very different. This form-code stuff is also written in objective c. Most important parts of the program are described here:
Class record_t contains record definitions. For most part naming in record_t is assumed self-explanatory, with the following exceptions:
Kort code is somewhat commented and there is a more-up-to-date listing of kort structure available from http://muikku.katiska.org/kort/documentation-0.03/doxygen_generated/index.html and it should documents details ; I'll try to explain those parts not clearly visible from code in this page.

Compiling kort

Kort is for most part done in Objective C. "gcc -Wall" doesn't produce serious complaints so in current incarnation the syntax of kort might conform to objective c syntax somewhat. Parser is written in yacc+lex so you'll need those; actually bison+flex was used but syntax should be the same. Bison versions earlier than 1.75 do not work, at least 1.75 is required. Of course thingies that kort tries to glue together must be present. At least one version combination that is known to compile is this:


Depending on your setup you may need to change libraries in Makefile. You'll need to link at least -lncursesw -lmysqlclient -lfl -ltcl -lm -ldl -lz -lobjc -ltre. Basic stuff is ncursesw,mysqlclient and tcl. Flex needs -lfl. Mysqlclient seems to require -lz. TCL seems to require -lm and -ldl, at least in Linux. In some systems you'll propably need to include -lgen -lnls -lc but that may have been at times long gone. These libraries may be at perverse locations, as you know. Basically same applies to #include-files so you'll may end up adding -I/dir/ectory -entries to CFLAGS. Have phun :-)

Footnotes

  1. Who would not love Suzie Wagner?

  2. Kicks some serious ass.