Skip to content

Commit c7d2e8b

Browse files
committed
int --> long
1 parent c9cd391 commit c7d2e8b

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/countfa.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ void usage() {
4040
void do_countfa(istream &input) {
4141

4242
bool at_name{false};
43-
unsigned int counter{0};
43+
unsigned long counter{0};
4444
char l;
4545

4646
while (input.get(l)) {

src/seqgen.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ void usage() {
4747

4848
int main(int argc, char **argv) {
4949

50-
unsigned int seqlen{0};
50+
unsigned long seqlen{0};
5151
int opt;
5252
size_t alphlen;
5353
ofstream outfile;
@@ -78,7 +78,7 @@ int main(int argc, char **argv) {
7878
has_out = true;
7979
}
8080
break;
81-
case 'l': if (optarg) seqlen = atoi(optarg);
81+
case 'l': if (optarg) seqlen = atol(optarg);
8282
break;
8383
case 's': if (optarg) iseed = atoi(optarg);
8484
break;
@@ -153,13 +153,13 @@ int main(int argc, char **argv) {
153153
if (!has_freqs) {
154154

155155
if (has_out) {
156-
for (unsigned int i = 0; i < seqlen; ++i) {
156+
for (unsigned long i = 0; i < seqlen; ++i) {
157157
outfile << lets[gen() % alphlen];
158158
}
159159
outfile << '\n';
160160
outfile.close();
161161
} else {
162-
for (unsigned int i = 0; i < seqlen; ++i) {
162+
for (unsigned long i = 0; i < seqlen; ++i) {
163163
cout << lets[gen() % alphlen];
164164
}
165165
cout << '\n';
@@ -170,13 +170,13 @@ int main(int argc, char **argv) {
170170
discrete_distribution<unsigned int> next_let(freqs.begin(), freqs.end());
171171

172172
if (has_out) {
173-
for (unsigned int i = 0; i < seqlen; ++i) {
173+
for (unsigned long i = 0; i < seqlen; ++i) {
174174
outfile << lets[next_let(gen)];
175175
}
176176
outfile << '\n';
177177
outfile.close();
178178
} else {
179-
for (unsigned int i = 0; i < seqlen; ++i) {
179+
for (unsigned long i = 0; i < seqlen; ++i) {
180180
cout << lets[next_let(gen)];
181181
}
182182
cout << '\n';

0 commit comments

Comments
 (0)