Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <3E5253BC.2030001@rfk.com> Date: Tue, 18 Feb 2003 10:39:40 -0500 From: "Larry Hall (RFK Partners, Inc.)" Reply-To: lhall AT rfk DOT com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3a) Gecko/20021212 X-Accept-Language: en-us, en MIME-Version: 1.0 To: John McAllister CC: cygwin AT cygwin DOT com Subject: Re: OK - more details for the CGI/cygwin problem (doesn't print all my HTML & Javascript to screen) References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit John McAllister wrote: > Hello again, > > I guess my earlier message was either ignored or people didn't know what I > was talking about. I didn't want to post all my code, because I don't think > the problem lies within the code (the exact same cgi program works on the > Red Hat UNIX client/server enviroment that it was created in). I was just > trying to find out if it was a common problem ie. that an application that > works perfectly well on UNIX does not when transferred to cygwin. > > I'll try to keep this brief: > > <--- > if (strcmp(cgi_request, "h")==0) > { insert_js("/home/John > McAllister/website/javascript/js_validation.txt"); > populate_fields(); > } > ---> > > OK - I simply call two functions if the correct request type is posted. > > ---> > void insert_js(char *file_name) > { FILE *fp; > char buffer[65536]; > int res; > > fp = fopen(file_name, "r"); ^^^ Here's a red flag. This goes back to the comment I made about binary/text mode issues I mentioned in response to your first post on this subject. If you expect the behavior of text files to mirror binary ones (as they do on UNIX/Linux), you'll want to port your program appropriately. See the User's Guide for other options and short-cuts. -- Larry Hall lhall AT rfk DOT com RFK Partners, Inc. http://www.rfk.com 838 Washington Street (508) 893-9779 - RFK Office Holliston, MA 01746 (508) 893-9889 - FAX -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/