From 4abb85b811b68813bc2a507e120b7dcbe3cad25f Mon Sep 17 00:00:00 2001 From: jesusc Date: Mon, 28 Jul 2003 23:19:22 +0000 Subject: [PATCH] Warning when libfile not found and path is null git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2783 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- as/mcs51/lklibr.c | 16 ++++++++++------ link/z80/lklibr.c | 18 +++++++++++------- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/as/mcs51/lklibr.c b/as/mcs51/lklibr.c index e880d7a6..d7d9cb24 100644 --- a/as/mcs51/lklibr.c +++ b/as/mcs51/lklibr.c @@ -126,13 +126,17 @@ addlib() unget(getnb()); - if (lbphead == NULL) { - addfile(NULL,ip); - return; - } - for (lbph=lbphead; lbph; lbph=lbph->next) { - foundcount+=addfile(lbph->path,ip); + if (lbphead == NULL) + { + foundcount+=addfile(NULL,ip); } + else + { + for (lbph=lbphead; lbph; lbph=lbph->next) + { + foundcount+=addfile(lbph->path,ip); + } + } if(foundcount==0) { printf("?ASlink-Warning-Couldn't find library '%s'\n", ip); diff --git a/link/z80/lklibr.c b/link/z80/lklibr.c index 94b54da5..eb4cd98d 100644 --- a/link/z80/lklibr.c +++ b/link/z80/lklibr.c @@ -175,16 +175,20 @@ addlib() unget(getnb()); - if (lbphead == NULL) { - addfile(NULL,ip); - return; - } - for (lbph=lbphead; lbph; lbph=lbph->next) { - foundcount+=addfile(lbph->path,ip); + if (lbphead == NULL) + { + foundcount+=addfile(NULL, ip); } + else + { + for (lbph=lbphead; lbph; lbph=lbph->next) + { + foundcount+=addfile(lbph->path,ip); + } + } if(foundcount==0) { - printf("?ASlink-Warning-Couldn't find library '%s'\n", ip); + printf("\n?ASlink-Warning-Couldn't find library '%s'", ip); } } -- 2.30.2