From 49d4c73dc1308381d867ffc7f3bd7ebb5d0a818e Mon Sep 17 00:00:00 2001 From: Rob Pilling Date: Wed, 28 Dec 2011 12:53:42 +0000 Subject: [PATCH 1/2] null pointer hack and red error for "o" --- gui.c | 7 +++++-- proc.c | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gui.c b/gui.c index af4b85e..b8ac466 100644 --- a/gui.c +++ b/gui.c @@ -127,10 +127,13 @@ void goto_me(struct proc **procs) void goto_lock(struct proc **procs) { - if(lock_proc_pid == -1) + if(lock_proc_pid == -1){ + attron( COLOR_PAIR(1 + COLOR_RED)); WAIT_STATUS("no process locked on"); - else + attroff(COLOR_PAIR(1 + COLOR_RED)); + }else{ goto_proc(procs, proc_get(procs, lock_proc_pid)); + } } void showproc(struct proc *proc, int *py, int indent) diff --git a/proc.c b/proc.c index 8f37c00..6690111 100644 --- a/proc.c +++ b/proc.c @@ -275,7 +275,9 @@ static void proc_handle_rename(struct proc *this) this->argv[argc] = NULL; free(this->cmd); - this->cmd = buffer; + this->cmd = buffer; + }else{ + this->cmd = ustrdup(""); } } From 87d63baafc78d99b5fb16c42bf99a1e38efb49e6 Mon Sep 17 00:00:00 2001 From: Rob Pilling Date: Sun, 18 Mar 2012 15:36:13 +0000 Subject: [PATCH 2/2] Added LICENSE (MIT) --- LICENSE | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..a1126ed --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT/X Consortium License + +© 2010-2011 Robert Pilling + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE.