annotate uptools/libcoding/hexdecode2.c @ 995:74024eb17e04

fc-loadtool help: improve language regarding 16 MiB flash chips In FC project history, 16 MiB flash originally meant Pirelli DP-L10. Then we got FCDEV3B with the same flash (our own design), but now we are discovering more Calypso devices that used such large flash, both late Calypso era (Sony Ericsson K2x0) as well as much earlier ones (FIC FLUID devices.txt file with 2004 dates, Leonardo+ rev 5). Hence we need to migrate to more generic or neutral language in associated documentation, without giving elevated status to specific examples that drove our early project history.
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 03 Dec 2023 21:11:12 +0000
parents ec7e23d5151f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
966
ec7e23d5151f fcup-smsend: add support for backslash escapes, new -e option
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
ec7e23d5151f fcup-smsend: add support for backslash escapes, new -e option
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 * This module is a subset of hexdigits.c from fc-sim-tools/libutil.
ec7e23d5151f fcup-smsend: add support for backslash escapes, new -e option
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 */
ec7e23d5151f fcup-smsend: add support for backslash escapes, new -e option
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4
ec7e23d5151f fcup-smsend: add support for backslash escapes, new -e option
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 decode_hex_digit(c)
ec7e23d5151f fcup-smsend: add support for backslash escapes, new -e option
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 {
ec7e23d5151f fcup-smsend: add support for backslash escapes, new -e option
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 if (c >= '0' && c <= '9')
ec7e23d5151f fcup-smsend: add support for backslash escapes, new -e option
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 return(c - '0');
ec7e23d5151f fcup-smsend: add support for backslash escapes, new -e option
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 if (c >= 'A' && c <= 'F')
ec7e23d5151f fcup-smsend: add support for backslash escapes, new -e option
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 return(c - 'A' + 10);
ec7e23d5151f fcup-smsend: add support for backslash escapes, new -e option
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 if (c >= 'a' && c <= 'f')
ec7e23d5151f fcup-smsend: add support for backslash escapes, new -e option
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 return(c - 'a' + 10);
ec7e23d5151f fcup-smsend: add support for backslash escapes, new -e option
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 return(-1);
ec7e23d5151f fcup-smsend: add support for backslash escapes, new -e option
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 }