Re: Success: Building 0.65.0beta3 with MIPSpro

2002-07-25 Thread Brian Hechinger

On Wed, Jul 24, 2002 at 06:32:46PM -0500, Art Haas wrote:
 
 Here is a small patch (kind-of/sort-of tested) that should
 only set the '-Wall -W -pedanctic' flags if the person building
 blackbox is compiling with GCC.

woo, thanks!!

 The AC_PROG_CC macro sets the variable GCC to yes if it finds
 out that the user is compiling with GCC (g++ in our case). After
 applying this patch, you'll need to regenerate the configure
 script. What you should see, or more precisely should _not_ see,
 are the '-Wall -W -pedantic' flags in the resulting makefile
 if you ar building with the SGI compiler.

is it possible to check and see which non-gcc compiler we are using?  as it is,
there is the step to set CXXFLAGS='-LAND:std' in the environment before running
configure, i was hoping we could do away with that step if at all possible.

thanks!

-brian
-- 
I mean Twinkies are good but getting shot really hurts.
-- http://www.thisisatastyburger.com/ --



Re: Success: Building 0.65.0beta3 with MIPSpro

2002-07-23 Thread Brian Hechinger

On Mon, Jul 22, 2002 at 09:00:39AM -0700, Sean 'Shaleh' Perry wrote:
 
 math.h is the wrong header, it should be stdlib.h (in C++ cfoo means it is
 the wrapper for foo.h).

ok, yes, it is in stdlib.h, you are right.  the issue here then is that there is
no stdlib.h C++ wrapper on IRIX.  that's kinda silly.

 I can drop the std:: and use stdlib.h.

only if it is not a problem for you to do so, then that's probably the best way
unless there is some benefit to using the std:: version that i am not aware of.

 hopefully we can avoid source changes.

ok, i'll operate under the assumption that you'll come up with a solution that
meets everyone's need and doesn't need special source for each platform.

 However I would like configure to be
 able to set the compiler flags properly.

as would i.  i'm looking into how this configure beast works to see if i can
come up with a solution.  if anyone is familiar with the internals of the
configure process i could use a couple pointers.  thanks!!

cheers!!

-brian
-- 
I mean Twinkies are good but getting shot really hurts.
-- http://www.thisisatastyburger.com/ --



Re: Success: Building 0.65.0beta3 with MIPSpro

2002-07-22 Thread Brian Hechinger

On Mon, Jul 22, 2002 at 01:35:53AM -0700, Sean 'Shaleh' Perry wrote:
 
 only CXXFLAGS is used.

yeah, i wasn't too careful with my cut and paste, since those are straight out
of my .profile.  good call.

 I will look over your patch and get back to you.

there are really only two changes that were made, first, '#include cstdlib'
was removed since MIPSpro doesn't use it, and second, std::abs() doesn't exist
on MIPSpro so i had to use the abs() in the C math routines, and needed to add
'#include math.h' in the files that tries to use abs().

 As for the -Wall -W -pedantic, search for them in configure.in.  If you can
 submit me code that detects the compiler is not gcc and removes the flags I
 would be greatful.  Otherwise the bulk 90%+ of the users of blackbox use gcc so
 it is better for the few to override than to change it for the many.

i agree 100%.  it's not hard to edit that stuff out.  if i can figure out how
to get configure to cope with non-gcc, would you like me to set a define so
that the MIPSpro changes in the source can be wrapped?  i don't know that there
is any sane solution to what i needed to do to get it all working.

-brian
-- 
I mean Twinkies are good but getting shot really hurts.
-- http://www.thisisatastyburger.com/ --



Re: building blackbox with MIPSpro

2002-07-12 Thread Brian Hechinger

On Wed, Jul 10, 2002 at 09:08:55PM -0500, Art Haas wrote:
 
 I used to work at a place where we build C++ on SGI machines, and
 the compiler needed a -LANG:std (or something very similiar) to
 accept modern C++ code. This flag set the compiler in a mode where
 code like ...
 
 for (int i = 0; i  10; i++) {
... stuff ... 
 }
 
 was good, and the i variable was only valid within the scope of
 the for block. Did you build blackbox with this flag?

ooh, i was COMPLETELY unaware of that flag.  let me try that and see how
it helps my current work.  0.62.1 builds just fine with MIPSpro after some var
fiddling, although that flag should even get rid of that, but so far the version
out of CVS is *painful* to get built with MIPSpro, maybe that flag will help in
these other areas as well.

a million thanks!!

-brian
-- 
I mean Twinkies are good but getting shot really hurts.
-- http://www.thisisatastyburger.com/ --



building blackbox with MIPSpro

2002-07-10 Thread Brian Hechinger

hello,

i've managed to get blackbox to build using MIPSpro on my Octane.  this is very
very good, since MIPSpro generates binaries that kick gcc generated binaries
all over the place. :)

anyway, it turned out to be a lot easier than i thought it was going to be.
edit config.h and define STDC_HEADERS, and then there is this interesting
other issue, which is why i'm writing here.

MIPSpro does not honor the C++ thing where variable scope is kept withing a
for loop (for example) and so in the instance where the same variable name was
used twice in the same function within seperate scope, i had to change one to
be different so that MIPSpro could cope.

