From: Russ Combs Date: Tue, 6 Jan 2015 13:21:33 +0000 (-0500) Subject: update lua source license foo, add comments on style X-Git-Tag: 3.0.0-233~1091^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5bf32d7675e6db6290cdf32e4949b25572c5fca;p=thirdparty%2Fsnort3.git update lua source license foo, add comments on style --- diff --git a/doc/style.txt b/doc/style.txt index 6ea83409c..818fdfc50 100644 --- a/doc/style.txt +++ b/doc/style.txt @@ -35,14 +35,22 @@ yet firm so feedback is welcome to get something we can live with. med, or low priority. For now, H, M, or L can indicate alpha 1, 2, or 3. Perf changes fall between alpha 1 and 2. +* Put the copyright(s) and license in a comment block at the top of each + source file (.h and .cc). Don't bother with trivial scripts and make + foo. Some interesting Lua code should get a comment block too. Copy and + paste exactly from src/main.h (don't reformat). + +* Put author, description, etc. in separate comment(s) following the + license. Do not put such comments in the middle of the license foo. + ==== Logging -* Messages intended for the user should not look like debug messages. In, - other words, the function name should not be included. +* Messages intended for the user should not look like debug messages. Eg, + the function name should not be included. * Most debug messages should just be deleted. -* Don't bang your messages (no !). The user feels bad enough about the +* Don't bang your error messages (no !). The user feels bad enough about the problem already w/o you shouting at him. ==== Types diff --git a/src/managers/snort_config.lua b/src/managers/snort_config.lua index 1f27bd9d1..20b99b071 100644 --- a/src/managers/snort_config.lua +++ b/src/managers/snort_config.lua @@ -1,20 +1,19 @@ --------------------------------------------------------------------------- --- Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved. +-- Copyright (C) 2014-2015 Cisco and/or its affiliates. All rights reserved. -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License Version 2 as --- published by the Free Software Foundation. You may not use, modify or --- distribute this program under any other version of the GNU General --- Public License. +-- This program is free software; you can redistribute it and/or modify it +-- under the terms of the GNU General Public License Version 2 as published +-- by the Free Software Foundation. You may not use, modify or distribute +-- this program under any other version of the GNU General Public License. -- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. +-- This program is distributed in the hope that it will be useful, but +-- WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- General Public License for more details. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +-- You should have received a copy of the GNU General Public License along +-- with this program; if not, write to the Free Software Foundation, Inc., +-- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --------------------------------------------------------------------------- -- snort_config.lua author Russ Combs diff --git a/src/managers/snort_plugin.lua b/src/managers/snort_plugin.lua index c99908b63..f701d89ba 100644 --- a/src/managers/snort_plugin.lua +++ b/src/managers/snort_plugin.lua @@ -1,21 +1,21 @@ --------------------------------------------------------------------------- --- Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved. +-- Copyright (C) 2014-2015 Cisco and/or its affiliates. All rights reserved. -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License Version 2 as --- published by the Free Software Foundation. You may not use, modify or --- distribute this program under any other version of the GNU General --- Public License. +-- This program is free software; you can redistribute it and/or modify it +-- under the terms of the GNU General Public License Version 2 as published +-- by the Free Software Foundation. You may not use, modify or distribute +-- this program under any other version of the GNU General Public License. -- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. +-- This program is distributed in the hope that it will be useful, but +-- WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- General Public License for more details. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +-- You should have received a copy of the GNU General Public License along +-- with this program; if not, write to the Free Software Foundation, Inc., +-- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --------------------------------------------------------------------------- +-- snort_plugin.lua author Russ Combs ffi = require("ffi")