summaryrefslogtreecommitdiff
path: root/ext/mailparse/rfc2045find.c
diff options
context:
space:
mode:
authorSVN Migration <svn@php.net>2002-03-13 18:39:43 +0000
committerSVN Migration <svn@php.net>2002-03-13 18:39:43 +0000
commit8d6817e7f142091b1c30de30f349c3fde9d7e094 (patch)
tree45704599905d4a7445ad446fc5337374a3390dbf /ext/mailparse/rfc2045find.c
parent94e6810a2a3e189cf729bdbae8f45cd9d7987ad6 (diff)
downloadphp-git-help.tar.gz
This commit was manufactured by cvs2svn to create tag 'help'.help
Diffstat (limited to 'ext/mailparse/rfc2045find.c')
-rw-r--r--ext/mailparse/rfc2045find.c47
1 files changed, 0 insertions, 47 deletions
diff --git a/ext/mailparse/rfc2045find.c b/ext/mailparse/rfc2045find.c
deleted file mode 100644
index ab93c2be4a..0000000000
--- a/ext/mailparse/rfc2045find.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* $Id$ */
-/*
-** Copyright 1998 - 1999 Double Precision, Inc. See COPYING for
-** distribution information.
-*/
-
-#include "php.h"
-#include "php_mailparse.h"
-
-struct rfc2045findstruct {
- const char *partnum;
- struct rfc2045 *ptr;
-} ;
-
-static void do_decode(struct rfc2045 *p, struct rfc2045id *id, void *ptr)
-{
- struct rfc2045findstruct *fs=(struct rfc2045findstruct *)ptr;
- const char *partnum=fs->partnum;
- unsigned n;
-
- while (id)
- {
- if (!isdigit((int)(unsigned char)*partnum)) return;
- n=0;
- while (isdigit((int)(unsigned char)*partnum))
- n=n*10 + *partnum++ - '0';
- if (*partnum)
- {
- if (*partnum != '.') return;
- ++partnum;
- }
- if (n != (unsigned)id->idnum) return;
- id=id->next;
- }
- if ( *partnum == '\0') fs->ptr=p;
-}
-
-
-struct rfc2045 *rfc2045_find(struct rfc2045 *p, const char *str)
-{
- struct rfc2045findstruct fs;
-
- fs.partnum=str;
- fs.ptr=0;
- rfc2045_decode(p, &do_decode, &fs);
- return (fs.ptr);
-}