loselong (new commandline utility)

Discussion in 'C Programming' started by Malcolm McLean, Mar 13, 2013.

  1. There's a new utility on my website.

    I wrote it because when I was grepping for symbols in files, my grep hit xml
    and spat out huge long lines of several thousand characters.

    So loselong filters them out, replacing them with an 80 line output with an
    ellipsis in the middle.

    It's a very simple utility, presented in the hope that others will find it
    useful.

    --
    Download the source to loselong
    http://www.malcolmmclean.site11.com/www/loselong/loselong.html
    Malcolm McLean, Mar 13, 2013
    #1
    1. Advertising

  2. Malcolm McLean

    Rui Maciel Guest

    Malcolm McLean wrote:

    > There's a new utility on my website.
    >
    > I wrote it because when I was grepping for symbols in files, my grep hit
    > xml and spat out huge long lines of several thousand characters.
    >
    > So loselong filters them out, replacing them with an 80 line output with
    > an ellipsis in the middle.
    >
    > It's a very simple utility, presented in the hope that others will find it
    > useful.


    As no one bothered to post a replly, here are a couple of suggestions:
    - adding a version number
    - bundling the files in a zip file somewhere
    - some comments on loselong.c would improve the readability
    - in general, pointer arguments in loselong.c weren't validated

    loselong.c:138
    CBUFFER *cbuffer(int capacity) : switching from int with size_t would
    eliminate the need to validate the input parameter.


    Notwithstanding, thanks for sharing your work with the world. Great job.
    Kudos!


    Rui Maciel
    Rui Maciel, Mar 14, 2013
    #2
    1. Advertising

  3. On Thursday, March 14, 2013 8:42:58 PM UTC, Rui Maciel wrote:
    > Malcolm McLean wrote:
    >
    >
    >
    > > There's a new utility on my website.

    >
    > >

    >
    > > I wrote it because when I was grepping for symbols in files, my grep hit

    >
    > > xml and spat out huge long lines of several thousand characters.

    >
    > >

    >
    > > So loselong filters them out, replacing them with an 80 line output with

    >
    > > an ellipsis in the middle.

    >
    > >

    >
    > > It's a very simple utility, presented in the hope that others will find it

    >
    > > useful.

    >
    >
    >
    > As no one bothered to post a replly, here are a couple of suggestions:
    >
    > - adding a version number
    >
    > - bundling the files in a zip file somewhere
    >
    > - some comments on loselong.c would improve the readability
    >
    > - in general, pointer arguments in loselong.c weren't validated
    >
    >
    >
    > loselong.c:138
    >
    > CBUFFER *cbuffer(int capacity) : switching from int with size_t would
    >
    > eliminate the need to validate the input parameter.
    >
    >
    >
    >
    >
    > Notwithstanding, thanks for sharing your work with the world. Great job.
    >
    > Kudos!
    >
    >

    It's now been sourceforged.

    https://sourceforge.net/projects/loselong/

    so we've got version control. I'll look at validating pointer arguments.
    Malcolm McLean, Mar 25, 2013
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ed Anuff
    Replies:
    0
    Views:
    2,068
    Ed Anuff
    Feb 8, 2004
  2. NNTP
    Replies:
    5
    Views:
    454
  3. Manish Pansiniya
    Replies:
    6
    Views:
    480
    Natty Gur
    Jul 14, 2003
  4. Andrew Stuart
    Replies:
    0
    Views:
    329
    Andrew Stuart
    Oct 3, 2004
  5. Santosh Kumar
    Replies:
    2
    Views:
    178
    Steven D'Aprano
    Sep 16, 2012
Loading...

Share This Page