rick@nvzg2.UUCP (Rick Gessner) (11/15/85)
Can anybody out there tell me what the second parameter to IUDateString is supposed to be???????? In looking at the assembler source that Andrew Shebanow posted for the "Pascal" Library interfaces for C, it is supposed to be: DateForm *form; which is then pushed on the stack and Pack6 is trapped with a selection of 0. Not being very fluent in things Pascalish I cannot 'figger out' what IM is trying to tell me DateForm is supposed to be. Any help would be greatly appreciated. Thanks in advance. (seems like i heard that before) Rick __________ | ______ | (Rick Gessner) | |??????| | (AT&T Information Systems) | |??????| | (SDSS-Tech Support) | ------ | (Altamonte Springs, FL) | * +--- | |----------| (My opinions are just that....,etc.) |__________| (ihnp4!codas!nvzg2!rick)
spector@acf4.UUCP (David HM Spector) (11/23/85)
I had the same problem with IUDateString. DateForm is an implicit byte. Basically, in assembly you want to do some thing like: TimeStr move.l Time,(SP) ; push the time global move.b abbrevDate,-(SP) ; or longDate,shortDate pea StringStorage ; where to put the result.. _IUDateString lea StringStorage,A2 ; get pointer to result The move.b will put the [0|1|2] in the proper position and pad things to keep the stack aligned. Hope this helps... David Spector NYU/acf Systems Group SPECTOR@NYU ...!{allegra,siesmo,rocky}!cmcl2!spector ^--that's an L not a one.
spector@acf4.UUCP (David HM Spector) (11/23/85)
I had the same problem with IUDateString. DateForm is an implicit byte. Basicly, in assembly you want to do some thing like: TimeStr move.l Time,(SP) ; push the time global move.b abbrevDate,-(SP) ; or longDate,shortDate pea StringStorage ; where to put the result.. _IUDateString lea StringStorage,A2 ; get pointer to result The move.b will put the [0|1|2] in the proper position and pad things to keep the stack aligned. Hope this helps... David Spector NYU/acf Systems Group SPECTOR@NYU ...!{allegra,siesmo,rocky}!cmcl2!spector ^--that's an L not a one.
shebanow@ernie.BERKELEY.EDU (Mike Shebanow) (11/25/85)
(Beware the line eater) The problem is twofold. First of all, I incorrectly labeled the parameter. The actual conventions are: void IUDateString(dateTime,form,result) long dateTime; (D0.L) DateForm form; (D1.W) Str255 *result; (D2.L) The dateform values are defined in Packages.h (at least for Consulair C). For reference, they are: // long flag specifying short date format #define shortDate 0 // long flag specifying long date format #define longDate 256 // long flag specifying medium date format #define medDate 512 Hope this helps. Incidentally, expect a new version of this library code, with many bug fixes & new routines, to appear in net.sources.mac shortly. The source + object is more than 70K, so it will be posted in small chunks over the space of several weeks. Andrew Shebanow shebanow@ucbernie