projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
zbd: Fix zbd_zone_idx()
[fio.git]
/
exp
/
test-expression-parser.c
diff --git
a/exp/test-expression-parser.c
b/exp/test-expression-parser.c
index 022df0111deb2f506210aacf98de5e0d14f2a77c..e22f24dc878d14f03482d7370da7568fb302d259 100644
(file)
--- a/
exp/test-expression-parser.c
+++ b/
exp/test-expression-parser.c
@@
-15,7
+15,7
@@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 5
9 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 5
1 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
*
*/
@@
-25,7
+25,7
@@
#include "../y.tab.h"
extern int evaluate_arithmetic_expression(const char *buffer, long long *ival,
#include "../y.tab.h"
extern int evaluate_arithmetic_expression(const char *buffer, long long *ival,
- double *dval);
+ double *dval
, double implied_units, int is_time
);
int main(int argc, char *argv[])
{
int main(int argc, char *argv[])
{
@@
-40,10
+40,11
@@
int main(int argc, char *argv[])
rc = strlen(buffer);
if (rc > 0 && buffer[rc - 1] == '\n')
buffer[rc - 1] = '\0';
rc = strlen(buffer);
if (rc > 0 && buffer[rc - 1] == '\n')
buffer[rc - 1] = '\0';
- rc = evaluate_arithmetic_expression(buffer, &result, &dresult);
+ rc = evaluate_arithmetic_expression(buffer, &result, &dresult
, 1.0, 0
);
if (!rc) {
printf("%lld (%20.20lf)\n", result, dresult);
} else {
if (!rc) {
printf("%lld (%20.20lf)\n", result, dresult);
} else {
+ fprintf(stderr, "Syntax error\n");
result = 0;
dresult = 0;
}
result = 0;
dresult = 0;
}