News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

The 28 May 2014 build (9781) is out.

Started by killerbot, May 29, 2014, 12:29:42 AM

Previous topic - Next topic

killerbot

Get quick announcements through the RSS feed http://www.codeblocks.org/nightly/CodeBlock_RSS.xml

Before you use a nightly make sure you understand how it works.

A link to the unicode windows wxWidget dll for Code::Blocks : http://prdownload.berlios.de/codeblocks/wxmsw28u_gcc_cb_wx2812_gcc481-TDM.7z

For those who might need this one (when no MingW installed on your system) : the mingw10m.dll : http://prdownload.berlios.de/codeblocks/mingwm10_gcc481-TDM.7z

The 28 May 2014 build is out.
  - Windows :
   http://prdownload.berlios.de/codeblocks/CB_20140528_rev9781_win32.7z
  - Linux :
   none

Resolved Fixed:


  • Removed standalone codesnipptes app from debian and rpm control files, because it no longer exists.
  • CC: Fix crash when creating new file from the wizard and there is a default code to be added to the file

Regressions/Confirmed/Annoying/Common bugs:




nexon7

The easiest tutorial for installing codeblocks nightly and setting TDM GCC 32 and 64 bit (download from tdm-gcc site) is here   https://nexon7.wordpress.com/2013/09/03/how-to-install-codeblock-nightly-build-with-latest-gcc-compiler-32-bit-and-64-bit/  
This build 9781 works like charm :)

nasty_wolverine

Is there a documented bug about the astyle formatter? recently it has been going wack moving code all over the place, like from one function to another.

stahta01

Quote from: nasty_wolverine on May 30, 2014, 11:20:30 AM
Is there a documented bug about the astyle formatter? recently it has been going wack moving code all over the place, like from one function to another.

I have NOT noticed it; but, I have NOT been using CB SVN version 9781.
I suggest posting the normal info and how to duplicate the issue.
OS Name and version; wxWidgets version; source of Code::Blocks (self built or ?).

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

nasty_wolverine

before:

#include "hash_manager.h"

int ChashManager::calculate_hash(float x, float y)
{
if( ((x >= 4.0f)||(x < 0.0f)) || ((y >= 4.0f)||(y < 0.0f)) )
{
return 0xFFFF;
}
else
{
return ( ((int)y*4) + (int)x); //TO DO: how do i control hash size???
}
}

int ChashManager::getbin(vector2f position, vector2f offset, vector2f corner, vector2f camera)
{
    vector2f temp;

temp = position + offset + corner;
temp = temp - camera; //collapse to camera space

return calculate_hash(temp.x, temp.y);
}

void ChashManager::flush()
{
hashbucket_.clear();
objectindex_.clear();
}

void ChashManager::add(int id, Chitbox phitbox, vector2f position, vector2f camera)
{
//main loop for every available hitbox in hitbox collection
for(std::vector<circle2f>::size_type i = 0; i < phitbox.collection.size(); i++)
{
    //phitbox.collection[i].r
    Sbox box();






}
}

void addtomap(int id, Sbox box)
{
    if( box.box_min == 0xffff && box.box_max == 0xffff && box.box_lt == 0xffff && box.box_rb == 0xffff )
{
return; // out of scene
}

    int ymod = 0;

int xspread = box.box_rb - box.box_min;
int yspread = (box.box_max - box.box_rb)/4;

for(int y = 0; y <= yspread; y++)
{
for(int x = box.box_min; x <= (xspread + box.box_min); x++)
{
//p_ent->hitbox.binlist.push_back(ymod + x);//bin number here is (ymod+x)
}
ymod += 4;
}
}

void delimit_box(Sbox &box)
{
    //lt, max
//min, rb

if( box.box_min == 0xffff && box.box_max == 0xffff && box.box_lt == 0xffff && box.box_rb == 0xffff )
{
return; // out of scene
}

//first scenario - min is Oxffff (object in lower left corner)
if((box.box_min == 0xffff) && (box.box_max != 0xffff))
{
if( box.box_lt == 0xffff && box.box_rb == 0xffff )
{
box.box_rb = box.box_max%4;
box.box_lt = 4*(box.box_max/4);
box.box_min = 0;
}
else if( box.box_lt != 0xffff && box.box_rb == 0xffff )
{
box.box_min = box.box_lt%4;
box.box_rb = box.box_max%4;
}
else if( box.box_lt == 0xffff && box.box_rb != 0xffff )
{
box.box_lt = 4*(box.box_max/4);
box.box_min = 4*(box.box_rb/4);
}
}
//second scenario- max is 0xffff (object in upper right corner)
else if ( (box.box_min != 0xffff) && (box.box_max == 0xffff) )
{
if( box.box_lt == 0xffff && box.box_rb == 0xffff )
{
box.box_max = 15;
box.box_lt = (box.box_min%4)+12;
box.box_rb = (((box.box_min/4)+1)*4)-1;
}
else if( box.box_lt != 0xffff && box.box_rb == 0xffff )
{
box.box_max = (((box.box_lt/4)+1)*4)-1;
box.box_rb = (((box.box_min/4)+1)*4)-1;
}
else if( box.box_lt == 0xffff && box.box_rb != 0xffff )
{
box.box_max = 12+(box.box_rb%4);
box.box_lt = 12+(box.box_min%4);
}
}
//second scenario- max and min is 0xffff (object in upper right/lower left corner)
else if ( (box.box_min == 0xffff) && (box.box_max == 0xffff) )
{
if(box.box_rb == 0xffff)
{
box.box_max = (((box.box_lt/4)+1)*4)-1;
box.box_min = box.box_lt%4;
box.box_rb = 3;
}
else
{
box.box_lt = 12;
box.box_max = 12+(box.box_rb%4);
box.box_min = 4*(box.box_rb/4);
}
}
}

