# HG changeset patch # User Mychaela Falconia # Date 1613543755 0 # Node ID 51167ee0151bb0837ebdf0a0a84d06657bda0bdd # Parent 51f26fd967e2d0c80324666aa093a22407c94ca4 pb-update implementation: rm vestiges of uicc unification attempt diff -r 51f26fd967e2 -r 51167ee0151b simtool/pbupd_file.c --- a/simtool/pbupd_file.c Wed Feb 17 06:15:15 2021 +0000 +++ b/simtool/pbupd_file.c Wed Feb 17 06:35:55 2021 +0000 @@ -14,10 +14,8 @@ extern char *alpha_from_file_hex(); static -process_record(line, pb_record_len, pb_record_count, filename_for_errs, - lineno_for_errs) +process_record(line, filename_for_errs, lineno_for_errs) char *line, *filename_for_errs; - unsigned pb_record_len, pb_record_count; { unsigned recno; u_char record[255], *fixp; @@ -27,7 +25,7 @@ int c; recno = strtoul(line+1, 0, 10); - if (recno < 1 || recno > pb_record_count) { + if (recno < 1 || recno > curfile_record_count) { fprintf(stderr, "%s line %d: record number is out of range\n", filename_for_errs, lineno_for_errs); return(-1); @@ -42,8 +40,8 @@ } while (isspace(*cp)) cp++; - memset(record, 0xFF, pb_record_len); - fixp = record + pb_record_len - 14; + memset(record, 0xFF, curfile_record_len); + fixp = record + curfile_record_len - 14; if (digit_char_to_gsm(*cp) < 0) goto inv_syntax; for (ndigits = 0; ; ndigits++) { @@ -90,7 +88,8 @@ } if (*cp == '"') { cp++; - cp = alpha_from_file_qstring(cp, record, pb_record_len - 14, + cp = alpha_from_file_qstring(cp, record, + curfile_record_len - 14, filename_for_errs, lineno_for_errs); if (!cp) @@ -99,7 +98,7 @@ cp += 3; while (isspace(*cp)) cp++; - cp = alpha_from_file_hex(cp, record, pb_record_len - 14, + cp = alpha_from_file_hex(cp, record, curfile_record_len - 14, filename_for_errs, lineno_for_errs); if (!cp) return(-1); @@ -109,7 +108,7 @@ cp++; if (*cp) goto inv_syntax; - return update_rec_op(recno, 0x04, record, pb_record_len); + return update_rec_op(recno, 0x04, record, curfile_record_len); } cmd_pb_update(argc, argv) @@ -138,8 +137,7 @@ } if (linebuf[0] != '#' || !isdigit(linebuf[1])) continue; - rc = process_record(linebuf, curfile_record_len, - curfile_record_count, argv[2], lineno); + rc = process_record(linebuf, argv[2], lineno); if (rc < 0) { fclose(inf); return(rc);