abh - HTMLify profile

abh
509 Files
102923 Views
Latest files of /abh/learning/c/BPPL/Phase-3/chatbot
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "ui.h"
#include "chatbot.h"
char *mirror_chat(char *message) {
return message;
#include <stdio.h>
#include <string.h>
#include "ui.h"
#include "chatbot.h"
char *mirror_chat(char *message) {
return message;
#include <stdlib.h>
#include "chatbot.h"
char *ChatBot_chat(ChatBot *chatbot, char *message) {
if (message == NULL || message[0] == '\0') return NULL;
ChatMsg usermsg = { chatbot->name, message, SEND };
char *response = chatbot->chat(message);
ChatMsg botmsg = { chatbot->name, response, RECEIVE };
#include "chatbot.h"
char *ChatBot_chat(ChatBot *chatbot, char *message) {
if (message == NULL || message[0] == '\0') return NULL;
ChatMsg usermsg = { chatbot->name, message, SEND };
char *response = chatbot->chat(message);
ChatMsg botmsg = { chatbot->name, response, RECEIVE };
#ifndef CHATBOT_H
#define CHATBOT_H
typedef enum {
SEND,
RECEIVE,
} MsgType;
#define CHATBOT_H
typedef enum {
SEND,
RECEIVE,
} MsgType;
#define _XOPEN_SOURCE_EXTENDED
#include <ncursesw/ncurses.h>
#include <string.h>
#include <locale.h>
#include "chatbot.h"
#include "ui.h"
enum {
#include <ncursesw/ncurses.h>
#include <string.h>
#include <locale.h>
#include "chatbot.h"
#include "ui.h"
enum {