Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 216672 Details for
Bug 209908
New ebuild: dev-util/ohcount-1.0.0
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch form ticket 55 to let ohcount scan directories recursive
ohcount-recursive.patch (text/plain), 1.07 KB, created by
joachim Langenbach
on 2010-01-16 13:05:27 UTC
(
hide
)
Description:
Patch form ticket 55 to let ohcount scan directories recursive
Filename:
MIME Type:
Creator:
joachim Langenbach
Created:
2010-01-16 13:05:27 UTC
Size:
1.07 KB
patch
obsolete
>diff -rupN ohcount.orig/src/sourcefile.c ohcount/src/sourcefile.c >--- ohcount.orig/src/sourcefile.c 2009-07-31 00:51:37.000000000 +0200 >+++ ohcount/src/sourcefile.c 2010-01-16 13:56:33.000000000 +0100 >@@ -6,6 +6,10 @@ > #include <stdlib.h> > #include <string.h> > >+#include <sys/types.h> >+#include <sys/stat.h> >+#include <unistd.h> >+ > #include "detector.h" > #include "diff.h" > #include "languages.h" >@@ -426,13 +430,15 @@ void ohcount_sourcefile_list_add_directo > DIR *d = opendir(directory); > if (d) { > while ((file = readdir(d))) { >+ struct stat st; > int length = strlen(file->d_name); > strncpy(f_p, (const char *)file->d_name, length); > *(f_p + length) = '\0'; > >- if (file->d_type == DT_DIR && *file->d_name != '.') // no hidden dirs >+ stat(filepath, &st); >+ if (S_ISDIR(st.st_mode) && *file->d_name != '.') // no hidden dirs > ohcount_sourcefile_list_add_directory(list, filepath); >- else if (file->d_type == DT_REG) >+ else if (S_ISREG(st.st_mode)) > ohcount_sourcefile_list_add_file(list, filepath); > } > closedir(d);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 209908
:
143358
|
216671
| 216672