ReactOS 0.4.15-dev-7654-g6bc40d3
tscript.cpp
Go to the documentation of this file.
1
2//Telnet Win32 : an ANSI telnet client.
3//Copyright (C) 1998-2000 Paul Brannan
4//Copyright (C) 1998 I.Ioannou
5//Copyright (C) 1997 Brad Johnson
6//
7//This program is free software; you can redistribute it and/or
8//modify it under the terms of the GNU General Public License
9//as published by the Free Software Foundation; either version 2
10//of the License, or (at your option) any later version.
11//
12//This program is distributed in the hope that it will be useful,
13//but WITHOUT ANY WARRANTY; without even the implied warranty of
14//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15//GNU General Public License for more details.
16//
17//You should have received a copy of the GNU General Public License
18//along with this program; if not, write to the Free Software
19//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20//
21//I.Ioannou
22//roryt@hol.gr
23//
25
26#include "precomp.h"
27
28#include "tscript.h"
29
30// FIX ME!! This code not yet functional.
31
32#define TERMINATOR '~'
33#define SPACE_HOLDER '_'
34
35// processScript by Bryan Montgomery
36// modified to handle script file by Paul Brannan
38/* char* end = strchr(script,TERMINATOR);
39 if (0 == end) {
40 return true;
41 } else {
42 char* current = new char(sizeof(char)*strlen(script));
43 strncpy(current,script,(int)(end-script));
44 current[(int)(end-script)]=0;
45 char *ptr=end;
46 if (strstr(data,current) != 0) {
47 script = ++end;
48 end = strchr(script,TERMINATOR);
49 while ((ptr = strchr(ptr,SPACE_HOLDER)) != 0 && ptr < end) {
50 *ptr=' ';
51 }
52 Network.WriteString(script,(int)(end-script));
53 Network.WriteString("\r\n",2);
54 script = ++end;
55 }
56 delete current;
57 }*/
58 return TRUE;
59}
60
62 if(fp) fclose(fp);
63 fp = fopen(filename, "rt");
64}
65
void initScript(char *filename)
Definition: tscript.cpp:61
FILE * fp
Definition: tscript.h:15
BOOL processScript(char *data)
Definition: tscript.cpp:37
#define TRUE
Definition: types.h:120
unsigned int BOOL
Definition: ntddk_ex.h:94
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
_Check_return_ _CRTIMP FILE *__cdecl fopen(_In_z_ const char *_Filename, _In_z_ const char *_Mode)
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
const char * filename
Definition: ioapi.h:137