Lines Matching refs:context

47 U_CAPI decContext * U_EXPORT2 uprv_decContextClearStatus(decContext *context, uInt mask) {  in uprv_decContextClearStatus()  argument
48 context->status&=~mask; in uprv_decContextClearStatus()
49 return context; in uprv_decContextClearStatus()
65 U_CAPI decContext * U_EXPORT2 uprv_decContextDefault(decContext *context, Int kind) { in uprv_decContextDefault() argument
67 context->digits=9; /* 9 digits */ in uprv_decContextDefault()
68 context->emax=DEC_MAX_EMAX; /* 9-digit exponents */ in uprv_decContextDefault()
69 context->emin=DEC_MIN_EMIN; /* .. balanced */ in uprv_decContextDefault()
70 context->round=DEC_ROUND_HALF_UP; /* 0.5 rises */ in uprv_decContextDefault()
71 context->traps=DEC_Errors; /* all but informational */ in uprv_decContextDefault()
72 context->status=0; /* cleared */ in uprv_decContextDefault()
73 context->clamp=0; /* no clamping */ in uprv_decContextDefault()
75 context->extended=0; /* cleared */ in uprv_decContextDefault()
82 context->digits=7; /* digits */ in uprv_decContextDefault()
83 context->emax=96; /* Emax */ in uprv_decContextDefault()
84 context->emin=-95; /* Emin */ in uprv_decContextDefault()
85 context->round=DEC_ROUND_HALF_EVEN; /* 0.5 to nearest even */ in uprv_decContextDefault()
86 context->traps=0; /* no traps set */ in uprv_decContextDefault()
87 context->clamp=1; /* clamp exponents */ in uprv_decContextDefault()
89 context->extended=1; /* set */ in uprv_decContextDefault()
93 context->digits=16; /* digits */ in uprv_decContextDefault()
94 context->emax=384; /* Emax */ in uprv_decContextDefault()
95 context->emin=-383; /* Emin */ in uprv_decContextDefault()
96 context->round=DEC_ROUND_HALF_EVEN; /* 0.5 to nearest even */ in uprv_decContextDefault()
97 context->traps=0; /* no traps set */ in uprv_decContextDefault()
98 context->clamp=1; /* clamp exponents */ in uprv_decContextDefault()
100 context->extended=1; /* set */ in uprv_decContextDefault()
104 context->digits=34; /* digits */ in uprv_decContextDefault()
105 context->emax=6144; /* Emax */ in uprv_decContextDefault()
106 context->emin=-6143; /* Emin */ in uprv_decContextDefault()
107 context->round=DEC_ROUND_HALF_EVEN; /* 0.5 to nearest even */ in uprv_decContextDefault()
108 context->traps=0; /* no traps set */ in uprv_decContextDefault()
109 context->clamp=1; /* clamp exponents */ in uprv_decContextDefault()
111 context->extended=1; /* set */ in uprv_decContextDefault()
117 uprv_decContextSetStatus(context, DEC_Invalid_operation); /* trap */ in uprv_decContextDefault()
120 return context;} /* decContextDefault */ in uprv_decContextDefault()
130 U_CAPI enum rounding U_EXPORT2 uprv_decContextGetRounding(decContext *context) { in uprv_decContextGetRounding() argument
131 return context->round; in uprv_decContextGetRounding()
142 U_CAPI uInt U_EXPORT2 uprv_decContextGetStatus(decContext *context) { in uprv_decContextGetStatus() argument
143 return context->status; in uprv_decContextGetStatus()
158 U_CAPI decContext * U_EXPORT2 uprv_decContextRestoreStatus(decContext *context, in uprv_decContextRestoreStatus() argument
160 context->status&=~mask; /* clear the selected bits */ in uprv_decContextRestoreStatus()
161 context->status|=(mask&newstatus); /* or in the new bits */ in uprv_decContextRestoreStatus()
162 return context; in uprv_decContextRestoreStatus()
175 U_CAPI uInt U_EXPORT2 uprv_decContextSaveStatus(decContext *context, uInt mask) { in uprv_decContextSaveStatus() argument
176 return context->status&mask; in uprv_decContextSaveStatus()
188 U_CAPI decContext * U_EXPORT2 uprv_decContextSetRounding(decContext *context, in uprv_decContextSetRounding() argument
190 context->round=newround; in uprv_decContextSetRounding()
191 return context; in uprv_decContextSetRounding()
204 U_CAPI decContext * U_EXPORT2 uprv_decContextSetStatus(decContext *context, uInt status) { in uprv_decContextSetStatus() argument
205 context->status|=status; in uprv_decContextSetStatus()
207 if (status & context->traps) raise(SIGFPE); in uprv_decContextSetStatus()
209 return context;} /* decContextSetStatus */ in uprv_decContextSetStatus()
225 U_CAPI decContext * U_EXPORT2 uprv_decContextSetStatusFromString(decContext *context, in uprv_decContextSetStatusFromString() argument
228 return uprv_decContextSetStatus(context, DEC_Conversion_syntax); in uprv_decContextSetStatusFromString()
230 return uprv_decContextSetStatus(context, DEC_Division_by_zero); in uprv_decContextSetStatusFromString()
232 return uprv_decContextSetStatus(context, DEC_Division_impossible); in uprv_decContextSetStatusFromString()
234 return uprv_decContextSetStatus(context, DEC_Division_undefined); in uprv_decContextSetStatusFromString()
236 return uprv_decContextSetStatus(context, DEC_Inexact); in uprv_decContextSetStatusFromString()
238 return uprv_decContextSetStatus(context, DEC_Insufficient_storage); in uprv_decContextSetStatusFromString()
240 return uprv_decContextSetStatus(context, DEC_Invalid_context); in uprv_decContextSetStatusFromString()
242 return uprv_decContextSetStatus(context, DEC_Invalid_operation); in uprv_decContextSetStatusFromString()
245 return uprv_decContextSetStatus(context, DEC_Lost_digits); in uprv_decContextSetStatusFromString()
248 return uprv_decContextSetStatus(context, DEC_Overflow); in uprv_decContextSetStatusFromString()
250 return uprv_decContextSetStatus(context, DEC_Clamped); in uprv_decContextSetStatusFromString()
252 return uprv_decContextSetStatus(context, DEC_Rounded); in uprv_decContextSetStatusFromString()
254 return uprv_decContextSetStatus(context, DEC_Subnormal); in uprv_decContextSetStatusFromString()
256 return uprv_decContextSetStatus(context, DEC_Underflow); in uprv_decContextSetStatusFromString()
258 return context; in uprv_decContextSetStatusFromString()
276 U_CAPI decContext * U_EXPORT2 uprv_decContextSetStatusFromStringQuiet(decContext *context, in uprv_decContextSetStatusFromStringQuiet() argument
279 return uprv_decContextSetStatusQuiet(context, DEC_Conversion_syntax); in uprv_decContextSetStatusFromStringQuiet()
281 return uprv_decContextSetStatusQuiet(context, DEC_Division_by_zero); in uprv_decContextSetStatusFromStringQuiet()
283 return uprv_decContextSetStatusQuiet(context, DEC_Division_impossible); in uprv_decContextSetStatusFromStringQuiet()
285 return uprv_decContextSetStatusQuiet(context, DEC_Division_undefined); in uprv_decContextSetStatusFromStringQuiet()
287 return uprv_decContextSetStatusQuiet(context, DEC_Inexact); in uprv_decContextSetStatusFromStringQuiet()
289 return uprv_decContextSetStatusQuiet(context, DEC_Insufficient_storage); in uprv_decContextSetStatusFromStringQuiet()
291 return uprv_decContextSetStatusQuiet(context, DEC_Invalid_context); in uprv_decContextSetStatusFromStringQuiet()
293 return uprv_decContextSetStatusQuiet(context, DEC_Invalid_operation); in uprv_decContextSetStatusFromStringQuiet()
296 return uprv_decContextSetStatusQuiet(context, DEC_Lost_digits); in uprv_decContextSetStatusFromStringQuiet()
299 return uprv_decContextSetStatusQuiet(context, DEC_Overflow); in uprv_decContextSetStatusFromStringQuiet()
301 return uprv_decContextSetStatusQuiet(context, DEC_Clamped); in uprv_decContextSetStatusFromStringQuiet()
303 return uprv_decContextSetStatusQuiet(context, DEC_Rounded); in uprv_decContextSetStatusFromStringQuiet()
305 return uprv_decContextSetStatusQuiet(context, DEC_Subnormal); in uprv_decContextSetStatusFromStringQuiet()
307 return uprv_decContextSetStatusQuiet(context, DEC_Underflow); in uprv_decContextSetStatusFromStringQuiet()
309 return context; in uprv_decContextSetStatusFromStringQuiet()
322 U_CAPI decContext * U_EXPORT2 uprv_decContextSetStatusQuiet(decContext *context, uInt status) { in uprv_decContextSetStatusQuiet() argument
323 context->status|=status; in uprv_decContextSetStatusQuiet()
324 return context;} /* decContextSetStatusQuiet */ in uprv_decContextSetStatusQuiet()
334 U_CAPI const char * U_EXPORT2 uprv_decContextStatusToString(const decContext *context) { in uprv_decContextStatusToString() argument
335 Int status=context->status; in uprv_decContextStatusToString()
416 U_CAPI uInt U_EXPORT2 uprv_decContextTestStatus(decContext *context, uInt mask) { in uprv_decContextTestStatus() argument
417 return (context->status&mask)!=0; in uprv_decContextTestStatus()
428 U_CAPI decContext * U_EXPORT2 uprv_decContextZeroStatus(decContext *context) { in uprv_decContextZeroStatus() argument
429 context->status=0; in uprv_decContextZeroStatus()
430 return context; in uprv_decContextZeroStatus()