Home | History | Annotate | Download | only in i18n

Lines Matching full:diff

31 u_writeDiff(int32_t diff, uint8_t *p) {
32 if(diff>=SLOPE_REACH_NEG_1) {
33 if(diff<=SLOPE_REACH_POS_1) {
34 *p++=(uint8_t)(SLOPE_MIDDLE+diff);
35 } else if(diff<=SLOPE_REACH_POS_2) {
36 *p++=(uint8_t)(SLOPE_START_POS_2+(diff/SLOPE_TAIL_COUNT));
37 *p++=(uint8_t)(SLOPE_MIN+diff%SLOPE_TAIL_COUNT);
38 } else if(diff<=SLOPE_REACH_POS_3) {
39 p[2]=(uint8_t)(SLOPE_MIN+diff%SLOPE_TAIL_COUNT);
40 diff/=SLOPE_TAIL_COUNT;
41 p[1]=(uint8_t)(SLOPE_MIN+diff%SLOPE_TAIL_COUNT);
42 *p=(uint8_t)(SLOPE_START_POS_3+(diff/SLOPE_TAIL_COUNT));
45 p[3]=(uint8_t)(SLOPE_MIN+diff%SLOPE_TAIL_COUNT);
46 diff/=SLOPE_TAIL_COUNT;
47 p[2]=(uint8_t)(SLOPE_MIN+diff%SLOPE_TAIL_COUNT);
48 diff/=SLOPE_TAIL_COUNT;
49 p[1]=(uint8_t)(SLOPE_MIN+diff%SLOPE_TAIL_COUNT);
56 if(diff>=SLOPE_REACH_NEG_2) {
57 NEGDIVMOD(diff, SLOPE_TAIL_COUNT, m);
58 *p++=(uint8_t)(SLOPE_START_NEG_2+diff);
60 } else if(diff>=SLOPE_REACH_NEG_3) {
61 NEGDIVMOD(diff, SLOPE_TAIL_COUNT, m);
63 NEGDIVMOD(diff, SLOPE_TAIL_COUNT, m);
65 *p=(uint8_t)(SLOPE_START_NEG_3+diff);
68 NEGDIVMOD(diff, SLOPE_TAIL_COUNT, m);
70 NEGDIVMOD(diff, SLOPE_TAIL_COUNT, m);
72 NEGDIVMOD(diff, SLOPE_TAIL_COUNT, m);