| /plan9/sys/src/cmd/gs/src/ |
| H A D | gsbitops.h | 56 #define sample_bound_shift(value, shift)\ argument 57 ((shift) >= 8 * sizeof(value) ? (shift) & (8 * sizeof(value) - 1) : (shift)) 60 #define sample_load8_(value, sptr, sbit, sbpv)\ argument 63 case 0: value = (*(sptr) >> (8 - (sbit) - (sbpv))) & ((sbpv) | 1); break;\ 64 case 1: value = (*(sptr) >> (4 - (sbit))) & 0xf; break;\ 65 case 2: value = *(sptr); break; 66 #define sample_load8(value, sptr, sbit, sbpv)\ argument 67 sample_load8_(value, sptr, sbit, sbpv)\ 69 #define sample_load_next8(value, sptr, sbit, sbpv)\ argument 70 sample_load8(value, sptr, sbit, sbpv);\ [all …]
|
| H A D | zarith.c | 51 op[-1].value.realval += op->value.realval; in zop_add() 54 make_real(op - 1, (double)op[-1].value.intval + op->value.realval); in zop_add() 62 op[-1].value.realval += (double)op->value.intval; in zop_add() 65 long int2 = op->value.intval; in zop_add() 67 if (((op[-1].value.intval += int2) ^ int2) < 0 && in zop_add() 68 ((op[-1].value.intval - int2) ^ int2) >= 0 in zop_add() 70 make_real(op - 1, (double)(op[-1].value.intval - int2) + int2); in zop_add() 102 if (op->value.realval == 0) in zdiv() 108 op1->value.realval /= op->value.realval; in zdiv() 111 make_real(op1, (double)op1->value.intval / op->value.realval); in zdiv() [all …]
|
| H A D | gsparam2.c | 33 private int sput_word(stream *dest, uint value); 75 gs_param_typed_value value; in gs_param_list_puts() local 84 if ((code = param_read_typed(list, string_key, &value)) != 0) { in gs_param_list_puts() 90 sput_word(dest, (unsigned)value.type); in gs_param_list_puts() 94 value_top_sizeof = gs_param_type_sizes[value.type]; in gs_param_list_puts() 95 value_base_sizeof = gs_param_type_base_sizes[value.type]; in gs_param_list_puts() 96 switch (value.type) { in gs_param_list_puts() 101 sput_bytes(dest, (byte *)&value.value, value_top_sizeof); in gs_param_list_puts() 106 data = value.value.s.data, size = value.value.s.size; in gs_param_list_puts() 109 data = value.value.n.data, size = value.value.n.size; in gs_param_list_puts() [all …]
|
| H A D | gsparams.c | 121 gs_param_typed_value value; in gs_param_list_serialize() local 130 if ((code = param_read_typed(list, string_key, &value)) != 0) { in gs_param_list_serialize() 135 wb_put_word((unsigned)value.type, &write_buf); in gs_param_list_serialize() 139 value_top_sizeof = gs_param_type_sizes[value.type]; in gs_param_list_serialize() 140 value_base_sizeof = gs_param_type_base_sizes[value.type]; in gs_param_list_serialize() 141 switch (value.type) { in gs_param_list_serialize() 147 wb_put_bytes((byte *) & value.value, value_top_sizeof, &write_buf); in gs_param_list_serialize() 154 wb_put_bytes((byte *) & value.value, value_top_sizeof, &write_buf); in gs_param_list_serialize() 156 value_base_sizeof *= value.value.s.size; in gs_param_list_serialize() 157 wb_put_bytes(value.value.s.data, value_base_sizeof, &write_buf); in gs_param_list_serialize() [all …]
|
| H A D | gsfunc4.c | 58 } value; member 65 vsp->value.f = f; in store_float() 239 store_float(vsp, (floatp)vsp->value.i); in fn_PtCr_evaluate() 242 store_float(vsp, (floatp)vsp->value.i); in fn_PtCr_evaluate() 244 store_float(vsp - 1, (floatp)vsp[-1].value.i); in fn_PtCr_evaluate() 250 if (vsp->value.i < 0) in fn_PtCr_evaluate() 254 vsp->value.f = fabs(vsp->value.f); in fn_PtCr_evaluate() 257 int int1 = vsp[-1].value.i, int2 = vsp->value.i; in fn_PtCr_evaluate() 262 vsp[-1].value.i = int1 + int2; in fn_PtCr_evaluate() 266 vsp[-1].value.f += vsp->value.f; in fn_PtCr_evaluate() [all …]
|
| H A D | zrelbit.c | 64 osp->value.boolval ^= 1; in zne() 172 op[-1].value.boolval &= op->value.boolval; in zand() 176 op[-1].value.intval &= op->value.intval; in zand() 194 op->value.boolval = !op->value.boolval; in znot() 197 op->value.intval = ~op->value.intval; in znot() 215 op[-1].value.boolval |= op->value.boolval; in zor() 219 op[-1].value.intval |= op->value.intval; in zor() 238 op[-1].value.boolval ^= op->value.boolval; in zxor() 242 op[-1].value.intval ^= op->value.intval; in zxor() 261 if (op->value.intval < -MAX_SHIFT || op->value.intval > MAX_SHIFT) in zbitshift() [all …]
|
| H A D | gsparamx.c | 134 gs_param_typed_value value; in param_list_copy() local 144 if ((code = param_read_typed(plfrom, string_key, &value)) != 0) { in param_list_copy() 149 switch (value.type) { in param_list_copy() 159 copy.value.d.size = value.value.d.size; in param_list_copy() 161 ©.value.d, in param_list_copy() 163 (code = param_list_copy(copy.value.d.list, in param_list_copy() 164 value.value.d.list)) < 0 || in param_list_copy() 166 ©.value.d)) < 0) in param_list_copy() 169 &value.value.d); in param_list_copy() 172 value.value.s.persistent &= copy_persists; goto ca; in param_list_copy() [all …]
|
| H A D | jmcorig.h | 60 #define GETJSAMPLE(value) ((int) (value)) argument 66 #define GETJSAMPLE(value) ((int) (value)) argument 68 #define GETJSAMPLE(value) ((int) (value) & 0xFF) argument 85 #define GETJSAMPLE(value) ((int) (value)) argument 111 #define GETJOCTET(value) (value) argument 117 #define GETJOCTET(value) (value) argument 119 #define GETJOCTET(value) ((value) & 0xFF) argument
|
| H A D | gscparam.c | 54 gs_c_param_value value; member 69 return ENUM_USING(st_c_param_list, ¶m->value.d, in ENUM_PTRS_WITH() 70 sizeof(param->value.d), index); in ENUM_PTRS_WITH() 72 gs_param_typed_value value; in ENUM_PTRS_WITH() local 74 value.value = *(const gs_param_value *)¶m->value; in ENUM_PTRS_WITH() 75 value.type = param->type; in ENUM_PTRS_WITH() 76 return gs_param_typed_value_enum_ptrs(mem, &value, sizeof(value), index, in ENUM_PTRS_WITH() 109 RELOC_USING(st_c_param_list, ¶m->value.d, sizeof(param->value.d)); in RELOC_PTRS_WITH() 112 gs_param_typed_value value; in RELOC_PTRS_WITH() local 114 value.value = *(gs_param_value *)¶m->value; in RELOC_PTRS_WITH() [all …]
|
| H A D | iutil.c | 58 ref *to = aref->value.refs + index; in refcpy_to_old() 103 pref2->value.realval == pref1->value.intval); in obj_eq() 106 pref2->value.intval == pref1->value.realval); in obj_eq() 137 return ((pref1->value.refs == pref2->value.refs || in obj_eq() 142 return ((pref1->value.packed == pref2->value.packed || in obj_eq() 146 return (pref1->value.boolval == pref2->value.boolval); in obj_eq() 148 return (pref1->value.pdict == pref2->value.pdict); in obj_eq() 150 return (pref1->value.pfile == pref2->value.pfile && in obj_eq() 153 return (pref1->value.intval == pref2->value.intval); in obj_eq() 158 return (pref1->value.pname == pref2->value.pname); in obj_eq() [all …]
|
| H A D | zgeneric.c | 77 if ((ulong) op->value.intval > op - osbot) { in zcopy_integer() 80 count = op->value.intval; in zcopy_integer() 81 } else if (op1 + (count = op->value.intval) <= ostop) { in zcopy_integer() 139 if (gs_object_type(imemory, op->value.pstruct) != &st_bytes) in zlength() 142 make_int(op, gs_object_size(imemory, op->value.pstruct)); in zlength() 168 make_int(op1, op1->value.bytes[(uint) op->value.intval]); in zget() 175 code = array_get(imemory, op1, op->value.intval, op1); in zget() 216 ref *eltp = op2->value.refs + (uint) op1->value.intval; in zput() 225 sdata = op2->value.bytes; in zput() 230 sdata[(uint)op1->value.intval] = (byte)op->value.intval; in zput() [all …]
|
| H A D | idparam.c | 48 *pvalue = pdval->value.boolval; in dict_bool_param() 71 ival = pdval->value.intval; in dict_int_null_param() 78 if (pdval->value.realval < minval || pdval->value.realval > maxval) in dict_int_null_param() 80 ival = (long)pdval->value.realval; in dict_int_null_param() 81 if (ival != pdval->value.realval) in dict_int_null_param() 125 if (pdval->value.intval != (uint) pdval->value.intval) in dict_uint_param() 127 ival = (uint) pdval->value.intval; in dict_uint_param() 150 *pvalue = (float)pdval->value.intval; in dict_float_param() 153 *pvalue = pdval->value.realval; in dict_float_param() 178 pa = pdval->value.const_refs; in dict_int_array_check_param() [all …]
|
| H A D | gsparam.c | 31 return ENUM_STRING(&pvalue->value.s); 33 return ENUM_STRING(&pvalue->value.n); 35 return ENUM_OBJ(pvalue->value.ia.data); 37 return ENUM_OBJ(pvalue->value.fa.data); 39 return ENUM_OBJ(pvalue->value.sa.data); 41 return ENUM_OBJ(pvalue->value.na.data); 52 str.data = pvalue->value.s.data; /* n == s */ in RELOC_PTRS_WITH() 53 str.size = pvalue->value.s.size; in RELOC_PTRS_WITH() 55 pvalue->value.s.data = str.data; in RELOC_PTRS_WITH() 59 RELOC_VAR(pvalue->value.ia.data); in RELOC_PTRS_WITH() [all …]
|
| H A D | zdevice.c | 45 code = gs_copydevice2(&new_dev, op[-1].value.pdevice, op->value.boolval, in zcopydevice2() 78 dname = op->value.pdevice->dname; in zdevicename() 126 dev = op[-7].value.pdevice; in zgetbitsrect() 128 rect.p.x = op[-6].value.intval; in zgetbitsrect() 130 rect.p.y = op[-5].value.intval; in zgetbitsrect() 132 w = op[-4].value.intval; in zgetbitsrect() 134 h = op[-3].value.intval; in zgetbitsrect() 140 if (op[-2].value.intval == -1) in zgetbitsrect() 142 else if (op[-2].value.intval == 0) in zgetbitsrect() 144 else if (op[-2].value.intval == 1) in zgetbitsrect() [all …]
|
| H A D | idict.c | 85 dict *pdict = pdref->value.pdict; in dict_find() 94 if (pdict->keys.value.packed[hash] == in dict_find() 98 else if (pdict->keys.value.packed[hash - 1] == in dict_find() 143 pdict = (dict *) arr.value.refs; in dict_alloc() 161 dict *pdict = pdref->value.pdict; in dict_create_unpacked_keys() 169 ref *kp = pdict->keys.value.refs; in dict_create_unpacked_keys() 183 dict *pdict = pdref->value.pdict; in dict_create_contents() 198 refset_null_new(pdict->values.value.refs, asize, new_mask); in dict_create_contents() 209 pkp = (ref_packed *) arr.value.refs; in dict_create_contents() 234 dict *pdict = pdref->value.pdict; in dict_unpack() [all …]
|
| H A D | gdevmswn.c | 233 ushort value; in win_map_color_rgb() local 243 value = (color >> 11) & 0x1f; in win_map_color_rgb() 244 …prgb[0] = ((value << 11) + (value << 6) + (value << 1) + (value >> 4)) >> (16 - gx_color_value_bit… in win_map_color_rgb() 245 value = (color >> 5) & 0x3f; in win_map_color_rgb() 246 prgb[1] = ((value << 10) + (value << 4) + (value >> 2)) >> (16 - gx_color_value_bits); in win_map_color_rgb() 247 value = (color) & 0x1f; in win_map_color_rgb() 248 …prgb[2] = ((value << 11) + (value << 6) + (value << 1) + (value >> 4)) >> (16 - gx_color_value_bit… in win_map_color_rgb() 251 value = (color >> 10) & 0x1f; in win_map_color_rgb() 252 …prgb[0] = ((value << 11) + (value << 6) + (value << 1) + (value >> 4)) >> (16 - gx_color_value_bit… in win_map_color_rgb() 253 value = (color >> 5) & 0x1f; in win_map_color_rgb() [all …]
|
| H A D | idebug.c | 49 debug_print_string(sref.value.const_bytes, r_size(&sref)); in debug_print_name() 70 dprintf2("array(%u)0x%lx", size, (ulong) pref->value.refs); in debug_print_full_ref() 75 dprintf1("boolean %x", pref->value.boolval); in debug_print_full_ref() 78 dprintf1("device 0x%lx", (ulong) pref->value.pdevice); in debug_print_full_ref() 83 (ulong) pref->value.pdict); in debug_print_full_ref() 86 dprintf1("file 0x%lx", (ulong) pref->value.pfile); in debug_print_full_ref() 91 dprintf1("int %ld", pref->value.intval); in debug_print_full_ref() 98 (ulong) pref->value.packed); in debug_print_full_ref() 101 dprintf2("name(0x%lx#%u)", (ulong) pref->value.pname, in debug_print_full_ref() 109 dprintf2("op_array(%u)0x%lx:", size, (ulong) pref->value.const_refs); in debug_print_full_ref() [all …]
|
| H A D | zstring.c | 40 size = (uint)op->value.intval; in zbytestring() 58 size = op->value.intval; in zstring() 89 if (size <= r_size(op1) && !memcmp(op1->value.bytes, op->value.bytes, size)) { in zanchorsearch() 95 op1->value.bytes += size; in zanchorsearch() 123 ptr = op1->value.bytes; in zsearch() 126 pat = op->value.bytes; in zsearch() 139 op->value.bytes = ptr; in zsearch() 143 r_set_size(op - 1, ptr - op[-1].value.bytes); in zsearch() 144 op1->value.bytes = ptr + size; in zsearch() 162 if (op[-1].value.const_bytes[i] == op->value.const_bytes[j]) { in zstringbreak() [all …]
|
| H A D | gdevm16.c | 56 ushort value = color >> 11; in mem_true16_map_color_rgb() local 58 prgb[0] = ((value << 11) + (value << 6) + (value << 1) + (value >> 4)) in mem_true16_map_color_rgb() 60 value = (color >> 5) & 0x3f; in mem_true16_map_color_rgb() 61 prgb[1] = ((value << 10) + (value << 4) + (value >> 2)) in mem_true16_map_color_rgb() 63 value = color & 0x1f; in mem_true16_map_color_rgb() 64 prgb[2] = ((value << 11) + (value << 6) + (value << 1) + (value >> 4)) in mem_true16_map_color_rgb()
|
| H A D | zdosio.c | 32 make_int(op, inport((int)op->value.intval)); in zinport() 43 make_int(op, inportb((int)op->value.intval)); in zinportb() 55 outport((int)op[-1].value.intval, (int)op->value.intval); in zoutport() 68 outportb((int)op[-1].value.intval, (byte) op->value.intval); in zoutportb() 80 make_int(op, *(byte *) (op->value.intval)); in zpeek() 92 *(byte *) (op[-1].value.intval) = (byte) op->value.intval; in zpoke()
|
| /plan9/sys/src/cmd/usb/audio/ |
| H A D | audioctl.c | 219 * controls[rec][Channel_control].value[0] in setspeed() 220 * controls[rec][Resolution_control].value[0]/8; in setspeed() 234 devctl(epdev[rec], "samplesz %ld", controls[rec][Channel_control].value[0] * in setspeed() 235 controls[rec][Resolution_control].value[0]/8); in setspeed() 296 return controls[rec][Speed_control].value[0]; in getspeed() 307 return controls[rec][Speed_control].value[0]; in getspeed() 322 setcontrol(int rec, char *name, long *value) in setcontrol() argument 343 if((c->chans & 1 << i) && c->value[i] != value[i]) in setcontrol() 347 if(c->value[0] != value[0]) in setcontrol() 352 value[0] = 0; // set to average in setcontrol() [all …]
|
| /plan9/sys/src/cmd/troff/ |
| H A D | dwbinit.c | 132 for ( ; ptr->value != NULL || ptr->address != NULL; ptr++ ) { in DWBdebug() 133 if ( (path = ptr->value) == NULL ) { in DWBdebug() 203 char *value; in DWBinit() local 236 for ( ; paths->value != NULL || paths->address != NULL; paths++ ) { in DWBinit() 239 value = paths->value; in DWBinit() 242 value = *paths->address; in DWBinit() 245 length += plen + 1 + strlen(value); /* +1 is for the '/' */ in DWBinit() 252 if ( *value != '\0' ) { in DWBinit() 257 if (*value != '/' && *eop != '/') { in DWBinit() 258 sprintf(path, "%s/%s", prefix, value); in DWBinit() [all …]
|
| /plan9/sys/src/cmd/aux/na/ |
| H A D | na.y | 40 long value; member 64 long value; member 83 long mkreladdr(long value, int len); 163 setsym($2, $4.t, $4.value); 172 setsym($1, $3.t, $3.value); 205 $1->value = dot; 242 out.data[1] = $2.value; 248 out.data[1] = $2.value; 259 out.data[1] = mkreladdr($4.value, 2); 264 out.data[0] = ($8 << 24) | $2.value | ($4 << 29) | MOVE_MODE; [all …]
|
| /plan9/sys/src/ape/cmd/diff/ |
| H A D | ifdef.c | 139 int i, value[2]; local 147 value[i] = atoi (f); 153 value[i] = groups_letter_value (groups, f0); 154 if (value[i] < 0) 161 if (value[0] == value[1]) 192 int value; local 203 f = scan_char_literal (f, &value); 209 value = groups_letter_value (groups, c); 210 if (value < 0) 218 fprintf (out, spec - 1, value); [all …]
|
| /plan9/sys/src/ape/lib/bsd/ |
| H A D | putenv.c | 10 char *value; in putenv() local 13 value = strchr(s, '='); in putenv() 14 if (value) { in putenv() 15 n = value-s; in putenv() 24 value++; in putenv() 25 n = strlen(value); in putenv() 26 if(write(f, value, n) != n) in putenv()
|