Overview
SHA1 Hash: | 3d62a9fb39579b5b941dd22a27ebbc2007977638 |
---|---|
Date: | 2008-10-06 11:33:23 |
User: | drh |
Comment: | Fix a few C99-isms in the code so that the code will build on older C compilers. |
Timelines: | ancestors | descendants | both | trunk |
Other Links: | files | ZIP archive | manifest |
Tags And Properties
- branch=trunk inherited from [a28c83647d]
- sym-trunk inherited from [a28c83647d]
Changes
[hide diffs]Modified src/cgi.c from [48957219a2] to [ec3c5c4267].
@@ -199,12 +199,13 @@ const char *zPath, /* Path cookie applies to. NULL means "/" */ int lifetime /* Expiration of the cookie in seconds from now */ ){ if( zPath==0 ) zPath = g.zTop; if( lifetime>0 ){ + char *zDate; lifetime += (int)time(0); - char * zDate = cgi_rfc822_datestamp(lifetime); + zDate = cgi_rfc822_datestamp(lifetime); blob_appendf(&extraHeader, "Set-Cookie: %s=%t; Path=%s; expires=%s; Version=1\r\n", zName, zValue, zPath, zDate); if( zDate[0] ) free( zDate ); }else{ @@ -287,12 +288,12 @@ zReplyStatus = "Not Modified"; } #endif if( g.fullHttpReply ){ - fprintf(g.httpOut, "HTTP/1.0 %d %s\r\n", iReplyStatus, zReplyStatus); - char * zDate = cgi_rfc822_datestamp(time(0)); + char *zDate = cgi_rfc822_datestamp(time(0)); + fprintf(g.httpOut, "HTTP/1.0 %d %s\r\n", iReplyStatus, zReplyStatus); fprintf(g.httpOut, "Date: %s\r\n", zDate ); if( zDate[0] ) free( zDate ); fprintf(g.httpOut, "Connection: close\r\n"); }else{ fprintf(g.httpOut, "Status: %d %s\r\n", iReplyStatus, zReplyStatus);
Modified src/tagview.c from [6eeaea74ec] to [ea43e4dea1].
@@ -185,11 +185,11 @@ /* ** WEBPAGE: /tagview */ void tagview_page(void){ char const *zName = 0; - int zTcount = 0; + int nTag = 0; login_check_credentials(); if( !g.okRead ){ login_needed(); } login_anonymous_available(); @@ -221,12 +221,12 @@ " ORDER BY tagname", MAX_INT_TAG ); @ <ul> while( db_step(&q)==SQLITE_ROW ){ - zTcount++; const char *name = db_column_text(&q, 0); + nTag++; if( g.okHistory ){ if( strncmp(name, prefix, preflen)==0 ){ @ <li><a href=%s(g.zBaseURL)/tagview?name=%s(name+preflen)> @ %s(name+preflen)</a> }else{ @@ -244,11 +244,11 @@ @ (symbolic label) } @ </li> } @ </ul> - if( zTcount == 0) { + if( nTag == 0) { @ There are no relevant tags. } db_finalize(&q); } /*