Re: [dev] sbase - seq.c: help wanted

From: Galos, David <galosd83_AT_students.rowan.edu>
Date: Mon, 16 Apr 2012 02:45:46 -0500

> Attached is a first shot at seq(1) for sbase.  I do not like having to
> juggle data around to play games with sprintf, so if someone has a
> cleaner approach to this program, please speak up.

Unfortunately, there isn't much that can be done. User input is always
sub-par, and unless we want to account for scientific notation, or trailing
zeros, the easiest thing is to let atof parse the input, and then have
sprintf provide us a sane string.

I've cleaned up the code a bit, moved the digit-counting into separate
functions, and added simple regexp.h format string validation. I realizr

Received on Mon Apr 16 2012 - 09:45:46 CEST

This archive was generated by hypermail 2.3.0 : Mon Apr 16 2012 - 09:48:06 CEST