POV-Ray : Newsgroups : povray.general : Problem making macro work right Server Time
8 Aug 2024 06:19:27 EDT (-0400)
  Problem making macro work right (Message 1 to 7 of 7)  
From: Dan Johnson
Subject: Problem making macro work right
Date: 19 Feb 2001 07:31:09
Message: <3A911395.A8F95AA0@hotmail.com>
By changing things around I can make this actually render something, but
my primary misunderstanding is why it gives its current error message
that I have seen in other macros I have made.

"error: No matching } in object, union found instead."

Well isn't a union treated like an object?



// begin pov code
#include "colors.inc"

light_source {<20,100,-150> rgb 2}
camera {location <0,0,-6> look_at 0}

#macro Arrange_3d (Dimentions_vector,N)
        #local A = Dimentions_vector.x;
        #local B = Dimentions_vector.y;
        #local C = Dimentions_vector.z;
        #local Error_loop = 1;
        #while (Error_loop <= 3)
        #switch (Error_loop)
        #case (1)
        #local Vect = A;
        #case (2)
        #local Vect = B;
        #case (3)
        #local Vect = C;
        #end
        #if (abs(Vect)<1)
        #local Input_error = yes;
        #end
        #if (Vect-int(Vect.x)>0)
        #local Input_error = yes;
        #end
        #if ((Vect/abs(Vect))<0)
        #local Input_error = yes;
        #end
        #local Error_loop = Error_loop + 1;
        #end
        #ifdef (Input_error)
        #if (Input_error = yes)
        #error "Dimentions_vector has a number that is not a natural
number"
        #end
        #end

       ( (mod(N+A-1,A))*x + (B-mod(div(N+A-1,A)+B-1,B))*y +
(mod(div(N+B*A-1,B*A)+C-1,C))*z -<A-1,B+1,C-1>/2)
#end  // use only natural numbers aka 1,2,3,4,5,6... no fractions 0 or
negative numbers


#macro Grid (Dimentions_vector,Marker_interval,Marker_scale)

        #local N = 1;
        #while (N <= (((Dimentions_vector.x * 2) +
1)*((Dimentions_vector.y * 2) +1)*((Dimentions_vector.z * 2) + 1)))
                #local Grid_vector = Arrange_3d(<(Dimentions_vector.x *
2) + 1,(Dimentions_vector.y * 2) +1,(Dimentions_vector.z * 2) + 1>,N) *
Marker_interval;
                union {
                sphere {0,.5}
                text { ttf "timrom.ttf"
concat("<",str(Grid_vector.x,1,0),",",str(Grid_vector.y,1,0),",",str(Grid_vector.z,1,0),">")
.5 0  translate 1}
                scale Marker_scale
                translate Grid_vector}
                #local N = N+1;
        #end
#end

object {Grid(<2,2,2>,1,.1) pigment{Green}}
//end pov code


--
Dan Johnson

http://www.geocities.com/zapob


Post a reply to this message

From: Warp
Subject: Re: Problem making macro work right
Date: 19 Feb 2001 09:49:38
Message: <3a913282@news.povray.org>
I had to reindent the code in order to understand. You should really
work on this side :)

  What you are creating in your macro is a bunch of unions. This means that
when you make this:

object {Grid(<2,2,2>,1,.1) pigment{Green}}

it generates code that looks like this:

object
{ union { ... }
  union { ... }
  union { ... }
  ...
}

  You can't have several unions inside an object block.

  By the way, I think that you are missing some #breaks in your #switch.

  Here is the code after I indented it (well, actually I didn't indent it,
I just let emacs to do it automatically):

#include "colors.inc"

light_source {<20,100,-150> rgb 2}
camera {location <0,0,-6> look_at 0}

#macro Arrange_3d (Dimentions_vector,N)
  #local A = Dimentions_vector.x;
  #local B = Dimentions_vector.y;
  #local C = Dimentions_vector.z;
  #local Error_loop = 1;
  #while (Error_loop <= 3)
    #switch (Error_loop)
      #case (1)
        #local Vect = A; #break
      #case (2)
        #local Vect = B; #break
      #case (3)
        #local Vect = C; #break
    #end
    #if (abs(Vect)<1)
      #local Input_error = yes;
    #end
    #if (Vect-int(Vect.x)>0)
      #local Input_error = yes;
    #end
    #if ((Vect/abs(Vect))<0)
      #local Input_error = yes;
    #end
    #local Error_loop = Error_loop + 1;
  #end
  #ifdef (Input_error)
    #if (Input_error = yes)
      #error "Dimentions_vector has a number that is not a natural
      number"
    #end
  #end

  ( (mod(N+A-1,A))*x + (B-mod(div(N+A-1,A)+B-1,B))*y +
    (mod(div(N+B*A-1,B*A)+C-1,C))*z -<A-1,B+1,C-1>/2)
