Lines Matching refs:htons

62 #include <netinet/in.h>		/* for htons */
645 *(itPix++) = htons (*(itR++));
646 *(itPix++) = htons (*(itG++));
647 *(itPix++) = htons (*(itB++));
755 HP5400_DBG (DBG_MSG, " ysize=%d htons-> %d\n", resp->ysize,
756 htons (resp->ysize));
798 for (i = 0; i < htons (res.ysize); i++)
813 array[k][j] /= htons (res.ysize);
851 htons (res->ysize));
855 for (i = 0; i < htons (res->ysize); i++)
887 req.dpix = htons (300); /* = 300 dpi */
888 req.dpiy = htons (300); /* = 300 dpi */
889 req.offx = htons (0); /* = 0cm */
890 req.offy = htons (0); /* = 0cm */
891 req.lenx = htons (2690); /* = 22.78cm */
892 req.leny = htons (50); /* = 0.42cm */
894 req.flags1 = htons (0x0000);
895 req.flags2 = htons (0x0010);
896 req.flags3 = htons (0x3020); /* First calibration scan, 48bpp */
898 req.gamma[0] = htons (100);
899 req.gamma[1] = htons (100);
900 req.gamma[2] = htons (100);
945 req.dpix = htons (300); /* = 300 dpi */
946 req.dpiy = htons (300); /* = 300 dpi */
947 req.offx = htons (0); /* = 0cm */
948 req.offy = htons (0); /* = 0cm */
949 req.lenx = htons (2690); /* = 22.78cm */
950 req.leny = htons (16); /* = 0.14cm */
952 req.flags1 = htons (0x0000);
953 req.flags2 = htons (0x0010);
954 req.flags3 = htons (0x3024); /* Second calibration scan, 48bpp */
956 req.gamma[0] = htons (100);
957 req.gamma[1] = htons (100);
958 req.gamma[2] = htons (100);
1029 req.dpix = htons (params->iDpi);
1030 req.dpiy = htons (params->iLpi);
1034 req.offx = htons (params->iLeft);
1035 req.offy = htons (params->iTop);
1036 req.lenx = htons (params->iWidth);
1037 req.leny = htons (params->iHeight);
1039 req.flags1 = htons (0x0080);
1040 req.flags2 = htons (0x0000);
1041 req.flags3 = htons ((params->iDpi < 2400) ? 0x18E8 : 0x18C0); /* Try preview scan */
1043 req.gamma[0] = htons (100);
1044 req.gamma[1] = htons (100);
1045 req.gamma[2] = htons (100);
1055 params->iLines = htons (res.ysize);
1152 req.dpix = htons (pParams->iDpi); /* = 300 dpi */
1153 req.dpiy = htons (pParams->iLpi); /* = 300 dpi */
1154 req.offx = htons (pParams->iLeft); /* = 0cm */
1155 req.offy = htons (pParams->iTop); /* = 0cm */
1156 req.lenx = htons (pParams->iWidth); /* = 22.78cm */
1161 req.leny = htons (pParams->iHeight); /* = 0.42cm */
1163 req.flags1 = htons ((scantype == SCAN_TYPE_CALIBRATION) ? 0x0000 : 0x0080);
1164 req.flags2 = htons ((scantype == SCAN_TYPE_CALIBRATION) ? 0x0010 :
1167 req.flags3 = htons (0x18E8);
1169 req.gamma[0] = htons (100);
1170 req.gamma[1] = htons (100);
1171 req.gamma[2] = htons (100);
1187 pParams->iLines = htons (res.ysize);
1212 HP5400_DBG (DBG_MSG, "Off(%d,%d) : Len(%d,%d)\n", htons (req->offx),
1213 htons (req->offy), htons (req->lenx), htons (req->leny));
1214 /* Yes, all the htons() is silly but we want this check as late as possible */
1215 if (htons (req->offx) > 0x09F8)
1216 req->offx = htons (0x09F8);
1217 if (htons (req->offy) > 0x0DB6)
1218 req->offy = htons (0x0DB6);
1219 /* These tests are meaningless as htons() returns unsigned
1220 if( htons( req->offx ) < 0 ) req->offx = 0;
1221 if( htons( req->offy ) < 0 ) req->offy = 0;
1223 if (htons (req->offx) + htons (req->lenx) > 0x09F8)
1224 req->lenx = htons (0x09F8 - htons (req->offx));
1225 if (htons (req->offy) + htons (req->leny) > 0x0DB6)
1226 req->leny = htons (0x0DB6 - htons (req->offy));
1227 if (htons (req->lenx) <= 1)
1229 if (htons (req->leny) <= 1)
1266 short dpi = htons (HW_LPI);
1278 offsets [0] = htons (0x0054);
1279 offsets [1] = htons (0x0282);
1336 htonl (res.transfersize), htonl (res.xsize), htons (res.ysize));
1349 float pixels = ((float) htons (req->lenx) * (float) htons (req->leny)) *
1350 ((float) htons (req->dpix) * (float) htons (req->dpiy)) /
1358 htons (req->lenx), htons (req->leny),
1359 htons (req->dpix), htons (req->dpiy), HW_LPI, HW_LPI, bpp);
1369 htonl (res.transfersize) + 3 * htons (res.ysize));