From 2a0a9e513bc1ef7e40be796998412972b36a5b47 Mon Sep 17 00:00:00 2001 From: skeezix Date: Mon, 21 Dec 2009 15:41:13 -0500 Subject: [PATCH] DEbugging :/ --- lib/pnd_utility.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/pnd_utility.c b/lib/pnd_utility.c index b9cf22d..22f0db5 100644 --- a/lib/pnd_utility.c +++ b/lib/pnd_utility.c @@ -101,7 +101,7 @@ char *pnd_expand_tilde ( char *freeable_buffer ) { florp = strdup ( pw -> pw_dir ); home = florp; - //printf ( " home is %s (from %u)\n", home, b.ut_type ); + printf ( " DEBUG: home is %s (from %u)\n", home, b.ut_type ); } // passwd entry matches the utmp entry @@ -121,7 +121,10 @@ char *pnd_expand_tilde ( char *freeable_buffer ) { return ( s ); // can't succeed } + printf ( "DEBUG: entering while (%s)\n", s ); + while ( ( p = strchr ( s, '~' ) ) ) { + printf ( "DEBUG: within while (%s)\n", s ); char *temp = malloc ( strlen ( s ) + strlen ( home ) + 1 ); memset ( temp, '\0', strlen ( s ) + strlen ( home ) + 1 ); // copy in stuff prior to ~ @@ -135,7 +138,7 @@ char *pnd_expand_tilde ( char *freeable_buffer ) { s = temp; } // while finding matches - //printf ( "expand tilde OUT: '%s'\n", s ); + printf ( "DEBUG: expand tilde OUT: '%s'\n", s ); return ( s ); } -- 2.39.5