This commit is contained in:
2025-07-28 11:08:39 -04:00
parent 9159ad533f
commit e683817120
2 changed files with 14 additions and 41 deletions

View File

@@ -1,6 +1,3 @@
// Copyright (C) 2025 vx_clutch ( owestness@gmail.com )
// See end of file for extended copyright information.
#ifndef FORMAT_H
#define FORMAT_H
@@ -62,33 +59,3 @@ typedef struct
#define CLEAR_LIBRARIES(libs) ((libs) = LIB_NONE)
#endif
/* yait is yet another init tool.
* Copyright (C) 2025 vx-clutch
*
* This file is part of yait.
*
* 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
* or other materials provided with the distribution.
* 3. Neither the name of vx-clutch 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 COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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.
*/

View File

@@ -1,4 +1,12 @@
// Usage: yait [OPTION]... [PROJECT] (NAME)
/* Copyright (C) vx_clutch
*
* This file is part of yait
*
* This project and file is licenced under the BSD-3-Clause licence.
* <https://opensource.org/license/bsd-3-clause>
*/
/* Usage: yait [OPTION]... [PROJECT] (NAME) */
#include "../config.h"
#include "../core/file.h"
@@ -7,7 +15,6 @@
#include "contents.h"
#include "format.h"
#include <assert.h>
#include <ctype.h>
#include <errno.h>
#include <getopt.h>
#include <pwd.h>
@@ -56,7 +63,7 @@
#define done
#endif
int create_license_and_set_license_line (format_t, char **);
int create_license (format_t);
int create_configure ();
int create_makefile (format_t);
int create_project (format_t);
@@ -67,6 +74,8 @@ int sanitize (format_t *);
int setup_git (format_t);
int parse_arguments (format_t *, int, char **);
/* This is to keep track of how deep we are within
the project tree. This is used in reset_path */
int depth;
void
@@ -180,6 +189,7 @@ create_project (format_t fmt)
return 0;
}
/* This macro exist purely because I like how it looks. */
#define reset_path reset_path_ ()
int
reset_path_ ()
@@ -366,11 +376,7 @@ parse_arguments (format_t *conf, int argc, char **argv)
case 3:
conf->flag.git = 1;
break;
case 4:
char *lowercase_form = strdup (optarg);
for (; *lowercase_form; ++lowercase_form)
*lowercase_form = tolower ((unsigned char)*lowercase_form);
case 4: // TODO: Licence
break;
case '?':
break;