#end  // use only natural numbers aka 1,2,3,4,5,6... no fractions 0 or negative
numbers


#macro Grid (Dimentions_vector,Marker_interval,Marker_scale)

  #local N = 1;
  #while (N <= (((Dimentions_vector.x * 2) +
    1)*((Dimentions_vector.y * 2) +1)*((Dimentions_vector.z * 2) + 1)))
    #local Grid_vector = Arrange_3d(<(Dimentions_vector.x *
      2) + 1,(Dimentions_vector.y * 2) +1,(Dimentions_vector.z * 2) + 1>,N) *
Marker_interval;
    union
    { sphere {0,.5}
      text
      { ttf "timrom.ttf"
        concat("<",str(Grid_vector.x,1,0),",",str(Grid_vector.y,1,0),",",
          str(Grid_vector.z,1,0),">")
        .5 0  translate 1
      }
      scale Marker_scale
      translate Grid_vector
    }
    #local N = N+1;
  #end
#end

object {Grid(<2,2,2>,1,.1) pigment{Green}}


-- 
char*i="b[7FK@`3NB6>B:b3O6>:B:b3O6><`3:;8:6f733:>::b?7B>:>^B>C73;S1";
main(_,c,m){for(m=32;c=*i++-49;c&m?puts(""):m)for(_=(
c/4)&7;putchar(m),_--?m:(_=(1<<(c&3))-1,(m^=3)&3););}    /*- Warp -*/


Post a reply to this message

From: KalleK
Subject: Re: Problem making macro work right
Date: 19 Feb 2001 10:18:22
Message: <3a91393e$1@news.povray.org>
Hi Dan!

It's because there are more than one unions in the object{} statement.
That means there are too many - more than one - objects in the
object-statement.
The #while statement in your Grid#macro genereates several unions.
You may make a union of those grid-generated unions:

change
 object {Grid(<2,2,2>,1,.1) pigment{Green}}
to
 object {union { Grid(<2,2,2>,1,.1) }pigment{Green}}

But then you don't need the object-statement. You can just type:
 union { Grid(<2,2,2>,1,.1) }pigment{Green}

cukk


Post a reply to this message

From: KalleK
Subject: Re: Problem making macro work right
Date: 19 Feb 2001 10:53:16
Message: <3a91416c@news.povray.org>
KalleK <kal### [at] gmxde> schrieb in im Newsbeitrag:
3a91393e$1@news.povray.org...
> Hi Dan!
>
> It's because there are more than one unions in the object{}
statement.
> That means there are too many - more than one - objects in the
> object-statement.
> The #while statement in your Grid#macro genereates several unions.
> You may make a union of those grid-generated unions:
>
> change
>  object {Grid(<2,2,2>,1,.1) pigment{Green}}
> to
>  object {union { Grid(<2,2,2>,1,.1) }pigment{Green}}
>
> But then you don't need the object-statement. You can just type:
>  union { Grid(<2,2,2>,1,.1) }pigment{Green}
>
> cukk


Sorry I meant:
 union { Grid(<2,2,2>,1,.1) pigment{Green}}
 (with pigment inside the union, of course.)

But I think Warp explained it better, anyway. (Working offline I
thougt, I was first, but he was "firster")

cukk


Post a reply to this message

From: Dan Johnson
Subject: Re: Problem making macro work right
Date: 19 Feb 2001 18:41:26
Message: <3A91B0A3.31098CAC@hotmail.com>
Warp wrote:

>   I had to reindent the code in order to understand. You should really
> work on this side :)

Well my only formal training in programming was a 9 week intro to computers class I
took in 7th
grade.  I learned logo (I have almost completely forgotten it now), and basic on an
apple clone.
The code looked something like.

10 var = 1
15 if var > 30 end
20 var = var +1
30 goto 10
40 end

So I was never taught to write pretty code.  For years since then I have wanted to
take some
classes, but there was always something in the way.  Usually it was related to my poor
performance
in school, and how time spent on an extra curricular class would take away from
classes I needed
to graduate.  My parents used the same logic for never getting me a nintendo.  Well a
friend of
mine, also a poor performer at school took the other route.  He now lives in a million
US dollar
home.  The moral of this story is buy your kid video games.

