News for hackers. Stuff that matters.
Re:St – simple terminal by tokenrove on Wednesday November 26, 2014 @08:44AM (#8662231)
strparse makes sense if you read the code linearly, since they also have csiparse, and deal with STREscape and CSIEscape, respectively. If you did need to add an escape sequence, it would take less than a minute to find where to add it.

While I wouldn't call it a paragon of clarity, it basically follows the same style and organization as older Unix tools. In such cases, I find starting from main() and jumping around with ctags a useful strategy (after reading the globals and type definitions).

Oh, and I strongly agree about tests. Especially escape sequence parsing could benefit from fuzzing or other property-based testing approaches.

Re:St – simple terminal by humanrebar on Wednesday November 26, 2014 @10:47AM (#8662809)

  ...it basically follows the same style and organization
  as older Unix tools. In such cases, I find starting from
  main() and jumping around with ctags a useful strategy
 (after reading the globals and type definitions).
Oh, I know it's the same style and organization as older Unix tools. And it's the same style and organization as large one-off perl scripts. It would be a shame to replace old cruft with new stuff that doesn't the leverage lessons learned in software engineering over the last 40 years or so.