Re: XForms: problems with fl_get_choice_text

Ivan Powis (pczip@chemistry.nottingham.ac.uk)
Thu, 06 Nov 1997 11:35:18 GMT

To subscribers of the xforms list from Ivan Powis <pczip@chemistry.nottingham.ac.uk> :

>
> To subscribers of the xforms list from Bjoern Fuerst <fuerst@kph.uni-mainz.de> :
>
> sscanf((char *)datum(),"%*s %s %d %s %d",monat,&tag,time_string,&jahr);
>
> int tag;
> char monat[6];
> int jahr;
> char *time_string;
>
> /* (tag=day, monat=month, jahr=year)
>
> datum() returns something like "Thu Nov 6 11:12:34 1997"
>
> and the sscanf should get the things into the different variables
>
> %*s omits the first (Thu)
> %s writes "Nov" into monat (=char monat[6])
> %d writes 6 into tag
> %s writes "11:12:34" into time_string
> %d writes 1997 into jahr
>

time_string is a pointer, is it set to point to allocated storage?
or should it be char time_string[6] ??

--
-------------------------------------------------------------------------+
    ___  ___/   _  __ /  Ivan Powis                TEL: +44-115-951-3467 |
        /         /   /  Department of Chemistry   FAX: +44-115-951-3562 |
       /         /  _/   University of Nottingham                        |
      /         ___/     Nottingham NG7 2RD                              |
     /         /         UK                                              |
    /         /                      pczip@chem.nott.ac.uk               | 
_______/  ____/                      http://www.chem.nott.ac.uk/IP.html  |
-------------------------------------------------------------------------+

_________________________________________________ To unsubscribe, send the message "unsubscribe" to xforms-request@bob.usuf2.usuhs.mil or see http://bob.usuf2.usuhs.mil/mailserv/xforms.html Xforms Home Page: http://bragg.phys.uwm.edu/xforms List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/