CVS update: php31/ext/standard
| From: | shane | Date: | Tue, 01 Sep 1998 21:44:14 +0000 |
| Subject: | CVS update: php31/ext/standard | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-727@lists.php.net to get a copy of this message | ||
Date: Tuesday September 1, 1998 @ 17:44
Author: shane
Update of /repository/php31/ext/standard
In directory asf:/u2/tmp/cvs-serv29456/ext/standard
Modified Files:
file.c
Log Message:
fix get_meta_tags
fix compilation in scanner
update project file for dl
Index: php31/ext/standard/file.c
diff -c php31/ext/standard/file.c:2.3 php31/ext/standard/file.c:2.4
*** php31/ext/standard/file.c:2.3 Tue Sep 1 15:53:15 1998
--- php31/ext/standard/file.c Tue Sep 1 17:44:14 1998
***************
*** 26,32 ****
| Authors: Rasmus Lerdorf <rasmus@lerdorf.on.ca> |
+----------------------------------------------------------------------+
*/
! /* $Id: file.c,v 2.3 1998/09/01 19:53:15 shane Exp $ */
#ifdef THREAD_SAFE
#include "tls.h"
#endif
--- 26,32 ----
| Authors: Rasmus Lerdorf <rasmus@lerdorf.on.ca> |
+----------------------------------------------------------------------+
*/
! /* $Id: file.c,v 2.4 1998/09/01 21:44:14 shane Exp $ */
#ifdef THREAD_SAFE
#include "tls.h"
#endif
***************
*** 221,227 ****
char buf[8192];
register int i=0;
int use_include_path = 0;
!
int issock=0, socketd=0;
TLS_VARS;
--- 221,228 ----
char buf[8192];
register int i=0;
int use_include_path = 0;
! int len,var_namelen;
! char var_name[50],*val,*tmp,*end,*slashed;
int issock=0, socketd=0;
TLS_VARS;
***************
*** 263,271 ****
while((issock?SOCK_FGETS(buf,8191,socketd):(int)fgets(buf,8191,fp))
&& !strstr(buf,"</head>") &&
!strstr(buf,"</HEAD>")) {
if(strstr(buf,"<meta")||strstr(buf,"<META")) {
- pval entry;
- int len,var_namelen;
- char var_name[50],*var,*tmp,*end;
/* get the variable name from the name attribute of the meta tag */
tmp=strstr(buf,"name=\"");
--- 264,269 ----
***************
*** 309,328 ****
end=strstr(tmp,"\"");
if(end) {
*end='\0';
! var=estrdup(tmp);
*end='"';
}
}
}
! if(var) {
if (GLOBAL(php3_ini)->magic_quotes_runtime) {
! entry.value.str.val = _php3_addslashes(var,0,&len,0);
} else {
! entry.value.str.len = strlen(var);
! entry.value.str.val = var;
}
! entry.type = IS_STRING;
! _php3_hash_update(GLOBAL(active_symbol_table), var_name, var_namelen+1, (void *) &entry,
sizeof(pval),NULL);
}
}
}
--- 307,325 ----
end=strstr(tmp,"\"");
if(end) {
*end='\0';
! val=estrdup(tmp);
*end='"';
}
}
}
! if(*var_name && val) {
if (GLOBAL(php3_ini)->magic_quotes_runtime) {
! slashed = _php3_addslashes(val,0,&len,0);
} else {
! slashed = estrndup(val,strlen(val));
}
! SET_VAR_STRING(var_name,slashed);
! efree(val);
}
}
}
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net