modeedit.c (09128776167afe057fa4281c3d49f53b0ee52572) | modeedit.c (b7e08f9305ad24520603f54a58cfedb11da80d0f) |
---|---|
1/*- 2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3 * 4 * Copyright (c) 2000 Kelly Yancey <kbyanc@posi.net> 5 * Derived from work done by Julian Elischer <julian@tfs.com, 6 * julian@dialix.oz.au>, 1993, and Peter Dufault <dufault@hda.com>, 1994. 7 * All rights reserved. 8 * --- 281 unchanged lines hidden (view full) --- 290 char *cval; /* Pointer to new string value. */ 291 char *convertend; /* End-of-conversion pointer. */ 292 long long ival, newival; /* New integral value. */ 293 int resolution; /* Resolution in bits for integer conversion. */ 294 295/* 296 * Macro to determine the maximum value of the given size for the current 297 * resolution. | 1/*- 2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3 * 4 * Copyright (c) 2000 Kelly Yancey <kbyanc@posi.net> 5 * Derived from work done by Julian Elischer <julian@tfs.com, 6 * julian@dialix.oz.au>, 1993, and Peter Dufault <dufault@hda.com>, 1994. 7 * All rights reserved. 8 * --- 281 unchanged lines hidden (view full) --- 290 char *cval; /* Pointer to new string value. */ 291 char *convertend; /* End-of-conversion pointer. */ 292 long long ival, newival; /* New integral value. */ 293 int resolution; /* Resolution in bits for integer conversion. */ 294 295/* 296 * Macro to determine the maximum value of the given size for the current 297 * resolution. |
298 * XXX Lovely x86's optimize out the case of shifting by 32 and gcc doesn't 299 * currently workaround it (even for int64's), so we have to kludge it. | |
300 */ | 298 */ |
301#define RESOLUTION_MAX(size) ((resolution * (size) == 32)? \ 302 UINT_MAX: (1 << (resolution * (size))) - 1) | 299#define RESOLUTION_MAX(size) ((1LL << (resolution * (size))) - 1) |
303 304 assert(newvalue != NULL); 305 if (*newvalue == '\0') 306 return (0); /* Nothing to do. */ 307 308 if ((dest = editentry_lookup(name)) == NULL) 309 returnerr(ENOENT); 310 if (!dest->editable && editonly) --- 907 unchanged lines hidden --- | 300 301 assert(newvalue != NULL); 302 if (*newvalue == '\0') 303 return (0); /* Nothing to do. */ 304 305 if ((dest = editentry_lookup(name)) == NULL) 306 returnerr(ENOENT); 307 if (!dest->editable && editonly) --- 907 unchanged lines hidden --- |