Code Monkey home page Code Monkey logo

sherlock's People

Contributors

d-torrance avatar devinatkin avatar diogocabral avatar rodoaravena avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

sherlock's Issues

make creates no output

After replacing \t with spaces, make runs without an issue, however nothing is created.

Empty Result

./sherlock *.java > results.txt

i am trying to compare two java files...but the result is empty...

zsh: command not found: sherlock

Hi, thanks for this contribution. However, I'm having trouble getting started.

I followed your instructions on the README. I downloaded the repo, unzipped it, ran 'make' from the unziped directory. When I then type the command 'sherlock' I get

zsh: command not found: sherlock

I also tried running it like ./sherlock but it does not give any output

I'm not super familiar with how to run or make these kinds of files. Any cahnce you could send more detailed instructions or update the README?
Thank you, Charlie

Issue Compiling Sherlock

Simply Running make unfortunately doesn't appear to be working on all systems.

gcc -Wall -ansi -pedantic -O2 -g -D_DEFAULT_SOURCE -o sherlock sherlock.c
sherlock.c: In function ‘listFiles’:
sherlock.c:98:30: error: ‘DT_DIR’ undeclared (first use in this function)
         if (entry->d_type == DT_DIR) {
                              ^
sherlock.c:98:30: note: each undeclared identifier is reported only once for each function it appears in
sherlock.c:116:35: error: ‘DT_REG’ undeclared (first use in this function)
         else if (entry->d_type == DT_REG) {
                                   ^
make: *** [sherlock] Error 1

I'm getting this issue on RHEL 7. If I find a fix before I give up on this I'll submit a PR for said fix.

issue with architecture arm64 mac

attempting to run on the m1 macs returns this error

ld: can't link with a main executable file 'sherlock' for architecture arm64

is sherlock not compatible with the m1 macs?

pedantic fails with gcc

gcc -Wall -ansi -pedantic -O2 -g -D_DEFAULT_SOURCE -o sherlock sherlock.c
sherlock.c: In function ‘listFiles’:
sherlock.c:95:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
   95 |     if (!(dir = opendir(name)))
      |     ^~
sherlock.c:98:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
   98 |  while ((entry = readdir(dir)) != NULL)

it is fixed by inlining the return

diff --git a/sherlock.c b/sherlock.c
index 501582e..08be4ca 100644
--- a/sherlock.c
+++ b/sherlock.c
@@ -92,8 +92,7 @@ void listFiles(const char *name)
     DIR *dir;
     struct dirent *entry;
 
-    if (!(dir = opendir(name)))
-        return;
+    if (!(dir = opendir(name))) return;
 
        while ((entry = readdir(dir)) != NULL) 
        {

Missing license file

In order to develop sherlock it is necessary to have a license file (MIT, GPL, etc)

Can't compile

gcc -Wall -ansi -pedantic -O2 -g -o sherlock sherlock.c
sherlock.c: In function ‘listFiles’:
sherlock.c:100:31: error: ‘DT_DIR’ undeclared (first use in this function)
          if (entry->d_type == DT_DIR) 
                               ^
sherlock.c:100:31: note: each undeclared identifier is reported only once for each function it appears in
sherlock.c:120:36: error: ‘DT_REG’ undeclared (first use in this function)
          else if (entry->d_type == DT_REG) 
                                    ^
makefile:9: recipe for target 'sherlock' failed
make: *** [sherlock] Error 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.