Lines Matching defs:flags

81 static inline int is_valid_sbcs_mapping( const struct sbcs_table *table, int flags,
84 if ((flags & WC_NO_BEST_FIT_CHARS) || ch == (unsigned char)table->info.def_char)
90 static int get_length_sbcs( const struct sbcs_table *table, int flags,
106 if ((flags & WC_COMPOSITECHECK) && (srclen > 1) && (composed = compose(src)))
110 if (is_valid_sbcs_mapping( table, flags, composed, ch ))
117 /* no mapping for the composed char, check the other flags */
118 if (flags & WC_DEFAULTCHAR) /* use the default char instead */
125 if (flags & WC_DISCARDNS) /* skip the second char of the composition */
135 *used = !is_valid_sbcs_mapping( table, flags, wch, ch );
205 /* slow version of wcstombs_sbcs that handles the various flags */
206 static int wcstombs_sbcs_slow( const struct sbcs_table *table, int flags,
230 if ((flags & WC_COMPOSITECHECK) && (srclen > 1) && (composed = compose(src)))
234 if (is_valid_sbcs_mapping( table, flags, composed, *dst ))
241 /* no mapping for the composed char, check the other flags */
242 if (flags & WC_DEFAULTCHAR) /* use the default char instead */
250 if (flags & WC_DISCARDNS) /* skip the second char of the composition */
259 if (!is_valid_sbcs_mapping( table, flags, wch, *dst ))
274 static inline int is_valid_dbcs_mapping( const struct dbcs_table *table, int flags,
277 if ((flags & WC_NO_BEST_FIT_CHARS) || ch == table->info.def_char)
291 static int get_length_dbcs( const struct dbcs_table *table, int flags,
301 if (!defchar && !used && !(flags & WC_COMPOSITECHECK))
318 if ((flags & WC_COMPOSITECHECK) && (srclen > 1) && (composed = compose(src)))
323 if (is_valid_dbcs_mapping( table, flags, composed, res ))
331 /* no mapping for the composed char, check the other flags */
332 if (flags & WC_DEFAULTCHAR) /* use the default char instead */
340 if (flags & WC_DISCARDNS) /* skip the second char of the composition */
349 if (!is_valid_dbcs_mapping( table, flags, wch, res ))
383 /* slow version of wcstombs_dbcs that handles the various flags */
384 static int wcstombs_dbcs_slow( const struct dbcs_table *table, int flags,
404 if ((flags & WC_COMPOSITECHECK) && (srclen > 1) && (composed = compose(src)))
409 if (is_valid_dbcs_mapping( table, flags, composed, res ))
416 /* no mapping for the composed char, check the other flags */
417 if (flags & WC_DEFAULTCHAR) /* use the default char instead */
425 if (flags & WC_DISCARDNS) /* skip the second char of the composition */
434 if (!is_valid_dbcs_mapping( table, flags, wch, res ))
455 int wine_cp_wcstombs( const union cptable *table, int flags,
461 if (flags || defchar || used)
463 if (!dstlen) return get_length_sbcs( &table->sbcs, flags, src, srclen, used );
464 return wcstombs_sbcs_slow( &table->sbcs, flags, src, srclen,
472 if (!dstlen) return get_length_dbcs( &table->dbcs, flags, src, srclen, defchar, used );
473 if (flags || defchar || used)
474 return wcstombs_dbcs_slow( &table->dbcs, flags, src, srclen,