From 61bd4079a0e2cb3817892580461407c8d009338d Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Sat, 23 Jan 2021 16:15:39 -0500 Subject: Preserve order of filters when removing Filters should be kept in order since the first one that matches, wins. This lets highlights or ignores take priority over each other, if desired. --- filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filter.c b/filter.c index 2a7d564..a648d8b 100644 --- a/filter.c +++ b/filter.c @@ -74,7 +74,7 @@ bool filterRemove(struct Filter filter) { if (filter.chan && strcasecmp(filters[i].chan, filter.chan)) continue; if (filter.mesg && strcasecmp(filters[i].mesg, filter.mesg)) continue; free(filters[i].mask); - filters[i] = filters[--len]; + memmove(&filters[i], &filters[i + 1], sizeof(*filters) * --len); filters[len] = (struct Filter) {0}; found = true; } -- cgit 1.4.0 'sub right'>
summary refs log tree commit diff
path: root/bin/1sh/printf.c (unfollow)
Commit message (Expand)Author
2020-03-09Rename manual pages to 1shJune McEnroe
2020-03-09Move bltin out of subdirectoryJune McEnroe
2020-03-09Import /usr/src/usr.bin/printf from FreeBSD 12.1-RELEASEJune McEnroe
2020-03-09Import /usr/src/bin/test from FreeBSD 12.1-RELEASEJune McEnroe
2020-03-09Import /usr/src/bin/kill from FreeBSD 12.1-RELEASEJune McEnroe
2020-03-09Remove extraneous files from sh sourcesJune McEnroe
2020-03-09Import /usr/src/bin/sh from FreeBSD 12.1-RELEASEJune McEnroe
2020-03-09Remove 1sh sourcesJune McEnroe
2020-03-08Add The Stone SkyJune McEnroe
2020-03-08Publish "How I Relay Chat"June McEnroe
2020-03-03Don't use $ inside $(())June McEnroe
2020-03-03Remove setoptJune McEnroe
2020-03-03Use getopts in shell scriptsJune McEnroe
2020-02-27Style %T outside of Rs in italicJune McEnroe
2020-02-26Add Fierce Femmes and Notorious LiarsJune McEnroe
2020-02-23Add This Is How You Lose the Time WarJune McEnroe
2020-02-22Add See Ya LaterJune McEnroe
2020-02-20Remove wiki scriptJune McEnroe
2020-02-19Add The Obelisk GateJune McEnroe
2020-02-17Add Four Tet — HandsJune McEnroe
2020-02-12Simplify macOS notify-sendJune McEnroe
2020-02-12Add imbox and notemap to pageJune McEnroe
2020-02-12Collapse simple linksJune McEnroe
2020-02-12Move catgirl up the pageJune McEnroe
2020-02-12Update catgirl pty grabJune McEnroe
2020-02-12Link to cgit /about pages where appropriateJune McEnroe
2020-02-11Separate LINKS from BINS for html to workJune McEnroe
2020-02-11Add margin to Bl-bullet itemsJune McEnroe
2020-02-10Match URLs inside parens or with paired parens insideJune McEnroe
2020-02-10Duplicate effective URL before passing it back to curlJune McEnroe
2020-02-09Add To Be Taught, If FortunateJune McEnroe
2020-02-04Add The Future of Another TimelineJune McEnroe
2020-01-31Reorganize the Makefile for the umpteenth timeJune McEnroe
2020-01-28Change scout sensitivity to 1.4June McEnroe
2020-01-28Import shows.txtJune McEnroe