/[dgee]/dgee/smgr/dgmxDoc.c
ViewVC logotype

Diff of /dgee/smgr/dgmxDoc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by csmith, Thu Oct 23 20:57:35 2003 UTC revision 1.5 by csmith, Thu Oct 30 21:26:52 2003 UTC
# Line 33  Line 33 
33    
34  #include "dgmxDecode.h"  #include "dgmxDecode.h"
35  #include "dgmxDoc.h"  #include "dgmxDoc.h"
36    #include "clientGen.h"
37  #include "dgreadenv.h"  #include "dgreadenv.h"
38  #include "htmlTemplate.h"  #include "htmlTemplate.h"
39    
# Line 70  getHTMLDoc( char *svc, GWMessage *reqm ) Line 71  getHTMLDoc( char *svc, GWMessage *reqm )
71    void *stream   = NULL;    void *stream   = NULL;
72    
73    CString  uriCS  = CSInit;    CString  uriCS  = CSInit;
74      CString  typeCS = CSInit;
75    CString  xmlCS  = CSInit;    CString  xmlCS  = CSInit;
76    CString  fileCS = CSInit;    CString  fileCS = CSInit;
77    CString  ASCII0 = CSInit;    CString  ASCII0 = CSInit;
# Line 125  getHTMLDoc( char *svc, GWMessage *reqm ) Line 127  getHTMLDoc( char *svc, GWMessage *reqm )
127            break;            break;
128          }          }
129    
130          WrapCString( xmlCS, "xml" );          WrapCString( typeCS, "xml" );
131    
132      /* See if we've been explicitly asked for XML documentation      /* See if we've been explicitly asked for XML documentation
133           */           */
134      if( args && strcmpCS( &xmlCS, args ) == 0 ) {  /* XML */      if( args && strcmpCS( &typeCS, args ) == 0 ) {  /* XML */
135    
136            WrapCStringLen( xmlCS, dgmx, len );            WrapCStringLen( xmlCS, dgmx, len );
137            htmlCS = &xmlCS;            htmlCS = &xmlCS;
# Line 137  getHTMLDoc( char *svc, GWMessage *reqm ) Line 139  getHTMLDoc( char *svc, GWMessage *reqm )
139        gwmc_add_data( request, DGF_CONTENT_TYPE, MIME_TEXT_PLAIN,        gwmc_add_data( request, DGF_CONTENT_TYPE, MIME_TEXT_PLAIN,
140                                    MIME_TEXT_XML, strlen(MIME_TEXT_XML) );                                    MIME_TEXT_XML, strlen(MIME_TEXT_XML) );
141    
142          } else {  /* HTML */          } else {
143    
144              WrapCString( typeCS, "csharp" );
145          if( args && strcmpCS( &typeCS, args ) == 0 ) {  /* CSharp Client */
146    
147            html_fh = dgmx2client( dgmx, len );
148            gwmc_add_data( request, DGF_CONTENT_TYPE, MIME_TEXT_PLAIN,
149                               MIME_X_CSHARP_SRC, strlen(MIME_X_CSHARP_SRC) );
150              } else {
151            /* Convert dgmx to html
152                 */
153            html_fh = dgmx2html( dgmx, len );
154            gwmc_add_data( request, DGF_CONTENT_TYPE, MIME_TEXT_PLAIN,
155                               MIME_TEXT_HTML, strlen(MIME_TEXT_HTML) );
156          }
157    
       /* Convert dgmx to html  
            */  
       html_fh = dgmx2html( dgmx, len );  
158            if( html_fh == NULL ) {            if( html_fh == NULL ) {
159          gw_logf( LOG_ERROR, "DGMX -> HTML failed" );          gw_logf( LOG_ERROR, "DGMX -> HTML failed" );
160              gwusrerr = ERR_BAD_XML;              gwusrerr = ERR_BAD_XML;
# Line 150  getHTMLDoc( char *svc, GWMessage *reqm ) Line 163  getHTMLDoc( char *svc, GWMessage *reqm )
163        
164            htmlCS = HTML_get_outputCS( html_fh );            htmlCS = HTML_get_outputCS( html_fh );
165    
166        gwmc_add_data( request, DGF_CONTENT_TYPE, MIME_TEXT_PLAIN,      }
                                   MIME_TEXT_HTML, strlen(MIME_TEXT_HTML) );  
     }  
167    
168      /* Add Document to request buffer and return it      /* Add Document to request buffer and return it
169           */           */

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26