From: Francesco Chemolli Date: Mon, 4 Feb 2013 07:26:53 +0000 (+0100) Subject: Formatting X-Git-Tag: SQUID_3_4_0_1~279^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f0229765df8dac6436cea083160951f49eba6c90;p=thirdparty%2Fsquid.git Formatting --- diff --git a/src/mime.cc b/src/mime.cc index 597c10ff6c..c3391ab866 100644 --- a/src/mime.cc +++ b/src/mime.cc @@ -80,22 +80,7 @@ public: const char *aContentType, const char *aContentEncoding, const char *aTransferMode, bool optionViewEnable, bool optionDownloadEnable, - const char *anIconName) : - pattern(xstrdup(aPattern)), - compiled_pattern(compiledPattern), - content_type(xstrdup(aContentType)), - content_encoding(xstrdup(aContentEncoding)), - view_option(optionViewEnable), - download_option(optionViewEnable), - next(NULL), theIcon(anIconName) - { - if (!strcasecmp(aTransferMode, "ascii")) - transfer_mode = 'A'; - else if (!strcasecmp(aTransferMode, "text")) - transfer_mode = 'A'; - else - transfer_mode = 'I'; - } + const char *anIconName); ~MimeEntry(); const char *pattern; @@ -162,14 +147,14 @@ MimeIcon::MimeIcon(const char *aName) : url = xstrdup(internalLocalUri("/squid-internal-static/icons/", icon)); } -MimeIcon::~MimeIcon () +MimeIcon::~MimeIcon() { safe_free (icon); safe_free (url); } void -MimeIcon::setName (char const *aString) +MimeIcon::setName(char const *aString) { safe_free (icon); safe_free (url); @@ -178,7 +163,7 @@ MimeIcon::setName (char const *aString) } char const * -MimeIcon::getName () const +MimeIcon::getName() const { return icon; } @@ -471,3 +456,23 @@ MimeEntry::~MimeEntry() { safe_free(content_encoding); regfree(&compiled_pattern); } + +MimeEntry::MimeEntry(const char *aPattern, const regex_t &compiledPattern, + const char *aContentType, const char *aContentEncoding, + const char *aTransferMode, bool optionViewEnable, + bool optionDownloadEnable, const char *anIconName) : + pattern(xstrdup(aPattern)), + compiled_pattern(compiledPattern), + content_type(xstrdup(aContentType)), + content_encoding(xstrdup(aContentEncoding)), + view_option(optionViewEnable), + download_option(optionViewEnable), + next(NULL), theIcon(anIconName) +{ + if (!strcasecmp(aTransferMode, "ascii")) + transfer_mode = 'A'; + else if (!strcasecmp(aTransferMode, "text")) + transfer_mode = 'A'; + else + transfer_mode = 'I'; +}