changeset 826:6ed384cf51ec

[project @ 1994-10-17 02:48:12 by jwe]
author jwe
date Mon, 17 Oct 1994 02:48:12 +0000
parents 466c3eb4b9d5
children 85039b726047
files src/utils.cc
diffstat 1 files changed, 17 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/utils.cc	Sun Oct 16 20:57:56 1994 +0000
+++ b/src/utils.cc	Mon Oct 17 02:48:12 1994 +0000
@@ -395,13 +395,29 @@
       while ((entry = readdir (dirp)) != 0)
 	{
 	  int len = NLENGTH (entry);
+#ifdef WITH_DLD
+	  if ((len > 2
+	       && entry->d_name[len-2] == '.'
+	       && entry->d_name[len-1] == 'm')
+	      || (len > 4
+		  && entry->d_name[len-4] == '.'
+		  && entry->d_name[len-3] == 'o'
+		  && entry->d_name[len-2] == 'c'
+		  && entry->d_name[len-1] == 't'))
+#else
 	  if (len > 2
 	      && entry->d_name[len-2] == '.'
 	      && entry->d_name[len-1] == 'm')
+#endif
 	    {
 	      retval[i] = strsave (entry->d_name);
 	      if (no_suffix)
-		retval[i][len-2] = '\0';
+		{
+		  if (retval[i][len-1] == 'm')
+		    retval[i][len-2] = '\0';
+		  else
+		    retval[i][len-4] = '\0';
+		}
 
 	      i++;