Fossil SCM

fossil-scm / src / makeskins.c
Blame History Raw 54 lines
1
/*
2
** Copyright (c) 2010 Michael T. Richter, assigned to the Fossil SCM project.
3
**
4
** This program is free software; you can redistribute it and/or
5
** modify it under the terms of the Simplified BSD License (also
6
** known as the "2-Clause License" or "FreeBSD License".)
7
**
8
** This program is distributed in the hope that it will be useful,
9
** but without any warranty; without even the implied warranty of
10
** merchantability or fitness for a particular purpose.
11
**
12
** Author contact information:
13
** [email protected]
14
**
15
*******************************************************************************
16
**
17
** This utility is a preprocessor that takes raw CSS and HTML files, along with
18
** plain text descriptions, and generates the skins.c file that is used to embed
19
** the distributed default skins into Fossil.
20
**
21
** The intent of the utility is to make adding new skins to a Fossil build
22
** easier without involving error-prone C programming.
23
**
24
** This utility must be run BEFORE the translate program is executed on the C
25
** source files. (This is in retrospect obvious since it generates one of the
26
** said C files.)
27
*/
28
#include <stdio.h>
29
#include <ctype.h>
30
#include <stdlib.h>
31
#include <string.h>
32
33
int main(int argc, char **argv){
34
if( argc==3 ){
35
/*
36
** 1. Validate the arguments: <skins> and <src> directory.
37
** 2. Open the <src>/skins.c file.
38
** 3. Write the initial boilerplate.
39
** 4. Walk the directory structure of <skins>.
40
** 5. For each one:
41
** a) Store the title and author information. (info.txt)
42
** b) Write out the description as a comment. (info.txt)
43
** c) Write out the CSS information. (style.css)
44
** d) Write out the header information. (header.html)
45
** e) Write out the footer information. (footer.html)
46
** 6. Write out the built-in skins table.
47
** 7. Write the trailing boilerplate.
48
*/
49
}else{
50
/* error -- need a pair of directories */
51
}
52
return 0;
53
}
54

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button