File lmms-code-indent.patch of Package lmms

---
 plugins/opl2/fmopl.c                                  |    5 ++++-
 plugins/zynaddsubfx/zynaddsubfx/src/UI/EnvelopeUI.fl  |    6 ++++--
 plugins/zynaddsubfx/zynaddsubfx/src/UI/ResonanceUI.fl |    6 ++++--
 src/core/drumsynth.cpp                                |    7 +++++--
 4 files changed, 17 insertions(+), 7 deletions(-)

--- a/plugins/opl2/fmopl.c
+++ b/plugins/opl2/fmopl.c
@@ -653,7 +653,10 @@ static void init_timetables( FM_OPL *OPL
 	double rate;
 
 	/* make attack rate & decay rate tables */
-	for ( i = 0; i < 4; i++ ) OPL->AR_TABLE[i] = OPL->DR_TABLE[i] = 0; {
+	for ( i = 0; i < 4; i++ )
+		OPL->AR_TABLE[i] = OPL->DR_TABLE[i] = 0;
+	if (1)
+	{
 		for (i = 4; i <= 60; i++) {
 			rate  = OPL->freqbase;						/* frequency rate */
 			if( i < 60 ) { 
--- a/plugins/zynaddsubfx/zynaddsubfx/src/UI/EnvelopeUI.fl
+++ b/plugins/zynaddsubfx/zynaddsubfx/src/UI/EnvelopeUI.fl
@@ -204,12 +204,14 @@ if (event==FL_RELEASE){
 
 if ((event==FL_DRAG)&&(currentpoint>=0)){
   int ny=127-(int) (y_*127.0/h());
-  if (ny<0) ny=0;if (ny>127) ny=127;
+  if (ny<0) ny=0;
+  if (ny>127) ny=127;
   env->Penvval[currentpoint]=ny;
 
   int dx=(int)((x_-cpx)*0.1);
   int newdt=cpdt+dx;
-  if (newdt<0) newdt=0;if (newdt>127) newdt=127;
+  if (newdt<0) newdt=0;
+  if (newdt>127) newdt=127;
   if (currentpoint!=0) env->Penvdt[currentpoint]=newdt;
      else env->Penvdt[currentpoint]=0;
 
--- a/plugins/zynaddsubfx/zynaddsubfx/src/UI/ResonanceUI.fl
+++ b/plugins/zynaddsubfx/zynaddsubfx/src/UI/ResonanceUI.fl
@@ -133,8 +133,10 @@ if ( (x_>=0)&&(x_<w()) && (y_>=0)&&(y_<h
 if ((event==FL_PUSH)||(event==FL_DRAG)){
   int leftbutton=1;
   if (Fl::event_button()==FL_RIGHT_MOUSE) leftbutton=0;
-  if (x_<0) x_=0;if (y_<0) y_=0;
-  if (x_>=w()) x_=w();if (y_>=h()-1) y_=h()-1;
+  if (x_<0) x_=0;
+  if (y_<0) y_=0;
+  if (x_>=w()) x_=w();
+  if (y_>=h()-1) y_=h()-1;
 
   if ((oldx<0)||(oldx==x_)){
     int sn=(int)(x_*1.0/w()*N_RES_POINTS);
--- a/src/core/drumsynth.cpp
+++ b/src/core/drumsynth.cpp
@@ -155,7 +155,8 @@ float DrumSynth::waveform(float ph, int
      case 1: w = (float)fabs(2.0f*(float)sin(fmod(0.5f*ph,TwoPi)))-1.f; break; //sine^2
      case 2: while(ph<TwoPi) ph+=TwoPi;
              w = 0.6366197f * (float)fmod(ph,TwoPi) - 1.f;                     //tri
-             if(w>1.f) w=2.f-w;                                         break;
+             if(w>1.f) w=2.f-w;
+             break;
      case 3: w = ph - TwoPi * (float)(int)(ph / TwoPi);                        //saw
              w = (0.3183098f * w) - 1.f;                                break;  
     default: w = (sin(fmod(ph,TwoPi))>0.0)? 1.f: -1.f;                  break; //square
@@ -429,7 +430,9 @@ int DrumSynth::GetDSFileSamples(const ch
   strcpy(sec, "Distortion");
   chkOn[5] = GetPrivateProfileInt(sec,"On",0,dsfile); DiON = chkOn[5];
   DStep = 1 + GetPrivateProfileInt(sec,"Rate",0,dsfile);
-  if(DStep==7) DStep=20; if(DStep==6) DStep=10; if(DStep==5) DStep=8;
+  if(DStep==7) DStep=20;
+  if(DStep==6) DStep=10;
+  if(DStep==5) DStep=8;
 
   clippoint = 32700;
   DAtten = 1.0f;
openSUSE Build Service is sponsored by