■
プロ愚民の課題の前半がおわりました。というかこれができれば後半はハナクソですよね!
どうも関数にできない部分があって、、、そのダメソースをさらしてみようとおもいます!
if (tc == 1) { while ( (cc =getc(keyfile)) != EOF) { putchar(cc); /* cover words */ if (((c -'0') % 2) == 1) /* 8th bit must 0 */ { fseek(outfile, -1L, SEEK_CUR); putc(--c, outfile); } for (c = skipBit(), shift = 6, temp = cc ; shift >= 0; --shift, c = skipBit()) { if(((temp >> shift) & 1) == 1) { if (((c - '0') % 2) == 0) { fseek(outfile, -1L, SEEK_CUR); putc(++c, outfile); } } else if (((c - '0') %2) == 1) { fseek(outfile, -1L, SEEK_CUR); putc(--c, outfile); } } } } else { for (i = 0; i < length; i++) /* cover words */ { /* cover words */ if (((c -'0') % 2) == 1) /* 8th bit must 0 */ { fseek(outfile, -1L, SEEK_CUR); putc(--c, outfile); } for (c = skipBit(), shift = 6, temp = argv[pos][i] ; shift >= 0; --shift, c = skipBit()) { if(((temp >> shift) & 1) == 1) { if (((c - '0') % 2) == 0) { fseek(outfile, -1L, SEEK_CUR); putc(++c, outfile); } } else if (((c - '0') %2) == 1) { fseek(outfile, -1L, SEEK_CUR); putc(--c, outfile); } } } }
あれ?これってなんかおかしくね?なんかまるまる同じじゃね?