Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Replying so that i can go back to this and understand it one day


Mark, when you come back to this, this might be helpful for you. https://github.com/gryftir/recursivereverse


Thanks! Sorry for asking this, but why the strange (to me) indent?


8 spaces?

Probably because this is similar to the Linux kernel programming style. Many of us learnt C from the kernel or projects that follow it's coding style.


Assuming you mean the code on github, I use tabs for indentation in vim, but have tabstop and setwidth set to 2. So if the code has 8 spaces, that is github or the browser. Feel free to make a pull request, or I can try to fix it (though I am kinda focused on my portfolio for internship applications atm). Should be a simple regex though.


  perl -pi -e 's/^(\t+)/"  " x length($1)/e' recurse.c
seems to do the trick; vary the number of spaces inside the "" to taste.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: