Closed denji closed 6 years ago
Hi,
I got several warnings and errors:
text.c: In function ‘main’: text.c:86:2: warning: implicit declaration of function ‘console_resized’ [-Wimplicit-function-declaration] console_resized(0); ^ text.c:363:16: warning: assignment from incompatible pointer type sa.sa_handler = console_resized; ^ text.c: In function ‘get_term_width’: text.c:585:20: error: redeclaration of ‘w’ with no linkage struct winsize w = {0}; ^ text.c:579:17: note: previous declaration of ‘w’ was here struct winsize w; ^ text.c:591:9: warning: ‘return’ with no value, in function returning non-void [-Wreturn-type] return; ^ text.c: In function ‘print_unicode_output’: text.c:632:14: error: ‘console_width’ undeclared (first use in this function) int width = console_width - 30; ^ text.c:632:14: note: each undeclared identifier is reported only once for each function it appears in text.c: In function ‘get_term_width’: text.c:608:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ Makefile:373: recipe for target 'text.o' failed make[2]: * [text.o] Error 1 make[2]: Leaving directory '/tmp/1/axel/src' Makefile:451: recipe for target 'all-recursive' failed make[1]: * [all-recursive] Error 1 make[1]: Leaving directory '/tmp/1/axel' Makefile:348: recipe for target 'all' failed make: *\ [all] Error 2
Thanks!
Regards,
Eriberto
2016-05-28 19:03 GMT-03:00 Denis Denisov notifications@github.com:
If your console does not support unicode, don't turn it on. [image: axel-unicode] https://cloud.githubusercontent.com/assets/3759759/15630226/2b3e7792-2539-11e6-8a23-1648b74e17fa.png
- New command-line argument -u or --unicode that switches to unicode output.
- New config file option unicode_output = 1
- Detects width of the console/terminal.
Author: Emir Habul emiraga@gmail.com
You can view, comment on, or merge this pull request online at:
https://github.com/eribertomota/axel/pull/17 Commit Summary
- Displays progress bar using unicode characters
File Changes
- M doc/axelrc.example https://github.com/eribertomota/axel/pull/17/files#diff-0 (5)
- M src/axel.c https://github.com/eribertomota/axel/pull/17/files#diff-1 (26)
- M src/axel.h https://github.com/eribertomota/axel/pull/17/files#diff-2 (1)
- M src/conf.c https://github.com/eribertomota/axel/pull/17/files#diff-3 (2)
- M src/conf.h https://github.com/eribertomota/axel/pull/17/files#diff-4 (1)
- M src/conn.c https://github.com/eribertomota/axel/pull/17/files#diff-5 (4)
- M src/text.c https://github.com/eribertomota/axel/pull/17/files#diff-6 (168)
Patch Links:
- https://github.com/eribertomota/axel/pull/17.patch
- https://github.com/eribertomota/axel/pull/17.diff
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/eribertomota/axel/pull/17, or mute the thread https://github.com/notifications/unsubscribe/AGIyrtAiW7VTJa0ncLqFf6IkpdsXucRnks5qGLvIgaJpZM4IpKpg .
Hi,
The code still warning and not building for me. See below:
text.c: In function ‘main’:
text.c:87:2: warning: implicit declaration of function ‘console_resized’
[-Wimplicit-function-declaration]
console_resized(0);
^
text.c:364:16: warning: assignment from incompatible pointer type
sa.sa_handler = console_resized;
^
text.c: In function ‘get_term_width’:
text.c:591:9: warning: ‘return’ with no value, in function returning
non-void [-Wreturn-type]
return;
^
text.c:608:1: warning: control reaches end of non-void function
[-Wreturn-type]
}
^
mv -f .deps/text.Tpo .deps/text.Po
gcc -g -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -pthread -o
axel axel.o conf.o conn.o ftp.o http.o search.o tcp.o text.o
text.o: In function main': /tmp/axel2/axel-1/axel/src/text.c:87: undefined reference to
console_resized'
/tmp/axel2/axel-1/axel/src/text.c:364: undefined reference to
`console_resized'
collect2: error: ld returned 1 exit status
Makefile:354: recipe for target 'axel' failed
make[2]: * [axel] Error 1
make[2]: Leaving directory '/tmp/axel2/axel-1/axel/src'
Makefile:451: recipe for target 'all-recursive' failed
make[1]: * [all-recursive] Error 1
make[1]: Leaving directory '/tmp/axel2/axel-1/axel'
Makefile:348: recipe for target 'all' failed
make: *\ [all] Error 2
Thanks!!!
Regards,
Eriberto
2016-05-28 23:07 GMT-03:00 Denis Denisov notifications@github.com:
@eribertomota https://github.com/eribertomota rebased
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/eribertomota/axel/pull/17#issuecomment-222338605, or mute the thread https://github.com/notifications/unsubscribe/AGIyrotSgL9ET2ibpa2ZgLDQL2oGVXaZks5qGPTwgaJpZM4IpKpg .
Hi,
I will wait up to next weekend to release a new version (2.10). Please, let me to know if it is ok for you.
Cheers,
Eriberto
@eribertomota Where the file to automatic formatter codestyle config?
.clang-format
, .astylerc
, uncrustify.cfg
Sorry... Can you elaborate? i didn't understand...
2016-05-30 22:03 GMT-03:00 Denis Denisov notifications@github.com:
@eribertomota https://github.com/eribertomota Where the file to format codestyle based (.clang-format, .astylerc, uncrustify.cfg)?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/eribertomota/axel/pull/17#issuecomment-222571767, or mute the thread https://github.com/notifications/unsubscribe/AGIyrt7iuzTo5wt_MC-wnJOWLfePf5paks5qG4j8gaJpZM4IpKpg .
The code is relocated, check the missing parts.
Hi @denji
I'm getting compile errors on OS X with your latest code:
text.c:103:9: error: use of undeclared identifier 'console_width'
console_width = columns;
^
text.c:107:9: error: use of undeclared identifier 'console_width'
console_width = ts.ts_cols;
^
text.c:649:9: error: non-void function 'get_term_width' should return a value [-Wreturn-type]
return;
^
text.c:657:52: error: no member named 'w_cols' in 'struct ttysize'; did you mean 'ts_cols'?
if(ioctl(STDIN_FILENO, TIOCGSIZE, &w)!=-1 && w.w_cols > 1)
^~~~~~
ts_cols
/usr/include/sys/ioctl.h:81:17: note: 'ts_cols' declared here
unsigned short ts_cols;
^
text.c:658:18: error: no member named 'w_cols' in 'struct ttysize'; did you mean 'ts_cols'?
return w.w_cols;
^~~~~~
ts_cols
/usr/include/sys/ioctl.h:81:17: note: 'ts_cols' declared here
unsigned short ts_cols;
^
5 errors generated.
make[2]: *** [text.o] Error 1
Changes to error-checking should be split into another commit.
@denji are you still willing to work on this? or can we close the PR?
Branch: unicode-progressbar
If your console does not support unicode, don't turn it on.
-u
or--unicode
that switches to unicode output.unicode_output = 1
Author: Emir Habul emiraga@gmail.com