Let's see if this helps.
Output of diff:
97a98,101
> keyphrase=" key restricted "
> if ( p == "" ) { keyphrase = "" }
> selchannel=" channel "
> if ( c == "" ) { selchannel = "" }
102c106
< system("iwconfig " d " essid " s " key restricted " p " channel " c)
---
> system("iwconfig " d " essid " s keyphrase p selchannel c)
229a234,235
> password = ""
> newitem=""
232,233d237
< password = ""
< newitem=""
253c257,258
< system("iwconfig " wifi " essid " sid[selection] " channel " chan[selection])
---
> newitem=1
> associate(type[selection],wifi,sid[selection],password,chan[selection])
And output with -e (I'm very rusty - assuming this is what feeds to patch??)
253c
newitem=1
associate(type[selection],wifi,sid[selection],password,chan[selection])
.
232,233d
229a
password = ""
newitem=""
.
102c
system("iwconfig " d " essid " s keyphrase p selchannel c)
.
97a
keyphrase=" key restricted "
if ( p == "" ) { keyphrase = "" }
selchannel=" channel "
if ( c == "" ) { selchannel = "" }
.
Please forgive and educate me if this in not the proper approach.