Search the web
Sign In
New User? Sign Up
amithlondev · Amithlon-Dev
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Messages 278 - 312 of 313   Newest  |  < Newer  |  Older >  |  Oldest
Messages: Show Message Summaries   (Group by Topic) Sort by Date v  
#312 From: "tbsilvey@..." <tbsilvey@...>
Date: Tue Jul 5, 2005 11:13 pm
Subject: Re: Re: Proposed Group closure
sandbags.geo
Offline Offline
Send Email Send Email
 
>I will be expecting those members who are interested in moving over
>to apply for membership themselves. The group is at:

Ok, fair enough. See you there.

Troy


___________________________________________________________________
Get Juno Platinum for as low as $6.95/month!
Unlimited Internet Access with 250MB of Email Storage.
Visit http://www.juno.com/bestoffer to sign up today!

#311 From: Dimitrios Kalogeropoulos <jimkalog2003@...>
Date: Tue Jul 5, 2005 9:33 pm
Subject: ÈÝìá: Proposed Group closure
jimkalog2003
Offline Offline
Send Email Send Email
 
hello,
 
no problem with us!!!!
 
proceed.
 
amiga lives...>>>>>>

Bill Hoggett <bill_hoggett@...> Ýãñáøå:
Hi folks,

Does anyone still read this group?  :)

Are there any objections to shutting down this Group and effectively
merging it with the "amithlon-open" one? Old messages would be
archived and possibly deposited on Aminet, and any files can be
transferred to the other group.

I will proceed with this operation at the end of this month (July
2005) unless anyone has any objections or alternate proposals. The
traffic here over many months now does not justify keeping it going as
a separate entity any more.

Thanks for your attention.


Bill Hoggett
(Group tyrant)



×ñçóéìïðïéåßôå Yahoo!
ÂáñåèÞêáôå ôá åíï÷ëçôéêÜ ìçíý ìáôá (spam); Ôï Yahoo! Mail äéáèÝôåé ôçí êáëýôåñç äõíáôÞ ðñïóôáóßá êáôÜ ôùí åíï÷ëçôéêþí ìçíõìÜôùí
http://login.yahoo.com/config/mail?.intl=gr

#310 From: Amithlondev-list@...
Date: Tue Jul 5, 2005 5:45 pm
Subject: Re: Proposed Group closure
ttavoly
Offline Offline
Send Email Send Email
 
Hi Bill, on Jul 04 you wrote:

  > Hi folks,
  >
  > Does anyone still read this group?  :)

Yeah, I just did :)

If you close it down and move addresses over mine will probably bounce as
I have a whitelist now and don't intend to go through the horrible
Yahoo interface again (and my scripts) to make the open list work
too.

BTW, any developments on the kernel front (Gary?)? I've got a new laptop
which took a dozen kernel recompiles to get working with Linux so I am
getting proficient in this kind of stuff :)

       ...
       _ . Thomas Tavoly
  . _ // . aTmosh@...
  . \X/    http://distributed.amiga.org
  ...  5.5

#309 From: "Bill Hoggett" <bill_hoggett@...>
Date: Tue Jul 5, 2005 11:59 am
Subject: Re: Proposed Group closure
billhoggett
Offline Offline
Send Email Send Email
 
"tbsilvey@j..." <tbsilvey@j...> wrote:
>
> Sounds ok to me too. Will you add our accounts to the
> other list automatically or will you send an invitation?

Neither, I think.

There are just over 100 accounts on this list - 105 to be precise -
but only a very small number of those represents active readers who
have an account here but do not have an account on the other list.
Therefore, given that I am giving reasonably long notice and want to
avoid unnecessary work, I will be expecting those members who are
interested in moving over to apply for membership themselves. The
group is at:

http://groups.yahoo.com/group/amithlonopen

Membership has to be approved by me, but that is just a measure to
keep out the spam bots. Just add that you are moving from the
amithlon-dev list as a comment and you will get your membership
approved without problems.

Just in case anyone is a very rare visitor indeed, I may keep this
group open as a read-only group for some time after the end of the
month. Any visitor will then be able to read about the closure and
what they have to do to move over.

I hope that's acceptable.

Bill Hoggett


P.S. Incidentally, there is a discussion about Amithlon kernels in
progress on the other list, so it would be a good time for anyone with
an interest to get over there.

#308 From: "tbsilvey@..." <tbsilvey@...>
Date: Tue Jul 5, 2005 3:03 am
Subject: Re: Proposed Group closure
sandbags.geo
Offline Offline
Send Email Send Email
 
Sounds ok to me too. Will you add our accounts to the
other list automatically or will you send an invitation?

Troy

___________________________________________________________________
Get Juno Platinum for as low as $6.95/month!
Unlimited Internet Access with 250MB of Email Storage.
Visit http://www.juno.com/bestoffer to sign up today!

#307 From: Bernd Meyer <amithlon@...>
Date: Tue Jul 5, 2005 1:31 am
Subject: Re: Proposed Group closure
umisef
Offline Offline
Send Email Send Email
 
On Tuesday 05 July 2005 09:11, Bill Hoggett wrote:
> Hi folks,
>
Still reading, but not developing, so closure is fine by me, too.

Bernie

#306 From: Randy Q <fredd@...>
Date: Mon Jul 4, 2005 11:28 pm
Subject: Re: Proposed Group closure
randyq_au
Offline Offline
Send Email Send Email
 
Gudday Bill,

On  4/07/2005, you wrote:

> Hi folks,
>
> Does anyone still read this group?  :)
>
> Are there any objections to shutting down this Group and effectively
> merging it with the "amithlon-open" one? Old messages would be
> archived and possibly deposited on Aminet, and any files can be
> transferred to the other group.
>
> I will proceed with this operation at the end of this month (July
> 2005) unless anyone has any objections or alternate proposals. The
> traffic here over many months now does not justify keeping it going
> as a separate entity any more.
>
Fine by me ... not a lot happening nowadays.

> Thanks for your attention.

Thanks for your efforts.
>
>
> Bill Hoggett
> (Group tyrant)
>
>
Cheers,
Randy
(Group Serf)

#305 From: "Bill Hoggett" <bill_hoggett@...>
Date: Mon Jul 4, 2005 11:11 pm
Subject: Proposed Group closure
billhoggett
Offline Offline
Send Email Send Email
 
Hi folks,

Does anyone still read this group?  :)

Are there any objections to shutting down this Group and effectively
merging it with the "amithlon-open" one? Old messages would be
archived and possibly deposited on Aminet, and any files can be
transferred to the other group.

I will proceed with this operation at the end of this month (July
2005) unless anyone has any objections or alternate proposals. The
traffic here over many months now does not justify keeping it going as
a separate entity any more.

Thanks for your attention.


Bill Hoggett
(Group tyrant)

#304 From: "tuxcam" <tuxcam@...>
Date: Sun Jun 19, 2005 11:21 pm
Subject: Re: [amithlonkerneldev] Kernals webspace for kernels!
tuxcam
Offline Offline
Send Email Send Email
 
> Im happy to provide mirror =D

Where is the url of this mirror? :)

#303 From: "tbsilvey@..." <tbsilvey@...>
Date: Thu Feb 24, 2005 12:41 am
Subject: Re: Delayed approvals
sandbags.geo
Offline Offline
Send Email Send Email
 
I forgot I was signed up :)
So I though things died anyway with the end of
Bernd working on V2 and all the other uglyness
flying around at the time. Is there any change?

Troy

___________________________________________________________________
Speed up your surfing with Juno SpeedBand.
Now includes pop-up blocker!
Only $14.95/month -visit http://www.juno.com/surf to sign up today!

#302 From: Bill Hoggett <bill_hoggett@...>
Date: Wed Feb 23, 2005 5:47 pm
Subject: Delayed approvals
billhoggett
Offline Offline
Send Email Send Email
 
Soz to any of you who have been waiting for ages. This group has been dormant
for so long I forgot to check.  =:^/

--
Bill Hoggett

<Crow_> hmm, is there a --now-dammit option for exim?

#301 From: "tbsilvey@..." <tbsilvey@...>
Date: Sun Jan 23, 2005 2:47 am
Subject: Re: PCI access on Amithlon?
sandbags.geo
Offline Offline
Send Email Send Email
 
Wow, I forgot I was subscribed to this list.
It hasn't been used in a verrrrrry long time.
I maybe wrong, but as far as I know support
and files have been withdrawn by the author.
You can read the old news by following the links
at this page.... http://www.amithlon.net/
There is still a support page at the distributor
http://www.amithlon.com/, but they don't seem to
sell it or offer any other support files. You might
try searching google and see if there are any
users or groups out there still messing with it.
Good luck.

Troy

___________________________________________________________________
Speed up your surfing with Juno SpeedBand.
Now includes pop-up blocker!
Only $14.95/month -visit http://www.juno.com/surf to sign up today!

#300 From: rudolph.riedel@...
Date: Sat Jan 22, 2005 6:35 pm
Subject: PCI access on Amithlon?
rudolph_riedel
Offline Offline
Send Email Send Email
 
Hi!

Is there some SDK for PowerPCI.library available for
download anywhere?

I would like to play with the SMBus on my KT133A machine,
trying to read the SPD on my DIMM thru the VIA686B.

I also would very much apreciate some example code
on how to deal with PCI devices. :-)

Have a nice day - Rudolph

#296 From: Martin Blom <martin@...>
Date: Sat Mar 13, 2004 9:43 pm
Subject: Re: Amithlon native software & MUI ?
leviticus_mb
Offline Offline
Send Email Send Email
 
rudolph.riedel@... wrote:

>>However, I would suggest you to change the code to use Hookentry
>>instead. Here is an example. The following code works EVERYWHERE, be it
>>AmigaOS, MorphOS, Amithlon, AmigaOS 4.x or AROS ...
>
>
> I won't bet on this, this is an amiga.lib function with the
> purpose to serve as 68k->C interface...

It's used in AHI, for example, and there is no implementation in the
sources I have, at least. It was my understanding that it was added to
the AOS4 amiga.lib some time ago.

--
---- Martin Blom --------------------------- martin@... ----
Eccl 1:18                                 http://martin.blom.org/

#295 From: rudolph.riedel@...
Date: Sat Mar 13, 2004 6:51 pm
Subject: Re: Re: Amithlon native software & MUI ?
rudolph_riedel
Offline Offline
Send Email Send Email
 
martin@... (Martin Blom) wrote on 13.03.2004:

> However, I would suggest you to change the code to use Hookentry
> instead. Here is an example. The following code works EVERYWHERE, be it
> AmigaOS, MorphOS, Amithlon, AmigaOS 4.x or AROS ...

I won't bet on this, this is an amiga.lib function with the
purpose to serve as 68k->C interface...

Regards - Rudolph

#294 From: Martin Blom <martin@...>
Date: Sat Mar 13, 2004 3:41 pm
Subject: Re: Amithlon native software & MUI ?
leviticus_mb
Offline Offline
Send Email Send Email
 
Mi³osz Staszewski wrote:

> Well I think this is a dispatcher. I've never written anything for MUI and
> have no experience with it.
> I get this error message:
>
> YAM.c:425: syntax error before `void'
> YAM.c:590: syntax error before `void'
>
> and begining with the 425th line we can see this fragment of code:
>
> ==========
>
> HOOKPROTONHNONP(AY_GoPageFunc, void)
> {
>    GotoURL("http://www.yam.ch/");
> }
>
> ==========
>
> HOOKPROTONHNONP is defined in the SDI_Hook.h which I enclose.
> As you can see it's full of m68k registers. Isn't it then architecture
> related ?
>
> Thanks in advance for any help and best regards,

OK. I don't understand why people keep making the Hooks so complicated.
:-) I can't imagine YAM being that performance sensitive ...

Anyway. You could define your own macros in the spirit of the existing,
but it will required inline assembly. Here is the source code of
HookEntry which could be helpful for figuring out what registers to use:

__asm("
          .text
          .balign 4
          .type   _HookEntry,@function
_HookEntry:
          movl    %ebp,%eax  /* A1 */
          bswap   %eax
          push    %eax

          movl    %esi,%eax  /* A2 */
          bswap   %eax
          push    %eax

          movl    %ebx,%eax  /* A0 */
          bswap   %eax
          push    %eax

          mov     12(%ebx),%eax
          bswap   %eax
          call    *%eax
          add     $12,%esp
          ret

.L_HookEntry:
          .size   _HookEntry,.L_HookEntry-_HookEntry

          .globl  HookEntry
          .type   HookEntry,@function
HookEntry = _HookEntry+1
");

However, I would suggest you to change the code to use Hookentry
instead. Here is an example. The following code works EVERYWHERE, be it
AmigaOS, MorphOS, Amithlon, AmigaOS 4.x or AROS ...

#include <clib/alib_protos.h>

ULONG AY_GoPageFunc(struct Hook *hookPtr, Object *obj, APTR message)
{
     GotoURL("http://www.yam.ch/");
}

struct Hook hookname = {
    {NULL, NULL},
    HookEntry, AY_GoPageFunc, NULL
};

--
---- Martin Blom --------------------------- martin@... ----
Eccl 1:18                                 http://martin.blom.org/

#293 From: Mi³osz Staszewski <sofcik@...>
Date: Sat Mar 13, 2004 2:06 pm
Subject: Re: Amithlon native software & MUI ?
sofcik@...
Send Email Send Email
 
Hello Martin,

On 13.03.04, you wrote:

> Yes, of course. I assume you're talking about the dispatcher? Just use
> HookEntry and there is no need to worry about registers.

> If that's not what you meant, perhaps it's better if you post a small
> code example of what you want to do.

Well I think this is a dispatcher. I've never written anything for MUI and
have no experience with it.
I get this error message:

YAM.c:425: syntax error before `void'
YAM.c:590: syntax error before `void'

and begining with the 425th line we can see this fragment of code:

==========

HOOKPROTONHNONP(AY_GoPageFunc, void)
{
    GotoURL("http://www.yam.ch/");
}

==========

HOOKPROTONHNONP is defined in the SDI_Hook.h which I enclose.
As you can see it's full of m68k registers. Isn't it then architecture
related ?

Thanks in advance for any help and best regards,
--

Mi³osz 'Softfailur' Staszewski
sofcik@...
#ifndef SDI_HOOK_H
#define SDI_HOOK_H

/* Includeheader

         Name:           SDI_hook.h
         Versionstring:  $VER: SDI_hook.h 1.6 (02.03.2004)
         Author:         SDI
         Distribution:   PD
         Description:    defines to hide compiler specific hook stuff

  1.0   21.06.02 : based on the work made for freeciv and YAM with
                   additional texts partly taken from YAM_hook.h changes made
                   by Jens Langner, largely reworked the mechanism
  1.1   07.10.02 : added HOOKPROTONP and HOOKPROTONONP requested by Jens
  1.2   18.10.02 : reverted to old MorphOS-method for GCC
  1.3   08.02.04 : modified to get it compatible to AmigaOS4
  1.4   17.02.04 : modified to get compatible to latest SDI_compiler.h changes
  1.5   02.03.04 : added UNUSED define to OS4 hook specification so that the
                   compiler can ignore some warnings.
  1.6   02.03.04 : added (APTR) casts to MorphOS prototype definition to
                   reduce compiler warnings.
*/

/*
** This is PD (Public Domain). This means you can do with it whatever you want
** without any restrictions. I only ask you to tell me improvements, so I may
** fix the main line of this files as well.
**
** To keep confusion level low: When changing this file, please note it in
** above history list and indicate that the change was not made by myself
** (e.g. add your name or nick name).
**
** Dirk Stöcker <stoecker@...>
*/

#include "SDI_compiler.h"

/*
** Hook macros to handle the creation of Hooks/Dispatchers for different
** Operating System versions.
** Currently AmigaOS and MorphOS is supported.
**
** For more information about hooks see include file <utility/hooks.h> or
** the relevant descriptions in utility.library autodocs.
**
** Example:
**
** Creates a hook with the name "TestHook" that calls a corresponding
** function "TestFunc" that will be called with a pointer "text"
** (in register A1) and returns a long.
**
** HOOKPROTONHNO(TestFunc, LONG, STRPTR text)
** {
**   Printf(text);
**   return 0;
** }
** MakeHook(TestHook, TestFunc);
**
** Every function that is created with HOOKPROTO* must have a MakeHook() or
** MakeStaticHook() to create the corresponding hook. Best is to call this
** directly after the hook function. This is required by the GCC macros.
**
** The naming convention for the Hook Prototype macros is as followed:
**
** HOOKPROTO[NH][NO][NP]
**           ^^  ^^  ^^
**      NoHook   |    NoParameter
**            NoObject
**
** So a plain HOOKPROTO() creates you a Hook function that requires
** 4 parameters, the "name" of the hookfunction, the "obj" in REG_A2,
** the "param" in REG_A1 and a "hook" in REG_A0. Usually you will always
** use NH, as the hook structure itself is nearly never required.
**
** The DISPATCHERPROTO macro is for MUI dispatcher functions. It gets the
** functionname as argument. To supply this function for use by MUI, use
** The ENTRY macro, which also gets the function name as argument.
*/

#if !defined(__MORPHOS__) || !defined(__GNUC__)
   #if defined(__amigaos4__)
   #define HOOKPROTO(name, ret, obj, param) static SAVEDS ASM ret             \
     name(REG(a0, struct Hook *hook), REG(a2, obj), REG(a1, param))
   #define HOOKPROTONO(name, ret, param) static SAVEDS ASM ret                \
     name(REG(a0, struct Hook *hook), REG(a2, UNUSED APTR obj),               \
     REG(a1, param))
   #define HOOKPROTONP(name, ret, obj) static SAVEDS ASM ret                  \
     name(REG(a0, struct Hook *hook), REG(a2, obj),                           \
     REG(a1, UNUSED APTR param))
   #define HOOKPROTONONP(name, ret) static SAVEDS ASM ret                     \
     name(REG(a0, struct Hook *hook), REG(a2, UNUSED APTR obj,),              \
     REG(a1, APTR param))
   #define HOOKPROTONH(name, ret, obj, param) static SAVEDS ASM ret           \
     name(REG(a0, UNUSED struct Hook *hook), REG(a2, obj), REG(a1, param))
   #define HOOKPROTONHNO(name, ret, param) static SAVEDS ASM ret              \
     name(REG(a0, UNUSED struct Hook *hook), REG(a2, UNUSED APTR obj),        \
     REG(a1, param))
   #define HOOKPROTONHNP(name, ret, obj) static SAVEDS ASM ret                \
     name(REG(a0, UNUSED struct Hook *hook), REG(a2, obj),                    \
     REG(a1, UNUSED APTR param))
   #define HOOKPROTONHNONP(name, ret) static SAVEDS ret name(void)
   #else
   #define HOOKPROTO(name, ret, obj, param) static SAVEDS ASM ret             \
     name(REG(a0, struct Hook *hook), REG(a2, obj), REG(a1, param))
   #define HOOKPROTONO(name, ret, param) static SAVEDS ASM ret                \
     name(REG(a0, struct Hook *hook), REG(a1, param))
   #define HOOKPROTONP(name, ret, obj) static SAVEDS ASM ret                  \
     name(REG(a0, struct Hook *hook), REG(a2, obj))
   #define HOOKPROTONONP(name, ret) static SAVEDS ASM ret                     \
     name(REG(a0, struct Hook *hook))
   #define HOOKPROTONH(name, ret, obj, param) static SAVEDS ASM ret           \
     name(REG(a2, obj), REG(a1, param))
   #define HOOKPROTONHNO(name, ret, param) static SAVEDS ASM ret              \
     name(REG(a1, param))
   #define HOOKPROTONHNP(name, ret, obj) static SAVEDS ASM ret                \
     name(REG(a2, obj))
   #define HOOKPROTONHNONP(name, ret) static SAVEDS ret name(void)
   #endif
#endif

#ifdef __MORPHOS__
   #define SDI_TRAP_LIB 0xFF00 /* SDI prefix to reduce conflicts */

   struct SDI_EmulLibEntry
   {
     UWORD Trap;
     UWORD pad;
     APTR  Func;
   };

   #ifdef __GNUC__
     #include <emul/emulregs.h>

     #define HOOKPROTO(name, ret, obj, param) static ret name(void)           \
       { struct Hook *hook = (APTR)REG_A0; obj = (APTR)REG_A2;                \
         param = (APTR)REG_A1;
     #define HOOKPROTONO(name, ret, param) static ret name(void)              \
       { struct Hook *hook = (APTR)REG_A0; param = (APTR)REG_A1;
     #define HOOKPROTONP(name, ret, obj) static ret name(void)                \
       { struct Hook *hook = (APTR)REG_A0; obj = (APTR)REG_A2;
     #define HOOKPROTONONP(name, ret) static ret name(void)                   \
       { struct Hook *hook = (APTR)REG_A0;
     #define HOOKPROTONH(name, ret, obj, param) static ret name(void)         \
       { obj = (APTR)REG_A2; param = (APTR)REG_A1;
     #define HOOKPROTONHNO(name, ret, param) static ret name(void)            \
       { param = (APTR)REG_A1;
     #define HOOKPROTONHNP(name, ret, obj) static ret name(void)              \
       { obj = (APTR)REG_A2;
     #define HOOKPROTONHNONP(name, ret) static ret name(void) {
     #define MakeHook(hookname, funcname)                                     \
       } static const struct SDI_EmulLibEntry Gate_##funcname =               \
       {SDI_TRAP_LIB, 0, (void(*)()) funcname};                               \
       struct Hook hookname = {{NULL, NULL}, (HOOKFUNC)&Gate_##funcname,      \
       NULL, NULL}
     #define MakeStaticHook(hookname, funcname)                               \
       } static const struct SDI_EmulLibEntry Gate_##funcname =               \
       {SDI_TRAP_LIB, 0, (void(*)()) funcname};                               \
       static struct Hook hookname = {{NULL, NULL},                           \
       (HOOKFUNC)&Gate_##funcname, NULL, NULL}
     #define DISPATCHERPROTO(name)                                            \
       struct IClass;                                                         \
       static ULONG name(struct IClass * cl, Object * obj, Msg msg);          \
       static ULONG Trampoline_##name(void) {return name((struct IClass *)    \
       REG_A0, (Object *) REG_A2, (Msg) REG_A1);}                             \
       static const struct SDI_EmulLibEntry Gate_##name = {SDI_TRAP_LIB, 0,   \
       (void(*)())Trampoline_##name};                                         \
       static ULONG name(struct IClass * cl, Object * obj, Msg msg)
   #else
     #define MakeHook(hookname, funcname)                                     \
       static const struct SDI_EmulLibEntry Gate_##funcname = {SDI_TRAP_LIB,  \
       0, (APTR) funcname};                                                   \
       struct Hook hookname = {{NULL, NULL},                                  \
       (HOOKFUNC)&Gate_##funcname, NULL, NULL}
     #define MakeStaticHook(hookname, funcname)                               \
       static const struct SDI_EmulLibEntry Gate_##funcname = {SDI_TRAP_LIB,  \
       0, (APTR) funcname};                                                   \
       static struct Hook hookname = {{NULL, NULL},                           \
       (HOOKFUNC)&Gate_##funcname, NULL, NULL}
     #define DISPATCHERPROTO(name)                                            \
       struct IClass;                                                         \
       static ASM ULONG  name(REG(a0,                                         \
       struct IClass * cl), REG(a2, Object * obj), REG(a1, Msg msg));         \
       static const struct SDI_EmulLibEntry Gate_##name = {SDI_TRAP_LIB, 0,   \
       (APTR)name};                                                           \
       static ASM ULONG  name(REG(a0,                                         \
       struct IClass * cl), REG(a2, Object * obj), REG(a1, Msg msg))
   #endif

   #define ENTRY(func) (APTR)&Gate_##func
#else
   #define DISPATCHERPROTO(name) static SAVEDS ASM ULONG  name(REG(a0,        \
     struct IClass * cl), REG(a2, Object * obj), REG(a1, Msg msg))
   #define ENTRY(func) (APTR)func
   #define MakeHook(hookname, funcname) struct Hook hookname = {{NULL, NULL}, \
     (HOOKFUNC)funcname, NULL, NULL}
   #define MakeStaticHook(hookname, funcname) static struct Hook hookname =   \
     {{NULL, NULL}, (HOOKFUNC)funcname, NULL, NULL}
#endif

#define InitHook(hook, orighook, data) ((hook)->h_Entry = (orighook).h_Entry,\
   (hook)->h_SubEntry = (orighook).h_SubEntry,(hook)->h_Data = (APTR)(data))

#endif /* SDI_HOOK_H */

#292 From: Martin Blom <martin@...>
Date: Sat Mar 13, 2004 11:45 am
Subject: Re: Amithlon native software & MUI ?
leviticus_mb
Offline Offline
Send Email Send Email
 
Mi³osz Staszewski wrote:
> Hi all,
>
> I would like to ask if it is possible to recompile for Amithlon things that
> were written with MUI in mind and they pass some args through emulated 68k
> registers? How to access these from inside x86 code?

Yes, of course. I assume you're talking about the dispatcher? Just use
HookEntry and there is no need to worry about registers.

If that's not what you meant, perhaps it's better if you post a small
code example of what you want to do.

--
---- Martin Blom --------------------------- martin@... ----
Eccl 1:18                                 http://martin.blom.org/

#290 From: Mi³osz Staszewski <sofcik@...>
Date: Fri Mar 12, 2004 9:38 pm
Subject: Amithlon native software & MUI ?
sofcik@...
Send Email Send Email
 
Hi all,

I would like to ask if it is possible to recompile for Amithlon things that
were written with MUI in mind and they pass some args through emulated 68k
registers? How to access these from inside x86 code?

Best regards,
--

Mi³osz 'Softfailur' Staszewski
sofcik@...

#289 From: Mi³osz Staszewski <sofcik@...>
Date: Wed Mar 10, 2004 11:52 pm
Subject: Re: Another recompilation problem
sofcik@...
Send Email Send Email
 
Hello Martin,

On 10.03.04, you wrote:

> MUI applications have trouble with inlines and recent gcc's. Define the
> preprocessor macro NO_INLINE_STDARG before including <proto/muimaster.h>:
>
> #define NO_INLINE_STDARG
> #include <proto/muimaster.h>
> #undef NO_INLINE_STDARG
>
> or simply add -DNO_INLINE_STDARG to CPPFLAGS in your Makefile.

Done. It works :) Now I've another problem.

I've got such an error message:

YAM_rexx.o(.text+0x7e): undefined reference to `SetRexxVar'
YAM_rexx.o(.text+0xdac): undefined reference to `SetRexxVar'
YAM_rexx.o(.text+0xe08): undefined reference to `SetRexxVar'
collect2: ld returned 1 exit status
make: *** [YAM] Error 1

This is one of amiga.lib linked library functions, isn't it? I have
amiga.lib in there copied from my AmigaOS GCC installation (Or maybe I
should generate somehow amiga.lib for the cross-compiler, but how?). I also
checked the /opt/gg/gcc-lib/m68k-amigaos/.../specs file and there's
'-lamiga' option valid when using '-noixemul'. And '-noixemul' is one of
the options in my Makefile. So adding '-lamiga' option to the Makefile
shouldn't be necessary. Although even that doesn't help. Still I've got the
same error message.

When I had tried to remove '-noixemul' option (only for tests be cause I
know that if I want in the future to compile these sources for i686 I will
have to add it anyway) then I had other kind of error:

/opt/gg/m68k-amigaos/bin/ld: cannot open -lstack: No such file or directory
collect2: ld returned 1 exit status
make: *** [YAM] Error 1

And the needed libstack.a file was in there and the '-lstack' flag was in my
Makefile.

So when I use '-noixemul' I've got problems with SetRexxVar(), when I try to
disable that option I've got problems with '-lstack'.

What am I doing wrong? I try to build it for m68k-amigaos so it should be a
doable thing if somebody out there compiles it and we can use it :)

Thanks in advance for any help and sorry for my English,
--

Mi³osz 'Softfailur' Staszewski
sofcik@...

#288 From: Martin Blom <martin@...>
Date: Wed Mar 10, 2004 11:18 pm
Subject: Re: Another recompilation problem
leviticus_mb
Offline Offline
Send Email Send Email
 
Mi³osz Staszewski wrote:

> Hello all,
>
> I've got another problem with compilation under Amithlon cross-compiler.
>
> Now I want to compile YAM 2.3. And as before I want to compile m68k-amigaos
> version first. When I'll be sure that it works then I will try to get i686
> version.
>
> I've installed includes and FDs for MUI from mui38dev into
> /opt/gg/os-include/amigaos
> and /opt/gg/os-lib/fd/amigaos respectively.
>
> Then I ran the following commands:
>
> /opt/gg/bin/gg-fix-includes --sfd
> /opt/gg/bin/gg-fix-includes --include
> /opt/gg/bin/gg-fix-includes --lib
>
> (although the last one wasn't necessary I think).
>
> And this is the error I get:

[...]

> For me it looks like a problem with inlines and protos. But how to make this
> working if they should be automagically generated by
> /opt/gg/bin/gg-fix-includes ?
>
> Or maybe I'm wrong and the problem is something else?
> I enclose the Makefile and the file producing these errors.
> Any help will be appreciated.

MUI applications have trouble with inlines and recent gcc's. Define the
preprocessor macro NO_INLINE_STDARG before including <proto/muimaster.h>:

#define NO_INLINE_STDARG
#include <proto/muimaster.h>
#undef NO_INLINE_STDARG

or simply add -DNO_INLINE_STDARG to CPPFLAGS in your Makefile.


--
---- Martin Blom --------------------------- martin@... ----
Eccl 1:18                                 http://martin.blom.org/

#287 From: Mi³osz Staszewski <sofcik@...>
Date: Tue Mar 9, 2004 10:09 pm
Subject: Another recompilation problem
sofcik@...
Send Email Send Email
 
Hello all,

I've got another problem with compilation under Amithlon cross-compiler.

Now I want to compile YAM 2.3. And as before I want to compile m68k-amigaos
version first. When I'll be sure that it works then I will try to get i686
version.

I've installed includes and FDs for MUI from mui38dev into
/opt/gg/os-include/amigaos
and /opt/gg/os-lib/fd/amigaos respectively.

Then I ran the following commands:

/opt/gg/bin/gg-fix-includes --sfd
/opt/gg/bin/gg-fix-includes --include
/opt/gg/bin/gg-fix-includes --lib

(although the last one wasn't necessary I think).

And this is the error I get:

----------------------------------------------------
[root@AMITHLON Source]# make
m68k-amigaos-gcc -noixemul -O2 -c -DYAMVER="\"2.2\""
-D__YAM_VERDATE="\"7.4.2001\"" -D__YAM_VERDAYS=8497 YAM.c
YAM.c:237: unterminated macro call
YAM.c:968: unterminated macro call
YAM.c:968: unterminated macro call
YAM.c:968: unterminated macro call
YAM.c:968: unterminated macro call
YAM.c:968: unterminated macro call
YAM.c:968: unterminated macro call
YAM.c:968: unterminated macro call
YAM.c:968: unterminated macro call
YAM.c:968: unterminated string or character constant
YAM.c:1: possible real start of unterminated constant
YAM.c:968: macro `MUI_NewObjectA' used with too many (652) args
YAM.c:968: unterminated string or character constant
YAM.c:2: possible real start of unterminated constant
YAM.c:968: macro `LP2' used with only 5 args
YAM.c:968: unterminated string or character constant
YAM.c:3: possible real start of unterminated constant
YAM.c:968: unterminated string or character constant
YAM.c:3: possible real start of unterminated constant
YAM.c:968: macro `ColGroup' used with too many (2) args
YAM.c:968: macro `Label' used with too many (19) args
YAM.c:968: macro `LLabel' used with too many (14) args
YAM.c:968: macro `Label' used with too many (27) args
YAM.c:968: macro `LLabel' used with too many (8) args
YAM.c:968: unterminated string or character constant
YAM.c:1: possible real start of unterminated constant
YAM.c:968: unterminated string or character constant
YAM.c:380: possible real start of unterminated constant
YAM.c:968: unterminated string or character constant
YAM.c:8: possible real start of unterminated constant
YAM.c:968: unterminated string or character constant
YAM.c:3: possible real start of unterminated constant
YAM.c:968: unterminated string or character constant
YAM.c:9: possible real start of unterminated constant
YAM.c:1858: unterminated string or character constant
YAM.c:237: possible real start of unterminated constant
make: *** [YAM.o] Error 1
---------------------------------------------------------------

For me it looks like a problem with inlines and protos. But how to make this
working if they should be automagically generated by
/opt/gg/bin/gg-fix-includes ?

Or maybe I'm wrong and the problem is something else?
I enclose the Makefile and the file producing these errors.
Any help will be appreciated.

Regards,
--

Mi³osz 'Softfailur' Staszewski
sofcik@...
OBJS= YAM.o YAM_AB.o YAM_CL.o YAM_CO.o YAM_COg.o YAM_COs.o YAM_DI.o YAM_EA.o \
       YAM_ER.o YAM_FI.o YAM_FO.o YAM_MA.o YAM_MAf.o YAM_MI.o YAM_RE.o YAM_TR.o
YAM_US.o \
       YAM_UT.o YAM_WR.o YAM_loc.o YAM_rexx.o YAM_rexx_rxcl.o YAM_rexx_rxif.o
hmac_md5.o

EXTRA_OBJS= YAM_extra.o YAM_gates.o
YAM: $(OBJS) $(EXTRA_OBJS)
	 m68k-amigaos-gcc -noixemul -o YAM $(OBJS) $(EXTRA_OBJS) gg:lib/NewReadArgs.o
-lxpkmaster -lmui -lopenurl -lamiga

starter: starter.c
	 m68k-amigaos-gcc -o starter -O2 -nostlib -noixemul -DNAME="\"YAM\"" starter.c

YAM.h: YAM.h.in
	 perl gen_include.pl YAM.h.in >YAM.h

%.o: %.c
	 m68k-amigaos-gcc -noixemul -O2 -c -DYAMVER="\"2.2\""
-D__YAM_VERDATE="\"7.4.2001\"" -D__YAM_VERDAYS=8497 $<


YAM.o:     YAM.c     YAM.h YAM_loc.h
YAM_AB.o:  YAM_AB.c  YAM.h YAM_loc.h
YAM_CL.o:  YAM_CL.c  YAM.h YAM_loc.h
YAM_CO.o:  YAM_CO.c  YAM.h YAM_loc.h
YAM_COg.o: YAM_COg.c YAM.h YAM_loc.h
YAM_COs.o: YAM_COs.c YAM.h YAM_loc.h
YAM_DI.o:  YAM_DI.c  YAM.h YAM_loc.h
YAM_EA.o:  YAM_EA.c  YAM.h YAM_loc.h
YAM_ER.o:  YAM_ER.c  YAM.h YAM_loc.h
YAM_FI.o:  YAM_FI.c  YAM.h YAM_loc.h
YAM_FO.o:  YAM_FO.c  YAM.h YAM_loc.h
YAM_MA.o:  YAM_MA.c  YAM.h YAM_loc.h
YAM_MAf.o: YAM_MAf.c YAM.h YAM_loc.h
YAM_MI.o:  YAM_MI.c  YAM.h YAM_loc.h
YAM_RE.o:  YAM_RE.c  YAM.h YAM_loc.h
YAM_TR.o:  YAM_TR.c  YAM.h YAM_loc.h
YAM_US.o:  YAM_US.c  YAM.h YAM_loc.h
YAM_UT.o:  YAM_UT.c  YAM.h YAM_loc.h
YAM_WR.o:  YAM_WR.c  YAM.h YAM_loc.h
YAM_loc.o: YAM_loc.c
YAM_rexx.o     : YAM_rexx.c YAM_rexx.h
YAM_rexx_rxcl.o: YAM_rexx_rxcl.c YAM_rexx.h
YAM_rexx_rxif.o: YAM_rexx_rxif.c YAM_rexx.h YAM.h YAM_loc.h
YAM_extra.o: YAM_extra.c YAM.h YAM_loc.h
YAM_gates.o: YAM_gates.c
hmac_md5.o: hmac_md5.c

YAM_loc.h: YAM.cd
	 flexcat YAM.cd YAM_loc.h=C_h.sd YAM_loc.c=C_c.sd

gates:
	 @echo >YAM_gates.c "/* FILE GENERATED BY gen_gates.pl - DO NOT EDIT */"
	 @echo >>YAM_gates.c "#include <exec/types.h>"
	 @echo >>YAM_gates.c "#include <emul/emulinterface.h>"
	 @echo >>YAM_gates.c "#include <emul/emulregs.h>"
	 @echo >>YAM_gates.c "typedef void *Msg;"
	 @echo >>YAM_gates.c "typedef struct { long dummy; } Object;"
	 for file in YAM*.c; do perl gen_gates.pl $$file >>YAM_gates.c; done


deutsch.catalog: deutsch.ct
	 flexcat YAM.cd deutsch.ct CATALOG LOCALE:catalogs/deutsch/YAM.catalog FLUSH
/***************************************************************************

  YAM - Yet Another Mailer
  Copyright (C) 1995-2000 by Marcel Beck <mbeck@...>
  Copyright (C) 2000-2001 by YAM Open Source Team

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

  YAM Official Support Site :  http://www.yam.ch
  YAM OpenSource project    :  http://sourceforge.net/projects/yamos/

  $Id: YAM.c,v 1.32.2.4 2001/06/08 14:05:57 laursen Exp $

***************************************************************************/

#include "YAM.h"
#include "YAM_rexx.h"

/***************************************************************************
  Module: Root
***************************************************************************/

/// Global Vars
//  Defines global variables and structures
__near long __YAM_STACK = 32768;
__near long __buffsize = 8192;
__near long __MemPoolPuddleSize = 16384;

struct Library *WorkbenchBase = NULL, *IconBase = NULL;
struct Library *DataTypesBase = NULL, *MUIMasterBase = NULL, *XpkBase = NULL;
struct Library *OpenURLBase = NULL, *SocketBase = NULL, *CManagerBase = NULL;
struct LocaleBase *LocaleBase = NULL;
struct IntuitionBase *IntuitionBase = NULL;

BOOL yamFirst = TRUE, yamLast = FALSE;

struct Global *G;
struct Config *C, *CE;

char *Status[9] = { "U","O","F","R","W","E","H","S","N" };
char *SigNames[3] = { ".signature", ".altsignature1", ".altsignature2" };
char *FolderNames[4] = { "incoming", "outgoing", "sent", "deleted" };

char *ContType[MAXCTYPE+1] =
{
    /*CT_TX_PLAIN */ "text/plain",
    /*CT_TX_HTML  */ "text/html",
    /*CT_TX_GUIDE */ "text/x-aguide",
    /*CT_AP_OCTET */ "application/octet-stream",
    /*CT_AP_PS    */ "application/postscript",
    /*CT_AP_RTF   */ "application/rtf",
    /*CT_AP_LHA   */ "application/x-lha",
    /*CT_AP_LZX   */ "application/x-lzx",
    /*CT_AP_ZIP   */ "application/x-zip",
    /*CT_AP_AEXE  */ "application/x-amiga-executable",
    /*CT_AP_SCRIPT*/ "application/x-amigados-script",
    /*CT_AP_REXX  */ "application/x-rexx",
    /*CT_IM_JPG   */ "image/jpeg",
    /*CT_IM_GIF   */ "image/gif",
    /*CT_IM_PNG   */ "image/png",
    /*CT_IM_TIFF  */ "image/tiff",
    /*CT_IM_ILBM  */ "image/x-ilbm",
    /*CT_AU_AU    */ "audio/basic",
    /*CT_AU_8SVX  */ "audio/x-8svx",
    /*CT_AU_WAV   */ "audio/x-wav",
    /*CT_VI_MPG   */ "video/mpeg",
    /*CT_VI_MOV   */ "video/quicktime",
    /*CT_VI_ANIM  */ "video/x-anim",
    /*CT_VI_AVI   */ "video/x-msvideo",
    /*CT_ME_EMAIL */ "message/rfc822",
    NULL,
};
APTR ContTypeDesc[MAXCTYPE] =
{
    MSG_CTtextplain, MSG_CTtexthtml, MSG_CTtextaguide,
    MSG_CTapplicationoctetstream, MSG_CTapplicationpostscript,
MSG_CTapplicationrtf, MSG_CTapplicationlha, MSG_CTapplicationlzx,
MSG_CTapplicationzip, MSG_CTapplicationamigaexe, MSG_CTapplicationadosscript,
MSG_CTapplicationrexx,
    MSG_CTimagejpeg, MSG_CTimagegif, MSG_CTimagepng, MSG_CTimagetiff,
MSG_CTimageilbm,
    MSG_CTaudiobasic, MSG_CTaudio8svx, MSG_CTaudiowav,
    MSG_CTvideompeg, MSG_CTvideoquicktime, MSG_CTvideoanim, MSG_CTvideomsvideo,
    MSG_CTmessagerfc822
};
char *wdays[7] = { "Sun","Mon","Tue","Wed","Thu","Fri","Sat" };
char *months[12] = {
"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec" };
char *SecCodes[5] = { "none","sign","encrypt","sign+encrypt","anonymous" };
///
/// Timer Class
struct TC_Data
{
    struct MsgPort     *port;
    struct timerequest *req;
} TCData = { NULL,NULL };

//  Start a one second delay
void TC_Start(void)
{
    TCData.req->tr_node.io_Command = TR_ADDREQUEST;
    TCData.req->tr_time.tv_secs    = 1;
    TCData.req->tr_time.tv_micro   = 0;
    SendIO((struct IORequest *)TCData.req);
}

//  Frees timer resources
void TC_Exit(void)
{
    if (TCData.port)
    {
       if (TCData.req)
       {
          if (CheckIO((struct IORequest *)TCData.req)) return;
          AbortIO((struct IORequest *)TCData.req);
          WaitIO((struct IORequest *)TCData.req);
          CloseDevice((struct IORequest *)TCData.req);
          DeleteExtIO((struct IORequest *)TCData.req);
       }
       DeleteMsgPort(TCData.port);
    }
    TCData.port = NULL;
    TCData.req = NULL;
}

//  Initializes timer resources
BOOL TC_Init(void)
{
    if ((TCData.port = CreateMsgPort()))
       if ((TCData.req = (struct timerequest *)CreateExtIO(TCData.port,
sizeof(struct timerequest))))
          if (!OpenDevice(TIMERNAME, UNIT_VBLANK, (struct IORequest *)TCData.req,
0))
             return TRUE;
    return FALSE;
}

//  Returns TRUE if the internal editor is currently being used
BOOL TC_ActiveEditor(int wrwin)
{
    if (G->WR[wrwin])
    {
       APTR ao;
       get(G->WR[wrwin]->GUI.WI, MUIA_Window_ActiveObject, &ao);
       return (BOOL)(ao==G->WR[wrwin]->GUI.TE_EDIT);
    }
    return FALSE;
}

//  Dispatcher for timer class (called once every second)
void TC_Dispatcher(void)
{
    if (CheckIO((struct IORequest *)TCData.req))
    {
       int i;
       WaitIO((struct IORequest *)TCData.req);
       if (++G->SI_Count >= C->WriteIndexes && C->WriteIndexes)
          if (!TC_ActiveEditor(0) && !TC_ActiveEditor(1))
          {
             MA_UpdateIndexes(FALSE);
             G->SI_Count = 0;
          }
       if (++G->GM_Count >= C->CheckMailDelay*60 && C->CheckMailDelay)
       {
          for (i = 0; i < MAXWR; i++) if (G->WR[i]) break;
          if (i == MAXWR && !G->CO)
          {
             MA_PopNow(POP_TIMED,-1);
             G->GM_Count = 0;
          }
       }
       for (i = 0; i < MAXWR; i++) if (G->WR[i]) if (++G->WR[i]->AS_Count >=
C->AutoSave && C->AutoSave)
       {
          EditorToFile(G->WR[i]->GUI.TE_EDIT, WR_AutoSaveFile(i), NULL);
          G->WR[i]->AS_Count = 0;
          G->WR[i]->AS_Done = TRUE;
       }
       TC_Start();
    }
}
///
/// AY_PrintStatus
//  Shows progress of program initialization
void AY_PrintStatus(char *txt, int percent)
{
    set(G->AY_Text, MUIA_Gauge_InfoText, txt);
    set(G->AY_Text, MUIA_Gauge_Current, percent);
    DoMethod(G->App, MUIM_Application_InputBuffered);
}
///
/// AY_SendMailFunc
//  User clicked e-mail URL in About window
void SAVEDS AY_SendMailFunc(void)
{
    int wrwin;
    if (G->MA) if ((wrwin = MA_NewNew(NULL, 0)) >= 0)
    {
       setstring(G->WR[wrwin]->GUI.ST_TO, "YAM Support <support@...>");
       set(G->WR[wrwin]->GUI.WI, MUIA_Window_ActiveObject,
G->WR[wrwin]->GUI.ST_SUBJECT);
    }
}
MakeHook(AY_SendMailHook, AY_SendMailFunc);
///
/// AY_GoPageFunc
//  User clicked homepage URL in About window
void SAVEDS AY_GoPageFunc(void)
{
    GotoURL("http://www.yam.ch/");
}
MakeHook(AY_GoPageHook, AY_GoPageFunc);
///
/// AY_New
//  Creates About window
BOOL AY_New(BOOL hidden)
{
    char logopath[SIZE_PATHFILE];
    APTR ft_text, bt_sendmail, bt_gopage;
    struct DateTime dt;
    char datebuf[LEN_DATSTRING];

    dt.dat_Stamp.ds_Days   = __YAM_VERDAYS;
    dt.dat_Stamp.ds_Minute = 0;
    dt.dat_Stamp.ds_Tick   = 0;
    dt.dat_Format  = FORMAT_DOS;
    dt.dat_Flags   = 0L;
    dt.dat_StrDay  = NULL;
    dt.dat_StrDate = datebuf;
    dt.dat_StrTime = NULL;
    DateToStr(&dt);

    strmfp(logopath, G->ProgDir, "Icons/logo");
    G->AY_Win = WindowObject,
       MUIA_Window_Title, GetStr(MSG_MA_About),
       MUIA_Window_ID, MAKE_ID('C','O','P','Y'),
       MUIA_Window_Activate, FALSE,
       MUIA_HelpNode, "COPY",
       WindowContents, VGroup,
          MUIA_Background, MUII_GroupBack,
          Child, HGroup,
             MUIA_Group_Spacing, 0,
             Child, HSpace(0),
             Child, NewObject(CL_BodyChunk->mcc_Class,NULL,
                MUIA_Bodychunk_File, logopath,
             End,
             Child, HSpace(0),
          End,
          Child, HCenter((VGroup,
             Child, CLabel(GetStr(MSG_Copyright1)),
             Child, ColGroup(2),
                Child, bt_sendmail = TextObject,
                   MUIA_Text_Contents, "\033c\033u\0335support@...",
                   MUIA_InputMode, MUIV_InputMode_RelVerify,
                End,
                Child, bt_gopage = TextObject,
                   MUIA_Text_Contents, "\033c\033u\0335http://www.yam.ch/",
                   MUIA_InputMode, MUIV_InputMode_RelVerify,
                End,
             End,
             Child, RectangleObject,
                MUIA_Rectangle_HBar, TRUE,
                MUIA_FixHeight, 8,
             End,
             Child, ColGroup(2),
                MUIA_Group_HorizSpacing, 8,
                MUIA_Group_VertSpacing, 2,
                Child, Label(GetStr(MSG_Version)),
                Child, LLabel(__YAM_VERSION),
                Child, Label(GetStr(MSG_CompilationDate)),
                Child, LLabel(datebuf),
              End,
          End)),
          Child, G->AY_Group = PageGroup,
             Child, ListviewObject,
                MUIA_Listview_Input, FALSE,
                MUIA_Listview_List, ft_text = FloattextObject, ReadListFrame,
End,
             End,
             Child, ScrollgroupObject,
                MUIA_Scrollgroup_FreeHoriz, FALSE,
                MUIA_Scrollgroup_Contents, VGroupV,
                   GroupFrame,
                   Child, G->AY_List = VGroup,
                      Child, TextObject,
                         MUIA_Text_Contents, GetStr(MSG_UserLogin),
                         MUIA_Background, MUII_TextBack,
                         MUIA_Frame, MUIV_Frame_Text,
                         MUIA_Text_PreParse, MUIX_C MUIX_PH,
                      End,
                   End,
                   Child, HVSpace,
                End,
             End,
          End,
          Child, G->AY_Text = GaugeObject,
             GaugeFrame,
             MUIA_Gauge_InfoText, " ",
             MUIA_Gauge_Horiz, TRUE,
          End,
          Child, G->AY_Button = TextObject,
            MUIA_ShowMe, FALSE,
            MUIA_Text_Contents, GetStr(MSG_ABOUT_OKAY_GAD),
            MUIA_Background, MUII_ButtonBack,
            MUIA_Frame, MUIV_Frame_Button,
            MUIA_InputMode, MUIV_InputMode_RelVerify,
            MUIA_Text_SetMax, TRUE,
            MUIA_CycleChain, 1,
          End,
       End,
    End;

    /* if the WindowObject could be created */
    if (G->AY_Win)
    {
    	 /* now we create the about text */
       G->AY_AboutText = AllocStrBuf(SIZE_LARGE);
       G->AY_AboutText = StrBufCat(G->AY_AboutText, GetStr(MSG_Copyright2));
       G->AY_AboutText = StrBufCat(G->AY_AboutText, GetStr(MSG_UsedSoftware));
       G->AY_AboutText = StrBufCat(G->AY_AboutText, "\0338Magic User
Interface\0332 (Stefan Stuntz)\n"
                                                    "\0338TextEditor.mcc,
BetterString.mcc\0332 (Allan Odgaard)\n"
                                                    "\0338Toolbar.mcc\0332 (Benny
Kjær Nielsen)\n"
                                                    "\0338NListtree.mcc\0332
(Carsten Scholling)\n"
                                                    "\0338NList.mcc,
NListview.mcc\0332 (Gilles Masson)\n"
                                                    "\0338XPK\0332 (Urban D.
Müller, Dirk Stöcker)\n\n");
       G->AY_AboutText = StrBufCat(G->AY_AboutText, GetStr(MSG_WebSite));
       set(ft_text, MUIA_Floattext_Text, G->AY_AboutText);

       DoMethod(G->App, OM_ADDMEMBER, G->AY_Win);
       DoMethod(bt_sendmail, MUIM_Notify, MUIA_Pressed, FALSE,
MUIV_Notify_Application, 2, MUIM_CallHook, &AY_SendMailHook);
       DoMethod(bt_gopage  , MUIM_Notify, MUIA_Pressed, FALSE,
MUIV_Notify_Application, 2, MUIM_CallHook, &AY_GoPageHook);
       DoMethod(G->AY_Win  , MUIM_Notify, MUIA_Window_CloseRequest, TRUE,
G->AY_Win, 3, MUIM_Set,MUIA_Window_Open, FALSE);

       // If the close button will be pressed we close the window
       DoMethod(G->AY_Button, MUIM_Notify, MUIA_Pressed, FALSE, G->AY_Win, 3,
MUIM_Set, MUIA_Window_Open, FALSE, TAG_DONE);

       set(G->AY_Win, MUIA_Window_Open, !hidden);

       return TRUE;
    }
    return FALSE;
}
///
/// PopUp
//  Un-iconify YAM
void PopUp(void)
{
    int winopen;
    nnset(G->App, MUIA_Application_Iconified,FALSE);
    get(G->MA->GUI.WI, MUIA_Window_Open, &winopen);
    if (!winopen) set(G->MA->GUI.WI, MUIA_Window_Open, TRUE);
    DoMethod(G->MA->GUI.WI, MUIM_Window_ScreenToFront);
}
///
/// DoublestartHook
//  A second copy of YAM was started
void SAVEDS DoublestartFunc(void)
{
//   PopUp();
//   ^^^^^^^^ Crap! If we want to popup the other (running) YAM,
//            we can't use our own app object (NULL) pointer!
}
MakeHook(DoublestartHook, DoublestartFunc);
///
/// StayInProg
//  Makes sure that the user really wants to quit the program
BOOL StayInProg(void)
{
    BOOL req = FALSE;
    int i, fq;

    if (G->AB->Modified)
    {
       if (MUI_Request(G->App, G->MA->GUI.WI, 0, NULL,
GetStr(MSG_MA_ABookModifiedGad), GetStr(MSG_AB_Modified)))
          AB_SaveABookFunc();
    }
    if (G->CO || C->ConfirmOnQuit) req = TRUE;
    for (i = 0; i < 4; i++) if (G->EA[i]) req = TRUE;
    for (i = 0; i < 2; i++) if (G->WR[i]) req = TRUE;
    get(G->App, MUIA_Application_ForceQuit, &fq);
    if (fq) req = FALSE;
    if (!req) return FALSE;
    return (BOOL)!MUI_Request(G->App, G->MA->GUI.WI, 0,
GetStr(MSG_MA_ConfirmReq), GetStr(MSG_YesNoReq), GetStr(MSG_QuitYAMReq));
}
///
/// Root_GlobalDispatcher
//  Processes return value of MUI_Application_NewInput
BOOL Root_GlobalDispatcher(ULONG app_input)
{
    switch (app_input)
    {
       case MUIV_Application_ReturnID_Quit: return (BOOL)!StayInProg();
       case ID_CLOSEALL: if (!C->IconifyOnQuit) return (BOOL)!StayInProg();
                         set(G->App, MUIA_Application_Iconified, TRUE); break;
       case ID_RESTART:  return 2;
       case ID_ICONIFY:  MA_UpdateIndexes(FALSE); break;
    }
    return FALSE;
}
///
/// Root_New
//  Creates MUI application
BOOL Root_New(BOOL hidden)
{
#define MUIA_Application_UsedClasses 0x8042e9a7
    static char *classes[] = { "TextEditor.mcc", "Toolbar.mcc",
"BetterString.mcc", "InfoText.mcc", "NListtree.mcc", "NList.mcc",
"NListviews.mcc", NULL };
    G->App = ApplicationObject,
       MUIA_Application_Author     ,"Marcel Beck",
       MUIA_Application_Base       ,"YAM",
       MUIA_Application_Title      ,"YAM",
       MUIA_Application_Version    ,"$VER: YAM " __YAM_VERSION " (" __YAM_VERDATE
")",
       MUIA_Application_Copyright  ,"© 1995-2000 by Marcel Beck",
       MUIA_Application_Description,GetStr(MSG_AppDescription),
       MUIA_Application_UseRexx    ,FALSE,
       MUIA_Application_SingleTask ,!getenv("MultipleYAM"),
       MUIA_Application_UsedClasses, classes,
    End;
    if (G->App)
    {
       set(G->App, MUIA_Application_HelpFile, "YAM.guide");
       set(G->App, MUIA_Application_Iconified, hidden);
       DoMethod(G->App, MUIM_Notify, MUIA_Application_DoubleStart, TRUE,
MUIV_Notify_Application, 2, MUIM_CallHook, &DoublestartHook);
       DoMethod(G->App, MUIM_Notify, MUIA_Application_Iconified, TRUE,
MUIV_Notify_Application, 2, MUIM_Application_ReturnID, ID_ICONIFY);
       if (AY_New(hidden)) return TRUE;
    }
    return FALSE;
}
///

/// Terminate
//  Deallocates used memory and MUI modules and terminates
void Terminate(void)
{
    int i;
// struct Folder **flist;

    if (G->CO) { CO_FreeConfig(CE); free(CE); DisposeModule(&G->CO); }
    for (i = 0; i < MAXEA; i++) DisposeModule(&G->EA[i]);
    for (i = 0; i < MAXRE; i++) if (G->RE[i]) { RE_CleanupMessage(i);
DisposeModule(&G->RE[i]); }
    for (i = 0; i <=MAXWR; i++) if (G->WR[i]) { WR_Cleanup(i);
DisposeModule(&G->WR[i]); }
    if (G->TR) { TR_Cleanup(); TR_CloseTCPIP(); }
    DisposeModule(&G->FO);
    DisposeModule(&G->FI);
    DisposeModule(&G->ER);
    DisposeModule(&G->US);
    if (G->MA)
    {
       MA_UpdateIndexes(FALSE);
       G->Weights[0] = GetMUI(G->MA->GUI.LV_FOLDERS, MUIA_HorizWeight);
       G->Weights[1] = GetMUI(G->MA->GUI.LV_MAILS, MUIA_HorizWeight);
       SaveLayout(TRUE);
       set(G->MA->GUI.WI, MUIA_Window_Open, FALSE);
/*
       if ((flist = FO_CreateList()))
       {
          for (i = 1; i <= (int)*flist; i++) ClearMailList(flist[i], TRUE);
          free(flist);
       }
*/
    }
    DisposeModule(&G->AB);
    DisposeModule(&G->MA);
    if (G->TTin) free(G->TTin);
    if (G->TTout) free(G->TTout);
    for (i = 0; i < MAXASL; i++) if (G->ASLReq[i])
MUI_FreeAslRequest(G->ASLReq[i]);
    for (i = 0; i < MAXWR+1; i++) if (G->WR_NRequest[i].nr_stuff.nr_Msg.nr_Port)
DeletePort(G->WR_NRequest[i].nr_stuff.nr_Msg.nr_Port);
    if (G->AppIcon) RemoveAppIcon(G->AppIcon);
    if (G->AppPort) DeletePort(G->AppPort);
    if (G->RexxHost) CloseDownARexxHost(G->RexxHost);
    TC_Exit();
    if (G->AY_AboutText) FreeStrBuf(G->AY_AboutText);
    if (G->App) MUI_DisposeObject(G->App);
    for (i = 0; i < MAXICONS; i++) if (G->DiskObj[i])
FreeDiskObject(G->DiskObj[i]);
    for (i = 0; i < MAXIMAGES; i++) if (G->BImage[i]) FreeBCImage(G->BImage[i]);
    CO_FreeConfig(C);
    ExitClasses();
    if (DataTypesBase) CloseLibrary(DataTypesBase);
    if (XpkBase)       CloseLibrary(XpkBase);
    if (MUIMasterBase) CloseLibrary(MUIMasterBase);
    CloseYAMCatalog();
    if (G->Locale) CloseLocale(G->Locale);
    if (LocaleBase) CloseLibrary((struct Library *)LocaleBase);
    if (WorkbenchBase) CloseLibrary(WorkbenchBase);
    if (IconBase) CloseLibrary(IconBase);
#ifdef __ixemul__
    if (RexxSysBase) CloseLibrary(RexxSysBase);
#endif
    if (IFFParseBase) CloseLibrary(IFFParseBase);
    if (KeymapBase) CloseLibrary(KeymapBase);
    if (IntuitionBase) CloseLibrary((struct Library *) IntuitionBase);
    if (UtilityBase) CloseLibrary((struct Library *)UtilityBase);
    free(C); free(G);
    if (yamLast) exit(0);
}
///
/// Abort
//  Shows error requester, then terminates the program
void Abort(char *error)
{
    if (error)
    {
       if (MUIMasterBase) {
          MUI_Request(G->App ? G->App : NULL, NULL, 0, GetStr(MSG_ErrorStartup),
GetStr(MSG_Quit), error);
       }
       else if (IntuitionBase) {
          struct EasyStruct ErrReq = {
             sizeof (struct EasyStruct),
             0,
             NULL,
             NULL,
             NULL
          };

          ErrReq.es_Title        = (char *)GetStr(MSG_ErrorStartup);
          ErrReq.es_TextFormat   = error;
          ErrReq.es_GadgetFormat = (char *)GetStr(MSG_Quit);

          EasyRequest(NULL, &ErrReq, NULL, error);
       }
       else puts(error);
    }
    yamLast = TRUE;
    Terminate();
}
///
/// CheckMCC
//  Checks if a certain version of a MCC is available
BOOL CheckMCC(char *name, int minver, int minrev, BOOL req)
{
    Object *obj;
    BOOL success = FALSE;

    obj = MUI_NewObject(name, TAG_DONE);
    if (obj) {
       ULONG tmp;
       int ver, rev;

       get(obj, MUIA_Version, &tmp);
       ver = (int)tmp;
       get(obj, MUIA_Revision, &tmp);
       rev = (int)tmp;

       if (ver > minver || (ver == minver && rev >= minrev)) {
          success = TRUE;
       }
       MUI_DisposeObject(obj);
    }

    if (!success && req) {
       static char errorlib[SIZE_DEFAULT];
       sprintf(errorlib, GetStr(MSG_ErrorLib), name, minver);
       Abort(errorlib);
    }

    return success;
}
///
/// InitLib
//  Opens a library
struct Library *InitLib(char *libname, int version, int revision, BOOL required,
BOOL close)
{
    struct Library *lib = OpenLibrary(libname, version);
    if (lib && revision) if (lib->lib_Version == version && lib->lib_Revision <
revision) { CloseLibrary(lib); lib = NULL; }
    if (!lib && required)
    {
       static char errorlib[SIZE_DEFAULT];
       sprintf(errorlib, GetStr(MSG_ErrorLib), libname, version);
       Abort(errorlib);
    }
    if (lib && close) CloseLibrary(lib);
    return lib;
}
///
/// SetupAppIcons
//  Sets location of mailbox status icon on workbench screen
void SetupAppIcons(void)
{
    int i;
    for (i = 0; i < 4; i++) if (G->DiskObj[i])
    {
       G->DiskObj[i]->do_CurrentX = C->IconPositionX;
       G->DiskObj[i]->do_CurrentY = C->IconPositionY;
    }
}
///
/// Initialise2
//  Phase 2 of program initialization (after user logs in)
void Initialise2(BOOL hidden)
{
    BOOL newfolders = FALSE;
    int i;
    struct Folder *folder, **oldfolders = NULL;

    AY_PrintStatus(GetStr(MSG_LoadingConfig), 30);
    CO_SetDefaults(C, -1);
    CO_LoadConfig(C, G->CO_PrefsFile, &oldfolders);
    CO_Validate(C, FALSE);
    AY_PrintStatus(GetStr(MSG_CreatingGUI), 40);
    if (!(G->MA = MA_New()) || !(G->AB = AB_New()))
Abort(GetStr(MSG_ErrorMuiApp));
    MA_SetupDynamicMenus();
    MA_ChangeSelectedFunc();
    SetupAppIcons();
    LoadLayout();
    set(G->MA->GUI.LV_FOLDERS, MUIA_HorizWeight, G->Weights[0]);
    set(G->MA->GUI.LV_MAILS,   MUIA_HorizWeight, G->Weights[1]);
    AY_PrintStatus(GetStr(MSG_LoadingFolders), 50);
    if (!FO_LoadTree(CreateFilename(".folders")) && oldfolders)
    {
       for (i = 0; i < 100; i++) if (oldfolders[i])
DoMethod(G->MA->GUI.NL_FOLDERS, MUIM_NList_InsertSingle, oldfolders[i],
MUIV_NList_Insert_Bottom);
       newfolders = TRUE;
    }
    if (oldfolders) { for (i = 0; oldfolders[i]; i++) free(oldfolders[i]);
free(oldfolders); }
    if (!FO_GetFolderByType(FT_INCOMING,NULL)) newfolders |=
FO_CreateFolder(FT_INCOMING, FolderNames[0], GetStr(MSG_MA_Incoming));
    if (!FO_GetFolderByType(FT_OUTGOING,NULL)) newfolders |=
FO_CreateFolder(FT_OUTGOING, FolderNames[1], GetStr(MSG_MA_Outgoing));
    if (!FO_GetFolderByType(FT_SENT    ,NULL)) newfolders |=
FO_CreateFolder(FT_SENT    , FolderNames[2], GetStr(MSG_MA_Sent));
    if (!FO_GetFolderByType(FT_DELETED ,NULL)) newfolders |=
FO_CreateFolder(FT_DELETED , FolderNames[3], GetStr(MSG_MA_Deleted));
    if (newfolders) FO_SaveTree(CreateFilename(".folders"));
    AY_PrintStatus(GetStr(MSG_RebuildIndices), 60);
    MA_UpdateIndexes(TRUE);
    AY_PrintStatus(GetStr(MSG_LoadingFolders), 75);
    for (i = 0; ; i++)
    {
       DoMethod(G->MA->GUI.NL_FOLDERS, MUIM_NList_GetEntry, i, &folder);
       if (!folder) break;
       if ((folder->Type == FT_INCOMING || folder->Type == FT_OUTGOING ||
folder->Type == FT_DELETED || C->LoadAllFolders) && !(folder->XPKType&1))
MA_GetIndex(folder);
       else if (folder->Type != FT_SEPARATOR) folder->LoadedMode =
MA_LoadIndex(folder, FALSE);
       DoMethod(G->App, MUIM_Application_InputBuffered);
    }
    G->NewMsgs = -1;
    MA_ChangeFolder(FO_GetFolderByType(FT_INCOMING,NULL));
    AY_PrintStatus(GetStr(MSG_LoadingABook), 90);
    AB_LoadTree(G->AB_Filename, FALSE, FALSE);
    if (!(G->RexxHost = SetupARexxHost("YAM", NULL)))
Abort(GetStr(MSG_ErrorARexx));
    AY_PrintStatus("", 100);
    set(G->MA->GUI.WI, MUIA_Window_Open, !hidden);
    set(G->AY_Win, MUIA_Window_Open, FALSE);
    set(G->AY_Text, MUIA_ShowMe, FALSE);
	  set(G->AY_Button, MUIA_ShowMe, TRUE);
}
///
/// Initialise
//  Phase 1 of program initialization (before user logs in)
void Initialise(BOOL hidden)
{
    static char iconfile[SIZE_PATHFILE];
    char iconpath[SIZE_PATH];
    char *icnames[MAXICONS] = { "empty", "old", "new", "check" };
    char *imnames[MAXIMAGES] = { "status_unread", "status_old", "status_forward",
       "status_reply", "status_waitsend", "status_error", "status_hold",
       "status_sent", "status_new", "status_delete", "status_download",
       "status_group", "status_urgent", "status_attach", "status_report",
       "status_crypt", "status_signed" };
    int i;

    DateStamp(&G->StartDate);

    /* First open locale.library, so we can display a translated error requester
       in case some of the other libraries can't be opened. */
    if ((LocaleBase = (struct LocaleBase *)InitLib("locale.library", 38, 0, TRUE,
FALSE))) G->Locale = OpenLocale(NULL);
    OpenYAMCatalog();

    UtilityBase = (struct UtilityBase *)InitLib("utility.library", 36, 0, TRUE,
FALSE);
    KeymapBase = InitLib("keymap.library", 36, 0, TRUE, FALSE);
    IFFParseBase = InitLib("iffparse.library", 36, 0, TRUE, FALSE);
#ifdef __ixemul__
    RexxSysBase = InitLib("rexxsyslib.library", 36, 0, TRUE, FALSE);
#endif
    MUIMasterBase = InitLib("muimaster.library", 19, 0, TRUE, FALSE);

    /* We can't use CheckMCC() due to a bug in Toolbar.mcc! */
    InitLib("mui/Toolbar.mcc", 15, 6, TRUE, TRUE);

    CheckMCC(MUIC_NList, 19, 98, TRUE);
    CheckMCC(MUIC_NListtree, 18, 7, TRUE);

    if (!InitClasses()) Abort(GetStr(MSG_ErrorClasses));
    if (!Root_New(hidden)) Abort(FindPort("YAM") ? NULL :
GetStr(MSG_ErrorMuiApp));
    AY_PrintStatus(GetStr(MSG_InitLibs), 10);
    XpkBase = InitLib(XPKNAME, 0, 0, FALSE, FALSE);
    if ((DataTypesBase = InitLib("datatypes.library", 39, 0, FALSE, FALSE)))
       if (CheckMCC("Dtpic.mui", 0, 0, FALSE)) G->DtpicSupported = TRUE;
    if (!TC_Init()) Abort(GetStr(MSG_ErrorTimer));
    for (i = 0; i < MAXASL; i++)
       if (!(G->ASLReq[i] = MUI_AllocAslRequestTags(ASL_FileRequest,
ASLFR_RejectIcons, TRUE,
          TAG_END))) Abort(GetStr(MSG_ErrorAslStruct));
    G->AppPort = CreatePort(NULL, 0);
    for (i = 0; i < 3; i++)
    {
       G->WR_NRequest[i].nr_stuff.nr_Msg.nr_Port = CreatePort(NULL, 0);
       G->WR_NRequest[i].nr_Name = (UBYTE *)G->WR_Filename[i];
       G->WR_NRequest[i].nr_Flags = NRF_SEND_MESSAGE;
    }
    srand(GetDateStamp());
    AY_PrintStatus(GetStr(MSG_LoadingGFX), 20);
    strmfp(iconpath, G->ProgDir, "Icons");
    for (i = 0; i < MAXICONS; i++)
    {
       strmfp(iconfile, iconpath, icnames[i]);
       G->DiskObj[i] = GetDiskObject(iconfile);
    }
    for (i = 0; i < MAXIMAGES; i++)
    {
       strmfp(iconfile, iconpath, imnames[i]);
       G->BImage[i] = LoadBCImage(iconfile);
       DoMethod(G->App, MUIM_Application_InputBuffered);
    }
}
///
/// SendWaitingMail
//  Sends pending mail on startup
void SendWaitingMail(void)
{
    struct Mail *mail;
    BOOL doit = TRUE;
    int tots = 0, hidden;
    struct Folder *fo = FO_GetFolderByType(FT_OUTGOING, NULL);

    get(G->App, MUIA_Application_Iconified, &hidden);
    for (mail = fo->Messages; mail; mail = mail->Next) if (mail->Status !=
STATUS_HLD) tots++;
    if (!tots) return;
    MA_ChangeFolder(fo);
    if (!hidden) doit = MUI_Request(G->App, G->MA->GUI.WI, 0, NULL,
GetStr(MSG_YesNoReq), GetStr(MSG_SendStartReq));
    if (doit) MA_Send(SEND_ALL);
}
///
/// DoStartup
//  Performs different checks/cleanup operations on startup
void DoStartup(BOOL nocheck, BOOL hide)
{

    if (C->CleanupOnStartup) DoMethod(G->App, MUIM_CallHook, &MA_DeleteOldHook);
    if (C->RemoveOnStartup) DoMethod(G->App, MUIM_CallHook,
&MA_DeleteDeletedHook);
    if (C->CheckBirthdates && !nocheck && !hide) AB_CheckBirthdates();
    if (TR_IsOnline())
    {
       if (C->GetOnStartup && !nocheck) {
          MA_PopNow(POP_START,-1);
          if (G->TR) DisposeModule(&G->TR);
       }
       if (C->SendOnStartup && !nocheck) {
          SendWaitingMail();
          if (G->TR) DisposeModule(&G->TR);
       }
    }
}
///
/// Login
//  Allows automatical login for AmiTCP-Genesis users
#ifdef __STORM__
struct Library *GenesisBase;
#endif
void Login(char *user, char *password, char *maildir, char *prefsfile)
{
#ifndef __STORM__
    struct Library *GenesisBase;
#endif
    struct genUser *guser;
    BOOL terminate = FALSE, loggedin = FALSE;

    if ((GenesisBase = OpenLibrary("genesis.library", 1)))
    {
       if ((guser = GetGlobalUser()))
       {
          terminate = !(loggedin = US_Login(guser->us_name, "\01", maildir,
prefsfile));
          FreeUser(guser);
       }
       CloseLibrary(GenesisBase);
    }
    if (!loggedin && !terminate) terminate = !US_Login(user, password, maildir,
prefsfile);
    if (terminate) Abort(NULL);
}
///
/// GetDST
//  Checks if daylight saving time is active
int GetDST(void)
{
    int i;
    char *dst;

    if((dst = getenv("IXGMTOFFSET")))
    {
       return dst[4]?2:1;
    }

    dst = getenv("SUMMERTIME");
    if (!dst) return 0;
    for (i = 0; i < 11; i++)
    {
       while (*dst != ':') if (!*dst++) return 0;
       dst++;
    }
    return (*dst == 'Y' ? 2 : 1);
}
///

/// Main
//  Program entry point, main loop
#ifdef __GNUC__
void STACKEXT main(int argc, char **argv)
#else
void main(int argc, char **argv)
#endif
{
    struct NewRDArgs nrda;
    struct { STRPTR user;
             STRPTR password;
             STRPTR maildir;
             STRPTR prefsfile;
             LONG   nocheck;
             LONG   hide;
             LONG   debug;
             STRPTR mailto;
             STRPTR subject;
             STRPTR letter;
             STRPTR *attach;
           } args = { NULL, NULL, NULL, NULL, FALSE, FALSE, FALSE, NULL, NULL,
NULL, NULL };
    int wrwin, err, ret;
    char **sptr, progdir[SIZE_PATH];
    ULONG signals, appsigs, timsigs, notsigs0, notsigs1, notsigs2, rexsigs;
    struct Message *msg;
    struct User *user;
    BPTR progdirlock, yamlock, oldcdirlock;

    IntuitionBase = (struct IntuitionBase *) InitLib("intuition.library", 36, 0,
TRUE, FALSE);
    IconBase = InitLib("icon.library", 36, 0, TRUE, FALSE);
    WorkbenchBase = InitLib("workbench.library", 36, 0, TRUE, FALSE);

#ifdef __ixemul__
    if(0 == argc) _WBenchMsg=(struct WBStartup *)argv;
#endif

    nrda.Template =
"USER/K,PASSWORD/K,MAILDIR/K,PREFSFILE/K,NOCHECK/S,HIDE/S,DEBUG/S,MAILTO/K,SUBJE\
CT/K,LETTER/K,ATTACH/M";
    nrda.ExtHelp = NULL;
    nrda.Window = NULL;
    nrda.Parameters = (LONG *)&args;
    nrda.FileParameter = -1;
    nrda.PrgToolTypesOnly = FALSE;
    if ((err = NewReadArgs(_WBenchMsg, &nrda)))
    {
       PrintFault(err, "YAM");
       NewFreeArgs(&nrda);
       if (WorkbenchBase) CloseLibrary(WorkbenchBase);
       if (IconBase) CloseLibrary(IconBase);
       if (IntuitionBase) CloseLibrary((struct Library *) IntuitionBase);
       exit(5);
    }
    if ((progdirlock = GetProgramDir()))
       NameFromLock(progdirlock, progdir, SIZE_PATH);
    else
    {
       strcpy(progdir, "YAM:");
       SetProgramDir(Lock(progdir, ACCESS_READ));
    }
    yamlock = Lock(progdir, ACCESS_READ);
    oldcdirlock = CurrentDir(yamlock);
    while (1)
    {
       G = calloc(1,sizeof(struct Global));
       C = calloc(1,sizeof(struct Config));
       strcpy(G->ProgDir, progdir);
       if (!args.maildir) strcpy(G->MA_MailDir, progdir);
       args.hide = -args.hide; args.nocheck = -args.nocheck;
       G->TR_Debug = -args.debug;
       G->TR_Allow = TRUE;
       G->CO_DST = GetDST();
       if (yamFirst)
       {
          Initialise(args.hide);
          Login(args.user, args.password, args.maildir, args.prefsfile);
          Initialise2(args.hide);
          DoMethod(G->App, MUIM_Application_Load, MUIV_Application_Load_ENVARC);
          AppendLog(0, GetStr(MSG_LOG_Started), "", "", "", "");
          MA_StartMacro(MACRO_STARTUP, NULL);
          DoStartup(args.nocheck, args.hide);
          if (args.mailto || args.letter || args.subject || args.attach) if
((wrwin = MA_NewNew(NULL, 0)) >= 0)
          {
             if (args.mailto) setstring(G->WR[wrwin]->GUI.ST_TO, args.mailto);
             if (args.subject) setstring(G->WR[wrwin]->GUI.ST_SUBJECT,
args.subject);
             if (args.letter) FileToEditor(args.letter,
G->WR[wrwin]->GUI.TE_EDIT);
             if (args.attach) for (sptr = (char**)args.attach; *sptr; sptr++)
                if (FileSize(*sptr) >= 0) WR_AddFileToList(wrwin, *sptr, NULL,
FALSE);
          }
          yamFirst = FALSE;
       }
       else
       {
          Initialise(FALSE);
          Login(NULL, NULL, NULL, NULL);
          Initialise2(FALSE);
          DoMethod(G->App, MUIM_Application_Load, MUIV_Application_Load_ENVARC);
       }
       user = US_GetCurrentUser();
       AppendLogNormal(1, GetStr(MSG_LOG_LoggedIn), user->Name, "", "", "");
       AppendLogVerbose(1, GetStr(MSG_LOG_LoggedInVerbose), user->Name,
G->CO_PrefsFile, G->MA_MailDir, "");
       TC_Start();
       appsigs  = 1<<G->AppPort->mp_SigBit;
       timsigs  = 1<<TCData.port->mp_SigBit;
       notsigs0 = 1<<G->WR_NRequest[0].nr_stuff.nr_Msg.nr_Port->mp_SigBit;
       notsigs1 = 1<<G->WR_NRequest[1].nr_stuff.nr_Msg.nr_Port->mp_SigBit;
       notsigs2 = 1<<G->WR_NRequest[2].nr_stuff.nr_Msg.nr_Port->mp_SigBit;
       rexsigs  = 1<<G->RexxHost->port->mp_SigBit;
       while (!(ret = Root_GlobalDispatcher(DoMethod(G->App,
MUIM_Application_NewInput, &signals))))
       {
          if (signals)
          {
             signals = Wait(signals | timsigs | SIGBREAKF_CTRL_C |
SIGBREAKF_CTRL_F | appsigs | notsigs0 | notsigs1 | rexsigs);
             if (signals & SIGBREAKF_CTRL_C) break;
             if (signals & SIGBREAKF_CTRL_F) PopUp();
             if (signals & timsigs) TC_Dispatcher();
             if (signals & rexsigs) ARexxDispatch(G->RexxHost);
             if (signals & appsigs)
             {
                struct AppMessage *apmsg;
                while ((apmsg = (struct AppMessage *)GetMsg(G->AppPort)))
                {
                   if (apmsg->am_Type == AMTYPE_APPICON)
                   {
                      PopUp();
                      if (apmsg->am_NumArgs)
                      {
                         int wrwin;
                         if      (G->WR[0]) wrwin = 0;
                         else if (G->WR[1]) wrwin = 1;
                         else wrwin = MA_NewNew(NULL, 0);
                         if (wrwin >= 0) WR_App(wrwin, apmsg);
                      }
                   }
                   ReplyMsg((struct Message *)apmsg);
                }
             }
             if (signals & notsigs0)
             {
                while ((msg = GetMsg(G->WR_NRequest[0].nr_stuff.nr_Msg.nr_Port)))
ReplyMsg(msg);
                if (G->WR[0]) FileToEditor(G->WR_Filename[0],
G->WR[0]->GUI.TE_EDIT);
             }
             if (signals & notsigs1)
             {
                while ((msg = GetMsg(G->WR_NRequest[1].nr_stuff.nr_Msg.nr_Port)))
ReplyMsg(msg);
                if (G->WR[1]) FileToEditor(G->WR_Filename[1],
G->WR[1]->GUI.TE_EDIT);
             }
             if (signals & notsigs2)
             {
                while ((msg = GetMsg(G->WR_NRequest[2].nr_stuff.nr_Msg.nr_Port)))
ReplyMsg(msg);
                if (G->WR[2]) FileToEditor(G->WR_Filename[2],
G->WR[2]->GUI.TE_EDIT);
             }
          }
       }
       if (C->SendOnQuit && !args.nocheck) if (TR_IsOnline()) SendWaitingMail();
       if (C->CleanupOnQuit) DoMethod(G->App, MUIM_CallHook, &MA_DeleteOldHook);
       if (C->RemoveOnQuit) DoMethod(G->App, MUIM_CallHook,
&MA_DeleteDeletedHook);
       if (ret == 1)
       {
          yamLast = TRUE;
          AppendLog(99, GetStr(MSG_LOG_Terminated), "", "", "", "");
          MA_StartMacro(MACRO_QUIT, NULL);
          CurrentDir(oldcdirlock);
          UnLock(yamlock);
          NewFreeArgs(&nrda);
       }
       FreeData2D(&Header);
       Terminate();
    }
}
///

#286 From: Mi³osz Staszewski <sofcik@...>
Date: Sat Mar 6, 2004 12:50 am
Subject: Re: Cross-compilation problems
sofcik@...
Send Email Send Email
 
Hello Martin,

On 05.03.04, you wrote:

> You should use --host, not --target. --target is when you're building
> something that should *generate code* for a different system. --host is
> what the resulting binary should *run* on and --build is used to configure
> the current system (normally, configure realizes this by itself).
>
> Also note that in order for configure to work properly, you should have
> something like this in the beginning of configure.in:
>
> AC_CANONICAL_SYSTEM
> AC_CHECK_TOOL( CC, gcc, : )

Thanks for these informations. I've compiled it successfully. For both m68k
and i686 :)
And thanks for this Amithlon cross-compiler. Really great piece of
software!!!!

Regards,
--

Mi³osz 'Softfailur' Staszewski
sofcik@...

#285 From: Martin Blom <martin@...>
Date: Fri Mar 5, 2004 7:09 am
Subject: Re: Cross-compilation problems
leviticus_mb
Offline Offline
Send Email Send Email
 
Mi³osz Staszewski wrote:
> Hello all,
>
> At first I would like to sorry about little OT, be cause the problem I'm
> having it's not yet Amithlon related. At the moment it's general-Amiga
> thing.
>
> I've problems with cross-compilation for AmigaOS under Linux.
>
> I've downloaded the cross-compiler from:
>
> http://www.lysator.liu.se/~lcs/files/gg-cross
>
> and probably installed it properly be cause I was able to compile some
> simple things for m68k-AmigaOS and Amithlon-x86-native.
>
> Now the time has come to try playing with something more complex. I decided
> to compile lame (mp3 encoder).
> I've got sources that compile without any problems under GCC working under
> AmigaOS. So I tried to make the same thing under Linux (target:
> m68k-amigaos). But I can't make it working.
>
> When I run './configure' under Linux it configures everything for
> native-x86-Linux build. And this is not what I want :(
>
> './configure --target=m68k-amigaos' doesn't help. The result is exaclty the
> same.

You should use --host, not --target. --target is when you're building
something that should *generate code* for a different system. --host is
what the resulting binary should *run* on and --build is used to
configure the current system (normally, configure realizes this by itself).

Also note that in order for configure to work properly, you should have
something like this in the beginning of configure.in:

AC_CANONICAL_SYSTEM
AC_CHECK_TOOL( CC, gcc, : )


--
---- Martin Blom --------------------------- martin@... ----
Eccl 1:18                                 http://martin.blom.org/

#284 From: Mi³osz Staszewski <sofcik@...>
Date: Thu Mar 4, 2004 11:13 pm
Subject: Cross-compilation problems
sofcik@...
Send Email Send Email
 
Hello all,

At first I would like to sorry about little OT, be cause the problem I'm
having it's not yet Amithlon related. At the moment it's general-Amiga
thing.

I've problems with cross-compilation for AmigaOS under Linux.

I've downloaded the cross-compiler from:

http://www.lysator.liu.se/~lcs/files/gg-cross

and probably installed it properly be cause I was able to compile some
simple things for m68k-AmigaOS and Amithlon-x86-native.

Now the time has come to try playing with something more complex. I decided
to compile lame (mp3 encoder).
I've got sources that compile without any problems under GCC working under
AmigaOS. So I tried to make the same thing under Linux (target:
m68k-amigaos). But I can't make it working.

When I run './configure' under Linux it configures everything for
native-x86-Linux build. And this is not what I want :(

'./configure --target=m68k-amigaos' doesn't help. The result is exaclty the
same.

And when I tried to 'make' sources previously configured under GCC-AmigaOS
only changing the compiler name from 'gcc' to 'm68k-amigaos-gcc' it also
didn't help. Here's what I got back from 'make' then:

--------------------------------------------------------------------------------\
----------
make  all-recursive
make[1]: Getting into `/home/sofcik/temp/lame-3.92'
Making all in mpglib
make[2]: Getting into `/home/sofcik/temp/lame-3.92/mpglib'
source='common.c' object='common.lo' libtool=yes \
depfile='.deps/common.Plo' tmpdepfile='.deps/common.TPlo' \
depmode=gcc /bin/sh ../depcomp \
/bin/sh ../libtool --mode=compile m68k-amigaos-gcc -DHAVE_CONFIG_H  -I. -I.
-I.. -I../include -I. -I../libmp3lame -I..    -O3 -fomit-frame-pointer
-ffast-math                   -funroll-loops -m68020-60 -m68881 -Wall -pipe
  -c -o common.lo `test -f common.c || echo './'`common.c
../libtool: line 1: print: command not found
../libtool: line 1: print: command not found
../libtool: line 1: print: command not found
../libtool: line 1: print: command not found
../libtool: line 1: print: command not found
../libtool: line 1: print: command not found
../libtool: line 1: print: command not found
../libtool: line 1: print: command not found
../libtool: line 1: print: command not found
../libtool: line 1: print: command not found
../libtool: line 1: print: command not found
../libtool: line 1: print: command not found
../libtool: line 1: print: command not found
../libtool: line 1: print: command not found
../libtool: line 1: print: command not found
../libtool: line 1: print: command not found
../libtool: line 1: print: command not found
../libtool: line 1: print: command not found
../libtool: line 1: print: command not found
../libtool: line 1: print: command not found
../libtool: line 1: print: command not found
../libtool: line 1: print: command not found
../libtool: line 638: print: command not found
make[2]: *** [common.lo] B³±d 1
make[2]: Leaving directory `/home/sofcik/temp/lame-3.92/mpglib'
make[1]: *** [all-recursive] B³±d 1
make[1]: Leaving directory `/home/sofcik/temp/lame-3.92'
make: *** [all] Error 2
--------------------------------------------------------------------------------\
--------

Could you possibly tell me what I'm doing wrong and what should be done to
compile that?
I assume that building m68k-amigaos version is a doable thing if it compiles
nice under real AmigaOS and GCC.

Regards, thanks in advance for any help  and sorry for my English,
--

Mi³osz 'Softfailur' Staszewski
sofcik@...

#282 From: Martin Blom <martin@...>
Date: Sun Nov 2, 2003 1:26 pm
Subject: Re: Run_elf
leviticus_mb
Offline Offline
Send Email Send Email
 
On Sun, 2 Nov 2003, yyz_21122003 wrote:

> > Are you sure you're using run_elf 1.6? Perhaps you could mail me
> prog.c,
> > because it really should work.
>
> It is helloworld.c :D (but I hope I can compile a mpeg2enc amithlon
> version if I don't have to change the code... It require gcc but
> don't know if there are some platform references :/ )
> Can be a wrong compiled libamigastubs.a?
> Now I have get an "Run_elf 1.6 >>> UNDEFINED SYMBOL 'printf'
> <<< !!!!!!!!!

???? Something is wrong and you have to check your setup. I assume you
use the compiler in AmigaOS? I can only help you with the Linux
crosscompiler I'm afraid.

> How you can see I'm a beginner and perhaps I have to leave this
> developers forum but I hope that someone can help me a bit... :P
> No way to compile an ixemul program?

No, I never ported ixemul.

> If this is the case can I install Amiga Geek Gadgets GCC 68k
> compiler on Amithlon?

Yes of course.

--
---- Martin Blom --------------------------- martin@... ----
Eccl 1:18                                 http://martin.blom.org/

#281 From: "yyz_21122003" <yyz_21122003@...>
Date: Sun Nov 2, 2003 7:04 am
Subject: Re: Run_elf
yyz_21122003
Offline Offline
Send Email Send Email
 
--- In amithlondev@yahoogroups.com, Martin Blom <martin@b...> wrote:
> yyz_21122003 wrote:
>
> >Hi,
> >I have compiled a c program with both linux (m68k-amigaos-gcc)
and
> >amithlon.
> >When I run program with run_elf (1.6) a window popup tell me:
> >
> >          Run_elf
> >UNDEFINED SYMBOL: _CallLib68k
> >
> >or something like this :-P
> >
> >On linux:
> >CC=m68k-amigaos-gcc
> >./configure
> >make
> >
> >On amithlon:
> >i686be-amithlon-gcc -r -noixemul prog.c
> >
> >What's wrong?
> >
> >
> >
> Are you sure you're using run_elf 1.6? Perhaps you could mail me
prog.c,
> because it really should work.

It is helloworld.c :D (but I hope I can compile a mpeg2enc amithlon
version if I don't have to change the code... It require gcc but
don't know if there are some platform references :/ )
Can be a wrong compiled libamigastubs.a?
Now I have get an "Run_elf 1.6 >>> UNDEFINED SYMBOL 'printf'
<<< !!!!!!!!!
How you can see I'm a beginner and perhaps I have to leave this
developers forum but I hope that someone can help me a bit... :P
No way to compile an ixemul program?
If this is the case can I install Amiga Geek Gadgets GCC 68k
compiler on Amithlon?

Best Regards

#280 From: Martin Blom <martin@...>
Date: Fri Oct 31, 2003 6:51 pm
Subject: Re: Run_elf
leviticus_mb
Offline Offline
Send Email Send Email
 
yyz_21122003 wrote:

>Hi,
>I have compiled a c program with both linux (m68k-amigaos-gcc) and
>amithlon.
>When I run program with run_elf (1.6) a window popup tell me:
>
>          Run_elf
>UNDEFINED SYMBOL: _CallLib68k
>
>or something like this :-P
>
>On linux:
>CC=m68k-amigaos-gcc
>./configure
>make
>
>On amithlon:
>i686be-amithlon-gcc -r -noixemul prog.c
>
>What's wrong?
>
>
>
Are you sure you're using run_elf 1.6? Perhaps you could mail me prog.c,
because it really should work.

#279 From: TigerGutt <tigergutt@...>
Date: Wed Oct 29, 2003 12:22 am
Subject: Dual screen with Nvidia cards..
tigergud
Offline Offline
Send Email Send Email
 
Wazzup! ,

I was pondering about how to get good dual screen setup with various
hardware.

Found some hints here..

http://forums.xaprief.com/showthread.php?s=&threadid=2313

Any input in how we could control this from Amithlon ?

Best regards
--
Smith & Wesson: The Original Point And Click Interface

#278 From: "yyz_21122003" <yyz_21122003@...>
Date: Tue Oct 28, 2003 11:23 am
Subject: Run_elf
yyz_21122003
Offline Offline
Send Email Send Email
 
Hi,
I have compiled a c program with both linux (m68k-amigaos-gcc) and
amithlon.
When I run program with run_elf (1.6) a window popup tell me:

           Run_elf
UNDEFINED SYMBOL: _CallLib68k

or something like this :-P

On linux:
CC=m68k-amigaos-gcc
./configure
make

On amithlon:
i686be-amithlon-gcc -r -noixemul prog.c

What's wrong?
Regards

Messages 278 - 312 of 313   Newest  |  < Newer  |  Older >  |  Oldest
Advanced
Add to My Yahoo!      XML What's This?

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help