Lines Matching refs:context
74 decContext *decContextClearStatus(decContext *context, uInt mask) { in decContextClearStatus() argument
75 context->status&=~mask; in decContextClearStatus()
76 return context; in decContextClearStatus()
92 decContext * decContextDefault(decContext *context, Int kind) { in decContextDefault() argument
94 context->digits=9; /* 9 digits */ in decContextDefault()
95 context->emax=DEC_MAX_EMAX; /* 9-digit exponents */ in decContextDefault()
96 context->emin=DEC_MIN_EMIN; /* .. balanced */ in decContextDefault()
97 context->round=DEC_ROUND_HALF_UP; /* 0.5 rises */ in decContextDefault()
98 context->traps=DEC_Errors; /* all but informational */ in decContextDefault()
99 context->status=0; /* cleared */ in decContextDefault()
100 context->clamp=0; /* no clamping */ in decContextDefault()
102 context->extended=0; /* cleared */ in decContextDefault()
109 context->digits=7; /* digits */ in decContextDefault()
110 context->emax=96; /* Emax */ in decContextDefault()
111 context->emin=-95; /* Emin */ in decContextDefault()
112 context->round=DEC_ROUND_HALF_EVEN; /* 0.5 to nearest even */ in decContextDefault()
113 context->traps=0; /* no traps set */ in decContextDefault()
114 context->clamp=1; /* clamp exponents */ in decContextDefault()
116 context->extended=1; /* set */ in decContextDefault()
120 context->digits=16; /* digits */ in decContextDefault()
121 context->emax=384; /* Emax */ in decContextDefault()
122 context->emin=-383; /* Emin */ in decContextDefault()
123 context->round=DEC_ROUND_HALF_EVEN; /* 0.5 to nearest even */ in decContextDefault()
124 context->traps=0; /* no traps set */ in decContextDefault()
125 context->clamp=1; /* clamp exponents */ in decContextDefault()
127 context->extended=1; /* set */ in decContextDefault()
131 context->digits=34; /* digits */ in decContextDefault()
132 context->emax=6144; /* Emax */ in decContextDefault()
133 context->emin=-6143; /* Emin */ in decContextDefault()
134 context->round=DEC_ROUND_HALF_EVEN; /* 0.5 to nearest even */ in decContextDefault()
135 context->traps=0; /* no traps set */ in decContextDefault()
136 context->clamp=1; /* clamp exponents */ in decContextDefault()
138 context->extended=1; /* set */ in decContextDefault()
144 decContextSetStatus(context, DEC_Invalid_operation); /* trap */ in decContextDefault()
156 return context;} /* decContextDefault */ in decContextDefault()
166 enum rounding decContextGetRounding(decContext *context) { in decContextGetRounding() argument
167 return context->round; in decContextGetRounding()
178 uInt decContextGetStatus(decContext *context) { in decContextGetStatus() argument
179 return context->status; in decContextGetStatus()
194 decContext *decContextRestoreStatus(decContext *context, in decContextRestoreStatus() argument
196 context->status&=~mask; /* clear the selected bits */ in decContextRestoreStatus()
197 context->status|=(mask&newstatus); /* or in the new bits */ in decContextRestoreStatus()
198 return context; in decContextRestoreStatus()
211 uInt decContextSaveStatus(decContext *context, uInt mask) { in decContextSaveStatus() argument
212 return context->status&mask; in decContextSaveStatus()
224 decContext *decContextSetRounding(decContext *context, in decContextSetRounding() argument
226 context->round=newround; in decContextSetRounding()
227 return context; in decContextSetRounding()
240 decContext * decContextSetStatus(decContext *context, uInt status) { in decContextSetStatus() argument
241 context->status|=status; in decContextSetStatus()
242 if (status & context->traps) raise(SIGFPE); in decContextSetStatus()
243 return context;} /* decContextSetStatus */ in decContextSetStatus()
259 decContext * decContextSetStatusFromString(decContext *context, in decContextSetStatusFromString() argument
262 return decContextSetStatus(context, DEC_Conversion_syntax); in decContextSetStatusFromString()
264 return decContextSetStatus(context, DEC_Division_by_zero); in decContextSetStatusFromString()
266 return decContextSetStatus(context, DEC_Division_impossible); in decContextSetStatusFromString()
268 return decContextSetStatus(context, DEC_Division_undefined); in decContextSetStatusFromString()
270 return decContextSetStatus(context, DEC_Inexact); in decContextSetStatusFromString()
272 return decContextSetStatus(context, DEC_Insufficient_storage); in decContextSetStatusFromString()
274 return decContextSetStatus(context, DEC_Invalid_context); in decContextSetStatusFromString()
276 return decContextSetStatus(context, DEC_Invalid_operation); in decContextSetStatusFromString()
279 return decContextSetStatus(context, DEC_Lost_digits); in decContextSetStatusFromString()
282 return decContextSetStatus(context, DEC_Overflow); in decContextSetStatusFromString()
284 return decContextSetStatus(context, DEC_Clamped); in decContextSetStatusFromString()
286 return decContextSetStatus(context, DEC_Rounded); in decContextSetStatusFromString()
288 return decContextSetStatus(context, DEC_Subnormal); in decContextSetStatusFromString()
290 return decContextSetStatus(context, DEC_Underflow); in decContextSetStatusFromString()
292 return context; in decContextSetStatusFromString()
310 decContext * decContextSetStatusFromStringQuiet(decContext *context, in decContextSetStatusFromStringQuiet() argument
313 return decContextSetStatusQuiet(context, DEC_Conversion_syntax); in decContextSetStatusFromStringQuiet()
315 return decContextSetStatusQuiet(context, DEC_Division_by_zero); in decContextSetStatusFromStringQuiet()
317 return decContextSetStatusQuiet(context, DEC_Division_impossible); in decContextSetStatusFromStringQuiet()
319 return decContextSetStatusQuiet(context, DEC_Division_undefined); in decContextSetStatusFromStringQuiet()
321 return decContextSetStatusQuiet(context, DEC_Inexact); in decContextSetStatusFromStringQuiet()
323 return decContextSetStatusQuiet(context, DEC_Insufficient_storage); in decContextSetStatusFromStringQuiet()
325 return decContextSetStatusQuiet(context, DEC_Invalid_context); in decContextSetStatusFromStringQuiet()
327 return decContextSetStatusQuiet(context, DEC_Invalid_operation); in decContextSetStatusFromStringQuiet()
330 return decContextSetStatusQuiet(context, DEC_Lost_digits); in decContextSetStatusFromStringQuiet()
333 return decContextSetStatusQuiet(context, DEC_Overflow); in decContextSetStatusFromStringQuiet()
335 return decContextSetStatusQuiet(context, DEC_Clamped); in decContextSetStatusFromStringQuiet()
337 return decContextSetStatusQuiet(context, DEC_Rounded); in decContextSetStatusFromStringQuiet()
339 return decContextSetStatusQuiet(context, DEC_Subnormal); in decContextSetStatusFromStringQuiet()
341 return decContextSetStatusQuiet(context, DEC_Underflow); in decContextSetStatusFromStringQuiet()
343 return context; in decContextSetStatusFromStringQuiet()
356 decContext * decContextSetStatusQuiet(decContext *context, uInt status) { in decContextSetStatusQuiet() argument
357 context->status|=status; in decContextSetStatusQuiet()
358 return context;} /* decContextSetStatusQuiet */ in decContextSetStatusQuiet()
368 const char *decContextStatusToString(const decContext *context) { in decContextStatusToString() argument
369 Int status=context->status; in decContextStatusToString()
418 uInt decContextTestStatus(decContext *context, uInt mask) { in decContextTestStatus() argument
419 return (context->status&mask)!=0; in decContextTestStatus()
430 decContext *decContextZeroStatus(decContext *context) { in decContextZeroStatus() argument
431 context->status=0; in decContextZeroStatus()
432 return context; in decContextZeroStatus()