Skip to content

Commit

Permalink
add mp4v2
Browse files Browse the repository at this point in the history
  • Loading branch information
YuanDaYu002 committed Nov 16, 2018
1 parent 810d245 commit 20c1caf
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 0 deletions.
1 change: 1 addition & 0 deletions http-downloader-print-english
Submodule http-downloader-print-english added at cc5336
1 change: 1 addition & 0 deletions mp4v2
Submodule mp4v2 added at bda384
Binary file added persent_printf
Binary file not shown.
61 changes: 61 additions & 0 deletions persent_printf.c
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


0 comments on commit 20c1caf

Please sign in to comment.