Soft'N'Design Software
/
projects
/
calc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
change perl program calls
[calc.git]
/
storage.c
diff --git
a/storage.c
b/storage.c
index dda1856155387d8f8d5b5afbd9697eabfaee2215..4a559f27433086ceda169ce7f734afffd8450157 100644
(file)
--- a/
storage.c
+++ b/
storage.c
@@
-16,11
+16,15
@@
tab_t *storage = NULL;
/* storage functions */
/* storage functions */
-
void
memory (int nb)
+
int
memory (int nb)
{
{
- if (
nb != size_tab (storage
)) {
+ if (
(nb != -1) && (nb != size_tab (storage)
)) {
storage = resize_tab (storage, nb);
}
storage = resize_tab (storage, nb);
}
+ if (size_tab (storage) == -1) {
+ memory (DEFAULT_STORAGE_SIZE);
+ }
+ return size_tab (storage);
}
double store (int id, double value)
}
double store (int id, double value)