NO

Author Topic: Version 6.50, Release Candidate #3 available  (Read 15234 times)

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Version 6.50, Release Candidate #3 available
« on: November 20, 2010, 05:19:47 PM »
Pelles C version 6.50, Release Candidate #3, is now available for download:
http://www.smorgasbordet.com/pellesc/download.htm

  • Fixed C runtime problem with localtime() and time zones ( GetTimeZoneInformation(), day-in-month format; mainly for Europe ).
  • Fixed C runtime problem with memmove() for overlapping buffers (backward copy), where the number of bytes to copy was even smaller than the bytes needed to dword-align the destination pointer ( off-by-1 problem ).
  • Fixed compiler problem when the same fixed register was targeted to the result and second argument (not first argument), like in 'shl ecx,cl'.
  • Fixed compiler problem with volatile reference in 'useless' expression.
  • Fixed compiler problem with non-standard unsigned char/short bit-field assignment ( x.f1 = x.f2 = ... ).
  • Fixed compiler/optimizer problem with pointer aliasing.
  • Fixed compiler/optimizer problem with unwanted propagation of some small structures ( 1/2/4/8 byte(s) ).
  • Fixed compiler/optimizer problem with array address in global sub-expression elimination.
  • Fixed compiler/optimizer problem with impossible range check ( like: x < 1 && x > 8 ).
  • Fixed compiler problem where inlining of a function with inline assembly code, containing a conditional jump, lost the target label (inlining inline assembly code is a pretty bad idea, but that's another story).

Pelle
 
/Pelle

Online AlexN

  • Global Moderator
  • Member
  • *****
  • Posts: 394
    • Alex's Link Sammlung
Re: Version 6.50, Release Candidate #3 available
« Reply #1 on: November 20, 2010, 09:34:12 PM »
Thank you Pelle!!!

I will try it as soon as possible.  :)
best regards
 Alex ;)

whatsup

  • Guest
Re: Version 6.50, Release Candidate #3 available
« Reply #2 on: November 20, 2010, 10:42:26 PM »
thank you very much.
i'm lucy i've seen this :)

Online Vortex

  • Member
  • *
  • Posts: 802
    • http://www.vortex.masmcode.com
Re: Version 6.50, Release Candidate #3 available
« Reply #3 on: November 21, 2010, 12:58:19 AM »
Thanks for the new release candidate.
Code it... That's all...

AMIB

  • Guest
Re: Version 6.50, Release Candidate #3 available
« Reply #4 on: November 21, 2010, 09:31:05 PM »
Thanks for your nice compiler

I'm working on a graphical university project
There are two little problems I found:

1. The resource compiler doesn't understand RT_MANIFEST I should manually enter 24 instead.
( I'm using external res editor: ResEdit and everything else is OK )
It shows up following errors during compilation
Code: [Select]
PORC: F:\Project\C\AMIB Levels\rsrc.rc(91): warning: Unrecognized or misplaced token: (
PORC: F:\Project\C\AMIB Levels\rsrc.rc(91): warning: Unrecognized or misplaced token: (
PORC: F:\Project\C\AMIB Levels\rsrc.rc(91): warning: Unrecognized or misplaced token: )
....
PORC: F:\Project\C\AMIB Levels\rsrc.rc(91): warning: Unrecognized or misplaced token: "STRING"

2. DblClicking .ppj files opens it in HEX mode and it is not knows as project file
I have to use open command inside IDE to open project files.

Thanks again

Offline MrBcx

  • Global Moderator
  • Member
  • *****
  • Posts: 176
    • Bcx Basic to C/C++ Translator
Re: Version 6.50, Release Candidate #3 available
« Reply #5 on: November 22, 2010, 12:26:18 AM »
Hi Pelle,

I've spent several hours testing RC3 ... things are looking very good.

However, I am getting the following compile error on a small sample that has
always compiled and executed fine with earlier versions of Pelles C.   It currently
compiles and executes fine using several other compilers.

graph.c(310): fatal error: Internal error: spill_at_range()


Here is the complete source code:

// *********************************************************************
// Created with BCX32 - BASIC To C/C++ Translator (V) 6.2.2 (2010/10/24)
//                 BCX (c) 1999 - 2009 by Kevin Diggins
// *********************************************************************
//              Translated for compiling with a C Compiler
// *********************************************************************
#include <windows.h>    // Win32 Header File
#include <windowsx.h>   // Win32 Header File
#include <commctrl.h>   // Win32 Header File
#include <commdlg.h>    // Win32 Header File
#include <mmsystem.h>   // Win32 Header File
#include <shellapi.h>   // Win32 Header File
#include <shlobj.h>     // Win32 Header File
#include <richedit.h>   // Win32 Header File
#include <wchar.h>      // Win32 Header File
#include <objbase.h>    // Win32 Header File
#include <ocidl.h>      // Win32 Header File
#include <winuser.h>    // Win32 Header File
#include <olectl.h>     // Win32 Header File
#include <oaidl.h>      // Win32 Header File
#include <ole2.h>       // Win32 Header File
#include <oleauto.h>    // Win32 Header File
#include <conio.h>
#include <direct.h>
#include <ctype.h>
#include <io.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stddef.h>
#include <stdlib.h>
#include <setjmp.h>
#include <time.h>
#include <stdarg.h>
#include <process.h>


// ***************************************************
// Compiler Defines
// ***************************************************

// C++
#if defined( __cplusplus )
  #define overloaded
  #define C_EXPORT EXTERN_C __declspec(dllexport)
  #define C_IMPORT EXTERN_C __declspec(dllimport)
#else
  #define C_EXPORT __declspec(dllexport)
  #define C_IMPORT __declspec(dllimport)
#endif

// Open Watcom defs
#if defined( __WATCOM_CPLUSPLUS__ ) || defined( __TINYC__ )
  #define atanl atan
  #define sinl  sin
  #define cosl  cos
  #define tanl  tan
  #define asinl asin
  #define acosl acos
  #define log10l log10
  #define logl   log
  #define _fcloseall fcloseall
#endif

// Borland C++ 5.5.1 defs - bcc32.exe
#if defined( __BCPLUSPLUS__ )
  // ===== Borland Libraries ==========
  #include <dos.h>
  #pragma comment(lib,"import32.lib")
  #pragma comment(lib,"cw32.lib")
  // ==================================
#endif

// Microsoft VC++
#ifndef DECLSPEC_UUID
  #if (_MSC_VER >= 1100) && defined ( __cplusplus )
    #define DECLSPEC_UUID(x)    __declspec(uuid(x))
  #else
    #define DECLSPEC_UUID(x)
  #endif
#endif


#if !defined( __LCC__ )
// *************************************************
// Instruct Linker to Search Object/Import Libraries
// *************************************************
#pragma comment(lib,"kernel32.lib")
#pragma comment(lib,"user32.lib")
#pragma comment(lib,"gdi32.lib")
#pragma comment(lib,"comctl32.lib")
#pragma comment(lib,"advapi32.lib")
#pragma comment(lib,"winspool.lib")
#pragma comment(lib,"shell32.lib")
#pragma comment(lib,"ole32.lib")
#pragma comment(lib,"oleaut32.lib")
#pragma comment(lib,"uuid.lib")
#pragma comment(lib,"odbc32.lib")
#pragma comment(lib,"odbccp32.lib")
#pragma comment(lib,"winmm.lib")
#pragma comment(lib,"comdlg32.lib")
#pragma comment(lib,"imagehlp.lib")
#pragma comment(lib,"version.lib")
#else
#pragma lib <winspool.lib>
#pragma lib <shell32.lib>
#pragma lib <ole32.lib>
#pragma lib <oleaut32.lib>
#pragma lib <uuid.lib>
#pragma lib <odbc32.lib>
#pragma lib <odbccp32.lib>
#pragma lib <winmm.lib>
#pragma lib <imagehlp.lib>
#pragma lib <version.lib>
// *************************************************
// End of Object/Import Libraries To Search
// *************************************************
#endif
// *************************************************
//            User Defined Constants
// *************************************************

#define GRAPHPROPS_CLASS struct _GRAPHPROPS*
#define GRAPH_LEFT 0
#define GRAPH_RIGHT 1
#define CaptionName1 "BCX Graph Pseudo Control By Jeethu Rao"
#define ClassName1 "BCX_Graph"
#define ID_PUSH 1001
#define ID_FREEZE1 1002
#define ID_FREEZE2 1003
#define ID_GRAPH1 1004
#define ID_GRAPH2 1005
#define ID_TIMER1 1006
#define ID_Button1 ID_PUSH

// *************************************************
//          User Defined Types And Unions
// *************************************************

typedef struct _GraphProps
{
   POINT*   GraphPtr;
   POINT*   LGraphPtr;
   COLORREF  GraphColor;
   COLORREF  GridColor;
   UCHAR    UpdateInterval;
   UCHAR    StepSize;
   BOOL     Frozen;
   BOOL     Direction;
}GraphProps, *LPGRAPHPROPS;


// *************************************************
//                System Variables
// *************************************************


// *************************************************
//            User Global Variables
// *************************************************

static int     BCX_GetDiaUnit;
static int     BCX_cxBaseUnit;
static int     BCX_cyBaseUnit;
static int     BCX_ScaleX;
static int     BCX_ScaleY;
static int     OurTimer;
static HWND    Form1;
static HWND    Rect1;
static HWND    Rect2;
static HWND    Button1;
static HWND    Button2;
static HWND    Button3;



// *************************************************
//               Standard Macros
// *************************************************

#define DefaultFont ((BcxFont==0)?GetStockObject(DEFAULT_GUI_FONT):BcxFont)
#define BOR |
#define Show(Window)RedrawWindow(Window,0,0,0);ShowWindow(Window,SW_SHOW);


// *************************************************
//               Standard Prototypes
// *************************************************

void    Center (HWND,HWND=0,HWND=0);
char*   BCX_TmpStr(size_t);
char*   join (int, ... );
float   rnd (void);

// *************************************************
//               User Prototypes
// *************************************************

void    InitGraph (HWND, COLORREF, COLORREF, UCHAR, BOOL);
void    CloseGraph (HWND);
void    FreezeGraph (HWND, int);
BOOL    IsGraphFrozen (HWND);
void    UpdateGraph (HWND, int, int);
void    DrawGraph (HWND);
int     WINAPI WinMain (HINSTANCE, HINSTANCE, LPSTR, int);
LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM);
void    FormLoad (HINSTANCE);


// *************************************************
//            User Global Initialized Arrays
// *************************************************



// *************************************************
//                 Runtime Functions
// *************************************************

char *BCX_TmpStr (size_t Bites)
{
  static int   StrCnt;
  static char *StrFunc[2048];
  StrCnt=(StrCnt + 1) & 2047;
  if(StrFunc[StrCnt]) free (StrFunc[StrCnt]);
  return StrFunc[StrCnt]=(char*)calloc(Bites+128,sizeof(char));
}


char * join(int n, ...)
{
  register int i = n, tmplen = 0;
  register char *s_;
  register char *strtmp;
  va_list marker;
  va_start(marker, n); // Initialize variable arguments
  while(i-- > 0)
  {
    s_ = va_arg(marker, char *);
    if(s_) tmplen += strlen(s_);
  }
  strtmp = BCX_TmpStr(tmplen);
  va_end(marker); // Reset variable arguments
  i = n;
  va_start(marker, n); // Initialize variable arguments
  while(i-- > 0)
  {
    s_ = va_arg(marker, char *);
    if(s_) strcat(strtmp, s_);
  }
  va_end(marker); // Reset variable arguments
  return strtmp;
}


float rnd (void)
{
  return (float)rand()/RAND_MAX;
}


void Center (HWND hwnd, HWND Xhwnd, HWND Yhwnd)
{
  RECT rect, rectP;
  int  x, y, width, height;
  int  screenwidth, screenheight;
  if(Xhwnd==0)
    {
      RECT  DesktopArea;
      RECT  rc;
      SystemParametersInfo(SPI_GETWORKAREA,0,&DesktopArea,0);
      GetWindowRect(hwnd,&rc);
      SetWindowPos(hwnd,HWND_TOP,
        ((DesktopArea.right-DesktopArea.left)-(rc.right-rc.left))/2+
          DesktopArea.left,((DesktopArea.bottom-DesktopArea.top)-
         (rc.bottom-rc.top))/2 + DesktopArea.top,0,0,SWP_NOSIZE);
      return;
    }
  GetWindowRect (hwnd,&rect);
  GetWindowRect (Xhwnd,&rectP);
  width = rect.right-rect.left;
  x = ((rectP.right-rectP.left)-width)/2 + rectP.left;
  if(Yhwnd==NULL)
    {
      height = rect.bottom-rect.top;
      y = ((rectP.bottom-rectP.top)-height)/2 + rectP.top;
    }
  else
    {
      GetWindowRect(Yhwnd,&rectP);
      height = rect.bottom-rect.top;
      y = ((rectP.bottom-rectP.top)-height)/2+rectP.top;
    }
  screenwidth = GetSystemMetrics(SM_CXSCREEN);
  screenheight = GetSystemMetrics(SM_CYSCREEN);
  if ((x<0)) x=0;
  if ((y<0)) y=0;
  if ((x+width>screenwidth))   x = screenwidth-width;
  if ((y+height>screenheight)) y = screenheight-height;
  MoveWindow (hwnd, x, y, width, height, FALSE);
}



// ************************************
//       User Subs and Functions
// ************************************


void InitGraph (HWND hWnd, COLORREF GRColor, COLORREF GridColor, UCHAR StepSize, BOOL Direction)
{
   GraphProps*  GraphPropSet;
   POINT*   GPtr;
   RECT     rc;
   VOID*    LGPtr;
   long     lx;
  GraphPropSet=(GraphProps*)malloc(sizeof(GraphProps));
  GetClientRect(hWnd, &rc);
  GPtr=(POINT*)malloc(sizeof(POINT)*(rc.right-rc.left/StepSize)+1);
  if(Direction==GRAPH_LEFT)
    {
      for(lx=0; lx<=((rc.right-rc.left)/StepSize); lx+=1)
        {
          GPtr[lx].x=lx*StepSize;
          GPtr[lx].y=rc.bottom-rc.top;
        }
    }
  else
    {
      for(lx=((rc.right-rc.left)/StepSize); lx>=0; lx+=-1)
        {
          GPtr[lx].x=lx*StepSize;
          GPtr[lx].y=rc.bottom-rc.top;
        }
    }
  LGPtr=malloc(sizeof(POINT)*(rc.right-rc.left/StepSize)+1);
  memset(LGPtr,0,sizeof(POINT)*(rc.right-rc.left/StepSize)+1);
  GraphPropSet->GraphPtr=GPtr;
  GraphPropSet->LGraphPtr=(LPPOINT)LGPtr;
  GraphPropSet->GraphColor=GRColor;
  GraphPropSet->GridColor=GridColor;
  GraphPropSet->Frozen=FALSE;
  GraphPropSet->StepSize=StepSize;
  GraphPropSet->Direction=Direction;
  SetProp(hWnd,"GraphProps",GraphPropSet);
  ShowWindow(hWnd,SW_SHOW);
  DrawGraph(hWnd);
}


void CloseGraph (HWND hWnd)
{
   GraphProps*  tmp;
   VOID*    DestPtr;
  tmp=(GraphProps*)GetProp(hWnd,"GraphProps");
  DestPtr=tmp->GraphPtr;
  DestPtr=tmp->LGraphPtr;
  RemoveProp(hWnd,"GraphProps");
}


void FreezeGraph (HWND hWnd, int FreezeStatus)
{
   GraphProps*  Gprops;
  Gprops=(GraphProps*)GetProp(hWnd,"GraphProps");
  if(FreezeStatus)
    {
      Gprops->Frozen=TRUE;
    }
  else
    {
      Gprops->Frozen=FALSE;
    }
}


BOOL IsGraphFrozen (HWND hWnd)
{
   GraphProps*  Gprops;
  Gprops=(GraphProps*)GetProp(hWnd,"GraphProps");
  return Gprops->Frozen;
}


void UpdateGraph (HWND hWnd, int UpdtVal, int MaxVal)
{
   RECT     rc;
   long     WindowSizeX;
   long     WindowSizeY;
  GetClientRect(hWnd, &rc);
  WindowSizeX=rc.right-rc.left;
  WindowSizeY=rc.bottom-rc.top;
   POINT*   pntarray;
   POINT*   lpointarray;
   GraphProps*  PropSet;
   POINT*   tmp_pntr1;
   POINT*   tmp_pntr2;
  int     lx;
  int     locSteps;
  if(UpdtVal>MaxVal)
    {
      UpdtVal=MaxVal;
    }
  PropSet=(GraphProps*)GetProp(hWnd,"GraphProps");
  if(PropSet->Frozen==TRUE)
    {
      return;
    }
  pntarray=PropSet->GraphPtr;
  lpointarray=PropSet->LGraphPtr;
  locSteps=PropSet->StepSize;
  if(PropSet->Direction==GRAPH_LEFT)
    {
      lpointarray->y=WindowSizeY-((WindowSizeY*UpdtVal)/MaxVal);
      for(lx=1; lx<=(WindowSizeX/PropSet->StepSize); lx+=1)
        {
          (lpointarray+lx)->y=(pntarray+(lx-1))->y;
        }
      for(lx=0; lx<=(WindowSizeX/PropSet->StepSize); lx+=1)
        {
          (pntarray+lx)->y=(lpointarray+lx)->y;
        }
    }
  else
    {
      (lpointarray+(WindowSizeX/PropSet->StepSize))->y=WindowSizeY-((WindowSizeY*UpdtVal)/MaxVal);
      for(lx=(WindowSizeX/PropSet->StepSize)-1; lx>=0; lx+=-1)
        {
          (lpointarray+lx)->y=(pntarray+(lx+1))->y;
        }
      for(lx=(WindowSizeX/PropSet->StepSize); lx>=0; lx+=-1)
        {
          (pntarray+lx)->y=(lpointarray+lx)->y;
        }
    }
}


void DrawGraph (HWND hWnd)
{
   RECT     rc;
   HPEN     hPen1;
   HPEN     hPen2;
   HBITMAP  MemBM;
   HBITMAP  OldBM;
   HBRUSH   black_brush;
   HDC      MemDC;
   HDC      ScreenDC;
   HGDIOBJ  GdiObj;
   GraphProps*  PropSet;
   long     WindowSizeX;
   long     WindowSizeY;
  int     x;
   long     y;
   long     SpacingX;
   long     SpacingY;
  GetClientRect(hWnd, &rc);
  PropSet=(GraphProps*)GetProp(hWnd,"GraphProps");
  WindowSizeX=rc.right-rc.left;
  WindowSizeY=rc.bottom-rc.top;
  black_brush=CreateSolidBrush(RGB(0,0,0));
  hPen1=CreatePen(PS_SOLID,2,PropSet->GridColor);
  hPen2=CreatePen(PS_SOLID,1,PropSet->GraphColor);
  ScreenDC=GetDC(hWnd);
  MemDC=CreateCompatibleDC(ScreenDC);
  MemBM=CreateCompatibleBitmap(ScreenDC,rc.right-rc.left,rc.bottom-rc.top);
  OldBM=(HBITMAP)SelectObject(MemDC,MemBM);
  FillRect(MemDC, &rc,black_brush);
  SpacingX=10;
  SpacingY=10;
  SelectObject(MemDC,hPen1);
  for(x=0; SpacingX>=0 ? x<=WindowSizeX : x>=WindowSizeX; x+=SpacingX)
    {
      MoveToEx(MemDC,x,0,NULL);
      LineTo(MemDC,x,WindowSizeY);
    }
  for(y=0; SpacingY>=0 ? y<=WindowSizeY : y>=WindowSizeY; y+=SpacingY)
    {
      MoveToEx(MemDC,0,y,NULL);
      LineTo(MemDC,WindowSizeX,y);
    }
  SelectObject(MemDC,hPen2);
  Polyline(MemDC,PropSet->GraphPtr,(WindowSizeX/PropSet->StepSize)+1);
  BitBlt(ScreenDC,rc.left,rc.top,rc.right-rc.left,rc.bottom-rc.top,MemDC,0,0,SRCCOPY);
  GdiObj=SelectObject(MemDC,OldBM);
  ReleaseDC(hWnd,ScreenDC);
  DeleteDC(MemDC);
  DeleteObject(black_brush);
  DeleteObject(hPen1);
  DeleteObject(hPen2);
  DeleteObject(OldBM);
  DeleteObject(MemBM);
  DeleteObject(GdiObj);
}


int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR CmdLine, int CmdShow)
{
   WNDCLASS  Wc;
   MSG      Msg;
  Wc.style=CS_HREDRAW BOR CS_VREDRAW BOR CS_DBLCLKS;
  Wc.lpfnWndProc=WndProc;
  Wc.cbClsExtra=0;
  Wc.cbWndExtra=0;
  Wc.hInstance=hInst;
  Wc.hIcon=LoadIcon(NULL,IDI_WINLOGO);
  Wc.hCursor=LoadCursor(NULL,IDC_ARROW);
  Wc.hbrBackground=GetSysColorBrush(COLOR_BTNFACE);
  Wc.lpszMenuName=NULL;
  Wc.lpszClassName=ClassName1;
  RegisterClass( &Wc);
  FormLoad(hInst);
  while(GetMessage( &Msg,NULL,0,0))
    {
      if(!IsWindow(GetActiveWindow())||!IsDialogMessage(GetActiveWindow(), &Msg))
        {
          TranslateMessage( &Msg);
          DispatchMessage( &Msg);
        }
    }
  return Msg.wParam;
}


LRESULT CALLBACK WndProc (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{
  for(;;)
  {
    if(Msg==WM_TIMER)
      {
        UpdateGraph(Rect1,rnd()*50,50);
        DrawGraph(Rect1);
        UpdateGraph(Rect2,rnd()*50,50);
        DrawGraph(Rect2);
        return 0;
      }
    if(Msg==WM_COMMAND)
      {
        if(LOWORD(wParam)==ID_PUSH)
          {
            if(OurTimer==0)
              {
                OurTimer=SetTimer(Form1,1,33,0);
                SetWindowText(Button1,"Stop All");
                EnableWindow(Button2,TRUE);
                EnableWindow(Button3,TRUE);
                if(OurTimer==0)
                  {
                    MessageBox(Form1,"Cannot Create Timer","Error",MB_OK);
                    PostQuitMessage(0);
                  }
              }
            else
              {
                KillTimer(Form1,OurTimer);
                OurTimer=0;
                SetWindowText(Button1,"Start All");
                EnableWindow(Button2,FALSE);
                EnableWindow(Button3,FALSE);
              }
          }
        else if(LOWORD(wParam)==ID_FREEZE1)
          {
            if(IsGraphFrozen(Rect1)==FALSE)
              {
                FreezeGraph(Rect1,1);
                SetWindowText(Button2,"Thaw Graph1");
              }
            else
              {
                FreezeGraph(Rect1,0);
                SetWindowText(Button2,"Freeze Graph1");
              }
          }
        else if(LOWORD(wParam)==ID_FREEZE2)
          {
            if(IsGraphFrozen(Rect2)==FALSE)
              {
                FreezeGraph(Rect2,1);
                SetWindowText(Button3,"Thaw Graph2");
              }
            else
              {
                FreezeGraph(Rect2,0);
                SetWindowText(Button3,"Freeze Graph2");
              }
          }
        return 0;
      }
    if(Msg==WM_CLOSE)
      {
        static int     id;
        memset(&id,0,sizeof(id));
        id=MessageBox(hWnd,"Are you sure?","Quit Program!",MB_YESNO);
        if(id==IDYES)
          {
            DestroyWindow(hWnd);
          }
        return 0;
      }
    if(Msg==WM_DESTROY)
      {
        CloseGraph(Rect1);
        CloseGraph(Rect2);
        PostQuitMessage(0);
        return 0;
      }
    if(Msg==WM_PAINT)
      {
        DrawGraph(Rect1);
        DrawGraph(Rect2);
      }
    break;
  }
  return DefWindowProc(hWnd, Msg, wParam, lParam);
}


void FormLoad (HINSTANCE hInst)
{
  BCX_GetDiaUnit=GetDialogBaseUnits();
  BCX_cxBaseUnit=LOWORD(BCX_GetDiaUnit);
  BCX_cyBaseUnit=HIWORD(BCX_GetDiaUnit);
  BCX_ScaleX=BCX_cxBaseUnit/4;
  BCX_ScaleY=BCX_cyBaseUnit/8;
  Form1=CreateWindow(ClassName1,CaptionName1,DS_MODALFRAME BOR WS_POPUP BOR WS_CAPTION BOR WS_SYSMENU,0,0,195*BCX_ScaleX,90*BCX_ScaleY,NULL,(HMENU)NULL,hInst,NULL);
  Rect1=CreateWindowEx(0,"static","",WS_CHILD BOR SS_NOTIFY BOR WS_VISIBLE BOR SS_BLACKRECT BOR SS_OWNERDRAW,5,10,90*BCX_ScaleX,50*BCX_ScaleY,Form1,(HMENU)ID_GRAPH1,hInst,NULL);
  Rect2=CreateWindowEx(0,"static","",WS_CHILD BOR SS_NOTIFY BOR WS_VISIBLE BOR SS_BLACKRECT BOR SS_OWNERDRAW,100*BCX_ScaleX,10,90*BCX_ScaleX,50*BCX_ScaleY,Form1,(HMENU)ID_GRAPH2,hInst,NULL);
  InitGraph(Rect1,RGB(0,0,255),RGB(0,100,0),3,GRAPH_LEFT);
  InitGraph(Rect2,RGB(255,0,0),RGB(0,100,0),7,GRAPH_RIGHT);
  Button1=CreateWindowEx(0,"button","Start All",WS_CHILD BOR WS_TABSTOP BOR BS_PUSHBUTTON BOR WS_VISIBLE,75*BCX_ScaleX,60*BCX_ScaleY,40*BCX_ScaleX,14*BCX_ScaleY,Form1,(HMENU)ID_Button1,hInst,NULL);
  SendMessage(Button1,(UINT)WM_SETFONT,(WPARAM)GetStockObject(DEFAULT_GUI_FONT),(LPARAM)MAKELPARAM(FALSE,0));
  Button2=CreateWindowEx(0,"button","Freeze Graph1",WS_CHILD BOR WS_TABSTOP BOR BS_PUSHBUTTON BOR WS_VISIBLE,25*BCX_ScaleX,60*BCX_ScaleY,50*BCX_ScaleX,14*BCX_ScaleY,Form1,(HMENU)ID_FREEZE1,hInst,NULL);
  SendMessage(Button2,(UINT)WM_SETFONT,(WPARAM)GetStockObject(DEFAULT_GUI_FONT),(LPARAM)MAKELPARAM(FALSE,0));
  Button3=CreateWindowEx(0,"button","Freeze Graph2",WS_CHILD BOR WS_TABSTOP BOR BS_PUSHBUTTON BOR WS_VISIBLE,125*BCX_ScaleX,60*BCX_ScaleY,50*BCX_ScaleX,14*BCX_ScaleY,Form1,(HMENU)ID_FREEZE2,hInst,NULL);
  SendMessage(Button3,(UINT)WM_SETFONT,(WPARAM)GetStockObject(DEFAULT_GUI_FONT),(LPARAM)MAKELPARAM(FALSE,0));
  EnableWindow(Button2,FALSE);
  EnableWindow(Button3,FALSE);
  Center(Form1);
  Show(Form1);
}






Bcx Basic to C/C++ Translator
https://www.BcxBasicCoders.com

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Re: Version 6.50, Release Candidate #3 available
« Reply #6 on: November 22, 2010, 09:00:24 PM »
May the source be with you

lamer

  • Guest
Re: Version 6.50, Release Candidate #3 available
« Reply #7 on: November 22, 2010, 09:07:03 PM »
May I add my fly to the ointment?
The program still does not recognize Libraries and Includes folders other, than default. No matter what folder you add and where it is located - if the LIB file is not in PellesC\Lib folder - you get POLINK: fatal error: File not found: 'somefile.lib'. The same with includes.
It happens both on Windows XP SP3 and Windows 7 Ultimate with 32-bit version. Still haven't try 64-bit.

lamer

  • Guest
Re: Version 6.50, Release Candidate #3 available
« Reply #8 on: November 23, 2010, 10:00:09 PM »
This has happened 7-8 times today:

No matter what I do with resource file: change placement of control on dialog, add bitmap - any operation results in this message and, the worst, RC file is totally deleted. Fortunately I've had a backup copy. Images are stored in the subfolder "images", in RC file it looks like
Code: [Select]
IDR_ICO_MAIN ICON "images\\note_pinned.ico"May be this is the reason for error?
One more thing: intellisence for structures (my own) members works very slowly or does not works at all. After typing period or -> IDE just freezes for about 20-30 seconds and... nothing. Next time the same operation with the same variable of the same structure DOES brings up intellisence window.
And the last one: please, remove the pink background from the line of code when I press F5 in debugging!

(version 32 bit on XP SP3)

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: Version 6.50, Release Candidate #3 available
« Reply #9 on: November 28, 2010, 08:07:19 PM »
1. The resource compiler doesn't understand RT_MANIFEST I should manually enter 24 instead.
As it shouldn't; the preprocessor may turn RT_MANIFEST into 24 with some luck, but the correct way is to use the resource compiler keyword manifest.

2. DblClicking .ppj files opens it in HEX mode and it is not knows as project file
I have to use open command inside IDE to open project files.
I works for me...
/Pelle

ianammo

  • Guest
Re: Version 6.50, Release Candidate #3 available
« Reply #10 on: November 29, 2010, 11:31:36 PM »
Are any of the new SSE/2/3/4 intrinsics (_mm_add_ps etc) going to be made available on the 32-bit version, or only on the 64-bit version, and we have to use assembly on the 32-bit version?

Thanks.

lamer

  • Guest
Re: Version 6.50, Release Candidate #3 available
« Reply #11 on: November 29, 2010, 11:38:49 PM »
Not all local variables are shown under "Locals" tab in debug. For example, I have 6 local variables, but only 3 of them are shown. The same about "Auto" tab. Attempt to add missing variable to "Watch" results in "ERROR IN EXPRESSION". I have to output them with OutputDebugString or something else and this is very inconveniently.
Not such was the picture in previous versions.
Here is example (just dummy proc I've tried right now):
Code: [Select]
static void Procedure(void)
{
BOOL                    found = FALSE;
int            result = 0;
wchar_t            buffer[256];
ISpObjectToken     *pToken = NULL;

result = 1;
if(result == 1)
found = TRUE;
else
found = FALSE;
}
The breakpoint is on the line "found = TRUE;". I run the program, stop on breakpoint - nothing in "Locals", nothing in "Auto"
« Last Edit: November 29, 2010, 11:47:31 PM by lamer »

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Re: Version 6.50, Release Candidate #3 available
« Reply #12 on: November 30, 2010, 05:55:16 AM »
Take optimization off if you want see those variables.
If look optimized code in disassembly you see there is only ret code in that function and variables are useless.
May the source be with you

lamer

  • Guest
Re: Version 6.50, Release Candidate #3 available
« Reply #13 on: November 30, 2010, 10:18:03 AM »
timovjl ,
thank you for tip :)

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Re: Version 6.50, Release Candidate #3 available
« Reply #14 on: December 05, 2010, 05:56:01 PM »
problems with this code:
Code: [Select]
#include <stdio.h>

/*
test_readfile1.txt
1
"Test1"
"\My Flash Disk\test1.exe"
2
"Test2"
"\My Flash Disk\test2.exe"
*/

int main(int argc, char **argv)
{
char *fmt = "%d %200[^\n]\n %200[^\n]\n";
char *fmtw = "%d %200l[^\n]\n %200l[^\n]\n";

int n, i;
char s1[200], s2[200];
wchar_t ws1[200], ws2[200];

FILE *fp = fopen("test_readfile1.txt", "r");
if (fp) {
while (!feof(fp)) {
if ((n = fscanf(fp, fmt, &i, &s1, &s2)) <= 0) break;
printf("%d %s %s\n", i, s1, s2);
if ((n = fscanf(fp, fmtw, &i, &ws1, &ws2)) <= 0) break;
printf("%d %ls %ls\n", i, ws1, ws2);
}
fclose(fp);
}
return 0;
}
expect to print this:
Code: [Select]
1 "Test1" "\My Flash Disk\test1.exe"
2 "Test2" "\My Flash Disk\test2.exe"
May the source be with you