FreeCalypso > hg > ueda-linux
diff ueda/mclutils/mkbom.c @ 81:6e43956e740d
beginning of BOM utils refactoring: seqrefdes code factored out
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 23 Feb 2017 19:15:48 +0000 |
parents | df98a82b807e |
children | 20c6f84c75e7 |
line wrap: on
line diff
--- a/ueda/mclutils/mkbom.c Thu Feb 23 18:54:47 2017 +0000 +++ b/ueda/mclutils/mkbom.c Thu Feb 23 19:15:48 2017 +0000 @@ -2,7 +2,6 @@ * This program generates a procurement-oriented BOM from the MCL. */ -#include <ctype.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -126,37 +125,6 @@ add_refdes_to_bompart(bp, refdes); } -is_string_num(str) - char *str; -{ - if (*str < '1' || *str > '9') - return(0); - while (isdigit(*str)) - str++; - if (*str) - return(0); - else - return(1); -} - -is_refdes_sequential(str1, str2) - char *str1, *str2; -{ - int num1, num2; - - while (isupper(*str1)) - if (*str1++ != *str2++) - return(0); - if (!is_string_num(str1) || !is_string_num(str2)) - return(0); - num1 = atoi(str1); - num2 = atoi(str2); - if (num2 == num1 + 1) - return(1); - else - return(0); -} - add_refdes_to_bompart(bp, refdes) struct bompart *bp; char *refdes;