diff --git src/kits/locale/Locale.cpp src/kits/locale/Locale.cpp
index 53edd1a..2b0208b 100644
|
|
BLocale::GetLanguage(BLanguage* language) const
|
113 | 113 | |
114 | 114 | BAutolock lock(fLock); |
115 | 115 | if (!lock.IsLocked()) |
116 | | return B_ERROR; |
| 116 | return B_WOULD_BLOCK; |
117 | 117 | |
118 | 118 | *language = fLanguage; |
119 | 119 | |
… |
… |
BLocale::GetFormattingConventions(BFormattingConventions* conventions) const
|
129 | 129 | |
130 | 130 | BAutolock lock(fLock); |
131 | 131 | if (!lock.IsLocked()) |
132 | | return B_ERROR; |
| 132 | return B_WOULD_BLOCK; |
133 | 133 | |
134 | 134 | *conventions = fConventions; |
135 | 135 | |
… |
… |
BLocale::FormatDate(char* string, size_t maxSize, time_t time,
|
198 | 198 | { |
199 | 199 | BAutolock lock(fLock); |
200 | 200 | if (!lock.IsLocked()) |
201 | | return B_ERROR; |
| 201 | return B_WOULD_BLOCK; |
202 | 202 | |
203 | 203 | BString format; |
204 | 204 | fConventions.GetDateFormat(style, format); |
… |
… |
BLocale::FormatDate(BString *string, time_t time, BDateFormatStyle style,
|
225 | 225 | { |
226 | 226 | BAutolock lock(fLock); |
227 | 227 | if (!lock.IsLocked()) |
228 | | return B_ERROR; |
| 228 | return B_WOULD_BLOCK; |
229 | 229 | |
230 | 230 | BString format; |
231 | 231 | fConventions.GetDateFormat(style, format); |
… |
… |
BLocale::FormatDate(BString* string, int*& fieldPositions, int& fieldCount,
|
258 | 258 | { |
259 | 259 | BAutolock lock(fLock); |
260 | 260 | if (!lock.IsLocked()) |
261 | | return B_ERROR; |
| 261 | return B_WOULD_BLOCK; |
262 | 262 | |
263 | 263 | BString format; |
264 | 264 | fConventions.GetDateFormat(style, format); |
… |
… |
BLocale::GetDateFields(BDateElement*& fields, int& fieldCount,
|
305 | 305 | { |
306 | 306 | BAutolock lock(fLock); |
307 | 307 | if (!lock.IsLocked()) |
308 | | return B_ERROR; |
| 308 | return B_WOULD_BLOCK; |
309 | 309 | |
310 | 310 | BString format; |
311 | 311 | fConventions.GetDateFormat(style, format); |
… |
… |
BLocale::StartOfWeek() const
|
360 | 360 | { |
361 | 361 | BAutolock lock(fLock); |
362 | 362 | if (!lock.IsLocked()) |
363 | | return B_ERROR; |
| 363 | return B_WOULD_BLOCK; |
364 | 364 | |
365 | 365 | UErrorCode err = U_ZERO_ERROR; |
366 | 366 | Calendar* c = Calendar::createInstance( |
… |
… |
BLocale::FormatDateTime(char* target, size_t maxSize, time_t time,
|
384 | 384 | { |
385 | 385 | BAutolock lock(fLock); |
386 | 386 | if (!lock.IsLocked()) |
387 | | return B_ERROR; |
| 387 | return B_WOULD_BLOCK; |
388 | 388 | |
389 | 389 | BString format; |
390 | 390 | fConventions.GetDateFormat(dateStyle, format); |
… |
… |
BLocale::FormatDateTime(BString* target, time_t time,
|
421 | 421 | { |
422 | 422 | BAutolock lock(fLock); |
423 | 423 | if (!lock.IsLocked()) |
424 | | return B_ERROR; |
| 424 | return B_WOULD_BLOCK; |
425 | 425 | |
426 | 426 | BString format; |
427 | 427 | fConventions.GetDateFormat(dateStyle, format); |
… |
… |
BLocale::FormatTime(char* string, size_t maxSize, time_t time,
|
464 | 464 | { |
465 | 465 | BAutolock lock(fLock); |
466 | 466 | if (!lock.IsLocked()) |
467 | | return B_ERROR; |
| 467 | return B_WOULD_BLOCK; |
468 | 468 | |
469 | 469 | BString format; |
470 | 470 | fConventions.GetTimeFormat(style, format); |
… |
… |
BLocale::FormatTime(BString* string, time_t time, BTimeFormatStyle style,
|
491 | 491 | { |
492 | 492 | BAutolock lock(fLock); |
493 | 493 | if (!lock.IsLocked()) |
494 | | return B_ERROR; |
| 494 | return B_WOULD_BLOCK; |
495 | 495 | |
496 | 496 | BString format; |
497 | 497 | fConventions.GetTimeFormat(style, format); |
… |
… |
BLocale::FormatTime(BString* string, int*& fieldPositions, int& fieldCount,
|
524 | 524 | { |
525 | 525 | BAutolock lock(fLock); |
526 | 526 | if (!lock.IsLocked()) |
527 | | return B_ERROR; |
| 527 | return B_WOULD_BLOCK; |
528 | 528 | |
529 | 529 | BString format; |
530 | 530 | fConventions.GetTimeFormat(style, format); |
… |
… |
BLocale::GetTimeFields(BDateElement*& fields, int& fieldCount,
|
570 | 570 | { |
571 | 571 | BAutolock lock(fLock); |
572 | 572 | if (!lock.IsLocked()) |
573 | | return B_ERROR; |
| 573 | return B_WOULD_BLOCK; |
574 | 574 | |
575 | 575 | BString format; |
576 | 576 | fConventions.GetTimeFormat(style, format); |
… |
… |
BLocale::FormatNumber(BString* string, double value) const
|
646 | 646 | { |
647 | 647 | BAutolock lock(fLock); |
648 | 648 | if (!lock.IsLocked()) |
649 | | return B_ERROR; |
| 649 | return B_WOULD_BLOCK; |
650 | 650 | |
651 | 651 | UErrorCode err = U_ZERO_ERROR; |
652 | 652 | ObjectDeleter<NumberFormat> numberFormatter(NumberFormat::createInstance( |
… |
… |
BLocale::FormatNumber(BString* string, int32 value) const
|
686 | 686 | { |
687 | 687 | BAutolock lock(fLock); |
688 | 688 | if (!lock.IsLocked()) |
689 | | return B_ERROR; |
| 689 | return B_WOULD_BLOCK; |
690 | 690 | |
691 | 691 | UErrorCode err = U_ZERO_ERROR; |
692 | 692 | ObjectDeleter<NumberFormat> numberFormatter(NumberFormat::createInstance( |
… |
… |
BLocale::FormatMonetary(BString* string, double value) const
|
729 | 729 | |
730 | 730 | BAutolock lock(fLock); |
731 | 731 | if (!lock.IsLocked()) |
732 | | return B_ERROR; |
| 732 | return B_WOULD_BLOCK; |
733 | 733 | |
734 | 734 | UErrorCode err = U_ZERO_ERROR; |
735 | 735 | ObjectDeleter<NumberFormat> numberFormatter( |