training

Code I wrote during training
git clone git://git.bitsmanent.org/training
Log | Files | Refs | README

commit 164749c147d75397a2c9057b25b6b778b643488c
parent 337d87c807d146a23489d2c3cb92e1e980289ad0
Author: Claudio <claudio@clabook.(none)>
Date:   Sun,  4 Nov 2012 11:01:45 +0100

Removes the -v flag from mazegen and add LICENSE file.

Diffstat:
ALICENSE | 32++++++++++++++++++++++++++++++++
Mkts.c | 18+++---------------
Mmazegen.c | 24++++--------------------
Mpkgsetup | 2++
Mworm.c | 29+++--------------------------
5 files changed, 44 insertions(+), 61 deletions(-)

diff --git a/LICENSE b/LICENSE @@ -0,0 +1,32 @@ +MIT/X Consortium License + +© 2006-2012 Anselm R Garbe <anselm@garbe.us> +© 2007-2011 Peter Hartlich <sgkkr at hartlich dot com> +© 2010-2011 Connor Lane Smith <cls@lubutu.com> +© 2006-2009 Jukka Salmi <jukka at salmi dot ch> +© 2007-2009 Premysl Hruby <dfenze at gmail dot com> +© 2007-2009 Szabolcs Nagy <nszabolcs at gmail dot com> +© 2007-2009 Christof Musik <christof at sendfax dot de> +© 2009 Mate Nagy <mnagy at port70 dot net> +© 2007-2008 Enno Gottox Boland <gottox at s01 dot de> +© 2008 Martin Hurton <martin dot hurton at gmail dot com> +© 2008 Neale Pickett <neale dot woozle dot org> +© 2006-2007 Sander van Dijk <a dot h dot vandijk at gmail dot com> + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/kts.c b/kts.c @@ -1,19 +1,7 @@ -/* - * Knight's tour solver. - * - * Copyright (C) 2007-2012 Claudio Alessi - * All rights are reserved. +/* See LICENSE file for copyright and license details. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * 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. -*/ + * Knight's tour solver. + */ #include <stdio.h> #include <stdlib.h> diff --git a/mazegen.c b/mazegen.c @@ -1,19 +1,7 @@ -/* - * Maze generator - Implements the Deep-First Search algorithm +/* See LICENSE file for copyright and license details. * - * Copyright (C) 2007-2012 Claudio Alessi - * All rights are reserved. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * 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. -*/ + * Maze generator - Implements the Deep-First Search algorithm. + */ #include <stdio.h> #include <stdlib.h> @@ -58,12 +46,8 @@ main(int argc, char *argv[]) { rows = ROWS; cols = COLS; - while((c = getopt(argc, argv, "c:r:hv")) != -1) { + while((c = getopt(argc, argv, "c:r:h")) != -1) { switch(c) { - case 'v': - printf("© 2007-2010 Claudio M. Alessi\n"); - return 0; - break; case 'c': cols = atoi(optarg); break; diff --git a/pkgsetup b/pkgsetup @@ -1,5 +1,7 @@ #!/bin/sh # +# See LICENSE file for copyright and license details. +# # This scripts aim to simplify the installing and bootstrapping of the pkgsrc # framework on non-NetBSD systems. It also get the pkgsrc-wip directory and # allow to keep all update. Feel free to contribute. diff --git a/worm.c b/worm.c @@ -1,30 +1,7 @@ -/* - * The Hermit Worm - Commodore64 snake-like game. +/* See LICENSE file for copyright and license details. * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the author nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. -*/ + * The Hermit Worm - Commodore64 snake-like game. + */ #include <stdio.h> #include <curses.h>