From 116f5db5c2339c9526735df960b4dbc52ee78568 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 10 Mar 2000 15:44:41 +0000 Subject: *** empty log message *** --- gendepslist2.cc | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/gendepslist2.cc b/gendepslist2.cc index f2508e6..1520c48 100644 --- a/gendepslist2.cc +++ b/gendepslist2.cc @@ -254,9 +254,9 @@ map > closure(const map > &names) { // } //}; -inline int verif(int num, int max, const string &package, const string &dep) { - if (num >= max) cerr << package << " requires " << dep << " which is not in the same hdlist\n"; - return num; +inline int verif(int npack, int ndep, const string &package, const string &dep) { + if (ndep > npack) cerr << package << " requires " << dep << " which is not in the same hdlist\n"; + return ndep; } void printDepslist(ofstream *out1, ofstream *out2) { @@ -319,11 +319,15 @@ void printDepslist(ofstream *out1, ofstream *out2) { for (ITs q = dep.begin(); q != dep.end(); q++) { if (q->find('|') != string::npos) { vector l = split('|', *q); - for (ITv k = l.begin(); k != l.end(); k++) *out2 << " " << verif(where[*k], nb2hdlist[i], *p, *k); + for (ITv k = l.begin(); k != l.end(); k++) { + verif(nb2hdlist[i], nb2hdlist[where[*k]], *p, *k); + *out2 << " " << where[*k]; + } } else if (q->compare("NOTFOUND_") > 1) { *out2 << " " << *q; } else { - *out2 << " " << verif(where[*q], nb2hdlist[i], *p, *q); + verif(nb2hdlist[i], nb2hdlist[where[*q]], *p, *q); + *out2 << " " << where[*q]; } } *out2 << "\n"; -- cgit v1.2.1