would i be asking too terribly much to ask that the the variable scope rules
meet that of plain old C so that blackbox will cleanly build on SGI kit using
MIPSpro as the compiler?

there were only, i think maybe 4 or 5 instances of this happening, so it's not
a terribly huge undertaking, and would help out tremendously thouse of us who
like to use MIPSpro.

thanks!!!

-brian
-- 
I mean Twinkies are good but getting shot really hurts.
-- http://www.thisisatastyburger.com/ --



Xsgi Visual Problem

2002-06-14 Thread Brian Hechinger

has anyone ever taken a look at this?  i've tried both 0.62.1 and 0.65.0alpha8
and they both exhibit the same problem, which is corrupted visuals.  not the
black boxes that i've seen mentioned in the archives, but just a distorted mess
instead of menus and taskbar.  i can click on stuff, so they work, they just
don't render correctly.

i'm running on an Octane with SI graphics.  hinv available if you are
interested.

i'd really like to get this working since 4Dwm isn't bad, but it's multiple
head support really really blows (i have two SIs) and i would like to get
something a little more useful.

thanks!

-brian
-- 
I mean Twinkies are good but getting shot really hurts.
-- http://www.thisisatastyburger.com/ --



Re: Xsgi Visual Problem

2002-06-14 Thread Brian Hechinger

On Fri, Jun 14, 2002 at 12:30:54PM -0400, James E. Flemer wrote:
 
 Take a look at this:
   http://www.mail-archive.com/blackbox@troll.no/msg01336.html
 
 I have had this problem on Solaris 8 (sparc), when the
 display has lots of color depths. xdpyinfo says something
 like (I am doing this from memory):
 
 screen #0:
   dimensions: 
   resolution: 75x75 dpi
   depths (4): 32 16 8 2

  dimensions:1280x1024 pixels (350x280 millimeters)
  resolution:93x93 dots per inch
  depths (5):1, 8, 12, 15, 24

but i thought i solved that with -depth 24 -class TrueColor in
/usr/lib/X11/xdm/Xservers?  it at least solved remote X apps problem where they
would ask for default and get 8.  hmmm.  so now we know why it is happening,
but how do we get it to do the right thing?

-brian
-- 
I mean Twinkies are good but getting shot really hurts.
-- http://www.thisisatastyburger.com/ --



Re: Xsgi Visual Problem

2002-06-14 Thread Brian Hechinger

On Fri, Jun 14, 2002 at 02:11:25PM -0400, James E. Flemer wrote:
 
 Well .. If all it is picking the depth for is title bars
 and menus etc, then we probably don't need the highest one.
 I'd say it should take the smallest one above 8 (or if none
  8 exist, then the highest there is). I assume the reason
 for providing more depths is that apps can choose a lower
 depth and conserve resources? That is pure speculation on
 my part though, I've rather limited knowledge of X windows
 internals. :-)

i know almost nothing of X internals, so keep that in mind. :)

how much do we save by not using 24-bit depth for things?  is there really a
benefit?

-brian
-- 
I mean Twinkies are good but getting shot really hurts.
-- http://www.thisisatastyburger.com/ --



Re: Xsgi Visual Problem

2002-06-14 Thread Brian Hechinger

On Fri, Jun 14, 2002 at 01:59:27PM -0400, James E. Flemer wrote:
 
 diff -bru blackbox-0.61.1-orig/src/BaseDisplay.cc blackbox-0.61.1/src/BaseDisplay.cc
 --- blackbox-0.61.1-orig/src/BaseDisplay.cc   Thu Oct  5 17:05:40 2000
 +++ blackbox-0.61.1/src/BaseDisplay.ccTue Jan 29 20:04:29 2002
  -581,4 +581,6 
  visual = DefaultVisual(basedisplay-getXDisplay(), screen_number);
  colormap = DefaultColormap(basedisplay-getXDisplay(), screen_number);
}
 +  fprintf(stderr,JEF: Depth: %d\n, depth);
 +  fprintf(stderr,JEF: Visual: %d\n, visual-c_class);
  }
 diff -bru blackbox-0.61.1-orig/src/Image.cc blackbox-0.61.1/src/Image.cc
 --- blackbox-0.61.1-orig/src/Image.cc Thu Oct  5 17:05:40 2000
 +++ blackbox-0.61.1/src/Image.cc  Tue Jan 29 20:02:00 2002
  -1886,6 +1886,9 
if (bits_per_pixel = 24) setDither(False);
  
red_offset = green_offset = blue_offset = 0;
 +  
 +  fprintf(stderr, JEF: Visual %d/%d, Depth %d, BPP %d\n,
 + getVisual()-c_class, TrueColor, screen_depth, bits_per_pixel);
  
switch (getVisual()-c_class) {
case TrueColor:

i applied these patches, and NOW IT WORKS.

i'm am SO confused.

-brian
-- 
I mean Twinkies are good but getting shot really hurts.
-- http://www.thisisatastyburger.com/ --



mouse question

2002-06-14 Thread Brian Hechinger

ok, now that i've got it working, i'm not having much luck getting the mouse
switched to left-handed mode.  bbconf is out of the question unless i manage
to get Qt installed, but from what i hear, that's not so easy on IRIX.

any pointers?

thanks.

-brian
-- 
I mean Twinkies are good but getting shot really hurts.
-- http://www.thisisatastyburger.com/ --