Lines Matching defs:notice

154 	KEY("notice"),
247 comment(Notice_t* notice, register Buffer_t* b, register char* s, register int n, int u)
254 cc = notice->cc[1];
259 PUT(b, notice->cc[n > 0 ? 0 : 1]);
262 PUT(b, notice->cc[n > 0 ? 1 : 2]);
296 expand(Notice_t* notice, register Buffer_t* b, const Item_t* item)
332 if ((c = lookup(key, x, t - x - 1)) >= 0 && (x = notice->item[c].data))
334 z = x + notice->item[c].size;
371 * generate a copright notice
375 copyright(Notice_t* notice, register Buffer_t* b)
382 if (notice->test)
387 else if (!(t = notice->item[SOURCE].data))
392 if ((x = notice->item[START].data) && strncmp(t, x, 4) < 0)
394 if ((x = notice->item[SINCE].data) && strncmp(x, t, 4) < 0)
396 expand(notice, b, &notice->item[SINCE]);
400 if (notice->item[PARENT].data)
403 expand(notice, b, &notice->item[PARENT]);
405 if (notice->item[CORPORATION].data)
408 expand(notice, b, &notice->item[CORPORATION]);
409 if (notice->item[INCORPORATION].data)
412 expand(notice, b, &notice->item[INCORPORATION]);
415 else if (notice->item[COMPANY].data)
418 expand(notice, b, &notice->item[COMPANY]);
519 Notice_t notice;
545 notice.test = 0;
546 notice.type = NONE;
547 notice.verbose = 0;
548 notice.ids = 0;
549 notice.cc[0] = cc1;
550 notice.cc[1] = cc2;
551 notice.cc[2] = cc3;
553 notice.item[i].data = 0;
554 notice.item[STYLE] = notice.item[CLASS] = lic[notice.type];
555 notice.item[STYLE].quote = notice.item[CLASS].quote = 0;
680 for (i = 0; i < notice.ids; i++)
681 if (n == notice.id[i].name.size && !strncmp(x, notice.id[i].name.data, n))
685 notice.id[i].name.data = x;
686 notice.id[i].name.size = n;
687 notice.id[i].name.quote = 0;
688 notice.id[i].value.data = v;
689 notice.id[i].value.size = s - v;
690 notice.id[i].value.quote = quote;
691 if (notice.ids <= i)
692 notice.ids = i + 1;
700 if (notice.item[i].size)
702 expand(&notice, &buf, &key[i]);
705 if (h >= notice.item[i].size)
710 else if (notice.item[i].data[h] == ' ' || notice.item[i].data[h] == '\t')
714 expand(&notice, &buf, &notice.item[i]);
727 expand(&notice, &buf, &item);
730 expand(&notice, &buf, &notice.item[h]);
743 notice.test = 1;
747 notice.verbose = 1;
751 notice.type = c;
758 notice.type = c;
759 notice.item[CLASS].data = lic[lic[c].quote].data;
760 notice.item[CLASS].size = lic[lic[c].quote].size;
761 if (notice.item[STYLE].data != lic[NONE].data)
767 notice.item[h].data = (notice.item[h].size = s - v) ? v : (char*)0;
768 notice.item[h].quote = quote;
801 if (notice.type == INLINE && (!notice.verbose || !notice.item[NOTICE].data))
803 if (notice.type != USAGE)
805 if (!notice.type)
806 notice.type = SPECIAL;
807 comment(&notice, &buf, NiL, 1, 0);
808 comment(&notice, &buf, NiL, 0, 0);
809 if (notice.item[PACKAGE].data)
812 expand(&notice, &tmp, &notice.item[PACKAGE]);
814 comment(&notice, &buf, BUF(&tmp), USE(&tmp), 0);
816 if (notice.type >= OPEN)
818 copyright(&notice, &tmp);
819 comment(&notice, &buf, BUF(&tmp), USE(&tmp), 0);
820 if (notice.type >= SPECIAL)
821 COMMENT(&notice, &buf, "All Rights Reserved", 0);
823 if (notice.type == CPL || notice.type == EPL)
825 copy(&tmp, notice.item[PACKAGE].data ? "and" : "This software", -1);
827 comment(&notice, &buf, BUF(&tmp), USE(&tmp), 0);
828 if (notice.type == EPL)
832 if (notice.item[VERSION].data)
835 expand(&notice, &tmp, &notice.item[VERSION]);
837 comment(&notice, &buf, BUF(&tmp), USE(&tmp), 0);
838 if (notice.item[CORPORATION].data || notice.item[COMPANY].data)
841 if (notice.item[PARENT].data)
843 expand(&notice, &tmp, &notice.item[PARENT]);
846 if (notice.item[CORPORATION].data)
848 expand(&notice, &tmp, &notice.item[CORPORATION]);
849 if (notice.item[INCORPORATION].data)
852 expand(&notice, &tmp, &notice.item[INCORPORATION]);
855 else if (notice.item[COMPANY].data)
856 expand(&notice, &tmp, &notice.item[COMPANY]);
857 comment(&notice, &buf, BUF(&tmp), USE(&tmp), 0);
859 comment(&notice, &buf, NiL, 0, 0);
860 COMMENT(&notice, &buf, "A copy of the License is available at", 0);
861 if (notice.item[URL].data)
863 expand(&notice, &tmp, &notice.item[URL]);
864 comment(&notice, &buf, BUF(&tmp), USE(&tmp), 0);
865 if (notice.item[URLMD5].data)
868 expand(&notice, &tmp, &notice.item[URLMD5]);
870 comment(&notice, &buf, BUF(&tmp), USE(&tmp), 0);
873 else if (notice.type == EPL)
874 COMMENT(&notice, &buf, "http://www.eclipse.org/org/documents/epl-v10.html", 0);
876 COMMENT(&notice, &buf, "http://www.opensource.org/licenses/cpl", 0);
877 comment(&notice, &buf, NiL, 0, 0);
879 else if (notice.type == OPEN)
881 copy(&tmp, notice.item[PACKAGE].data ? "and it" : "This software", -1);
883 comment(&notice, &buf, BUF(&tmp), USE(&tmp), 0);
884 if (notice.item[i = CORPORATION].data)
886 if (notice.item[PARENT].data)
888 expand(&notice, &tmp, &notice.item[i = PARENT]);
891 expand(&notice, &tmp, &notice.item[CORPORATION]);
892 comment(&notice, &buf, BUF(&tmp), USE(&tmp), 0);
894 else if (notice.item[i = COMPANY].data)
896 if (notice.item[PARENT].data)
898 expand(&notice, &tmp, &notice.item[i = PARENT]);
901 expand(&notice, &tmp, &notice.item[COMPANY]);
902 comment(&notice, &buf, BUF(&tmp), USE(&tmp), 0);
906 if (notice.item[URL].data)
908 COMMENT(&notice, &buf, "A copy of the Source Code Agreement is available", 0);
911 expand(&notice, &tmp, &notice.item[i]);
913 comment(&notice, &buf, BUF(&tmp), USE(&tmp), 0);
914 comment(&notice, &buf, NiL, 0, 0);
915 expand(&notice, &tmp, &notice.item[URL]);
916 comment(&notice, &buf, BUF(&tmp), USE(&tmp), 0);
917 if (notice.item[URLMD5].data)
920 expand(&notice, &tmp, &notice.item[URLMD5]);
922 comment(&notice, &buf, BUF(&tmp), USE(&tmp), 0);
924 comment(&notice, &buf, NiL, 0, 0);
926 COMMENT(&notice, &buf, "If you have copied or used this software without agreeing", 0);
927 COMMENT(&notice, &buf, "to the terms of the license you are infringing on", 0);
928 COMMENT(&notice, &buf, "the license and copyright and are violating", 0);
930 expand(&notice, &tmp, &notice.item[i]);
933 comment(&notice, &buf, BUF(&tmp), USE(&tmp), 0);
937 comment(&notice, &buf, BUF(&tmp), USE(&tmp), 0);
938 comment(&notice, &buf, NiL, 0, 0);
940 else if (notice.type == GPL)
942 comment(&notice, &buf, NiL, 0, 0);
943 COMMENT(&notice, &buf, "This is free software; you can redistribute it and/or", 0);
944 COMMENT(&notice, &buf, "modify it under the terms of the GNU General Public License", 0);
945 COMMENT(&notice, &buf, "as published by the Free Software Foundation;", 0);
946 COMMENT(&notice, &buf, "either version 2, or (at your option) any later version.", 0);
947 comment(&notice, &buf, NiL, 0, 0);
948 COMMENT(&notice, &buf, "This software is distributed in the hope that it", 0);
949 COMMENT(&notice, &buf, "will be useful, but WITHOUT ANY WARRANTY;", 0);
950 COMMENT(&notice, &buf, "without even the implied warranty of MERCHANTABILITY", 0);
951 COMMENT(&notice, &buf, "or FITNESS FOR A PARTICULAR PURPOSE.", 0);
952 COMMENT(&notice, &buf, "See the GNU General Public License for more details.", 0);
953 comment(&notice, &buf, NiL, 0, 0);
954 COMMENT(&notice, &buf, "You should have received a copy of the", 0);
955 COMMENT(&notice, &buf, "GNU General Public License", 0);
956 COMMENT(&notice, &buf, "along with this software (see the file COPYING.)", 0);
957 COMMENT(&notice, &buf, "If not, a copy is available at", 0);
958 COMMENT(&notice, &buf, "http://www.gnu.org/copyleft/gpl.html", 0);
959 comment(&notice, &buf, NiL, 0, 0);
961 else if (notice.type == BSD)
963 comment(&notice, &buf, NiL, 0, 0);
964 COMMENT(&notice, &buf, "Redistribution and use in source and binary forms, with or", -1);
965 COMMENT(&notice, &buf, "without modification, are permitted provided that the following", -1);
966 COMMENT(&notice, &buf, "conditions are met:", -1);
967 comment(&notice, &buf, NiL, 0, 0);
968 COMMENT(&notice, &buf, " 1. Redistributions of source code must retain the above", -1);
969 COMMENT(&notice, &buf, " copyright notice, this list of conditions and the", -1);
970 COMMENT(&notice, &buf, " following disclaimer.", -1);
971 comment(&notice, &buf, NiL, 0, 0);
972 COMMENT(&notice, &buf, " 2. Redistributions in binary form must reproduce the above", -1);
973 COMMENT(&notice, &buf, " copyright notice, this list of conditions and the", -1);
974 COMMENT(&notice, &buf, " following disclaimer in the documentation and/or other", -1);
975 COMMENT(&notice, &buf, " materials provided with the distribution.", -1);
976 comment(&notice, &buf, NiL, 0, 0);
978 if (notice.item[i = PARENT].data || notice.item[i = CORPORATION].data || notice.item[i = COMPANY].data)
979 expand(&notice, &tmp, &notice.item[i]);
983 comment(&notice, &buf, BUF(&tmp), USE(&tmp), -1);
984 COMMENT(&notice, &buf, " names of its contributors may be used to endorse or", -1);
985 COMMENT(&notice, &buf, " promote products derived from this software without", -1);
986 COMMENT(&notice, &buf, " specific prior written permission.", -1);
987 comment(&notice, &buf, NiL, 0, 0);
988 COMMENT(&notice, &buf, "THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND", -1);
989 COMMENT(&notice, &buf, "CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES,", -1);
990 COMMENT(&notice, &buf, "INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF", -1);
991 COMMENT(&notice, &buf, "MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE", -1);
992 COMMENT(&notice, &buf, "DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS", -1);
993 COMMENT(&notice, &buf, "BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,", -1);
994 COMMENT(&notice, &buf, "EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED", -1);
995 COMMENT(&notice, &buf, "TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,", -1);
996 COMMENT(&notice, &buf, "DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON", -1);
997 COMMENT(&notice, &buf, "ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,", -1);
998 COMMENT(&notice, &buf, "OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY", -1);
999 COMMENT(&notice, &buf, "OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE", -1);
1000 COMMENT(&notice, &buf, "POSSIBILITY OF SUCH DAMAGE.", -1);
1001 comment(&notice, &buf, NiL, 0, 0);
1003 else if (notice.type == ZLIB)
1005 comment(&notice, &buf, NiL, 0, 0);
1006 COMMENT(&notice, &buf, "This software is provided 'as-is', without any express or implied", -1);
1007 COMMENT(&notice, &buf, "warranty. In no event will the authors be held liable for any", -1);
1008 COMMENT(&notice, &buf, "damages arising from the use of this software.", -1);
1009 comment(&notice, &buf, NiL, 0, 0);
1010 COMMENT(&notice, &buf, "Permission is granted to anyone to use this software for any", -1);
1011 COMMENT(&notice, &buf, "purpose, including commercial applications, and to alter it and", -1);
1012 COMMENT(&notice, &buf, "redistribute it freely, subject to the following restrictions:", -1);
1013 comment(&notice, &buf, NiL, 0, 0);
1014 COMMENT(&notice, &buf, " 1. The origin of this software must not be misrepresented;", -1);
1015 COMMENT(&notice, &buf, " you must not claim that you wrote the original software. If", -1);
1016 COMMENT(&notice, &buf, " you use this software in a product, an acknowledgment in the", -1);
1017 COMMENT(&notice, &buf, " product documentation would be appreciated but is not", -1);
1018 COMMENT(&notice, &buf, " required.", -1);
1019 comment(&notice, &buf, NiL, 0, 0);
1020 COMMENT(&notice, &buf, " 2. Altered source versions must be plainly marked as such,", -1);
1021 COMMENT(&notice, &buf, " and must not be misrepresented as being the original", -1);
1022 COMMENT(&notice, &buf, " software.", -1);
1023 comment(&notice, &buf, NiL, 0, 0);
1024 COMMENT(&notice, &buf, " 3. This notice may not be removed or altered from any source", -1);
1025 COMMENT(&notice, &buf, " distribution.", -1);
1026 comment(&notice, &buf, NiL, 0, 0);
1028 else if (notice.type == MIT)
1030 comment(&notice, &buf, NiL, 0, 0);
1031 COMMENT(&notice, &buf, "Permission is hereby granted, free of charge, to any person", 0);
1032 COMMENT(&notice, &buf, "obtaining a copy of this software and associated", 0);
1033 COMMENT(&notice, &buf, "documentation files (the \"Software\"), to deal in the", 0);
1034 COMMENT(&notice, &buf, "Software without restriction, including without limitation", 0);
1035 COMMENT(&notice, &buf, "the rights to use, copy, modify, merge, publish, distribute,", 0);
1036 COMMENT(&notice, &buf, "sublicense, and/or sell copies of the Software, and to", 0);
1037 COMMENT(&notice, &buf, "permit persons to whom the Software is furnished to do so,", 0);
1038 COMMENT(&notice, &buf, "subject to the following conditions:", 0);
1039 comment(&notice, &buf, NiL, 0, 0);
1040 COMMENT(&notice, &buf, "The above copyright notice and this permission notice shall", 0);
1041 COMMENT(&notice, &buf, "be included in all copies or substantial portions of the", 0);
1042 COMMENT(&notice, &buf, "Software.", 0);
1043 comment(&notice, &buf, NiL, 0, 0);
1044 COMMENT(&notice, &buf, "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY", 0);
1045 COMMENT(&notice, &buf, "KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE", 0);
1046 COMMENT(&notice, &buf, "WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR", 0);
1047 COMMENT(&notice, &buf, "PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS", 0);
1048 COMMENT(&notice, &buf, "OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR", 0);
1049 COMMENT(&notice, &buf, "OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR", 0);
1050 COMMENT(&notice, &buf, "OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE", 0);
1051 COMMENT(&notice, &buf, "SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", 0);
1052 comment(&notice, &buf, NiL, 0, 0);
1056 if (notice.type == PROPRIETARY)
1058 if (notice.item[i = PARENT].data || notice.item[i = CORPORATION].data || notice.item[i = COMPANY].data)
1060 expand(&notice, &tmp, &notice.item[i]);
1066 comment(&notice, &buf, BUF(&tmp), USE(&tmp), 1);
1067 comment(&notice, &buf, NiL, 0, 0);
1068 if (notice.item[URL].data)
1073 comment(&notice, &buf, BUF(&tmp), USE(&tmp), 1);
1074 if (notice.item[PARENT].data)
1076 expand(&notice, &tmp, &notice.item[PARENT]);
1079 if (notice.item[CORPORATION].data)
1081 expand(&notice, &tmp, &notice.item[CORPORATION]);
1082 comment(&notice, &buf, BUF(&tmp), USE(&tmp), 1);
1084 else if (notice.item[COMPANY].data)
1086 expand(&notice, &tmp, &notice.item[COMPANY]);
1087 comment(&notice, &buf, BUF(&tmp), USE(&tmp), 1);
1095 comment(&notice, &buf, BUF(&tmp), USE(&tmp), 1);
1096 if (notice.item[i = PARENT].data || notice.item[i = CORPORATION].data)
1097 expand(&notice, &tmp, &notice.item[i]);
1098 if (notice.item[COMPANY].data)
1102 expand(&notice, &tmp, &notice.item[COMPANY]);
1105 comment(&notice, &buf, BUF(&tmp), USE(&tmp), 1);
1106 COMMENT(&notice, &buf, "and is not to be disclosed or used except in", 1);
1107 COMMENT(&notice, &buf, "accordance with applicable agreements", 1);
1109 comment(&notice, &buf, NiL, 0, 0);
1111 else if (notice.type == NONEXCLUSIVE)
1113 COMMENT(&notice, &buf, "For nonexclusive individual use", 1);
1114 comment(&notice, &buf, NiL, 0, 0);
1116 else if (notice.type == NONCOMMERCIAL)
1118 COMMENT(&notice, &buf, "For noncommercial use", 1);
1119 comment(&notice, &buf, NiL, 0, 0);
1121 if (notice.type >= PROPRIETARY && !notice.item[URL].data)
1123 COMMENT(&notice, &buf, "Unpublished & Not for Publication", 0);
1124 comment(&notice, &buf, NiL, 0, 0);
1126 if (notice.item[URL].data)
1129 if (notice.item[CORPORATION].data || notice.item[COMPANY].data)
1132 if ((notice.item[PARENT].size + (notice.item[CORPORATION].data ? (notice.item[CORPORATION].size + notice.item[INCORPORATION].size) : notice.item[COMPANY].size)) >= (COMLONG - 6))
1133 comment(&notice, &buf, BUF(&tmp), USE(&tmp), 0);
1136 if (notice.item[PARENT].data)
1138 expand(&notice, &tmp, &notice.item[PARENT]);
1141 if (notice.item[CORPORATION].data)
1143 expand(&notice, &tmp, &notice.item[CORPORATION]);
1144 if (notice.item[INCORPORATION].data)
1147 expand(&notice, &tmp, &notice.item[INCORPORATION]);
1150 else if (notice.item[COMPANY].data)
1151 expand(&notice, &tmp, &notice.item[COMPANY]);
1153 comment(&notice, &buf, BUF(&tmp), USE(&tmp), 0);
1154 COMMENT(&notice, &buf, "under the terms and conditions of the license in", 0);
1155 expand(&notice, &tmp, &notice.item[URL]);
1156 comment(&notice, &buf, BUF(&tmp), USE(&tmp), 0);
1157 if (notice.item[URLMD5].data)
1160 expand(&notice, &tmp, &notice.item[URLMD5]);
1162 comment(&notice, &buf, BUF(&tmp), USE(&tmp), 0);
1164 comment(&notice, &buf, NiL, 0, 0);
1166 else if (notice.type == PROPRIETARY)
1168 COMMENT(&notice, &buf, "The copyright notice above does not evidence any", 0);
1169 COMMENT(&notice, &buf, "actual or intended publication of such source code", 0);
1170 comment(&notice, &buf, NiL, 0, 0);
1173 if (v = notice.item[NOTICE].data)
1175 x = v + notice.item[NOTICE].size;
1178 item.quote = notice.item[NOTICE].quote;
1190 expand(&notice, &tmp, &item);
1191 comment(&notice, &buf, BUF(&tmp), USE(&tmp), h);
1194 comment(&notice, &buf, NiL, 0, 0);
1196 if (notice.item[ORGANIZATION].data)
1198 expand(&notice, &tmp, &notice.item[ORGANIZATION]);
1199 comment(&notice, &buf, BUF(&tmp), USE(&tmp), 0);
1200 if (notice.item[i = PARENT].data || notice.item[i = CORPORATION].data)
1201 expand(&notice, &tmp, &notice.item[i]);
1202 if (notice.item[COMPANY].data)
1206 expand(&notice, &tmp, &notice.item[COMPANY]);
1209 comment(&notice, &buf, BUF(&tmp), USE(&tmp), 0);
1210 if (notice.item[LOCATION].data)
1212 expand(&notice, &tmp, &notice.item[LOCATION]);
1213 comment(&notice, &buf, BUF(&tmp), USE(&tmp), 0);
1215 comment(&notice, &buf, NiL, 0, 0);
1218 if (v = notice.item[AUTHOR].data)
1220 x = v + notice.item[AUTHOR].size;
1222 k = q && notice.type != USAGE ? -1 : 0;
1234 item.quote = notice.item[AUTHOR].quote;
1237 for (i = 0; i < notice.ids; i++)
1238 if (q || item.size == notice.id[i].name.size && !strncmp(item.data, notice.id[i].name.data, item.size))
1241 if (notice.type == USAGE)
1244 expand(&notice, &buf, &notice.id[i].value);
1251 COMMENT(&notice, &buf, "CONTRIBUTORS", 0);
1252 comment(&notice, &buf, NiL, 0, 0);
1255 expand(&notice, &tmp, &notice.id[i].value);
1256 comment(&notice, &buf, BUF(&tmp), USE(&tmp), 0);
1265 if (notice.type == USAGE)
1268 expand(&notice, &buf, &item);
1275 COMMENT(&notice, &buf, "CONTRIBUTORS", 0);
1276 comment(&notice, &buf, NiL, 0, 0);
1279 expand(&notice, &tmp, &item);
1280 comment(&notice, &buf, BUF(&tmp), USE(&tmp), 0);
1285 comment(&notice, &buf, NiL, 0, 0);
1287 if (notice.type == USAGE)
1290 copyright(&notice, &buf);
1292 if (notice.item[URL].data)
1295 expand(&notice, &buf, &notice.item[URL]);
1301 comment(&notice, &buf, NiL, -1, 0);