>
>   What you are creating in your macro is a bunch of unions. This means that
> when you make this:
>
> object {Grid(<2,2,2>,1,.1) pigment{Green}}
>
> it generates code that looks like this:
>
> object
> { union { ... }
>   union { ... }
>   union { ... }
>   ...
> }
>
>   You can't have several unions inside an object block.
>

Ahh, its all so obvious now.

>
>   By the way, I think that you are missing some #breaks in your #switch.

Well the POV-Ray docs said that the #breaks were optional, and I usually do things the
easy way.
Since you asked, I fixed that.

>   Here is the code after I indented it (well, actually I didn't indent it,
> I just let emacs to do it automatically):

    Well emacs seems to be a magical tool to people who understand it.  Working with
POV-Ray I
learned for the first time how slow my computer really is.  I know now that I can
never truly be
happy with windows, because most of the truly powerful computers in the world use
unix.  I
installed Red Hat on a pentium 100 machine, but I never use it, and I didn't learn
much installing
it or using the dorky control panels.  I think I need more motivation to get me
started, like when
I learned dos so that I could play games.  My friend told me "from the command prompt
type help
read everything", and I did so that I could play doom.  I usually only play games now
when I am at
friends, or when I am in a really bad mood, and want to kill something without
consequences.  To
prepare my transition to linux I have been learning Gimp, and Emacs on windows.  Many
features of
these programs don't seem to work at all on windows.  So now I have some motivation,
but I know I
will only successfully transition if the gain is more than the loss.  Right now I
can't make
emacs, or xemacs for windows work anywhere near as nicely as the editor built in to
the windows
version of POV-Ray.  I have been posting questions on gnu.emacs.help, and have managed
to get
emacs to function somewhat close to what I am used to.  So far though when it comes to
using
povray with emacs: it uses really ugly colors, and it doesn't do any kind of auto
indenting.  I
tried looking through the source to "pov-mode.el" but it only makes slightly more
sense to me than
warps signature (see below).  Maybe one of the code gurus can tell me how to make
emacs look a
little more like this

http://www.cs.tut.fi/~warp/snapshot.gif

Here is my .emacs file can anyone tell me what I am doing wrong.

;---begin .emacs
(setq font-lock-maximum-decoration t)   ; many colors
(global-font-lock-mode t)               ; enable syntax highlighting
(load "cua-mode")    ;  windows shortcut keys
(CUA-mode t)
(autoload 'pov-mode "pov-mode.el" "PoVray scene file mode" t)
(setq auto-mode-alist
 (append '(("\\.pov$" . pov-mode)
    ("\\.inc$" . pov-mode)
                 ) auto-mode-alist))
;; Use this to turn on font-lock:
(add-hook 'pov-mode-hook 'turn-on-font-lock)
(setq scroll-conservatively 1000)
;--end .emacs



>
> --
> char*i="b[7FK@`3NB6>B:b3O6>:B:b3O6><`3:;8:6f733:>::b?7B>:>^B>C73;S1";
> main(_,c,m){for(m=32;c=*i++-49;c&m?puts(""):m)for(_=(
> c/4)&7;putchar(m),_--?m:(_=(1<<(c&3))-1,(m^=3)&3););}    /*- Warp -*/

Below is my fixed code.  Added "#local Dimentions_vector = Dimentions_vector0 *
<1,1,1>;" to both
functions, and now it successfully promotes integers to vectors.  I don't know why it
renders a
blank screen when I use a negative number, in the input vector instead of generating
an error like
I wanted it to.  Tried to indent by hand doesn't help in understanding the core of
Arrange_3d " (
(mod(N+A-1,A))*x + (B-mod(div(N+A-1,A)+B-1,B))*y + (mod(div(N+B*A-1,B*A)+C-1,C))*z
-<A-1,B+1,C-1>/2)".

//---begin pov
#include "colors.inc"

light_source {<20,100,-150> rgb 2}
camera {location <0,0,-6> look_at 0}

#macro Arrange_3d (Dimentions_vector0,N)
        #local Dimentions_vector = Dimentions_vector0 * <1,1,1>;
        #local A = Dimentions_vector.x;
        #local B = Dimentions_vector.y;
        #local C = Dimentions_vector.z;
        #local Error_loop = 1;
        #while (Error_loop <= 3)
                #switch (Error_loop)
                        #case (1)
                                #local Vect = A;
                        #break
                        #case (2)
                                #local Vect = B;
                        #break
                        #case (3)
                                #local Vect = C;
                        #break
                #end
                #if (abs(Vect)<1)
                        #local Input_error = yes;
                #end
                #if (Vect-int(Vect.x)>0)
                        #local Input_error = yes;
                #end
                #if ((Vect/abs(Vect))<0)
                        #local Input_error = yes;
                #end
                #local Error_loop = Error_loop + 1;
        #end
        #ifdef (Input_error)
                #if (Input_error = yes)
                        #error "Dimentions_vector has a number that is not a natural
number"
                #end
        #end

       ( (mod(N+A-1,A))*x + (B-mod(div(N+A-1,A)+B-1,B))*y +
(mod(div(N+B*A-1,B*A)+C-1,C))*z
-<A-1,B+1,C-1>/2)
#end  // use only natural numbers aka 1,2,3,4,5,6... no fractions 0 or negative
numbers


#macro Grid (Dimentions_vector0,Marker_interval,Marker_scale)
        #local Dimentions_vector = Dimentions_vector0 * <1,1,1>;
        #local N = 1;
        union {
        #while (N <= (((Dimentions_vector.x * 2) + 1)*((Dimentions_vector.y * 2)
+1)*((Dimentions_vector.z * 2) + 1)))
                #local Grid_vector = Arrange_3d(<(Dimentions_vector.x * 2) +
1,(Dimentions_vector.y * 2) +1,(Dimentions_vector.z * 2) + 1>,N) * Marker_interval;
                union {
                sphere {0,.5}
                text { ttf "timrom.ttf"
concat("<",str(Grid_vector.x,1,0),",",str(Grid_vector.y,1,0),",",str(Grid_vector.z,1,0),">")
.5 0
translate 1}
                scale Marker_scale
                translate Grid_vector}
                #local N = N+1;
        #end
        }
#end

object {Grid(<3,2,1>,1,.1) pigment{Green}}
//--end pov


--
Dan Johnson

http://www.geocities.com/zapob


Post a reply to this message

From: Ken
Subject: Re: Problem making macro work right
Date: 19 Feb 2001 19:51:32
Message: <3A91BFA7.3F3F4267@pacbell.net>
Dan Johnson wrote:

> So I was never taught to write pretty code.

Write it so that you understand it which is the most important point.
If you intend to share your code with others (such as here in the
groups) you will recieve a lot less flack from the programmer types
it you learn a few indenting basics. Even then there is no real
consensus between them which are the correct indenting methodologies,
kind of a catch 22 as it were. I now indent my script, that I post
here, just enough to keep them off my back about it :)

> The moral of this story is buy your kid video games.

ROFL

-- 
Ken Tyler


Post a reply to this message

From: Warp
Subject: Re: Problem making macro work right
Date: 20 Feb 2001 06:03:59
Message: <3a924f1f@news.povray.org>
Dan Johnson <zap### [at] hotmailcom> wrote:
:>   By the way, I think that you are missing some #breaks in your #switch.

: Well the POV-Ray docs said that the #breaks were optional, and I usually do things
the easy way.

  Well, they are optional in the sense that they are not obligatory. Povray
will not give you an error if you don't put them there.
  However, if the docs say just that they are optional giving the impression
that the behaviour doesn't change whether you put the #break or not, then
the docs are misleading.
  Yes, you can leave out the #breaks, but then the behaviour of the #switch
changes. And it changes in a way which you probably don't want.
  A #case not ending with a #break will continue with the next #case. That
is, here:

#declare Var=1;
#switch(Var)
  #case(1) #declare Res=1; #break
  #case(2) #declare Res=2; #break
#end

the value of 'Res' will be 1. However, here:

#declare Var=1;
#switch(Var)
  #case(1) #declare Res=1;
  #case(2) #declare Res=2;
#end

the value of 'Res' will be 2.

  And before you ask: Yes, it has some practical uses when working this way.
And yes, this behaviour comes from C.

: I know now that I can never truly be
: happy with windows, because most of the truly powerful computers in the world use
unix.

  Well, the power of those computers come more from the hardware than from
the OS. Those computers usually have hundreds of processors and gigabytes
of RAM.
  Of course it's true that unices can handle that amount of resources a lot
more efficiently than any version of windows (AFAIK even NT freezes when
there are 16 processors or something like that in the computer; I don't know
about w2k). However, in a 1-processor computer with a regular amount of RAM,
having a unix variant will probably not give you any considerable speed
increase (except perhaps in cases where you are running LOTS of processes;
however povray is not one of these cases).
  Unix variants, however, have many other handy features by default that
are either missing completely in Windows or are quite expensive. This doesn't
mean, of course, that there aren't things that are handier in Windows than
in Unix.
  Perhaps the biggest problem with Unix variants is the higher learning
curve and a completely different ideology and application field. Whether
you will be needing unix or not depends a lot on what you are doing (as
your hobby or even as your work).
  In my work Unix is almost essential. If I had to use Windows, I would have
grown gray hair long time ago (because of, among another things, the lack
of versatility, tools and stability).
  However, at home I have win98 in my computer. I have tried Linux, but
deleted it afterwards because I just don't use it at home (the main reason
being perhaps that I don't have internet connection at home). For the things
I do at home (playing games, music, graphics...) win98 is more than enough
(although sometimes I really miss some handy features of unices).

: Maybe one of the code gurus can tell me how to make emacs look a
: little more like this

: http://www.cs.tut.fi/~warp/snapshot.gif

  Although emacs is extremely versatile and powerful, it has one very big
problem: It's extremely difficult to configure. I have always cursed that
and always will.
  In later versions of emacs (I don't know from which version) some
improvements has been added: A customize mode has been added, which makes
configuring emacs a lot easier. It still isn't that easy to configure
everything after all, but it helps a lot (for example with the colors).

  Anyways, this is the essential part of my .emacs which configures not
only pov-mode but also colors and many key combinations (to work more like
in windows editors, for example shift+cursor movement paints the text,
ctrl-ins copies and shift-ins pastes, etc; these work only when emacs is
run from X and they don't work with xemacs (don't ask me why)).
  I commented it a bit so that you can see what features it adds:

-------------8<-------------8<-------------8<-------------8<-------------
;;; This line adds LOTS of stuff in emacs (doesn't work with xemacs).
;;; Among other things it adds ctrl+cursor movement painting and other
;;; typical windows-editor editing keys:
(pc-selection-mode)

;;; Show also column number besides line number:
(column-number-mode t)

;;; Doesn't add new lines at the end of the doc when pressing return:
(setq next-line-add-newlines nil)

;;; Misc settings:
(setq auto-save-default nil)
(setq scroll-step 1)
(set-background-color "black")
(set-foreground-color "white")
(set-cursor-color "yellow")
(standard-display-european t) 
(set-input-mode (car (current-input-mode)) 
                (nth 1 (current-input-mode)) 
                0) 

;;; Fix home, end and delete to work as in windows:
(global-set-key '[home] 'beginning-of-line)
(global-set-key '[end] 'end-of-line)
(global-set-key '[delete] 'delete-char)

;;; Use ctrl-y to immediately kill a line. Handier than ctrl-k
(global-set-key "\C-y" 'kill-complete-line)

;;; Other key settings. Should be self-explanatory:
(global-set-key [(alt x)] 'save-buffers-kill-emacs)
(global-set-key [(alt f3)] 'delete-window)
(global-set-key '[f2] 'save-buffer)
(global-set-key '[f9] 'compile)
(global-set-key "\C-r" 'insert-file)

;;; Fix backspace to delete chars instead of popping up the help. To pop
;;; up the help, press F1:
(global-set-key "\C-h" 'delete-backward-char)

;;; Misc help functions:
(auto-fill-mode)
(defun kill-complete-line () 
  "Kill the complete line." 
  (interactive) 
  (beginning-of-line) 
  (if (eobp) (error "End of buffer")) 
  (let ((beg (point))) 
    (forward-line 1) 
    (kill-region beg (point)))) 

(setq font-lock-maximum-decoration t) 
(global-font-lock-mode t) 

(setq backup-inhibited 't)

(defun contents-move (dir checkpoint)
  (let ((oldColumn (current-column)))
    (if (not (pos-visible-in-window-p checkpoint))
        ((lambda ()
           (save-excursion
             (goto-char (window-start))
             (forward-line dir)
             (set-window-start (selected-window) (point))))))
    (forward-line dir)
    (move-to-column oldColumn)))
 
(defun contents-one-down ()
  (interactive)
  (contents-move -1 (point-min)))
 
(defun contents-one-up ()
  (interactive)
  (contents-move 1 (point-max)))
 
(defun generic-page-scroll (lines)
  (let ((oldColumn (current-column)))
    (save-excursion
      (goto-char (window-start))
      (forward-line lines)
      (set-window-start (selected-window) (point)))
    (forward-line lines)
    (move-to-column oldColumn)))
 
(defun page-scroll-up ()
  (interactive)
  (if (not (pos-visible-in-window-p (point-max)))
      (generic-page-scroll (- (1- (window-height)) next-screen-context-lines))
    (goto-char (point-max))))
 
(defun page-scroll-down ()
  (interactive)
  (if (not (pos-visible-in-window-p (point-min)))
      (generic-page-scroll (- next-screen-context-lines (1- (window-height))))
    (goto-char (point-min))))
 
;;; Use ctrl-up and ctrl-down to scroll the page
(global-set-key '[(control up)] 'contents-one-down)
(global-set-key '[(control down)] 'contents-one-up)

;;; Fix page up and page down behaviour to work as it should
(global-set-key '[next] 'page-scroll-up)
(global-set-key '[prior] 'page-scroll-down)

;; POV-Ray related stuff
;; =====================
;; Fix the path here:
(autoload 'pov-mode "/home/warp/temp/pov-mode.elc" "PoVray scene file mode" t)
(setq auto-mode-alist
      (append '(("\\.pov$" . pov-mode)
                ("\\.inc$" . pov-mode)
                ("\\.mcr$" . pov-mode))
              auto-mode-alist))
(add-hook 'pov-mode-hook 'turn-on-font-lock)


;;; Insert file at the current position uuencoded
(defun insert-file-uuencoded (filename)
  (interactive "fInsert file (uuencoded): ")
  (shell-command (concat "uuencode " filename " " (substring filename (string-match
"[^/]+$" filename)) " | sed 's/^ $/`/'") t)
)

(global-set-key [(control c) (control u)] 'insert-file-uuencoded)

;;; Kill all whitespace chars forward from cursor with ctrl-t
(defun kill-white-space()
  (interactive)
  (if (re-search-forward "\\(\\s-\\|\n\\)+" nil t)
      (replace-match "")))

(global-set-key '[(control t)] 'kill-white-space)


;; Color settings
(custom-set-variables)
(custom-set-faces
 '(font-lock-comment-face ((((class color) (background dark)) (:foreground
"ForestGreen"))))
 '(font-lock-string-face ((((class color) (background dark)) (:foreground
"Magenta"))))
 '(region ((t (:foreground "black" :background "#99CCFF"))))
 '(font-lock-keyword-face ((((class color) (background dark)) (:foreground
"Yellow"))))
 '(font-lock-constant-face ((((class color) (background dark)) (:foreground
"GreenYellow"))))
 '(font-lock-type-face ((((class color) (background dark)) (:foreground "#40A0FF"))))
 '(modeline ((t (:foreground "yellow" :background "Blue"))))
 '(font-lock-variable-name-face ((((class color) (background dark)) (:foreground
"thistle"))))
 '(font-lock-function-name-face ((((class color) (background dark)) (:foreground
"Coral"))))
 '(font-lock-builtin-face ((((class color) (background dark)) (:foreground
"Green")))))


;;; C indentation settings
(defun oma-c-mode-common-hook ()
  (interactive)
  (setq c-basic-offset 4)
  (c-set-offset 'substatement-open 0)
  (c-set-offset 'case-label 2)
  (c-set-offset 'block-open 0)
  (c-set-offset 'knr-argdecl-intro '-)
  (c-set-offset 'arglist-close 'c-lineup-arglist)
  (c-set-offset 'access-label -3)
  (c-set-offset 'inclass 4)	
  (c-set-offset 'inline-open 0)
  (setq tab-width 8
        ;; this will make sure spaces are used instead of tabs
        indent-tabs-mode nil)
)
(add-hook 'c-mode-common-hook 'oma-c-mode-common-hook)

-------------8<-------------8<-------------8<-------------8<-------------



-- 
char*i="b[7FK@`3NB6>B:b3O6>:B:b3O6><`3:;8:6f733:>::b?7B>:>^B>C73;S1";
main(_,c,m){for(m=32;c=*i++-49;c&m?puts(""):m)for(_=(
c/4)&7;putchar(m),_--?m:(_=(1<<(c&3))-1,(m^=3)&3););}    /*- Warp -*/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.