Home | History | Annotate | Download | only in i18n

Lines Matching full:diff

30 u_writeDiff(int32_t diff, uint8_t *p) {
31 if(diff>=SLOPE_REACH_NEG_1) {
32 if(diff<=SLOPE_REACH_POS_1) {
33 *p++=(uint8_t)(SLOPE_MIDDLE+diff);
34 } else if(diff<=SLOPE_REACH_POS_2) {
35 *p++=(uint8_t)(SLOPE_START_POS_2+(diff/SLOPE_TAIL_COUNT));
36 *p++=(uint8_t)(SLOPE_MIN+diff%SLOPE_TAIL_COUNT);
37 } else if(diff<=SLOPE_REACH_POS_3) {
38 p[2]=(uint8_t)(SLOPE_MIN+diff%SLOPE_TAIL_COUNT);
39 diff/=SLOPE_TAIL_COUNT;
40 p[1]=(uint8_t)(SLOPE_MIN+diff%SLOPE_TAIL_COUNT);
41 *p=(uint8_t)(SLOPE_START_POS_3+(diff/SLOPE_TAIL_COUNT));
44 p[3]=(uint8_t)(SLOPE_MIN+diff%SLOPE_TAIL_COUNT);
45 diff/=SLOPE_TAIL_COUNT;
46 p[2]=(uint8_t)(SLOPE_MIN+diff%SLOPE_TAIL_COUNT);
47 diff/=SLOPE_TAIL_COUNT;
48 p[1]=(uint8_t)(SLOPE_MIN+diff%SLOPE_TAIL_COUNT);
55 if(diff>=SLOPE_REACH_NEG_2) {
56 NEGDIVMOD(diff, SLOPE_TAIL_COUNT, m);
57 *p++=(uint8_t)(SLOPE_START_NEG_2+diff);
59 } else if(diff>=SLOPE_REACH_NEG_3) {
60 NEGDIVMOD(diff, SLOPE_TAIL_COUNT, m);
62 NEGDIVMOD(diff, SLOPE_TAIL_COUNT, m);
64 *p=(uint8_t)(SLOPE_START_NEG_3+diff);
67 NEGDIVMOD(diff, SLOPE_TAIL_COUNT, m);
69 NEGDIVMOD(diff, SLOPE_TAIL_COUNT, m);
71 NEGDIVMOD(diff, SLOPE_TAIL_COUNT, m);