Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "headers.h"
- struct sentence *newSentence(struct word *firstWord,int sentenceNum, int wordCount) {
- struct sentence *new = NULL;
- new = malloc(sizeof(struct sentence));
- if (new != NULL) {
- new->firstWord = firstWord;
- new->lineNum = sentenceNum;
- new->wordTotal = wordCount;
- new->nextSent = NULL;
- // printf("new sentence constructed\n");
- // fflush(stdout);
- }
- return new;
- }
- struct word *newWord(char *letters, int charNum, int location) {
- struct word *new = NULL;
- new = malloc(sizeof(struct word));
- if (new != NULL) {
- new->str = letters;
- new->length = charNum;
- new->pos = location;
- new->nextWord = NULL;
- // printf("new word constructed\n");
- // fflush(stdout);
- }
- return new;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement