Remove unused files.
Этот коммит содержится в:
родитель
924c985630
Коммит
646e878d6b
@ -1,17 +0,0 @@
|
||||
#ifndef CALLBACK_H
|
||||
#define CALLBACK_H
|
||||
|
||||
/*
|
||||
* All callbacks are char *func( char *msg );
|
||||
* INFO/BOX should always return NULL;
|
||||
*/
|
||||
|
||||
#define CALL_INFO 0
|
||||
#define CALL_BOX 1
|
||||
#define CALL_PASSWD 2
|
||||
|
||||
#define NUM_CALLBACKS 3
|
||||
|
||||
extern void vfs_set_callback( int num, void *func );
|
||||
|
||||
#endif
|
103
vfs/container.c
103
vfs/container.c
@ -1,103 +0,0 @@
|
||||
/* Virtual File System
|
||||
Copyright (C) 1995 The Free Software Foundation
|
||||
|
||||
Written by: 1995 Ching Hui (mr854307@cs.nthu.edu.tw)
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library 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 Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <config.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include "utilvfs.h"
|
||||
#include "xdirentry.h"
|
||||
#include "container.h"
|
||||
|
||||
|
||||
struct linklist *
|
||||
linklist_init(void)
|
||||
{
|
||||
struct linklist *head;
|
||||
|
||||
head = g_new (struct linklist, 1);
|
||||
if (head) {
|
||||
head->prev = head->next = head;
|
||||
head->data = NULL;
|
||||
}
|
||||
return head;
|
||||
}
|
||||
|
||||
void
|
||||
linklist_destroy(struct linklist *head, void (*destructor) (void *))
|
||||
{
|
||||
struct linklist *p, *q;
|
||||
|
||||
for (p = head->next; p != head; p = q) {
|
||||
if (p->data && destructor)
|
||||
(*destructor) (p->data);
|
||||
q = p->next;
|
||||
g_free(p);
|
||||
}
|
||||
g_free(head);
|
||||
}
|
||||
|
||||
int
|
||||
linklist_insert(struct linklist *head, void *data)
|
||||
{
|
||||
struct linklist *p;
|
||||
|
||||
p = g_new (struct linklist, 1);
|
||||
if (p == NULL)
|
||||
return 0;
|
||||
p->data = data;
|
||||
p->prev = head->prev;
|
||||
p->next = head;
|
||||
head->prev->next = p;
|
||||
head->prev = p;
|
||||
return 1;
|
||||
}
|
||||
|
||||
void
|
||||
linklist_delete_all(struct linklist *head, void (*destructor) (void *))
|
||||
{
|
||||
struct linklist *p, *q;
|
||||
|
||||
for (p = head->next; p != head; p = q) {
|
||||
destructor(p->data);
|
||||
q = p->next;
|
||||
g_free(p);
|
||||
}
|
||||
head->next = head->prev = head;
|
||||
head->data = NULL;
|
||||
}
|
||||
|
||||
int
|
||||
linklist_delete(struct linklist *head, void *data)
|
||||
{
|
||||
struct linklist *h = head->next;
|
||||
|
||||
while (h != head) {
|
||||
if (h->data == data) {
|
||||
h->prev->next = h->next;
|
||||
h->next->prev = h->prev;
|
||||
g_free(h);
|
||||
return 1;
|
||||
}
|
||||
h = h->next;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user