Commit Graph

7 Commits

Author SHA1 Message Date
Zoltan Somogyi
9b6390b17e Bring the programming style of extras up to date.
extras/curs/curs.m:
extras/curs/curs.panel.m:
    Make panel a separate submodule of curs, not a nested submodule.

extras/base64/base64.m:
extras/curses/mcurses.basics.m:
extras/curses/mcurses.m:
extras/curses/mcurses.misc.m:
extras/curses/mcurses.user.m:
extras/gator/evolve.m:
extras/gator/genotype.m:
extras/gator/phenotype.m:
extras/gator/tausworthe3.m:
extras/monte/dots.m:
extras/monte/geom.m:
extras/monte/hg.m:
extras/monte/monte.m:
extras/monte/rnd.m:
extras/moose/grammar.m:
extras/moose/moose.m:
extras/mopenssl/mopenssl.m:
extras/net/echo.m:
extras/net/errno.m:
extras/net/getaddrinfo.m:
extras/net/net.m:
extras/net/netdb.m:
extras/net/sockets.m:
extras/net/streams.m:
extras/net/tcp.m:
extras/net/test_lookups.m:
extras/net/types.m:
extras/odbc/odbc.m:
extras/odbc/odbc_test.m:
extras/references/README:
extras/references/reference.m:
extras/references/scoped_update.m:
extras/solver_types/library/any.m:
extras/solver_types/library/any_array.m:
extras/solver_types/library/any_assoc_list.m:
extras/solver_types/library/any_list.m:
extras/solver_types/library/any_map.m:
extras/solver_types/library/any_tree234.m:
extras/solver_types/library/any_util.m:
extras/trail/trail.m:
extras/trailed_update/samples/interpreter.m:
extras/trailed_update/samples/vqueens.m:
extras/trailed_update/tests/var_test.m:
extras/trailed_update/tr_array.m:
extras/trailed_update/tr_store.m:
extras/trailed_update/trailed_update.m:
extras/trailed_update/unsafe.m:
extras/trailed_update/var.m:
    Bring programming style up to date.
2023-03-30 21:48:10 +11:00
Julien Fischer
c1c8654796 Delete trailing whitespace in the ODBC binding.
extras/odbc/*.m:
     As above.
2017-05-07 23:02:58 +10:00
Julien Fischer
749c6da9c7 A major cleanup of the ODBC binding. This is incorporates fixes for a number
Estimated hours taken: 6
Branches: main

A major cleanup of the ODBC binding.  This is incorporates fixes for a number
of problems pointed out by Keri Harris the other day plus some fixes for some
other problems I encountered while working on it.

Also, add support for unixODBC to the ODBC binding.

extras/odbc/odbc.m:
extras/odbc/odbc_test.m:
	Convert to four-space indentation throughout.

	Use the new foreign-language interface throughout.

	Make the type odbc.statement into a foreign_type.  This cuts
	down on the amount of casting required in the C code.

	Use '.' as a module qualifier throughout.

	Avoid unnecessary module qualification.  Rename some local predicates
	to help with this.

	Fix places where we don't conform to the C or Mercury coding
	standards.

	Add support for unixODBC.

	Don't use cast expressions as lvalues.

	Add missing character escapes.

	Avoid warnings about stat shadowing a global declaration.

extras/odbc/Mmakefile:
	Support MODBC_UNIX (unixODBC) as a legal value for MODBC_DRIVER.

	Remove a link to an old installation of iODBC.

	Add the MLLIBS options necessary for building the ODBC binding
	on Debian with either iODBC or unixODBC.  (I've left the Windows
	specific stuff intact, but I have no idea if it works or not.)
2006-04-03 06:19:55 +00:00
Julien Fischer
9fb4f15dfc Fix compilation problems in the extras distribution caused by recent
Estimated hours taken: 0.5
Branches: main

Fix compilation problems in the extras distribution caused by recent
changes.

extras/stream/stream.m:
	Provide a definition for the type stream/1.

extras/*/*.m:
	Conform to the recent changes to the standard library.
2006-03-30 01:21:20 +00:00
Simon Taylor
8d20c43319 Handle exceptions thrown by the closure passed to odbc__transaction.
Estimated hours taken: 2

Handle exceptions thrown by the closure passed to odbc__transaction.

extras/odbc/odbc.m:
	Abort the transaction if the closure throws an exception,
	and rethrow the exception to the caller.

extras/odbc/odbc_test.m:
	Add a transaction which throws an exception to the test.

extras/odbc/Mmakefile:
	Minor changes to the set-up for iODBC 2.50.3.
2000-03-21 05:39:29 +00:00
Simon Taylor
d4549c6947 Improve the ODBC interface slightly.
Estimated hours taken: 1

Improve the ODBC interface slightly.

extras/odbc/odbc.m
	Rename odbc__execute/4 as odbc__solutions/4.
	Add odbc__aggregate/6 similar to std_util:unsorted_aggregate/4.
1997-10-04 23:13:32 +00:00
Simon Taylor
0e77183b7d A cleaned up version of Mission Critical's ODBC interface.
NEWS
	Document the ODBC interface.

runtime/engine.h
runtime/engine.mod
        Add wrappers around longjmp and setjmp which save and restore
        some state in engine.c and the Mercury registers.

runtime/mercury_trail.h
	Add a macro MR_IF_USE_TRAIL which evaluates to its argument
	if MR_USE_TRAIL is defined, or to nothing otherwise.

runtime/mercury_string.h
        Add a macro make_aligned_string_copy to copy a C string
        onto the Mercury heap.

runtime/misc.c
        Avoid a seg-fault when printing out info about the nondet stack
        in a debug grade.

extras/odbc/Mmakefile
extras/odbc/odbc.m
        The interface.

extras/odbc/odbc_test.m
	A simple test.
1997-10-02 01:51:41 +00:00