Lines Matching defs:base
18 unsigned int e2p_percent(int percent, unsigned int base)
25 return base / (100 / percent);
26 if (mask & base)
27 return (base / 100) * percent;
28 return base * percent / 100;
37 unsigned int base;
43 fprintf(stderr, "Usage: %s percent base\n", argv[0]);
53 base = strtoul(argv[2], &p, 0);
55 fprintf(stderr, "Bad base: %s\n", argv[2]);
59 printf("%d percent of %u is %u.\n", percent, base,
60 e2p_percent(percent, base));