void Project::RemoveSystemInclude(const char *path) { if (!path) return; BString abspath(path); abspath.ReplaceFirst("<project>",fPath.GetFolder()); if (abspath[0] != '/') { abspath.Prepend("/"); abspath.Prepend(fPath.GetFolder()); } STRACE(1,("%s: Attempting to remove system include %s\n",GetName(),path)); for (int32 i = 0; i < fSystemIncludeList.CountItems(); i++) { BString *str = fSystemIncludeList.ItemAt(i); if (str && str->Compare(abspath) == 0) { STRACE(1,("%s: Removed %s\n",GetName(),path)); fSystemIncludeList.RemoveItemAt(i); delete str; return; } } }
click_type WinDecorator::Clicked(BPoint pt, int32 buttons, int32 modifiers) { if (fCloseRect.Contains(pt)) { STRACE(("WinDecorator():Clicked() - Close\n")); return CLICK_CLOSE; } if (fZoomRect.Contains(pt)) { STRACE(("WinDecorator():Clicked() - Zoom\n")); return CLICK_ZOOM; } // Clicking in the tab? if (fTabRect.Contains(pt)) { // Here's part of our window management stuff /* TODO This is missing CLICK_MOVETOFRONT if(buttons==B_PRIMARY_MOUSE_BUTTON && !IsFocus()) return CLICK_MOVETOFRONT; */ return CLICK_DRAG; } // We got this far, so user is clicking on the border? if (fBorderRect.Contains(pt) && !fFrame.Contains(pt)) { STRACE(("WinDecorator():Clicked() - Resize\n")); return CLICK_RESIZE; } // Guess user didn't click anything STRACE(("WinDecorator():Clicked()\n")); return CLICK_NONE; }
bool ResourceToAttribute(BFile &file, BResources &res,type_code code, const char *name) { if (!name) return false; int32 id; size_t length; if (res.GetResourceInfo(code,name,&id,&length)) { const void *buffer = res.LoadResource(code,name,&length); if (!buffer) { STRACE(2,("Resource %s exists, but couldn't be loaded\n",name)); return false; } file.WriteAttr(name,code,0,buffer,length); STRACE(2,("Successfully wrote attribute %s\n",name)); return true; } else { STRACE(2,("Resource %s doesn't exist\n",name)); } return false; }
status_t CDDBData::Save(const char *filename) { if (!filename) { STRACE(("CDDBData::Save failed - NULL filename\n")); return B_ERROR; } BFile file(filename, B_READ_WRITE | B_CREATE_FILE | B_ERASE_FILE); if (file.InitCheck() != B_OK) { STRACE(("CDDBData::Save failed - couldn't create file %s\n", filename)); return file.InitCheck(); } BString entry; char timestring[10]; sprintf(timestring,"%.2" B_PRId32 ":%.2" B_PRId32 "", fDiscTime.GetMinutes(), fDiscTime.GetSeconds()); entry << fArtist << " - " << fAlbum << "\t" << timestring << "\n"; file.Write(entry.String(), entry.Length()); STRACE(("CDDBData::Save: wrote first line: %s", entry.String())); BString tracksattr(fArtist); tracksattr << " - " << fAlbum << "\n"; for (int32 i = 0; i < fTrackList.CountItems(); i++) { BString *trackstr = (BString *)fTrackList.ItemAt(i); CDAudioTime *time= (CDAudioTime*)fTimeList.ItemAt(i); if (!trackstr || !time) continue; entry = *trackstr; sprintf(timestring,"%.2" B_PRId32 ":%.2" B_PRId32 "", time->GetMinutes(), time->GetSeconds()); entry << "\t" << timestring << "\n"; file.Write(entry.String(), entry.Length()); STRACE(("CDDBData::Save: Wrote line: %s", entry.String())); tracksattr << *trackstr << "\n"; } file.WriteAttr("CD:key", B_INT32_TYPE, 0, &fDiscID, sizeof(int32)); STRACE(("CDDBData::Save: Wrote CD identifier: %" B_PRId32 "(%" B_PRIx32 ")\n", fDiscID, fDiscID)); file.WriteAttr("CD:tracks", B_STRING_TYPE, 0, tracksattr.String(), tracksattr.Length() + 1); if (fGenre.CountChars() > 0) file.WriteAttr("Audio:Genre",B_STRING_TYPE, 0, fGenre.String(), fGenre.Length() + 1); if (fYear > 0) file.WriteAttr("Audio:Year", B_INT32_TYPE, 0, &fYear, sizeof(int32)); return B_OK; }
// TODO: get rid of DesktopSettings here, and introduce private accessor // methods to the Decorator base class TabDecorator::TabDecorator(DesktopSettings& settings, BRect frame) : Decorator(settings, frame), fOldMovingTab(0, 0, -1, -1), // focus color constants kFocusFrameColor(settings.UIColor(B_WINDOW_BORDER_COLOR)), kFocusTabColor(settings.UIColor(B_WINDOW_TAB_COLOR)), kFocusTabColorLight(tint_color(kFocusTabColor, (B_LIGHTEN_MAX_TINT + B_LIGHTEN_2_TINT) / 2)), kFocusTabColorBevel(tint_color(kFocusTabColor, B_LIGHTEN_2_TINT)), kFocusTabColorShadow(tint_color(kFocusTabColor, (B_DARKEN_1_TINT + B_NO_TINT) / 2)), kFocusTextColor(settings.UIColor(B_WINDOW_TEXT_COLOR)), // non-focus color constants kNonFocusFrameColor(settings.UIColor(B_WINDOW_INACTIVE_BORDER_COLOR)), kNonFocusTabColor(settings.UIColor(B_WINDOW_INACTIVE_TAB_COLOR)), kNonFocusTabColorLight(tint_color(kNonFocusTabColor, (B_LIGHTEN_MAX_TINT + B_LIGHTEN_2_TINT) / 2)), kNonFocusTabColorBevel(tint_color(kNonFocusTabColor, B_LIGHTEN_2_TINT)), kNonFocusTabColorShadow(tint_color(kNonFocusTabColor, (B_DARKEN_1_TINT + B_NO_TINT) / 2)), kNonFocusTextColor(settings.UIColor(B_WINDOW_INACTIVE_TEXT_COLOR)) { STRACE(("TabDecorator:\n")); STRACE(("\tFrame (%.1f,%.1f,%.1f,%.1f)\n", frame.left, frame.top, frame.right, frame.bottom)); // TODO: If the decorator was created with a frame too small, it should // resize itself! }
click_type WinDecorator::Clicked(BPoint where, int32 buttons, int32 modifiers) { if (!(fFlags & B_NOT_CLOSABLE) && fCloseRect.Contains(where)) return CLICK_CLOSE; if (!(fFlags & B_NOT_ZOOMABLE) && fZoomRect.Contains(where)) return CLICK_ZOOM; // Clicking in the tab? if (fTabRect.Contains(where)) { // Here's part of our window management stuff /* TODO This is missing CLICK_MOVETOFRONT if(buttons==B_PRIMARY_MOUSE_BUTTON && !IsFocus()) return CLICK_MOVETOFRONT; */ return CLICK_DRAG; } // We got this far, so user is clicking on the border? if (fBorderRect.Contains(where) && !fFrame.Contains(where)) { STRACE(("WinDecorator():Clicked() - Resize\n")); if (!(fFlags & B_NOT_RESIZABLE) && (fLook == B_TITLED_WINDOW_LOOK || fLook == B_FLOATING_WINDOW_LOOK || fLook == B_MODAL_WINDOW_LOOK)) { return CLICK_RESIZE; } } // Guess user didn't click anything STRACE(("WinDecorator():Clicked()\n")); return CLICK_NONE; }
status_t LinkReceiver::AdjustReplyBuffer(bigtime_t timeout) { // Here we take advantage of the compiler's dead-code elimination if (kInitialBufferSize == kMaxBufferSize) { // fixed buffer size if (fRecvBuffer != NULL) return B_OK; fRecvBuffer = (char *)malloc(kInitialBufferSize); if (fRecvBuffer == NULL) return B_NO_MEMORY; fRecvBufferSize = kInitialBufferSize; } else { STRACE(("info: LinkReceiver getting port_buffer_size().\n")); ssize_t bufferSize; do { bufferSize = port_buffer_size_etc(fReceivePort, timeout == B_INFINITE_TIMEOUT ? B_RELATIVE_TIMEOUT : 0, timeout); } while (bufferSize == B_INTERRUPTED); STRACE(("info: LinkReceiver got port_buffer_size() = %ld.\n", bufferSize)); if (bufferSize < 0) return (status_t)bufferSize; // make sure our receive buffer is large enough if (bufferSize > fRecvBufferSize) { if (bufferSize <= (ssize_t)kInitialBufferSize) bufferSize = (ssize_t)kInitialBufferSize; else bufferSize = (bufferSize + B_PAGE_SIZE - 1) & ~(B_PAGE_SIZE - 1); if (bufferSize > (ssize_t)kMaxBufferSize) return B_ERROR; // we can't continue STRACE(("info: LinkReceiver setting receive buffersize to %ld.\n", bufferSize)); char *buffer = (char *)malloc(bufferSize); if (buffer == NULL) return B_NO_MEMORY; free(fRecvBuffer); fRecvBuffer = buffer; fRecvBufferSize = bufferSize; } } return B_OK; }
void CDDBData::AddTrack(const char *track, const CDAudioTime &time, const int16 &index) { if (!track) { STRACE(("CDDBData::AddTrack failed - NULL name\n")); return; } STRACE(("CDDBData::AddTrack(%s, %ld:%.2ld,%d)\n", track, time.minutes, time.seconds, index)); fTrackList.AddItem(new BString(track)); fTimeList.AddItem(new CDAudioTime(time)); }
int select_reactor_base::remove_handle(ndk_handle handle, select_handle *&sh) { STRACE(""); if (sh->handle == handle) { select_handle *p = sh; sh = sh->next; this->release_handle(p); }else { select_handle *prev = sh; select_handle *itor = sh->next; while (itor != 0) { if (itor->handle == handle) { prev->next = itor->next; this->release_handle(itor); break; } prev = itor; itor = itor->next; } } return 0; }
status_t FindWindow::SetWorkingDirectory(BString path) { fWorkingDir = path; STRACE(2,("Set working directory for find: %s\n",fWorkingDir.String())); return B_OK; }
/*! \brief Actually draws the close button Unless a subclass has a particularly large button, it is probably unnecessary to check the update rectangle. \param tab The \a tab to update. \param direct Draw without double buffering. \param rect The area of the button to update. */ void WinDecorator::_DrawClose(Decorator::Tab* tab, bool direct, BRect rect) { STRACE(("_DrawClose(%f, %f, %f, %f)\n", rect.left, rect.top, rect.right, rect.bottom)); // Just like DrawZoom, but for a close button _DrawBeveledRect(rect, tab->closePressed); // Draw the X BRect closeBox(rect); closeBox.InsetBy(4, 4); closeBox.right--; closeBox.top--; if (true) closeBox.OffsetBy(1, 1); fDrawingEngine->SetHighColor(RGBColor(0, 0, 0)); fDrawingEngine->StrokeLine(closeBox.LeftTop(), closeBox.RightBottom()); fDrawingEngine->StrokeLine(closeBox.RightTop(), closeBox.LeftBottom()); closeBox.OffsetBy(1, 0); fDrawingEngine->StrokeLine(closeBox.LeftTop(), closeBox.RightBottom()); fDrawingEngine->StrokeLine(closeBox.RightTop(), closeBox.LeftBottom()); }
status_t DWindowHWInterface::Initialize() { status_t ret = HWInterface::Initialize(); if (!fRectParams || !fBlitParams) return B_NO_MEMORY; if (ret >= B_OK) { for (int32 i = 1; fCardFD != B_ENTRY_NOT_FOUND; i++) { fCardFD = _OpenGraphicsDevice(i); if (fCardFD < 0) { STRACE(("Failed to open graphics device\n")); continue; } if (_OpenAccelerant(fCardFD) == B_OK) break; close(fCardFD); // _OpenAccelerant() failed, try to open next graphics card } return fCardFD >= 0 ? B_OK : fCardFD; } return ret; }
WinDecorator::WinDecorator(DesktopSettings& settings, BRect rect, window_look look, uint32 flags) : Decorator(settings, rect, look, flags), taboffset(0) { _UpdateFont(settings); // common colors to both focus and non focus state frame_highcol = (rgb_color){ 255, 255, 255, 255 }; frame_midcol = (rgb_color){ 216, 216, 216, 255 }; frame_lowcol = (rgb_color){ 110, 110, 110, 255 }; frame_lowercol = (rgb_color){ 0, 0, 0, 255 }; // state based colors fFocusTabColor = settings.UIColor(B_WINDOW_TAB_COLOR); fFocusTextColor = settings.UIColor(B_WINDOW_TEXT_COLOR); fNonFocusTabColor = settings.UIColor(B_WINDOW_INACTIVE_TAB_COLOR); fNonFocusTextColor = settings.UIColor(B_WINDOW_INACTIVE_TEXT_COLOR); // Set appropriate colors based on the current focus value. In this case, // each decorator defaults to not having the focus. _SetFocus(); // Do initial decorator setup _DoLayout(); textoffset=5; STRACE(("WinDecorator()\n")); }
void TabDecorator::_GetFootprint(BRegion *region) { STRACE(("TabDecorator: GetFootprint\n")); // This function calculates the decorator's footprint in coordinates // relative to the view. This is most often used to set a Window // object's visible region. if (region == NULL) return; region->MakeEmpty(); if (fTopTab->look == B_NO_BORDER_WINDOW_LOOK) return; region->Include(fTopBorder); region->Include(fLeftBorder); region->Include(fRightBorder); region->Include(fBottomBorder); if (fTopTab->look == B_BORDERED_WINDOW_LOOK) return; region->Include(&fTabsRegion); if (fTopTab->look == B_DOCUMENT_WINDOW_LOOK) { // include the rectangular resize knob on the bottom right float knobSize = kResizeKnobSize - fBorderWidth; region->Include(BRect(fFrame.right - knobSize, fFrame.bottom - knobSize, fFrame.right, fFrame.bottom)); } }
void Project::AddLibrary(const char *path) { if (!path) return; DPath libpath(path); if (!BEntry(libpath.GetFullPath()).Exists()) { libpath = FindLibrary(libpath.GetFileName()); if (libpath.IsEmpty()) { if (gBuildMode) { printf("%s seems to be missing\n", path); } else { BString err; err << path << " seems to be missing. Do you want to remove it from the project?"; int32 result = ShowAlert(err.String(),"Remove","Keep"); if (result == 0) return; } } } if (!HasLibrary(libpath.GetFullPath())) { STRACE(1,("%s: Added library %s\n",GetName(),libpath.GetFullPath())); fLibraryList.AddItem(gFileFactory.CreateSourceFileItem(libpath.GetFullPath())); } }
status_t CDDBQuery::_IdentifySelf() { BString username, hostname; username = getenv("USER"); hostname = getenv("HOSTNAME"); if (username.Length() < 1) username = "******"; if (hostname.Length() < 1) hostname = "antares"; BString tmp; tmp << "cddb hello " << username << " " << hostname << " AntaresCDPlayer 1.0\n"; STRACE((">%s", tmp.String())); if (fSocket.Send(tmp.String(), tmp.Length())==-1) { _Disconnect(); return B_ERROR; } _ReadLine(tmp); return B_OK; }
void IndexServer::AddVolume(const BVolume& volume) { // ignore volumes like / or /dev if (volume.Capacity() == 0) return; // check if volume is already in our list for (int i = 0; i < fVolumeWatcherList.CountItems(); i++) { VolumeWatcher* current = fVolumeWatcherList.ItemAt(i); if (current->Volume() == volume) return; } char name[256]; volume.GetName(name); STRACE("IndexServer::AddVolume %s\n", name); VolumeWatcher* watcher = new VolumeWatcher(volume); /* if (!watcher->Enabled()) { delete watcher; return; }*/ fVolumeWatcherList.AddItem(watcher); _SetupVolumeWatcher(watcher); watcher->StartWatching(); }
void FindWindow::ReplaceAll(void) { // This function is called from the FinderThread function, so locking is // required when accessing any member variables. Lock(); BString errorLog; BString findText(fFindBox->Text()); BString replaceText(fReplaceBox->Text()); if (!fIsRegEx) { findText.CharacterEscape("^$()%.[]*+-?", '\\'); } BString replaceTerms; replaceTerms << "'" << findText << "' '" << replaceText << "'"; ShellHelper shell; shell << "pwd; find "; shell.AddEscapedArg(fWorkingDir); BString sStr("'s/"); sStr << findText.String() << "/"; sStr << replaceText.String() << "/"; sStr << "'"; shell << " -type f | xargs sed -i " << sStr.String(); STRACE(2,("Shell command: %s\n",shell.AsString().String())); Unlock(); BString out; shell.RunInPipe(out,false); STRACE(2,("Command output: %s\n",out.String())); if (errorLog.CountChars() > 0) { BString errorString = B_TRANSLATE("The following files had problems replacing the search terms:\n"); errorString << errorLog; ShowAlert(errorString.String()); } PostMessage(M_FIND); }
int select_reactor_base::reset_fd_set(fd_set *&rd_set, fd_set *&wr_set, fd_set *&ex_set) { STRACE(""); FD_ZERO(this->rd_set_); FD_ZERO(this->wr_set_); FD_ZERO(this->ex_set_); int result = -1; if (this->handle_list_rd_ == 0) rd_set = 0; else { rd_set = this->rd_set_; select_handle *itor = this->handle_list_rd_; while (itor != 0) { if (itor->handle != NDK_INVALID_HANDLE) { FD_SET(itor->handle, rd_set); if (itor->handle > result) result = itor->handle; } itor = itor->next; } } if (this->handle_list_wr_ == 0) wr_set = 0; else { wr_set = this->wr_set_; select_handle *itor = this->handle_list_wr_; while (itor != 0) { if (itor->handle != NDK_INVALID_HANDLE) { FD_SET(itor->handle, wr_set); if (itor->handle > result) result = itor->handle; } itor = itor->next; } } if (this->handle_list_ex_ == 0) ex_set = 0; else { ex_set = this->ex_set_; select_handle *itor = this->handle_list_ex_; while (itor != 0) { if (itor->handle != NDK_INVALID_HANDLE) { FD_SET(itor->handle, ex_set); if (itor->handle > result) result = itor->handle; } itor = itor->next; } } return result + 1; }
status_t LinkReceiver::ReadFromPort(bigtime_t timeout) { // we are here so it means we finished reading the buffer contents ResetBuffer(); status_t err = AdjustReplyBuffer(timeout); if (err < B_OK) return err; int32 code; ssize_t bytesRead; STRACE(("info: LinkReceiver reading port %ld.\n", fReceivePort)); while (true) { if (timeout != B_INFINITE_TIMEOUT) { do { bytesRead = read_port_etc(fReceivePort, &code, fRecvBuffer, fRecvBufferSize, B_TIMEOUT, timeout); } while (bytesRead == B_INTERRUPTED); } else { do { bytesRead = read_port(fReceivePort, &code, fRecvBuffer, fRecvBufferSize); } while (bytesRead == B_INTERRUPTED); } STRACE(("info: LinkReceiver read %ld bytes.\n", bytesRead)); if (bytesRead < B_OK) return bytesRead; // we just ignore incorrect messages, and don't bother our caller if (code != kLinkCode) { STRACE(("wrong port message %lx received.\n", code)); continue; } // port read seems to be valid break; } fDataSize = bytesRead; return B_OK; }
status_t LinkReceiver::GetNextMessage(int32 &code, bigtime_t timeout) { fReadError = B_OK; int32 remaining = fDataSize - (fRecvStart + fReplySize); STRACE(("info: LinkReceiver GetNextReply() reports %ld bytes remaining in buffer.\n", remaining)); // find the position of the next message header in the buffer message_header *header; if (remaining <= 0) { status_t err = ReadFromPort(timeout); if (err < B_OK) return err; remaining = fDataSize; header = (message_header *)fRecvBuffer; } else { fRecvStart += fReplySize; // start of the next message fRecvPosition = fRecvStart; header = (message_header *)(fRecvBuffer + fRecvStart); } // check we have a well-formed message if (remaining < (int32)sizeof(message_header)) { // we don't have enough data for a complete header STRACE(("error info: LinkReceiver remaining %ld bytes is less than header size.\n", remaining)); ResetBuffer(); return B_ERROR; } fReplySize = header->size; if (fReplySize > remaining || fReplySize < (int32)sizeof(message_header)) { STRACE(("error info: LinkReceiver message size of %ld bytes smaller than header size.\n", fReplySize)); ResetBuffer(); return B_ERROR; } code = header->code; fRecvPosition += sizeof(message_header); STRACE(("info: LinkReceiver got header %ld [%ld %ld %ld] from port %ld.\n", header->code, fReplySize, header->code, header->flags, fReceivePort)); return B_OK; }
bool CDDBData::RenameTrack(const int32 &index, const char *newName) { if (!newName) { STRACE(("CDDBData::RenameTrack failed - NULL newName\n")); return false; } BString *name = (BString*)fTrackList.ItemAt(index); if (name) { STRACE(("CDDBData::RenameTrack(%ld,%s)\n", index, newName)); name->SetTo(newName); return true; } STRACE(("CDDBData::RenameTrack failed - invalid index\n")); return false; }
/** * Gets the index of the constraint. * * @return the index of the constraint */ int32 Constraint::Index() const { int32 i = fLS->Constraints().IndexOf(this); if (i == -1) STRACE(("Constraint not part of fLS->Constraints().")); return i; }
void MacDecorator::Draw() { STRACE("MacDecorator::Draw()\n"); fDrawingEngine->SetDrawState(&fDrawState); _DrawFrame(fBorderRect); _DrawTab(fTabRect); }
void WinDecorator::_DoLayout() { STRACE(("WinDecorator()::_DoLayout()\n")); bool hasTab = false; fBorderRect=fFrame; fTabRect=fFrame; switch (Look()) { case B_MODAL_WINDOW_LOOK: fBorderRect.InsetBy(-4, -4); break; case B_TITLED_WINDOW_LOOK: case B_DOCUMENT_WINDOW_LOOK: hasTab = true; fBorderRect.InsetBy(-4, -4); break; case B_FLOATING_WINDOW_LOOK: hasTab = true; break; case B_BORDERED_WINDOW_LOOK: fBorderRect.InsetBy(-1, -1); break; default: break; } if (hasTab) { fBorderRect.top -= 19; fTabRect.top -= 19; fTabRect.bottom=fTabRect.top+19; fZoomRect=fTabRect; fZoomRect.top+=3; fZoomRect.right-=3; fZoomRect.bottom-=3; fZoomRect.left=fZoomRect.right-15; fCloseRect=fZoomRect; fZoomRect.OffsetBy(0-fZoomRect.Width()-3,0); fMinimizeRect=fZoomRect; fMinimizeRect.OffsetBy(0-fZoomRect.Width()-1,0); } else { fTabRect.Set(0.0, 0.0, -1.0, -1.0); fCloseRect.Set(0.0, 0.0, -1.0, -1.0); fZoomRect.Set(0.0, 0.0, -1.0, -1.0); fMinimizeRect.Set(0.0, 0.0, -1.0, -1.0); } }
void WinDecorator::Draw(BRect update) { STRACE(("WinDecorator::Draw(): ")); update.PrintToStream(); fDrawingEngine->SetDrawState(&fDrawState); _DrawFrame(update); _DrawTab(update); }
//! Forces a complete decorator update void TabDecorator::Draw() { STRACE(("TabDecorator: Draw()")); fDrawingEngine->SetDrawState(&fDrawState); _DrawFrame(fBorderRect); _DrawTabs(fTitleBarRect); }
void Project::RemoveLibrary(const char *path) { if (!path) return; STRACE(1,("%s: Attempting to remove %s\n",GetName(),path)); for (int32 i = 0; i < fLibraryList.CountItems(); i++) { SourceFile *file = (SourceFile*)fLibraryList.ItemAt(i); if (file && strcmp(file->GetPath().GetFullPath(),path) == 0) { STRACE(1,("%s: Removed %s\n",GetName(),path)); fLibraryList.RemoveItemAt(i); delete file; return; } } }
void WinDecorator::Draw(void) { STRACE(("WinDecorator::Draw()\n")); fDrawingEngine->SetDrawState(&fDrawState); _DrawFrame(fBorderRect); _DrawTab(fTabRect); }
void Project::UpdateResources(void) { DPath targetpath(fPath.GetFolder()); targetpath.Append(GetTargetName()); BString resFileString; int32 resCount = 0; for (int32 i = 0; i < CountGroups(); i++) { SourceGroup *group = GroupAt(i); for (int32 j = 0; j < group->filelist.CountItems(); j++) { SourceFile *file = group->filelist.ItemAt(j); if (file->GetResourcePath(fBuildInfo).GetFullPath()) { resFileString << "'" << file->GetResourcePath(fBuildInfo).GetFullPath() << "' "; resCount++; } } } if (resCount > 0) { BString resString = "xres -o "; resString << "'" << targetpath.GetFullPath() << "' " << resFileString; BString errmsg; PipeCommand(resString.String(),errmsg); STRACE(1,("Resources for %s:\n%s\nErrors:%s\n",GetName(),resString.String(),errmsg.String())); if (errmsg.CountChars() > 0) printf("Resource errors: %s\n",errmsg.String()); } else { STRACE(1,("Resources for %s: No resource files to add\n",GetName())); } }