From ae1912cb0d494b48d514d937826c9fe83ec96c4d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 29 Dec 1999 14:20:26 +0000 Subject: Initial revision --- lib/file.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 lib/file.h (limited to 'lib/file.h') diff --git a/lib/file.h b/lib/file.h new file mode 100644 index 000000000..eeaeef4f4 --- /dev/null +++ b/lib/file.h @@ -0,0 +1,45 @@ +#ifndef __FILE_H +#define __FILE_H + +/***************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.0 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" + * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + * License for the specific language governing rights and limitations + * under the License. + * + * The Original Code is Curl. + * + * The Initial Developer of the Original Code is Daniel Stenberg. + * + * Portions created by the Initial Developer are Copyright (C) 1998. + * All Rights Reserved. + * + * ------------------------------------------------------------ + * Main author: + * - Daniel Stenberg + * + * http://curl.haxx.nu + * + * $Source$ + * $Revision$ + * $Date$ + * $Author$ + * $State$ + * $Locker$ + * + * ------------------------------------------------------------ + ****************************************************************************/ +UrgError file(struct UrlData *data, char *path, long *bytecountp); + +#endif -- cgit v1.2.1 From 96dde76b99897352aa3d0877a0b621a9e605733e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 22 May 2000 14:12:12 +0000 Subject: moved here from the newlib branch --- lib/file.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/file.h') diff --git a/lib/file.h b/lib/file.h index eeaeef4f4..e6ad0e6ce 100644 --- a/lib/file.h +++ b/lib/file.h @@ -40,6 +40,6 @@ * * ------------------------------------------------------------ ****************************************************************************/ -UrgError file(struct UrlData *data, char *path, long *bytecountp); +CURLcode file(struct connectdata *conn); #endif -- cgit v1.2.1 From 1ef3600a0731fef8f59563a1e49981f1b64b9746 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 20 Jun 2000 15:31:26 +0000 Subject: haxx.nu => haxx.se --- lib/file.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/file.h') diff --git a/lib/file.h b/lib/file.h index e6ad0e6ce..a1b19bda4 100644 --- a/lib/file.h +++ b/lib/file.h @@ -27,9 +27,9 @@ * * ------------------------------------------------------------ * Main author: - * - Daniel Stenberg + * - Daniel Stenberg * - * http://curl.haxx.nu + * http://curl.haxx.se * * $Source$ * $Revision$ -- cgit v1.2.1 From 24dee483e9e925c2ab79dd582f70c9a55ab9ba4d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 3 Jan 2001 09:29:33 +0000 Subject: dual-license fix --- lib/file.h | 39 +++++++++++---------------------------- 1 file changed, 11 insertions(+), 28 deletions(-) (limited to 'lib/file.h') diff --git a/lib/file.h b/lib/file.h index a1b19bda4..ff66eb80f 100644 --- a/lib/file.h +++ b/lib/file.h @@ -8,38 +8,21 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * The contents of this file are subject to the Mozilla Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ + * Copyright (C) 2000, Daniel Stenberg, , et al. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. + * In order to be useful for every potential user, curl and libcurl are + * dual-licensed under the MPL and the MIT/X-derivate licenses. * - * The Original Code is Curl. + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the MPL or the MIT/X-derivate + * licenses. You may pick one of these licenses. * - * The Initial Developer of the Original Code is Daniel Stenberg. + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. * - * Portions created by the Initial Developer are Copyright (C) 1998. - * All Rights Reserved. - * - * ------------------------------------------------------------ - * Main author: - * - Daniel Stenberg - * - * http://curl.haxx.se - * - * $Source$ - * $Revision$ - * $Date$ - * $Author$ - * $State$ - * $Locker$ - * - * ------------------------------------------------------------ - ****************************************************************************/ + * $Id$ + *****************************************************************************/ CURLcode file(struct connectdata *conn); #endif -- cgit v1.2.1 From 84e94fda8ba36c77c80e012c52ad36a4a59de6a7 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 5 Mar 2001 13:39:01 +0000 Subject: remade FILE:// support to look more as the other protocols --- lib/file.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/file.h') diff --git a/lib/file.h b/lib/file.h index ff66eb80f..83ffa3975 100644 --- a/lib/file.h +++ b/lib/file.h @@ -23,6 +23,6 @@ * * $Id$ *****************************************************************************/ -CURLcode file(struct connectdata *conn); - +CURLcode Curl_file(struct connectdata *conn); +CURLcode Curl_file_connect(struct connectdata *conn); #endif -- cgit v1.2.1 From 974f314f5785156af6983675aeb28313cc8ba2ea Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 19 Mar 2002 07:54:55 +0000 Subject: copyright string (year) update --- lib/file.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/file.h') diff --git a/lib/file.h b/lib/file.h index 83ffa3975..f0dcf8ff3 100644 --- a/lib/file.h +++ b/lib/file.h @@ -8,7 +8,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2000, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2002, Daniel Stenberg, , et al. * * In order to be useful for every potential user, curl and libcurl are * dual-licensed under the MPL and the MIT/X-derivate licenses. -- cgit v1.2.1 From 08ef208fb78fb2eabc5cec08c23e74e251eac898 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 11 Jun 2002 11:13:01 +0000 Subject: added disable-[protocol] support, largely provided by Miklos Nemeth --- lib/file.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/file.h') diff --git a/lib/file.h b/lib/file.h index f0dcf8ff3..4a26893e8 100644 --- a/lib/file.h +++ b/lib/file.h @@ -23,6 +23,8 @@ * * $Id$ *****************************************************************************/ +#ifndef CURL_DISABLE_FILE CURLcode Curl_file(struct connectdata *conn); CURLcode Curl_file_connect(struct connectdata *conn); #endif +#endif -- cgit v1.2.1 From ba4e69bebc8f7f32f3bc7faa1e13e7580754075b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 3 Sep 2002 11:52:59 +0000 Subject: updated source code boilerplate/header --- lib/file.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/file.h') diff --git a/lib/file.h b/lib/file.h index 4a26893e8..b11dcb782 100644 --- a/lib/file.h +++ b/lib/file.h @@ -1,7 +1,7 @@ #ifndef __FILE_H #define __FILE_H -/***************************************************************************** +/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | @@ -10,19 +10,19 @@ * * Copyright (C) 1998 - 2002, Daniel Stenberg, , et al. * - * In order to be useful for every potential user, curl and libcurl are - * dual-licensed under the MPL and the MIT/X-derivate licenses. - * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at http://curl.haxx.se/docs/copyright.html. + * * You may opt to use, copy, modify, merge, publish, distribute and/or sell * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the MPL or the MIT/X-derivate - * licenses. You may pick one of these licenses. + * furnished to do so, under the terms of the COPYING file. * * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * * $Id$ - *****************************************************************************/ + ***************************************************************************/ #ifndef CURL_DISABLE_FILE CURLcode Curl_file(struct connectdata *conn); CURLcode Curl_file_connect(struct connectdata *conn); -- cgit v1.2.1 From f26a338a54e04d0a6907f5d2479d8b0fa9daf297 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 16 Jan 2003 21:08:12 +0000 Subject: copyright year update in the source header --- lib/file.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/file.h') diff --git a/lib/file.h b/lib/file.h index b11dcb782..63d622b26 100644 --- a/lib/file.h +++ b/lib/file.h @@ -8,7 +8,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2002, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2003, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms -- cgit v1.2.1 From 053f6c85efd0bf698f73343989474d672d0563a8 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 7 Jan 2004 09:19:33 +0000 Subject: updated year in the copyright string --- lib/file.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/file.h') diff --git a/lib/file.h b/lib/file.h index 63d622b26..4d1d881e6 100644 --- a/lib/file.h +++ b/lib/file.h @@ -8,7 +8,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2003, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2004, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms -- cgit v1.2.1 From fd802db39f77fa3985d20e461742bf24644065d6 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 25 May 2004 21:47:29 +0000 Subject: initial support for "uploading" to file:// URLs --- lib/file.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/file.h') diff --git a/lib/file.h b/lib/file.h index 4d1d881e6..689b8aeca 100644 --- a/lib/file.h +++ b/lib/file.h @@ -24,7 +24,8 @@ * $Id$ ***************************************************************************/ #ifndef CURL_DISABLE_FILE -CURLcode Curl_file(struct connectdata *conn); -CURLcode Curl_file_connect(struct connectdata *conn); +CURLcode Curl_file(struct connectdata *); +CURLcode Curl_file_done(struct connectdata *, CURLcode); +CURLcode Curl_file_connect(struct connectdata *); #endif #endif -- cgit v1.2.1 From 6a2e21ec8cbaf7c719902e06953d9dbec629ad4f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 9 Feb 2005 13:06:40 +0000 Subject: FTP code turned into state machine. Not completely yet, but a good start. The tag 'before_ftp_statemachine' was set just before this commit in case of future need. --- lib/file.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/file.h') diff --git a/lib/file.h b/lib/file.h index 689b8aeca..f78acfe63 100644 --- a/lib/file.h +++ b/lib/file.h @@ -2,18 +2,18 @@ #define __FILE_H /*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2004, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2005, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms * are also available at http://curl.haxx.se/docs/copyright.html. - * + * * You may opt to use, copy, modify, merge, publish, distribute and/or sell * copies of the Software, and permit persons to whom the Software is * furnished to do so, under the terms of the COPYING file. @@ -24,7 +24,7 @@ * $Id$ ***************************************************************************/ #ifndef CURL_DISABLE_FILE -CURLcode Curl_file(struct connectdata *); +CURLcode Curl_file(struct connectdata *, bool *done); CURLcode Curl_file_done(struct connectdata *, CURLcode); CURLcode Curl_file_connect(struct connectdata *); #endif -- cgit v1.2.1 From 385e612fa5b7663fc2bc815677b8c27bec2f0fe4 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 16 Jan 2007 22:22:10 +0000 Subject: - Armel Asselin improved libcurl to behave a lot better when an easy handle doing an FTP transfer is removed from a multi handle before completion. The fix also fixed the "alive counter" to be correct on "premature removal" for all protocols. --- lib/file.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/file.h') diff --git a/lib/file.h b/lib/file.h index f78acfe63..20a1c4c06 100644 --- a/lib/file.h +++ b/lib/file.h @@ -8,7 +8,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2005, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2007, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -25,7 +25,7 @@ ***************************************************************************/ #ifndef CURL_DISABLE_FILE CURLcode Curl_file(struct connectdata *, bool *done); -CURLcode Curl_file_done(struct connectdata *, CURLcode); +CURLcode Curl_file_done(struct connectdata *, CURLcode, bool premature); CURLcode Curl_file_connect(struct connectdata *); #endif #endif -- cgit v1.2.1 From 07b6e7363d910ad4828376d568a2f19fd8d64661 Mon Sep 17 00:00:00 2001 From: Patrick Monnerat Date: Fri, 12 Oct 2007 13:36:37 +0000 Subject: Added per-protocol callback static tables, replacing callback ptr storage in the connectdata structure by a single handler table ptr. --- lib/file.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/file.h') diff --git a/lib/file.h b/lib/file.h index 20a1c4c06..227c0d181 100644 --- a/lib/file.h +++ b/lib/file.h @@ -24,7 +24,8 @@ * $Id$ ***************************************************************************/ #ifndef CURL_DISABLE_FILE -CURLcode Curl_file(struct connectdata *, bool *done); +extern const struct Curl_handler Curl_handler_file; + CURLcode Curl_file_done(struct connectdata *, CURLcode, bool premature); CURLcode Curl_file_connect(struct connectdata *); #endif -- cgit v1.2.1 From 61ffcd781599ac9a9f85b92f4be10588f2015721 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Sat, 13 Oct 2007 00:47:53 +0000 Subject: Made a few more functions static with the protocol handler table in place. --- lib/file.h | 1 - 1 file changed, 1 deletion(-) (limited to 'lib/file.h') diff --git a/lib/file.h b/lib/file.h index 227c0d181..7f338af1a 100644 --- a/lib/file.h +++ b/lib/file.h @@ -26,7 +26,6 @@ #ifndef CURL_DISABLE_FILE extern const struct Curl_handler Curl_handler_file; -CURLcode Curl_file_done(struct connectdata *, CURLcode, bool premature); CURLcode Curl_file_connect(struct connectdata *); #endif #endif -- cgit v1.2.1 From 59b05ac383f45ac3fe2e9fba899b440def9da2bd Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Tue, 30 Oct 2007 23:00:40 +0000 Subject: Fixed an OOM problem with file: URLs Moved Curl_file_connect into the protocol handler struct. --- lib/file.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'lib/file.h') diff --git a/lib/file.h b/lib/file.h index 7f338af1a..f77972094 100644 --- a/lib/file.h +++ b/lib/file.h @@ -25,7 +25,5 @@ ***************************************************************************/ #ifndef CURL_DISABLE_FILE extern const struct Curl_handler Curl_handler_file; - -CURLcode Curl_file_connect(struct connectdata *); #endif #endif -- cgit v1.2.1 From 83a6b348037048c389fbe859d7e3ea3e290a7644 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 12 Dec 2009 22:17:51 +0000 Subject: split out more protocol-specific structs from urldata.h into their own protocol-specific header files --- lib/file.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'lib/file.h') diff --git a/lib/file.h b/lib/file.h index f77972094..d146b2a55 100644 --- a/lib/file.h +++ b/lib/file.h @@ -8,7 +8,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2007, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -23,6 +23,18 @@ * * $Id$ ***************************************************************************/ + + +/**************************************************************************** + * FILE unique setup + ***************************************************************************/ +struct FILEPROTO { + char *path; /* the path we operate on */ + char *freepath; /* pointer to the allocated block we must free, this might + differ from the 'path' pointer */ + int fd; /* open file descriptor to read from! */ +}; + #ifndef CURL_DISABLE_FILE extern const struct Curl_handler Curl_handler_file; #endif -- cgit v1.2.1 From 2309b4e330b96bc2e1f8e36b6184015e59544037 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 24 Mar 2010 11:02:54 +0100 Subject: remove the CVSish $Id$ lines --- lib/file.h | 1 - 1 file changed, 1 deletion(-) (limited to 'lib/file.h') diff --git a/lib/file.h b/lib/file.h index d146b2a55..5e3bd7564 100644 --- a/lib/file.h +++ b/lib/file.h @@ -21,7 +21,6 @@ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * - * $Id$ ***************************************************************************/ -- cgit v1.2.1