Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 91bcabdccb824ec72a416086efeaaf0e > files > 17

adime-devel-2.2.1-10.fc15.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><head><title>
Upgrading from Dime to Adime
</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head><body bgcolor=white text=black link="#0000ee" alink="#ff0000" vlink="#551a8b">
<pre>

                              _      _ _
                             /_\  __| (_)_ __  ___
                            / _ \/ _` | | '  \/ -_)
                           /_/ \_\__,_|_|_|_|_\___|

                           Allegro Dialogs Made Easy

                          Upgrading from Dime to Adime

                          http://adime.sourceforge.net/

                               by Sven Sandberg


</pre>

<p>
<h1><a name="What's This?">What's This?</a></h1>

<p>
This file describes in detail everything you may need to do in order
to upgrade a program written for Dime 1.2.4 or earlier, so that it
uses Adime 2.0.0 or later.

<p>
The reason why I decided to prefix functions is that this is good
coding practice: It avoids potential conflicts with other libraries
that use the same identifier names. The reason why I had to change the
name of the library from Dime to Adime is that there is another
library called Dime (which is bigger and has been around longer) so it
caused a conflict.



<p><br>
<h1><a name="How to Upgrade a Program">How to Upgrade a Program</a></h1>

<p>
First replace `#include &lt;dime.h&gt;' by `#include &lt;adime.h&gt;' in all your
source files.

<p>
The most obvious difference now is that all identifiers are prefixed
with <tt>`adime_'</tt>. You will get compiler errors, and the fix is usually
obvious. But there are a couple of subtle differences that you may
encounter:

<p>
"%bool[]": This now uses 0 for off and 1 for on. It used to be nonzero
for on, but passing anything else than 0 or 1 is now an error.

<p>
"%filename[]" and "%string[]": These used to require a modifier
specifying the maximum number of characters in the string. This has
been changed: it now specifies the maximum number of bytes that these
characters may occupy. These numbers are different in general because
a Unicode character can occupy more than one byte.

<p>
`vdialogf()' and "%vdialogf[]": These now take an <tt>`adime_va_list'</tt> as
parameter instead of a <tt>`va_list'</tt>. An <tt>`adime_va_list'</tt> is just like a
<tt>`va_list'</tt>, but is represented in a way that is more convenient for
Adime.  You can use `adime_va_start()', `adime_va_arg()', and
`adime_va_end()' just like you use `va_start()', `va_arg()', and
`va_end()', except for one difference: If you pass an <tt>`adime_va_list'</tt>
to another function, and this function reads from it using
`adime_va_arg()', then the position to read from will have advanced
also in the calling function.

<p>
The internal way of defining a format has changed, so if you were
doing this yourself you need to rewrite parts of the code. This is
considered advanced though, so read internal.txt.

<p>
You may also want to uninstall Dime. You can do this by running "make
uninstall" from Dime's (not Adime's!) directory. You can also do it
manually by removing the files libdime.a and libdimed.a from your
system's library directory, dime.h and dime/*.h from your system's
include directory.  Under djgpp you also need to remove
djgpp/info/dime.inf or djgpp/info/dime.info.


</body>
</html>