From 3b56ebce6dd4077f6527843cfc1da63614605875 Mon Sep 17 00:00:00 2001 From: Tiago Cunha Date: Tue, 15 Feb 2011 15:12:28 +0000 Subject: [PATCH] Sync OpenBSD patchset 854: Use LIST_* not SLIST_*. --- cmd-server-info.c | 6 +++--- job.c | 8 ++++---- server.c | 4 ++-- tmux.h | 10 +++++----- tty-term.c | 10 +++++----- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/cmd-server-info.c b/cmd-server-info.c index 57cbbe68..58a8de90 100644 --- a/cmd-server-info.c +++ b/cmd-server-info.c @@ -1,4 +1,4 @@ -/* $Id: cmd-server-info.c,v 1.42 2011-01-21 23:51:36 tcunha Exp $ */ +/* $Id: cmd-server-info.c,v 1.43 2011-02-15 15:12:28 tcunha Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott @@ -142,7 +142,7 @@ cmd_server_info_exec(unused struct cmd *self, struct cmd_ctx *ctx) ctx->print(ctx, "%s", ""); ctx->print(ctx, "Terminals:"); - SLIST_FOREACH(term, &tty_terms, entry) { + LIST_FOREACH(term, &tty_terms, entry) { ctx->print(ctx, "%s [references=%u, flags=0x%x]:", term->name, term->references, term->flags); for (i = 0; i < NTTYCODE; i++) { @@ -174,7 +174,7 @@ cmd_server_info_exec(unused struct cmd *self, struct cmd_ctx *ctx) ctx->print(ctx, "%s", ""); ctx->print(ctx, "Jobs:"); - SLIST_FOREACH(job, &all_jobs, lentry) { + LIST_FOREACH(job, &all_jobs, lentry) { ctx->print(ctx, "%s [fd=%d, pid=%d, status=%d, flags=0x%x]", job->cmd, job->fd, job->pid, job->status, job->flags); } diff --git a/job.c b/job.c index c3cf7179..996bbdd4 100644 --- a/job.c +++ b/job.c @@ -1,4 +1,4 @@ -/* $Id: job.c,v 1.21 2011-02-14 23:11:33 tcunha Exp $ */ +/* $Id: job.c,v 1.22 2011-02-15 15:12:28 tcunha Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -31,7 +31,7 @@ */ /* All jobs list. */ -struct joblist all_jobs = SLIST_HEAD_INITIALIZER(all_jobs); +struct joblist all_jobs = LIST_HEAD_INITIALIZER(all_jobs); RB_GENERATE(jobs, job, entry, job_cmp); @@ -98,7 +98,7 @@ job_add(struct jobs *jobs, int flags, struct client *c, const char *cmd, if (jobs != NULL) RB_INSERT(jobs, jobs, job); - SLIST_INSERT_HEAD(&all_jobs, job, lentry); + LIST_INSERT_HEAD(&all_jobs, job, lentry); return (job); } @@ -118,7 +118,7 @@ job_free(struct job *job) { job_kill(job); - SLIST_REMOVE(&all_jobs, job, job, lentry); + LIST_REMOVE(job, lentry); xfree(job->cmd); if (job->freefn != NULL && job->data != NULL) diff --git a/server.c b/server.c index 8514fbb7..eb68bd05 100644 --- a/server.c +++ b/server.c @@ -1,4 +1,4 @@ -/* $Id: server.c,v 1.252 2011-01-21 23:44:13 tcunha Exp $ */ +/* $Id: server.c,v 1.253 2011-02-15 15:12:28 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -416,7 +416,7 @@ server_child_exited(pid_t pid, int status) } } - SLIST_FOREACH(job, &all_jobs, lentry) { + LIST_FOREACH(job, &all_jobs, lentry) { if (pid == job->pid) { job_died(job, status); /* might free job */ break; diff --git a/tmux.h b/tmux.h index 865e654b..a5f497fc 100644 --- a/tmux.h +++ b/tmux.h @@ -1,4 +1,4 @@ -/* $Id: tmux.h,v 1.608 2011-02-15 15:10:47 tcunha Exp $ */ +/* $Id: tmux.h,v 1.609 2011-02-15 15:12:28 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -680,10 +680,10 @@ struct job { #define JOB_PERSIST 0x1 /* don't free after callback */ RB_ENTRY(job) entry; - SLIST_ENTRY(job) lentry; + LIST_ENTRY(job) lentry; }; RB_HEAD(jobs, job); -SLIST_HEAD(joblist, job); +LIST_HEAD(joblist, job); /* Screen selection. */ struct screen_sel { @@ -986,9 +986,9 @@ struct tty_term { #define TERM_EARLYWRAP 0x4 int flags; - SLIST_ENTRY(tty_term) entry; + LIST_ENTRY(tty_term) entry; }; -SLIST_HEAD(tty_terms, tty_term); +LIST_HEAD(tty_terms, tty_term); struct tty { char *path; diff --git a/tty-term.c b/tty-term.c index a0f565f2..81ddb3c9 100644 --- a/tty-term.c +++ b/tty-term.c @@ -1,4 +1,4 @@ -/* $Id: tty-term.c,v 1.45 2011-01-03 23:30:43 tcunha Exp $ */ +/* $Id: tty-term.c,v 1.46 2011-02-15 15:12:28 tcunha Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott @@ -33,7 +33,7 @@ void tty_term_override(struct tty_term *, const char *); char *tty_term_strip(const char *); -struct tty_terms tty_terms = SLIST_HEAD_INITIALIZER(tty_terms); +struct tty_terms tty_terms = LIST_HEAD_INITIALIZER(tty_terms); const struct tty_term_code_entry tty_term_codes[NTTYCODE] = { { TTYC_ACSC, TTYCODE_STRING, "acsc" }, @@ -308,7 +308,7 @@ tty_term_find(char *name, int fd, const char *overrides, char **cause) char *s; const char *acs; - SLIST_FOREACH(term, &tty_terms, entry) { + LIST_FOREACH(term, &tty_terms, entry) { if (strcmp(term->name, name) == 0) { term->references++; return (term); @@ -321,7 +321,7 @@ tty_term_find(char *name, int fd, const char *overrides, char **cause) term->references = 1; term->flags = 0; memset(term->codes, 0, sizeof term->codes); - SLIST_INSERT_HEAD(&tty_terms, term, entry); + LIST_INSERT_HEAD(&tty_terms, term, entry); /* Set up curses terminal. */ if (setupterm(name, fd, &error) != OK) { @@ -442,7 +442,7 @@ tty_term_free(struct tty_term *term) if (--term->references != 0) return; - SLIST_REMOVE(&tty_terms, term, tty_term, entry); + LIST_REMOVE(term, entry); for (i = 0; i < NTTYCODE; i++) { if (term->codes[i].type == TTYCODE_STRING)