Skip to content
Snippets Groups Projects
Commit 007b8666 authored by deuce's avatar deuce
Browse files

Ran 'er through astyle... much easier on the eyes now.

parent 478cd155
No related branches found
No related tags found
No related merge requests found
Showing with 20870 additions and 21683 deletions
......@@ -12,81 +12,80 @@
void dump(void);
void
main(void)
{
FILE *justfile;
enemy erec;
enemy_idx eidx;
char key;
INT16 num=0;
INT16 lvl=0;
INT16 cnt;
char nnm[36];
// system("ren "ENEMY_FILENAME" nyenmb.dat");
// system("ren "ENEMY_INDEX" nyenmb.idx");
system("del "ENEMY_FILENAME);
system("del "ENEMY_INDEX);
eidx.first_enemy[0]=0;
do {
// printf("\nA-Add N-Next level Q-Quit>");
scanf("%c",&key);
dump();
if (key=='A' || key=='a') {
// printf("Name of the sucker:");
cnt=0;
do {
scanf("%c",&key);
erec.name[cnt]=key;
cnt++;
} while (key!='\n' && key!='\r' && cnt<36);
erec.name[cnt-1]=0;
if (key!='\n' && key!='\r') dump();
// printf("Hitpoints:");
scanf("%ld",&erec.hitpoints);
dump();
// printf("Strength:");
scanf("%ld",&erec.strength);
dump();
// printf("Defense:");
scanf("%ld",&erec.defense);
dump();
// printf("Arm:");
scanf("%d",&erec.arm);
dump();
justfile=fopen(ENEMY_FILENAME,"a+b");
// printf("Atpos: %d\n\n",ftell(justfile)/sizeof(enemy));
fwrite(&erec,sizeof(enemy),1,justfile);
fclose(justfile);
num++;
} else if (key=='N' || key=='n') {
eidx.last_enemy[lvl]=num;
lvl++;
eidx.first_enemy[lvl]=num;
}
} while (key!='q' && key!='Q');
eidx.last_enemy[lvl]=(--num);
justfile=fopen(ENEMY_INDEX,"wb");
fwrite(&eidx,sizeof(enemy_idx),1,justfile);
fclose(justfile);
printf("\nDone!");
main(void) {
FILE *justfile;
enemy erec;
enemy_idx eidx;
char key;
INT16 num=0;
INT16 lvl=0;
INT16 cnt;
char nnm[36];
// system("ren "ENEMY_FILENAME" nyenmb.dat");
// system("ren "ENEMY_INDEX" nyenmb.idx");
system("del "ENEMY_FILENAME);
system("del "ENEMY_INDEX);
eidx.first_enemy[0]=0;
do {
// printf("\nA-Add N-Next level Q-Quit>");
scanf("%c",&key);
dump();
if (key=='A' || key=='a') {
// printf("Name of the sucker:");
cnt=0;
do {
scanf("%c",&key);
erec.name[cnt]=key;
cnt++;
} while (key!='\n' && key!='\r' && cnt<36);
erec.name[cnt-1]=0;
if (key!='\n' && key!='\r')
dump();
// printf("Hitpoints:");
scanf("%ld",&erec.hitpoints);
dump();
// printf("Strength:");
scanf("%ld",&erec.strength);
dump();
// printf("Defense:");
scanf("%ld",&erec.defense);
dump();
// printf("Arm:");
scanf("%d",&erec.arm);
dump();
justfile=fopen(ENEMY_FILENAME,"a+b");
// printf("Atpos: %d\n\n",ftell(justfile)/sizeof(enemy));
fwrite(&erec,sizeof(enemy),1,justfile);
fclose(justfile);
num++;
} else if (key=='N' || key=='n') {
eidx.last_enemy[lvl]=num;
lvl++;
eidx.first_enemy[lvl]=num;
}
} while (key!='q' && key!='Q');
eidx.last_enemy[lvl]=(--num);
justfile=fopen(ENEMY_INDEX,"wb");
fwrite(&eidx,sizeof(enemy_idx),1,justfile);
fclose(justfile);
printf("\nDone!");
}
void
dump(void)
{
char key;
do {
scanf("%c",&key);
} while (key!='\n');
dump(void) {
char key;
do {
scanf("%c",&key);
} while (key!='\n');
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -32,7 +32,7 @@ typedef INT16 tBool;
/* InterBBS API Functions */
/******************************************************************************/
tIBResult IBSend(tIBInfo *pInfo, char *pszDestNode, char *pBuffer,
INT16 nBufferSize);
INT16 nBufferSize);
tIBResult IBSendAll(tIBInfo *pInfo, char *pBuffer, INT16 nBufferSize);
//tIBResult IBGet(tIBInfo *pInfo, void *pBuffer, INT16 nMaxBufferSize);
......@@ -65,14 +65,14 @@ tIBResult IBReadConfig(tIBInfo *pInfo, char *pszConfigFile);
void MakeFilename(const char *pszPath, const char *pszFilename, char *pszOut);
tIBResult ValidateInfoStruct(tIBInfo *pInfo);
tBool CreateMessage(char *pszMessageDir, tMessageHeader *pHeader,
char *pszText);
char *pszText);
DWORD GetFirstUnusedMsgNum(char *pszMessageDir);
void GetMessageFilename(char *pszMessageDir, DWORD lwMessageNum,
char *pszOut);
char *pszOut);
tBool WriteMessage(char *pszMessageDir, DWORD lwMessageNum,
tMessageHeader *pHeader, char *pszText);
tMessageHeader *pHeader, char *pszText);
tBool ReadMessage(char *pszMessageDir, DWORD lwMessageNum,
tMessageHeader *pHeader, char **ppszText);
tMessageHeader *pHeader, char **ppszText);
DWORD GetNextMSGID(void);
INT16 GetMaximumEncodedLength(INT16 nUnEncodedLength);
void EncodeBuffer(char *pszDest, const char *pBuffer, INT16 nBufferSize);
......@@ -83,7 +83,7 @@ void DecodeMail(const char *pcSource, ibbs_mail_type *ibmail);
void ConvertAddressToString(char *pszDest, const tFidoNode *pNode);
void ConvertStringToAddress(tFidoNode *pNode, const char *pszSource);
tBool ProcessConfigFile(char *pszFileName, INT16 nKeyWords, char **papszKeyWord,
void (*pfCallBack)(INT16, char *, void *), void *pCallBackData);
void (*pfCallBack)(INT16, char *, void *), void *pCallBackData);
void ProcessConfigLine(INT16 nKeyword, char *pszParameter, void *pCallbackData);
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment