View Issue Details

IDProjectCategoryView StatusLast Update
0000002LDMud 3.3Otherpublic2004-05-17 07:27
Reporteracius Assigned Tolars 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Summary0000002: Carriage return treated as ^J ^J ^J in char mode
DescriptionThis is something of a compatibility/consistency problem. In LDMud 3.2.9, when using charmode (i.e. key by key input), it would call my input_to function once, and it would send a ^M (character 13). In 3.3.453 (what I am using right now), it sends three ^J characters (character 10), calling the key input function 3 times.
Additional InformationI've got a charmode test utility which I can send if it will help diagnose things, though it is a bit specific to my MUDlib. If you want to play with it, just login to simud.org:4242, get to a command prompt, and type 'keytest'. Push buttons and see what you get (no mud clients, of course)
TagsNo tags attached.

Activities

acius

2003-05-30 11:59

reporter   ~0000002

Here's a small program that should duplicate this (ought to be lib-independent):

void runtest( string s ) {
   string mesg;
   int i;
   mesg = "Received: ";
   for( i = 0; i < strlen(s); i++ )
      mesg += s[i] + " ";
   if( s != "\27" )
      input_to( "runtest", 2 );
   write( mesg + "\n" );
}

void start_test() {
   input_to( "runtest", 2 );
}

Hitting "Enter" twice, I get this:

^MReceived: 10
Received: 10
Received: 10
^MReceived: 10
Received: 10
Received: 10

The local echo claims it's a \r (^M), but the MUD is sending \n (^J), three times.

lars

2003-07-28 23:05

reporter   ~0000014

The driver didn't treat CR and LF as normal characters in charmode, as it should have, but instead tried to interpret them as line end. Treating them as normal data characters in charmode solved the problem.

Corrected in 3.3.467 .

Issue History

Date Modified Username Field Change
2003-05-30 04:11 acius New Issue
2003-05-30 11:59 acius Note Added: 0000002
2003-07-28 21:25 lars Status new => assigned
2003-07-28 21:25 lars Assigned To => lars
2003-07-28 23:05 lars Status assigned => resolved
2003-07-28 23:05 lars Resolution open => fixed
2003-07-28 23:05 lars Note Added: 0000014
2004-05-17 07:27 lars Status resolved => closed