std::vector<int> ChashManager::getBinElements(int pid)
{


}




after:

#include "hash_manager.h"

int ChashManager::calculate_hash(float x, float y)
{
if( ((x >= 4.0f)||(x < 0.0f)) || ((y >= 4.0f)||(y < 0.0f)) )
{
return 0xFFFF;
}
else
{
return ( ((int)y*4) + (int)x); //TO DO: how do i control hash size???
}
}

int ChashManager::getbin(vector2f position, vector2f offset, vector2f corner, vector2f camera)
{
vector2f temp;

temp = position + offset + corner;
temp = temp - camera; //collapse to camera space
temp = temp - camera; //collapse to camera space
return calculate_hash(temp.x, temp.y);
}

void ChashManager::flush()
{
hashbucket_.clear();
objectindex_.clear();
}

void ChashManager::add(int id, Chitbox phitbox, vector2f position, vector2f camera)
{
//main loop for every available hitbox in hitbox collection
for(std::vector<circle2f>::size_type i = 0; i < phitbox.collection.size(); i++)
{
//phitbox.collection[i].r
Sbox box();






}
}

void addtomap(int id, Sbox box)
{
if( box.box_min == 0xffff && box.box_max == 0xffff && box.box_lt == 0xffff && box.box_rb == 0xffff )
{
return; // out of scene
}
{
int ymod = 0;

int xspread = box.box_rb - box.box_min;
int yspread = (box.box_max - box.box_rb)/4;

for(int y = 0; y <= yspread; y++)
{
for(int x = box.box_min; x <= (xspread + box.box_min); x++)
{
//p_ent->hitbox.binlist.push_back(ymod + x);//bin number here is (ymod+x)
}
ymod += 4;
}
}

void delimit_box(Sbox &box)
{
//lt, max
//min, rb
int yspread = (box.box_max - box.box_rb)/4;
if( box.box_min == 0xffff && box.box_max == 0xffff && box.box_lt == 0xffff && box.box_rb == 0xffff )
{
return; // out of scene
}
for(int y = 0; y <= yspread; y++)
//first scenario - min is Oxffff (object in lower left corner)
if((box.box_min == 0xffff) && (box.box_max != 0xffff))
{
if( box.box_lt == 0xffff && box.box_rb == 0xffff )
{
box.box_rb = box.box_max%4;
box.box_lt = 4*(box.box_max/4);
box.box_min = 0;
}
else if( box.box_lt != 0xffff && box.box_rb == 0xffff )
{
box.box_min = box.box_lt%4;
box.box_rb = box.box_max%4;
}
else if( box.box_lt == 0xffff && box.box_rb != 0xffff )
{
box.box_lt = 4*(box.box_max/4);
box.box_min = 4*(box.box_rb/4);
}
}
//second scenario- max is 0xffff (object in upper right corner)
else if ( (box.box_min != 0xffff) && (box.box_max == 0xffff) )
{
if( box.box_lt == 0xffff && box.box_rb == 0xffff )
{
box.box_max = 15;
box.box_lt = (box.box_min%4)+12;
box.box_rb = (((box.box_min/4)+1)*4)-1;
}
else if( box.box_lt != 0xffff && box.box_rb == 0xffff )
{
box.box_max = (((box.box_lt/4)+1)*4)-1;
box.box_rb = (((box.box_min/4)+1)*4)-1;
}
else if( box.box_lt == 0xffff && box.box_rb != 0xffff )
{
box.box_max = 12+(box.box_rb%4);
box.box_lt = 12+(box.box_min%4);
}
}
//second scenario- max and min is 0xffff (object in upper right/lower left corner)
else if ( (box.box_min == 0xffff) && (box.box_max == 0xffff) )
{
if(box.box_rb == 0xffff)
{
box.box_max = (((box.box_lt/4)+1)*4)-1;
box.box_min = box.box_lt%4;
box.box_rb = 3;
}
else
{
box.box_lt = 12;
box.box_max = 12+(box.box_rb%4);
box.box_min = 4*(box.box_rb/4);
}
}
}
for(int x = box.box_min; x <= (xspread + box.box_min); x++)
std::vector<int> ChashManager::getBinElements(int pid)
{
//p_ent->hitbox.binlist.push_back(ymod + x);//bin number here is (ymod+x)
}
}




as you can see, astyle formatting things is out of whack for me, there is some code duplication going on in the getbin method, and right near the end its copying code from somewhere else.

this is using nightly 9781 in windows 7 64bit

Jenna

Quote from: nasty_wolverine on May 30, 2014, 08:50:41 PM
as you can see, astyle formatting things is out of whack for me, there is some code duplication going on in the getbin method, and right near the end its copying code from somewhere else.

this is using nightly 9781 in windows 7 64bit
Can you please describe the exact steps to reproduce (including the astyle settings you use).

nasty_wolverine

Quote from: jens on May 30, 2014, 09:01:57 PM
Can you please describe the exact steps to reproduce (including the astyle settings you use).
well on the settings side, i use gnu indentation, its set on use tabs instead of spaces, indentation size is 4. everything else is unchecked. on how to reproduce it, the code I pasted before is in a file called hash_manager.cpp, i activate the file in the editor, go to plugins and click on source code formatter, and that happens. also, i checked with a few different styles of formatting, it does garble things up, but in different ways.

Alpha

Note, most likely rev 9575 is the cause; I do not have time to look into it right now, so consider reverting if it is not an easy fix.

nasty_wolverine

Quote from: Alpha on May 31, 2014, 04:32:40 AM
Note, most likely rev 9575 is the cause; I do not have time to look into it right now, so consider reverting if it is not an easy fix.
Its not something that i cant live without, indentation while typing code works fine. and i can always manually align code.

ToApolytoXaos

Is there a problem with auto-completion?

I am using svn9793 on debian testing (64-bit) and as soon as I complete <stdio it stops drop down listbox and I have to press Ctrl-space to auto-complete it.

nanyu

url link doesn't work :
click    http://prdownload.berlios.de/codeblocks/CB_20140528_rev9781_win32.7z
will open the web "http://www.berlios.de/"  homepage only。


--
firefox 29.01 / IE 11

ollydbg

#11
Quote from: nanyu on June 08, 2014, 09:32:38 PM
url link doesn't work :
click    http://prdownload.berlios.de/codeblocks/CB_20140528_rev9781_win32.7z
will open the web "http://www.berlios.de/"  homepage only。


--
firefox 29.01 / IE 11
It looks like the whole https://developer.berlios.de/projects/codeblocks/ was down. They have said before, see: berlios will close project host in 2014.04


EDIT
You can download the bin files from mirror sites: http://sourceforge.net/projects/codeblocks.berlios/files/
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

ToApolytoXaos

Quote from: ToApolytoXaos on June 08, 2014, 06:04:34 PM
Is there a problem with auto-completion?

I am using svn9793 on debian testing (64-bit) and as soon as I complete <stdio it stops drop down listbox and I have to press Ctrl-space to auto-complete it.
Another thing I have noticed is that under a C project if you use C99 syntax for structures and press "dot" to get a member, instead of getting the name of a desired member, you only get C++ keywords.

Is it possible for the parser to search only for C data members, reserved keywords, and such?

Thank you.

ollydbg

Quote from: ToApolytoXaos on June 09, 2014, 02:39:30 PM
Quote from: ToApolytoXaos on June 08, 2014, 06:04:34 PM
Is there a problem with auto-completion?

I am using svn9793 on debian testing (64-bit) and as soon as I complete <stdio it stops drop down listbox and I have to press Ctrl-space to auto-complete it.
Another thing I have noticed is that under a C project if you use C99 syntax for structures and press "dot" to get a member, instead of getting the name of a desired member, you only get C++ keywords.

Is it possible for the parser to search only for C data members, reserved keywords, and such?

Thank you.
You mean:
http://www.dribin.org/dave/blog/archives/2010/05/15/c99_syntax/

NSPoint point = { .x = 0, .y = 0};

?

1, we should know it is an initialization statement.
2, we are after the dot.
3, we are in a C file, but we have C99 option enabled.

The hardest part is 1. How do we locate that we are in an C stile initialization? Currently, CC only remember the "{}" pair for function bodies and class definition.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

ToApolytoXaos

Quote from: ollydbg on June 09, 2014, 03:36:34 PM
You mean:
http://www.dribin.org/dave/blog/archives/2010/05/15/c99_syntax/

NSPoint point = { .x = 0, .y = 0};

?
Yes, exactly.

Quote from: ollydbg on June 09, 2014, 03:36:34 PM
1, we should know it is an initialization statement.
2, we are after the dot.
3, we are in a C file, but we have C99 option enabled.

The hardest part is 1. How do we locate that we are in an C stile initialization? Currently, CC only remember the "{}" pair for function bodies and class definition.
As far as I know, GCC currently has C99/C11 features added (enabled?) in C by default and currently waiting to incorporate C11 as their default flag.

Should not it work since point #3 is partially available by default?