bugOCaml Text Mode Kit - Bugs: bug #31539, Curses.get_size is broken on...

 
 

bug #31539: Curses.get_size is broken on Cygwin (regression)

Submitted by:  Paul Pelzl <pelzlpj>
Submitted on:  Wed 03 Nov 2010 07:19:32 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 03 Nov 2010 07:19:32 PM UTC, original submission:

A Cygwin user reported an error which indicates a failure to retrieve the correct terminal size when running under an xterm. An older version of the curses bindings works OK.

I believe this is the offending change:

ML0d(get_size,int*int)
-BEG0 struct winsize ws;
+BEG0
+#ifndef WIN32
+ struct winsize ws;
ioctl(0,TIOCGWINSZ,&ws);
r_int_int(ws.ws_row,ws.ws_col);
+#else
+ COORD max;
+ HANDLE con;
+ con = GetStdHandle (STD_OUTPUT_HANDLE);
+ max = GetLargestConsoleWindowSize (con);
+ r_int_int (max.Y, max.X);
+#endif
END

Probably the WIN32 macro is getting defined (maybe due to the OCamlMakefile?). My understanding is that it is usually not appropriate to define WIN32 for Cygwin build environments.

Paul Pelzl <pelzlpj>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by pelzlpj (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup1