Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Majestic-12, Yahoo!

Members: 0
Guests: 12
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
612
Jacki72H
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » AFKMud Support & Development » editor touchup
Forum Rules | Mark all | Recent Posts

editor touchup
< Newer Topic :: Older Topic > A slight improvment? for editing th

Pages:<< prev 1 next >>
Post is unread #1 Mar 10, 2004, 6:05 pm   Last edited Nov 23, 2007, 11:45 pm by Samson
Go to the top of the page
Go to the bottom of the page

Quixadhal
Conjurer
GroupMembers
Posts398
JoinedMar 8, 2005

Hey, here's a little buglet/feature I found while doing other things of a more dire nature involving SQL (Where did you hear this citizen?)

All this does is prevent parsing of colour codes while listing the lines in your edit buffer... It's debatable which way is better, but I prefer to see the raw codes of what I'm working with.

diff -uraP afkmud/src/editor.c afkmud.sql/src/editor.c
--- afkmud/src/editor.c 2004-03-05 18:05:53.000000000 -0500
+++ afkmud.sql/src/editor.c     2004-03-10 20:53:20.000000000 -0500
@@ -585,8 +585,15 @@
            else
            {
                send_to_char( "------------------\r\n", ch );
-               for ( x = 0; x numlines; x++ )
-                   ch_printf( ch, "%2d> %s

", x+1, edit->line[x] );
+               for ( x = 0; x numlines; x++ ) {
+                    /* Quixadhal - We cannot use ch_printf here, or we can't see
+                     * what color codes exist in the strings!
+                     */
+                    char tmpline[MSL];
+
+                    sprintf(tmpline, "%2d> %s\r\n", x+1, edit->line[x] );
+                    write_to_buffer( ch->desc, tmpline, 0 );
+                }
                send_to_char( "------------------\r\n> ", ch );
            }
            return;


Anyways, enjoy!
       
Post is unread #2 Mar 10, 2004, 6:23 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Slick, this will help quite a bit with edit buffer checking. Thanks for that
       
Pages:<< prev 1 next >>