Re: Linking a single Glue API in the midlle of a C file
On Wed, Jul 9, 2008 at 10:18 PM, Luc Le Blanc wrote: Wow! That's too extreme for me. I link the Glue library anyway for various other APIs, so I'll let the linker do its smart linking and only pick what's needed. And best reason to go no further: it works! it was a suggestion if you got stuck and had no other choice. you should be thankful that the glue libraries are built from each function in their own .c file or you would not be able to selectively link the function used (specifically on a compiler like gcc - codewarrior might be smarter) On Wed, Jul 9, 2008 at 3:33 AM, Lionscribe wrote: Welcome back Aaron! You were very much missed. I see your humor has stayed with you. :-) i'm still lurking - still doing some work with Palm OS :) I wasn't seeing it as humor. You dont want to know some of the things we've had to do over the years to make certain things possible :) hacking assembly into your C code to get around bugs is very common. I'm sure Dmitiry can also comment on this :) -- // Aaron Ardiri -- For information on using the ACCESS Developer Forums, or to unsubscribe, please see http://www.access-company.com/developers/forums/
Re: Linking a single Glue API in the midlle of a C file
i don't do that. i hack C into my assembly instead :) On 7/10/08, Aaron Ardiri [EMAIL PROTECTED] wrote: On Wed, Jul 9, 2008 at 10:18 PM, Luc Le Blanc wrote: Wow! That's too extreme for me. I link the Glue library anyway for various other APIs, so I'll let the linker do its smart linking and only pick what's needed. And best reason to go no further: it works! it was a suggestion if you got stuck and had no other choice. you should be thankful that the glue libraries are built from each function in their own .c file or you would not be able to selectively link the function used (specifically on a compiler like gcc - codewarrior might be smarter) On Wed, Jul 9, 2008 at 3:33 AM, Lionscribe wrote: Welcome back Aaron! You were very much missed. I see your humor has stayed with you. :-) i'm still lurking - still doing some work with Palm OS :) I wasn't seeing it as humor. You dont want to know some of the things we've had to do over the years to make certain things possible :) hacking assembly into your C code to get around bugs is very common. I'm sure Dmitiry can also comment on this :) -- // Aaron Ardiri -- For information on using the ACCESS Developer Forums, or to unsubscribe, please see http://www.access-company.com/developers/forums/ -- Best Regards, Dmitry Grinberg (847) 226 9295 -- For information on using the ACCESS Developer Forums, or to unsubscribe, please see http://www.access-company.com/developers/forums/
Re: Linking a single Glue API in the midlle of a C file
On Tue, Jul 8, 2008 at 2:06 PM, Luc Le Blanc [EMAIL PROTECTED] wrote: My first app segment contains a single C file that embeds all procs that must be in the first segment in order to be able to properly handle Global Find and beamed data when the app is not running (i.e. global-less mode). Now, if I try to link the Glue Library to this in order to have access to LstGlueSetIncrementalSearch, I get out-of-reach references to this API. Can I link that single API in the middle of my C file? Otherwise, I tried splitting my C file in two and link the Glue Library between the two, but that causes lots of 16-bit jump problems. Ideas welcome, why not create a very simple program that calls the LstGlueSetIncrementalSearch function; then you can diassemble it using a combination of par, and pilotdis (par e code 1; pilotdis code0001.bin) then, you'll get a file called code0001.bin.s - which, has the assembly of the small demo program you wrote (that only calls the glue). the glue function will be appended at the end; and you should be able to cut and paste the assembler code into a C function declaration, embedded within asm tags. :) thats what i would do. its also a reason why the glue library code should be open source; so one could just use the function that they need (ie: c+p the code where they need) -- // Aaron Ardiri -- For information on using the ACCESS Developer Forums, or to unsubscribe, please see http://www.access-company.com/developers/forums/
Re: Linking a single Glue API in the midlle of a C file
Aaron Ardiri wrote: why not create a very simple program that calls the LstGlueSetIncrementalSearch function; then you can diassemble it using a combination of par, and pilotdis (par e code 1; pilotdis code0001.bin) then, you'll get a file called code0001.bin.s - which, has the assembly of the small demo program you wrote (that only calls the glue). the glue function will be appended at the end; and you should be able to cut and paste the assembler code into a C function declaration, embedded within asm tags. :) thats what i would do. Wow! That's too extreme for me. I link the Glue library anyway for various other APIs, so I'll let the linker do its smart linking and only pick what's needed. And best reason to go no further: it works! Luc Le Blanc -- For information on using the ACCESS Developer Forums, or to unsubscribe, please see http://www.access-company.com/developers/forums/
Re: Linking a single Glue API in the midlle of a C file
Welcome back Aaron! You were very much missed. I see your humor has stayed with you. :-) Lionscribe -- For information on using the ACCESS Developer Forums, or to unsubscribe, please see http://www.access-company.com/developers/forums/
Linking a single Glue API in the midlle of a C file
My first app segment contains a single C file that embeds all procs that must be in the first segment in order to be able to properly handle Global Find and beamed data when the app is not running (i.e. global-less mode). Now, if I try to link the Glue Library to this in order to have access to LstGlueSetIncrementalSearch, I get out-of-reach references to this API. Can I link that single API in the middle of my C file? Otherwise, I tried splitting my C file in two and link the Glue Library between the two, but that causes lots of 16-bit jump problems. Ideas welcome, Luc Le Blanc -- For information on using the ACCESS Developer Forums, or to unsubscribe, please see http://www.access-company.com/developers/forums/
Re: Linking a single Glue API in the midlle of a C file
in such case i think all you can do is reorder functions a bit or with switched optimizations you can make sequentional jumps to glue library (from place where you need LstGlueSetIncrementalSearch call small not inlineable function placed somewhere in the middle which will call LstGlueSetIncrementalSearch which will be linked after your main c file) i think this is what happens when you enable large code model in metrowerks (smart model may be enough too) Luc Le Blanc wrote: My first app segment contains a single C file that embeds all procs that must be in the first segment in order to be able to properly handle Global Find and beamed data when the app is not running (i.e. global-less mode). Now, if I try to link the Glue Library to this in order to have access to LstGlueSetIncrementalSearch, I get out-of-reach references to this API. Can I link that single API in the middle of my C file? Otherwise, I tried splitting my C file in two and link the Glue Library between the two, but that causes lots of 16-bit jump problems. Ideas welcome, Luc Le Blanc -- For information on using the ACCESS Developer Forums, or to unsubscribe, please see http://www.access-company.com/developers/forums/
Re: Linking a single Glue API in the midlle of a C file
Michal Seliga wrote: in such case i think all you can do is reorder functions a bit Been there, but I now hit the domino efect if I move anything :( or with switched optimizations you can make sequentional jumps to glue library (from place where you need LstGlueSetIncrementalSearch call small not inlineable function placed somewhere in the middle which will call LstGlueSetIncrementalSearch which will be linked after your main c file) This is smart! (and so simple!) I just added : #pragma dont_inline on void LstSetIncrementalSearch( ListPtr list, Boolean enable ) { LstGlueSetIncrementalSearch( list, enable ); } #pragma dont_inline reset at about half of my C file, and things work fine. Thanks! Luc Le Blanc -- For information on using the ACCESS Developer Forums, or to unsubscribe, please see http://www.access-company.com/developers/forums/