comparison src/mac.c @ 61338:b44917251d3a

(cfdate_to_lisp): Add `const' for variable `epoch_gdate'. (Fmac_get_preference): Doc fix.
author YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
date Wed, 06 Apr 2005 02:23:37 +0000
parents 40fe172d199c
children 72c95a1c84c6 02f1dbc4a199
comparison
equal deleted inserted replaced
61337:3e5d6db23314 61338:b44917251d3a
362 return result; 362 return result;
363 } 363 }
364 364
365 365
366 /* CFDate to a list of three integers as in a return value of 366 /* CFDate to a list of three integers as in a return value of
367 `current-time'xo. */ 367 `current-time'. */
368 368
369 Lisp_Object 369 Lisp_Object
370 cfdate_to_lisp (date) 370 cfdate_to_lisp (date)
371 CFDateRef date; 371 CFDateRef date;
372 { 372 {
373 static CFGregorianDate epoch_gdate = {1970, 1, 1, 0, 0, 0.0}; 373 static const CFGregorianDate epoch_gdate = {1970, 1, 1, 0, 0, 0.0};
374 static CFAbsoluteTime epoch = 0.0, sec; 374 static CFAbsoluteTime epoch = 0.0, sec;
375 int high, low; 375 int high, low;
376 376
377 if (epoch == 0.0) 377 if (epoch == 0.0)
378 epoch = CFGregorianDateGetAbsoluteTime (epoch_gdate, NULL); 378 epoch = CFGregorianDateGetAbsoluteTime (epoch_gdate, NULL);
666 component = parse_component (p); 666 component = parse_component (p);
667 if (NILP (component)) 667 if (NILP (component))
668 return Qnil; 668 return Qnil;
669 669
670 result = Fcons (component, result); 670 result = Fcons (component, result);
671 while (binding = parse_binding (p)) 671 while ((binding = parse_binding (p)) != '\0')
672 { 672 {
673 if (binding == '*') 673 if (binding == '*')
674 result = Fcons (LOOSE_BINDING, result); 674 result = Fcons (LOOSE_BINDING, result);
675 component = parse_component (p); 675 component = parse_component (p);
676 if (NILP (component)) 676 if (NILP (component))
3660 CFNumber Integer or float number 3660 CFNumber Integer or float number
3661 CFBoolean Symbol (t or nil) boolean 3661 CFBoolean Symbol (t or nil) boolean
3662 CFDate List of three integers date 3662 CFDate List of three integers date
3663 (cf. `current-time') 3663 (cf. `current-time')
3664 CFData Unibyte string data 3664 CFData Unibyte string data
3665 CFArray Array array 3665 CFArray Vector array
3666 CFDictionary Alist or hash table dictionary 3666 CFDictionary Alist or hash table dictionary
3667 (depending on HASH-BOUND) 3667 (depending on HASH-BOUND)
3668 3668
3669 If it is t, a symbol that represents the type of the original Core 3669 If it is t, a symbol that represents the type of the original Core
3670 Foundation object is prepended. If it is `xml', the value is returned 3670 Foundation object is prepended. If it is `xml', the value is returned
4172 { 4172 {
4173 QCLIPBOARD = intern ("CLIPBOARD"); 4173 QCLIPBOARD = intern ("CLIPBOARD");
4174 staticpro (&QCLIPBOARD); 4174 staticpro (&QCLIPBOARD);
4175 4175
4176 #if TARGET_API_MAC_CARBON 4176 #if TARGET_API_MAC_CARBON
4177 Qstring = intern ("string"); 4177 Qstring = intern ("string"); staticpro (&Qstring);
4178 staticpro (&Qstring); 4178 Qnumber = intern ("number"); staticpro (&Qnumber);
4179 4179 Qboolean = intern ("boolean"); staticpro (&Qboolean);
4180 Qnumber = intern ("number"); 4180 Qdate = intern ("date"); staticpro (&Qdate);
4181 staticpro (&Qnumber); 4181 Qdata = intern ("data"); staticpro (&Qdata);
4182 4182 Qarray = intern ("array"); staticpro (&Qarray);
4183 Qboolean = intern ("boolean"); 4183 Qdictionary = intern ("dictionary"); staticpro (&Qdictionary);
4184 staticpro (&Qboolean);
4185
4186 Qdate = intern ("date");
4187 staticpro (&Qdate);
4188
4189 Qdata = intern ("data");
4190 staticpro (&Qdata);
4191
4192 Qarray = intern ("array");
4193 staticpro (&Qarray);
4194
4195 Qdictionary = intern ("dictionary");
4196 staticpro (&Qdictionary);
4197 4184
4198 Qxml = intern ("xml"); 4185 Qxml = intern ("xml");
4199 staticpro (&Qxml); 4186 staticpro (&Qxml);
4200 #endif 4187 #endif
4201 4188