forked from YuanDaYu002/ToolBank
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
810d245
commit 20c1caf
Showing
4 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
Submodule http-downloader-print-english
added at
cc5336
Submodule mp4v2
added at
bda384
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
#include <stdio.h> | ||
|
||
#include <string.h> | ||
|
||
#if 1 | ||
int main(int argc,char *argv[]) | ||
{ | ||
if(argc < 2) | ||
{ | ||
printf("You need input 1 parameter[argv[1]](1~50)!\n "); | ||
return -1; | ||
} | ||
const int numTotal = 50; | ||
char sign[51] = {0}; | ||
memset(sign, '=', numTotal); | ||
|
||
int numshow;//1~50 | ||
printf("argv[1] = %s\n",argv[1]); | ||
sscanf(argv[1],"%d",&numshow); | ||
if(numshow < 1 || numshow > 50) | ||
{ | ||
printf("argv[1] out of range(1~50)!\n"); | ||
return -1; | ||
} | ||
printf("numshow = %d\n",numshow); | ||
printf("[%-*.*s]\n", numTotal, numshow, sign); | ||
fflush(stdout); | ||
|
||
return 0; | ||
} | ||
#else | ||
int main(int argc,char *argv[]) | ||
{ | ||
|
||
|
||
const int numTotal = 50; | ||
char sign[51] = {0}; | ||
memset(sign, '=', numTotal); | ||
|
||
int numshow = 0;//1~50 | ||
|
||
for(;;) | ||
{ | ||
numshow ++; | ||
if(numshow < 1 || numshow > 50) | ||
{ | ||
//printf("numshow out of range(1~50)!\n"); | ||
break; | ||
} | ||
//printf("numshow = %d\n",numshow); | ||
printf("[%-*.*s]", numTotal, numshow, sign); | ||
fflush(stdout); | ||
sleep(1); | ||
} | ||
|
||
return 0; | ||
} | ||
|
||
#endif | ||
|
||
|