| 159 | */ |
| 160 | |
| 161 | char * /* O - Template directory */ |
| 162 | cgiGetTemplateDir(void) |
| 163 | { |
| 164 | const char *datadir; /* CUPS_DATADIR env var */ |
| 165 | static char templates[1024] = ""; /* Template directory */ |
| 166 | |
| 167 | |
| 168 | if (!templates[0]) |
| 169 | { |
| 170 | /* |
| 171 | * Build the template directory pathname... |
| 172 | */ |
| 173 | |
| 174 | if ((datadir = getenv("CUPS_DATADIR")) == NULL) |
| 175 | datadir = CUPS_DATADIR; |
| 176 | |
| 177 | snprintf(templates, sizeof(templates), "%s/templates", datadir); |
| 178 | } |
| 179 | |
| 180 | return (templates); |
| 181 | } |
| 182 | |
| 183 | |
| 184 | /* |
no outgoing calls
no test coverage detected