h44394@leah.Albany.Edu (Michael R. Hoffman) (02/27/90)
Hi there. This bug may have already come up, but since our administrator does weekly deletions, it was wiped before I read it. The problem is in "store.c" at line 227: char word[]; The error ihas to do with "null space declaration". It seems that with 4.3BSD UNIX running non-ANSI C, this declaration must either contain an initialization value (i.e.- char word[]="*******") or a size value (i.e.- char word[*]). I tried using "char word[6]" after looking at the code, but now it won't accept the passwords for the stores. I just keep getting "too bad." Any help would be appreciated greatly! Mike Hoffman reply-to: h44394@leah.albany.edu
tamela@tahoe.unr.edu (Tamela R. Germano) (03/02/90)
In article <2616@leah.Albany.Edu> h44394@leah.Albany.Edu (Michael R. Hoffman) writes: >does weekly deletions, it was wiped before I read it. The problem is in >"store.c" at line 227: > char word[]; >The error ihas to do with "null space declaration". > >It seems that with 4.3BSD UNIX running non-ANSI C, this declaration must either >contain an initialization value (i.e.- char word[]="*******") or a size value >(i.e.- char word[*]). > >I tried using "char word[6]" after looking at the code, but now it won't accept >the passwords for the stores. I just keep getting "too bad." In store.c there is a function ask_ques(q), it's string compares are messed up. Replace: if((strcmp(word,"death")) == 10){ with: if (!strcmp(string,"death\n")){ Do similarly for the other two questions. Also, I replaced char word[] with char *word instead of giving it a size. ___ _ / / // --/ __ ______ _ // __ (_/ (_/|_/ / / <_</_</_(_/|_
tamela@tahoe.unr.edu (Tamela R. Germano) (03/02/90)
In article <2616@leah.Albany.Edu> h44394@leah.Albany.Edu (Michael R. Hoffman) writes: >does weekly deletions, it was wiped before I read it. The problem is in >"store.c" at line 227: > char word[]; >The error ihas to do with "null space declaration". > >It seems that with 4.3BSD UNIX running non-ANSI C, this declaration must either >contain an initialization value (i.e.- char word[]="*******") or a size value >(i.e.- char word[*]). In store.c there is a function ask_ques(q), it's string compares are messed up. Replace: if((strcmp(word,"death")) == 10){ with: if (!strcmp(string,"death\n")){ Do similarly for the other two questions. Also, I replaced char word[] with char *word instead of bothering with a specific size. ___ _ / / // --/ __ ______ _ // __ (_/ (_/|_/ / / <_</_</_(_/|_