This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: OK - more details for the CGI/cygwin problem (doesn't print allmy HTML & Javascript to screen)


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@rfk.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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]