|
Lines 412-419
history (int argc, char **argv)
Link Here
|
| 412 |
working = 1; |
412 |
working = 1; |
| 413 |
break; |
413 |
break; |
| 414 |
case 'X': /* Undocumented debugging flag */ |
414 |
case 'X': /* Undocumented debugging flag */ |
|
|
415 |
#ifdef DEBUG |
| 415 |
histfile = optarg; |
416 |
histfile = optarg; |
|
|
417 |
#endif |
| 416 |
break; |
418 |
break; |
|
|
419 |
|
| 417 |
case 'D': /* Since specified date */ |
420 |
case 'D': /* Since specified date */ |
| 418 |
if (*since_rev || *since_tag || *backto) |
421 |
if (*since_rev || *since_tag || *backto) |
| 419 |
{ |
422 |
{ |
|
Lines 898-906
save_user (char *name)
Link Here
|
| 898 |
{ |
901 |
{ |
| 899 |
if (user_count == user_max) |
902 |
if (user_count == user_max) |
| 900 |
{ |
903 |
{ |
| 901 |
user_max += USER_INCREMENT; |
904 |
if (size_overflow_p (xtimes (xsum (user_max, USER_INCREMENT), |
| 902 |
user_list = (char **) xrealloc ((char *) user_list, |
905 |
sizeof (char *)))) |
| 903 |
(int) user_max * sizeof (char *)); |
906 |
{ |
|
|
907 |
error (0, 0, "save_user: too many users"); |
| 908 |
return; |
| 909 |
} |
| 910 |
user_max = xsum (user_max, USER_INCREMENT); |
| 911 |
user_list = xrealloc (user_list, xtimes (user_max, sizeof (char *))); |
| 904 |
} |
912 |
} |
| 905 |
user_list[user_count++] = xstrdup (name); |
913 |
user_list[user_count++] = xstrdup (name); |
| 906 |
} |
914 |
} |
|
Lines 925-933
save_file (char *dir, char *name, char *
Link Here
|
| 925 |
|
933 |
|
| 926 |
if (file_count == file_max) |
934 |
if (file_count == file_max) |
| 927 |
{ |
935 |
{ |
| 928 |
file_max += FILE_INCREMENT; |
936 |
if (size_overflow_p (xtimes (xsum (file_max, FILE_INCREMENT), |
| 929 |
file_list = (struct file_list_str *) xrealloc ((char *) file_list, |
937 |
sizeof (*fl)))) |
| 930 |
file_max * sizeof (*fl)); |
938 |
{ |
|
|
939 |
error (0, 0, "save_file: too many files"); |
| 940 |
return; |
| 941 |
} |
| 942 |
file_max = xsum (file_max, FILE_INCREMENT); |
| 943 |
file_list = xrealloc (file_list, xtimes (file_max, sizeof (*fl))); |
| 931 |
} |
944 |
} |
| 932 |
fl = &file_list[file_count++]; |
945 |
fl = &file_list[file_count++]; |
| 933 |
fl->l_file = cp = xmalloc (strlen (dir) + strlen (name) + 2); |
946 |
fl->l_file = cp = xmalloc (strlen (dir) + strlen (name) + 2); |
|
Lines 965-973
save_module (char *module)
Link Here
|
| 965 |
{ |
978 |
{ |
| 966 |
if (mod_count == mod_max) |
979 |
if (mod_count == mod_max) |
| 967 |
{ |
980 |
{ |
| 968 |
mod_max += MODULE_INCREMENT; |
981 |
if (size_overflow_p (xtimes (xsum (mod_max, MODULE_INCREMENT), |
| 969 |
mod_list = (char **) xrealloc ((char *) mod_list, |
982 |
sizeof (char *)))) |
| 970 |
mod_max * sizeof (char *)); |
983 |
{ |
|
|
984 |
error (0, 0, "save_module: too many modules"); |
| 985 |
return; |
| 986 |
} |
| 987 |
mod_max = xsum (mod_max, MODULE_INCREMENT); |
| 988 |
mod_list = xrealloc (mod_list, xtimes (mod_max, sizeof (char *))); |
| 971 |
} |
989 |
} |
| 972 |
mod_list[mod_count++] = xstrdup (module); |
990 |
mod_list[mod_count++] = xstrdup (module); |
| 973 |
} |
991 |
} |