__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) 2002-2005 Roman Zippel <[email protected]>
 * Copyright (C) 2002-2005 Sam Ravnborg <[email protected]>
 */

#include <stdarg.h>
#include <stdlib.h>
#include <string.h>

#include <hash.h>
#include <hashtable.h>
#include <xalloc.h>
#include "lkc.h"

/* hash table of all parsed Kconfig files */
static HASHTABLE_DEFINE(file_hashtable, 1U << 11);

struct file {
	struct hlist_node node;
	char name[];
};

/* file already present in list? If not add it */
const char *file_lookup(const char *name)
{
	struct file *file;
	size_t len;
	int hash = hash_str(name);

	hash_for_each_possible(file_hashtable, file, node, hash)
		if (!strcmp(name, file->name))
			return file->name;

	len = strlen(name);
	file = xmalloc(sizeof(*file) + len + 1);
	memset(file, 0, sizeof(*file));
	memcpy(file->name, name, len);
	file->name[len] = '\0';

	hash_add(file_hashtable, &file->node, hash);

	str_printf(&autoconf_cmd, "\t%s \\\n", name);

	return file->name;
}

/* Allocate initial growable string */
struct gstr str_new(void)
{
	struct gstr gs;
	gs.s = xmalloc(sizeof(char) * 64);
	gs.len = 64;
	gs.max_width = 0;
	strcpy(gs.s, "\0");
	return gs;
}

/* Free storage for growable string */
void str_free(struct gstr *gs)
{
	free(gs->s);
	gs->s = NULL;
	gs->len = 0;
}

/* Append to growable string */
void str_append(struct gstr *gs, const char *s)
{
	size_t l;
	if (s) {
		l = strlen(gs->s) + strlen(s) + 1;
		if (l > gs->len) {
			gs->s = xrealloc(gs->s, l);
			gs->len = l;
		}
		strcat(gs->s, s);
	}
}

/* Append printf formatted string to growable string */
void str_printf(struct gstr *gs, const char *fmt, ...)
{
	va_list ap;
	char s[10000]; /* big enough... */
	va_start(ap, fmt);
	vsnprintf(s, sizeof(s), fmt, ap);
	str_append(gs, s);
	va_end(ap);
}

/* Retrieve value of growable string */
char *str_get(const struct gstr *gs)
{
	return gs->s;
}

Filemanager

Name Type Size Permission Actions
lxdialog Folder 0755
tests Folder 0755
.gitignore File 124 B 0644
Makefile File 8.47 KB 0644
conf.c File 18.48 KB 0644
confdata.c File 21.79 KB 0644
expr.c File 28.54 KB 0644
expr.h File 8.73 KB 0644
gconf-cfg.sh File 793 B 0755
gconf.c File 36.36 KB 0644
gconf.glade File 25.04 KB 0644
images.c File 6.42 KB 0644
images.h File 857 B 0644
internal.h File 548 B 0644
lexer.l File 8.89 KB 0644
lkc.h File 3.54 KB 0644
lkc_proto.h File 1.79 KB 0644
mconf-cfg.sh File 1.48 KB 0755
mconf.c File 25.31 KB 0644
menu.c File 18.2 KB 0644
merge_config.sh File 5.29 KB 0755
mnconf-common.c File 794 B 0644
mnconf-common.h File 397 B 0644
nconf-cfg.sh File 1.38 KB 0755
nconf.c File 38.26 KB 0644
nconf.gui.c File 15.43 KB 0644
nconf.h File 2.21 KB 0644
parser.y File 16.17 KB 0644
preprocess.c File 11.06 KB 0644
preprocess.h File 432 B 0644
qconf-cfg.sh File 1020 B 0755
qconf.cc File 41.47 KB 0644
qconf.h File 6.25 KB 0644
streamline_config.pl File 16.77 KB 0755
symbol.c File 28.43 KB 0644
util.c File 1.85 KB 0644
Filemanager