added open-ended field name handling

This commit is contained in:
dockes
2007-06-19 08:36:24 +00:00
parent c4b099e8d3
commit 0c74bd6e36
15 changed files with 176 additions and 176 deletions
+5 -5
View File
@@ -1,5 +1,5 @@
#ifndef lint
static char rcsid[] = "@(#$Id: rclconfig.cpp,v 1.46 2007-06-18 13:04:14 dockes Exp $ (C) 2004 J.F.Dockes";
static char rcsid[] = "@(#$Id: rclconfig.cpp,v 1.47 2007-06-19 08:36:23 dockes Exp $ (C) 2004 J.F.Dockes";
#endif
/*
* This program is free software; you can redistribute it and/or modify
@@ -373,13 +373,13 @@ string RclConfig::getMimeHandlerDef(const std::string &mtype)
return hs;
}
string RclConfig::getFieldPrefix(const string& fld)
bool RclConfig::getFieldPrefix(const string& fld, string &pfx)
{
string hs;
if (!mimeconf->get(fld, hs, "prefixes")) {
if (!mimeconf->get(fld, pfx, "prefixes")) {
LOGDEB(("getFieldPrefix: no prefix defined for '%s'\n", fld.c_str()));
return false;
}
return hs;
return true;
}
string RclConfig::getMimeViewerDef(const string &mtype)
+2 -2
View File
@@ -16,7 +16,7 @@
*/
#ifndef _RCLCONFIG_H_INCLUDED_
#define _RCLCONFIG_H_INCLUDED_
/* @(#$Id: rclconfig.h,v 1.34 2007-06-18 13:04:15 dockes Exp $ (C) 2004 J.F.Dockes */
/* @(#$Id: rclconfig.h,v 1.35 2007-06-19 08:36:24 dockes Exp $ (C) 2004 J.F.Dockes */
#include <list>
#include <string>
@@ -138,7 +138,7 @@ class RclConfig {
bool getMimeCatTypes(const string& cat, list<string>&);
/** mimeconf: get field prefix from field name */
string getFieldPrefix(const string& fldname);
bool getFieldPrefix(const string& fldname, string &pfx);
/** mimeview: get/set external viewer exec string(s) for mimetype(s) */
string getMimeViewerDef(const string &mimetype);