Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] It's time_t to Party!
- Date: Tue, 6 Dec 2005 14:49:30 -0500
- From: Jim <jep200404@example.com>
- Subject: Re: [tlug] It's time_t to Party!
- References: <20051202154627.GB4348@example.com> <20051202152527.302e2f6f.jep200404@example.com> <20051203122655.GG4348@example.com> <20051203092314.3118db01.jep200404@example.com> <20051204100726.GH4348@example.com> <30ce84360512040313l351f16c4r1872cb4f6f34679e@example.com> <20051206082734.GB4319@example.com> <20051206134111.28de6309.jep200404@example.com> <87zmnem4nh.fsf@example.com>
Stephen J. Turnbull wrote: > > >>>>> "Jim" == Jim <jep200404@example.com> writes: > > Jim> Unfortunately, I don't know how to say: > > Jim> printf("%(type_t)d...",ts.tv_sec); > > #if sizeof(type_t)==sizeof(long) > #define TYPE_T_F "%ld" > #endif > > printf (TYPE_T_F "...", ts.tv_sec); I can't think of a better way to salvage printf(), especially if something like TYPE_T_F was adopted in the headers as a standard (if appropriate). I would make that a little bit more flexible by leaving out the '%' to allow for more modifiers: #if sizeof(type_t)==sizeof(long) #define TYPE_T_F "ld" #elif #define TYPE_T_F "d" #endif to allow for some craziness like: printf("%-10.5" TYPE_T_F "...",ts.tv_sec); Jim
- Follow-Ups:
- Re: [tlug] It's time_t to Party!
- From: Stephen J. Turnbull
- References:
- [tlug] timing for geeks :)
- From: Michal Hajek
- Re: [tlug] timing for geeks
- From: Jim
- Re: [tlug] timing for geeks
- From: Michal Hajek
- Re: [tlug] A Rich Experiment Indeed
- From: Jim
- Re: [tlug] A Rich Experiment Indeed
- From: Michal Hajek
- Re: [tlug] A Rich Experiment Indeed
- From: Ian Wells
- Re: [tlug] timing for geeks II.
- From: Michal Hajek
- Re: [tlug] It's time_t to Party!
- From: Jim
- Re: [tlug] It's time_t to Party!
- From: Stephen J. Turnbull
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] It's time_t to Party!
- Next by Date: Re: [tlug] "UTF-8 & ISO-2022-JP"
- Previous by thread: Re: [tlug] It's time_t to Party!
- Next by thread: Re: [tlug] It's time_t to Party!
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links