/[jscoverage]/trunk/resource-manager.c
ViewVC logotype

Diff of /trunk/resource-manager.c

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

revision 2 by siliconforks, Wed Aug 1 13:51:53 2007 UTC revision 116 by siliconforks, Sat May 31 21:42:36 2008 UTC
# Line 1  Line 1 
1  /*  /*
2      resource-manager.c - handles embedded files      resource-manager.c - handles embedded files
3      Copyright (C) 2007 siliconforks.com      Copyright (C) 2007, 2008 siliconforks.com
4    
5      This program is free software; you can redistribute it and/or modify      This program is free software; you can redistribute it and/or modify
6      it under the terms of the GNU General Public License as published by      it under the terms of the GNU General Public License as published by
# Line 17  Line 17 
17      51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.      51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */  */
19    
20    #include <config.h>
21    
22  #include "resource-manager.h"  #include "resource-manager.h"
23    
24    #include <assert.h>
25  #include <stdlib.h>  #include <stdlib.h>
26  #include <string.h>  #include <string.h>
27    
# Line 33  Line 36 
36        return &RESOURCES[i];        return &RESOURCES[i];
37      }      }
38    }    }
39    abort();    return NULL;
40  }  }
41    
42  void copy_resource_to_stream(const char * resource, FILE * stream) {  void copy_resource_to_stream(const char * resource, FILE * stream) {
43    const struct Resource * r = get_resource(resource);    const struct Resource * r = get_resource(resource);
44      assert(r != NULL);
45    if (fwrite(r->data, 1, r->length, stream) != r->length) {    if (fwrite(r->data, 1, r->length, stream) != r->length) {
46      fatal("cannot write to stream");      fatal("cannot write to stream");
47    }    }

Legend:
Removed from v.2  
changed lines
  Added in v.116

  ViewVC Help
Powered by ViewVC 1.1.24