summaryrefslogtreecommitdiffabout
path: root/html.c
Unidiff
Diffstat (limited to 'html.c') (more/less context) (ignore whitespace changes)
-rw-r--r--html.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/html.c b/html.c
index 3a5d28d..c0b2ed4 100644
--- a/html.c
+++ b/html.c
@@ -108,24 +108,33 @@ void html_attr(char *txt)
108 else if (c=='<') 108 else if (c=='<')
109 html("&lt;"); 109 html("&lt;");
110 else if (c=='\'') 110 else if (c=='\'')
111 html("&quote;"); 111 html("&quote;");
112 txt = t+1; 112 txt = t+1;
113 } 113 }
114 t++; 114 t++;
115 } 115 }
116 if (t!=txt) 116 if (t!=txt)
117 html(txt); 117 html(txt);
118} 118}
119 119
120void html_hidden(char *name, char *value)
121{
122 html("<input type='hidden' name='");
123 html_attr(name);
124 html("' value='");
125 html_attr(value);
126 html("'/>");
127}
128
120void html_link_open(char *url, char *title, char *class) 129void html_link_open(char *url, char *title, char *class)
121{ 130{
122 html("<a href='"); 131 html("<a href='");
123 html_attr(url); 132 html_attr(url);
124 if (title) { 133 if (title) {
125 html("' title='"); 134 html("' title='");
126 html_attr(title); 135 html_attr(title);
127 } 136 }
128 if (class) { 137 if (class) {
129 html("' class='"); 138 html("' class='");
130 html_attr(class); 139 html_attr(class);
131 } 140 }
@@ -146,12 +155,13 @@ void html_fileperm(unsigned short mode)
146void html_filemode(unsigned short mode) 155void html_filemode(unsigned short mode)
147{ 156{
148 if (S_ISDIR(mode)) 157 if (S_ISDIR(mode))
149 html("d"); 158 html("d");
150 else if (S_ISLNK(mode)) 159 else if (S_ISLNK(mode))
151 html("l"); 160 html("l");
152 else 161 else
153 html("-"); 162 html("-");
154 html_fileperm(mode >> 6); 163 html_fileperm(mode >> 6);
155 html_fileperm(mode >> 3); 164 html_fileperm(mode >> 3);
156 html_fileperm(mode); 165 html_fileperm(mode);
157} 166}
167