flamp-2.2.12/0000775000175000017500000000000014607053767007717 500000000000000flamp-2.2.12/src/0000775000175000017500000000000014607053767010506 500000000000000flamp-2.2.12/src/Makefile.am0000664000175000017500000001461114563657712012466 00000000000000# Copyright (c) 2008 Dave Freese, W1HKJ (w1hkj AT w1hkj DOT com) bin_PROGRAMS = flamp MINGW32_SRC = flamp-rc.rc include/flamprc.h \ utils/mingw.c include/mingw.h include/compat.h \ utils/getsysinfo.c # Build the xmlrpcpp source if libflxmlrpc is not found XMLRPCPP_SRC = \ xmlrpcpp/XmlRpcBase64.h \ xmlrpcpp/XmlRpcClient.cpp \ xmlrpcpp/XmlRpcClient.h \ xmlrpcpp/XmlRpcDispatch.cpp \ xmlrpcpp/XmlRpcDispatch.h \ xmlrpcpp/XmlRpcException.h \ xmlrpcpp/XmlRpc.h \ xmlrpcpp/XmlRpcMutex.cpp \ xmlrpcpp/XmlRpcMutex.h \ xmlrpcpp/XmlRpcServerConnection.cpp \ xmlrpcpp/XmlRpcServerConnection.h \ xmlrpcpp/XmlRpcServer.cpp \ xmlrpcpp/XmlRpcServer.h \ xmlrpcpp/XmlRpcServerMethod.cpp \ xmlrpcpp/XmlRpcServerMethod.h \ xmlrpcpp/XmlRpcSocket.cpp \ xmlrpcpp/XmlRpcSocket.h \ xmlrpcpp/XmlRpcSource.cpp \ xmlrpcpp/XmlRpcSource.h \ xmlrpcpp/XmlRpcUtil.cpp \ xmlrpcpp/XmlRpcUtil.h \ xmlrpcpp/XmlRpcValue.cpp \ xmlrpcpp/XmlRpcValue.h # We distribute these but do not always compile them EXTRA_flamp_SOURCES = $(FLRIG_WIN32_RES_SRC) $(MINGW32_SRC) $(XMLRPCPP_SRC) flamp_SOURCES = if !ENABLE_FLXMLRPC flamp_SOURCES += $(XMLRPCPP_SRC) flamp_CPPFLAGS = @FLAMP_BUILD_CPPFLAGS@ flamp_CXXFLAGS = @FLAMP_BUILD_CXXFLAGS@ flamp_CFLAGS = $(flamp_CXXFLAGS) flamp_LDFLAGS = @FLAMP_BUILD_LDFLAGS@ flamp_LDADD = @FLAMP_BUILD_LDADD@ else flamp_CPPFLAGS = @FLAMP_BUILD_CPPFLAGS@ @FLXMLRPC_CFLAGS@ flamp_CXXFLAGS = @FLAMP_BUILD_CXXFLAGS@ @FLXMLRPC_CFLAGS@ flamp_CFLAGS = $(flamp_CXXFLAGS) flamp_LDFLAGS = @FLAMP_BUILD_LDFLAGS@ @FLXMLRPC_LIBS@ flamp_LDADD = @FLAMP_BUILD_LDADD@ endif if MINGW32 if HAVE_WINDRES flamp_SOURCES += $(MINGW32_SRC) endif endif ######################################################################## flamp_VERSION_MAJOR = @FLAMP_VERSION_MAJOR@ flamp_VERSION_MINOR = @FLAMP_VERSION_MINOR@ flamp_VERSION_PATCH = @FLAMP_VERSION_PATCH@ flamp_VERSION = @FLAMP_VERSION@ .EXPORT_ALL_VARIABLES: nsisinst appbundle # Sources that are generated, BUILT_SOURCES = # not distributed, nodist_flamp_SOURCES = $(BUILT_SOURCES) # and deleted by the clean targets CLEANFILES = $(BUILT_SOURCES) CLEAN_LOCAL = if MINGW32 if HAVE_WINDRES .rc.o: $(WINDRES) -Iinclude -I../data/win32 $< -O coff $@ endif endif install-data-local: if test -f ../data/flamp.xpm; then \ $(mkinstalldirs) $(DESTDIR)/$(datadir)/pixmaps; \ $(INSTALL_DATA) ../data/flamp.xpm $(DESTDIR)/$(datadir)/pixmaps; \ fi if test -f ../data/flamp.desktop; then \ $(mkinstalldirs) $(DESTDIR)/$(datadir)/applications; \ $(INSTALL_DATA) ../data/flamp.desktop $(DESTDIR)/$(datadir)/applications; \ fi uninstall-local: rm -f $(DESTDIR)/$(datadir)/pixmaps/flamp.xpm rm -f $(DESTDIR)/$(datadir)/applications/flamp.desktop FL_SRC = ui/dialogs.fl if HAVE_FLUID flgen: $(FL_SRC) (cd include; \ for f in $(FL_SRC); do \ c=$${f%.fl}.cxx; \ h=$${f%.fl}.h; \ h=$${h##*/}; \ $(FLUID) -c -o ../$$c -h $$h ../$$f; \ done) endif INSTALLER_FILE = flamp-$(flamp_VERSION)_setup.exe APPBUNDLE=flamp-$(flamp_VERSION) APPBUNDLE_NOLIBS=$(APPBUNDLE)-nolibs if HAVE_NSIS nsisinst: $(bin_PROGRAMS) sh ../scripts/mknsisinst.sh "../data" . CLEANFILES += $(INSTALLER_FILE) endif if DARWIN appbundle: $(bin_PROGRAMS) sh ../scripts/mkappbundle.sh "../data" . CLEAN_LOCAL += $(APPBUNDLE_NOLIBS) $(APPBUNDLE) $(APPBUNDLE)*.dmg endif clean-local: -rm -rf $(CLEAN_LOCAL) # Sources that we build. It is OK to have headers here. flamp_SOURCES += \ flamp.cxx \ flamp_dialog.cxx \ ui/dialogs.cxx \ lzma/Alloc.h \ lzma/Alloc.c \ lzma/LzFind.c \ lzma/LzFind.h \ lzma/LzHash.h \ lzma/LzmaDec.c \ lzma/LzmaDec.h \ lzma/LzmaEnc.c \ lzma/LzmaEnc.h \ lzma/LzmaLib.c \ lzma/LzmaLib.h \ lzma/Types.h \ server/xml_server.cxx \ utils/amp.cxx \ utils/base64.cxx \ utils/base128.cxx \ utils/base256.cxx \ utils/debug.cxx \ utils/socket.cxx \ utils/status.cxx \ utils/timeops.cxx \ utils/util.cxx \ utils/file_io.cxx \ utils/xml_io.cxx \ utils/global_amp.cxx \ utils/circular_queue.cxx \ utils/tagSearch.cxx \ utils/time_table.cxx \ utils/transmit_camp.cxx \ utils/ztimer.cxx \ utils/script_parsing.cxx \ utils/run_scripts.cxx \ widgets/calendar.cxx \ widgets/combo.cxx \ widgets/date.cxx \ widgets/fileselect.cxx \ widgets/flinput2.cxx \ widgets/flslider2.cxx \ widgets/Fl_BlockMap.cxx \ widgets/Fl_Text_Buffer_mod.cxx \ widgets/Fl_Text_Editor_mod.cxx \ widgets/Fl_Text_Display_mod.cxx \ widgets/FTextView.cxx \ widgets/icons.cxx \ widgets/missing_strings.c \ widgets/pixmaps.cxx \ widgets/pixmaps_tango.cxx \ widgets/font_browser.cxx \ widgets/hamcast_group.cxx \ include/hamcast_group.h # Additional source files that are distributed EXTRA_DIST = \ config.h \ utils/mingw.c \ utils/time_table_dat.cxx \ widgets/flnfc_common.cxx \ include/amp.h \ include/ascii.h \ include/base64.h \ include/base128.h \ include/base256.h \ include/calendar.h \ include/combo.h \ include/compat.h \ include/compat-mingw.h \ include/crc16.h \ include/date.h \ include/debug.h \ include/dirent-check.h \ include/fileselect.h \ include/fl_lock.h \ include/flmisc.h \ include/flamp_config.h \ include/flamprc.h \ include/flinput2.h \ include/flslider2.h \ include/font_browser.h \ include/gettext.h \ include/icons.h \ include/flamp.h \ include/flamp_dialog.h \ include/dialogs.h \ include/missing_strings.h \ include/socket.h \ include/mingw.h \ include/pixmaps.h \ include/status.h \ include/threads.h \ include/timeops.h \ include/util.h \ include/file_io.h \ include/xml_io.h \ include/global_amp.h \ include/circular_queue.h \ include/tagSearch.h \ include/time_table.h \ include/transmit_camp.h \ include/ztimer.h \ include/script_parsing.h \ widgets/Fl_Text_Buffer_mod.cxx \ widgets/Fl_Text_Display_mod.cxx \ widgets/Fl_Text_Editor_mod.cxx \ include/Fl_BlockMap.h \ include/Fl_Text_Buffer_mod.H \ include/Fl_Text_Display_mod.H \ include/Fl_Text_Editor_mod.H \ include/FTextView.h # Additional non-source files that are distributed #EXTRA_DIST += \ # ../data/template.rtf # ../flamp-doc/flamp-quick-guide.html # Additional source files that support non-Linux cross compilation EXTRA_DIST += \ ../ChangeLog \ ../data/flamp.desktop \ ../data/flamp.xpm \ ../data/flamp.png \ ../data/win32/fl_app.nsi \ ../data/win32/flamp.ico \ ../scripts/buildmxe.sh \ ../scripts/builddist.sh \ ../scripts/mkappbundle.sh \ ../scripts/mknsisinst.sh \ ../data/mac/Info.plist.in \ ../data/mac/flamp.icns \ $(flamp_WIN32_SRC) \ $(flamp_FL_SRC) flamp-2.2.12/src/widgets/0000775000175000017500000000000014607053767012154 500000000000000flamp-2.2.12/src/widgets/missing_strings.c0000644000175000017500000000502714463050061015444 00000000000000/* * "$Id: flstring.c 4288 2005-04-16 00:13:17Z mike $" * * missing BSD string functions for the Fast Light Tool Kit (FLTK). * version < 1.3.2 * * Copyright 1998-2005 by Bill Spitzak and others. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * * Free Software Foundation, Inc. * 51 Franklin Street, Fifth Floor * Boston, MA 02110-1301 USA. * * Please report all bugs and problems on the following page: * * http://www.fltk.org/str.php */ #include "missing_strings.h" // versions of FLTK < 1.3.2 do not contain fl_string #if (FLAMP_FLTK_API_MAJOR == 1 && FLAMP_FLTK_API_MINOR == 3 && FLAMP_FLTK_API_PATCH < 1) /* * 'fl_strlcat()' - Safely concatenate two strings. */ size_t /* O - Length of string */ fl_strlcat(char *dst, /* O - Destination string */ const char *src, /* I - Source string */ size_t size) { /* I - Size of destination string buffer */ size_t srclen; /* Length of source string */ size_t dstlen; /* Length of destination string */ /* * Figure out how much room is left... */ dstlen = strlen(dst); size -= dstlen + 1; if (!size) return (dstlen); /* No room, return immediately... */ /* * Figure out how much room is needed... */ srclen = strlen(src); /* * Copy the appropriate amount... */ if (srclen > size) srclen = size; memcpy(dst + dstlen, src, srclen); dst[dstlen + srclen] = '\0'; return (dstlen + srclen); } /* * 'fl_strlcpy()' - Safely copy two strings. */ size_t /* O - Length of string */ fl_strlcpy(char *dst, /* O - Destination string */ const char *src, /* I - Source string */ size_t size) { /* I - Size of destination string buffer */ size_t srclen; /* Length of source string */ /* * Figure out how much room is needed... */ size --; srclen = strlen(src); /* * Copy the appropriate amount... */ if (srclen > size) srclen = size; memcpy(dst, src, srclen); dst[srclen] = '\0'; return (srclen); } #endif flamp-2.2.12/src/widgets/Fl_Text_Display_mod.cxx0000664000175000017500000036167214507650001016507 00000000000000// // "$Id: Fl_Text_Display_mod.cxx 8808 2011-06-16 13:31:25Z manolo $" // // Copyright 2001-2010 by Bill Spitzak and others. // Original code Copyright Mark Edel. Permission to distribute under // the LGPL for the FLTK library granted by Mark Edel. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public // License as published by the Free Software Foundation; either // version 2 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Library General Public License for more details. // // You should have received a copy of the GNU Library General Public // License along with this library; if not, write to the // // Free Software Foundation, Inc. // 51 Franklin Street, Fifth Floor // Boston, MA 02110-1301 USA. // // Please report all bugs and problems on the following page: // // http://www.fltk.org/str.php // // TODO: rendering of the "optional hyphen" // TODO: make line numbering work again #include #include #include #include "missing_strings.h" #include #include #include #include #include #include "Fl_Text_Buffer_mod.H" #include "Fl_Text_Display_mod.H" #include #if FLAMP_FLTK_API_MAJOR == 1 && FLAMP_FLTK_API_MINOR < 3 # error "FLTK versions less then 1.3 are no longer supported" #endif #undef min #undef max // Text area margins. Left & right margins should be at least 3 so that // there is some room for the overhanging parts of the cursor! const int Fl_Text_Display_mod::DEFAULT_TOP_MARGIN = 1; const int Fl_Text_Display_mod::DEFAULT_BOTTOM_MARGIN = 1; const int Fl_Text_Display_mod::DEFAULT_LEFT_MARGIN = 3; const int Fl_Text_Display_mod::DEFAULT_RIGHT_MARGIN = 3; //#define TOP_MARGIN 1 //#define BOTTOM_MARGIN 1 //#define LEFT_MARGIN 3 //#define RIGHT_MARGIN 3 #define NO_HINT -1 /* Masks for text drawing methods. These are or'd together to form an integer which describes what drawing calls to use to draw a string */ #define FILL_MASK 0x0100 #define SECONDARY_MASK 0x0200 #define PRIMARY_MASK 0x0400 #define HIGHLIGHT_MASK 0x0800 #define BG_ONLY_MASK 0x1000 #define TEXT_ONLY_MASK 0x2000 #define STYLE_LOOKUP_MASK 0xff /* Maximum displayable line length (how many characters will fit across the widest window). This amount of memory is temporarily allocated from the stack in the draw_vline() method for drawing strings */ #define MAX_DISP_LINE_LEN 1000 static int max( int i1, int i2 ); static int min( int i1, int i2 ); static int countlines( const char *string ); /* The variables below are used in a timer event to allow smooth scrolling of the text area when the pointer has left the area. */ static int scroll_direction = 0; static int scroll_amount = 0; static int scroll_y = 0; static int scroll_x = 0; // CET - FIXME #define TMPFONTWIDTH 6 /** \brief Creates a new text display widget. \param X, Y, W, H position and size of widget \param l label text, defaults to none */ Fl_Text_Display_mod::Fl_Text_Display_mod(int X, int Y, int W, int H, const char* l) : Fl_Group(X, Y, W, H, l) { int i; TOP_MARGIN = DEFAULT_TOP_MARGIN; BOTTOM_MARGIN = DEFAULT_BOTTOM_MARGIN; LEFT_MARGIN = DEFAULT_LEFT_MARGIN; RIGHT_MARGIN = DEFAULT_RIGHT_MARGIN; mMaxsize = 0; damage_range1_start = damage_range1_end = -1; damage_range2_start = damage_range2_end = -1; dragPos = dragging = 0; dragType = DRAG_CHAR; display_insert_position_hint = 0; shortcut_ = 0; color(FL_BACKGROUND2_COLOR, FL_SELECTION_COLOR); box(FL_DOWN_FRAME); textsize(FL_NORMAL_SIZE); textcolor(FL_FOREGROUND_COLOR); textfont(FL_HELVETICA); set_flag(SHORTCUT_LABEL); text_area.x = 0; text_area.y = 0; text_area.w = 0; text_area.h = 0; mVScrollBar = new Fl_Scrollbar(0,0,1,1); mVScrollBar->callback((Fl_Callback*)v_scrollbar_cb, this); mHScrollBar = new Fl_Scrollbar(0,0,1,1); mHScrollBar->callback((Fl_Callback*)h_scrollbar_cb, this); mHScrollBar->type(FL_HORIZONTAL); end(); scrollbar_width(Fl::scrollbar_size()); scrollbar_align(FL_ALIGN_BOTTOM_RIGHT); mCursorOn = 0; mCursorPos = 0; mCursorOldY = -100; mCursorToHint = NO_HINT; mCursorStyle = NORMAL_CURSOR; mCursorPreferredXPos = -1; mBuffer = 0; mFirstChar = 0; mLastChar = 0; mNBufferLines = 0; mTopLineNum = mTopLineNumHint = 1; mAbsTopLineNum = 1; mNeedAbsTopLineNum = 0; mHorizOffset = mHorizOffsetHint = 0; mCursor_color = FL_FOREGROUND_COLOR; mStyleBuffer = 0; mStyleTable = 0; mNStyles = 0; mNVisibleLines = 2; mLineStarts = new int[mNVisibleLines]; mLineStarts[0] = 0; for (i=1; iremove_modify_callback(buffer_modified_cb, this); // mBuffer->remove_predelete_callback(buffer_predelete_cb, this); // } if (mLineStarts) delete[] mLineStarts; } /** Attach a text buffer to display, replacing the current buffer (if any) \param buf attach this text buffer */ void Fl_Text_Display_mod::buffer( Fl_Text_Buffer_mod *buf ) { /* If the text display is already displaying a buffer, clear it off of the display and remove our callback from it */ if ( buf == mBuffer) return; if ( mBuffer != 0 ) { // we must provide a copy of the buffer that we are deleting! char *deletedText = mBuffer->text(); buffer_modified_cb( 0, 0, mBuffer->length(), 0, deletedText, this ); free(deletedText); mNBufferLines = 0; mBuffer->remove_modify_callback( buffer_modified_cb, this ); mBuffer->remove_predelete_callback( buffer_predelete_cb, this ); } /* Add the buffer to the display, and attach a callback to the buffer for receiving modification information when the buffer contents change */ mBuffer = buf; if (mBuffer) { mBuffer->add_modify_callback( buffer_modified_cb, this ); mBuffer->add_predelete_callback( buffer_predelete_cb, this ); /* Update the display */ buffer_modified_cb( 0, buf->length(), 0, 0, 0, this ); } /* Resize the widget to update the screen... */ resize(x(), y(), w(), h()); } /** \brief Attach (or remove) highlight information in text display and redisplay. Highlighting information consists of a style buffer which parallels the normal text buffer, but codes font and color information for the display; a style table which translates style buffer codes (indexed by buffer character - 'A') into fonts and colors; and a callback mechanism for as-needed highlighting, triggered by a style buffer entry of "unfinishedStyle". Style buffer can trigger additional redisplay during a normal buffer modification if the buffer contains a primary Fl_Text_Selection (see extendRangeForStyleMods for more information on this protocol). Style buffers, tables and their associated memory are managed by the caller. Styles are ranged from 65 ('A') to 126. \param styleBuffer this buffer works in parallel to the text buffer. For every character in the text buffer, the stye buffer has a byte at the same offset that contains an index into an array of possible styles. \param styleTable a list of styles indexed by the style buffer \param nStyles number of styles in the style table \param unfinishedStyle if this style is found, the callback below is called \param unfinishedHighlightCB if a character with an unfinished style is found, this callback will be called \param cbArg and optional argument for the callback above, usually a pointer to the Text Display. */ void Fl_Text_Display_mod::highlight_data(Fl_Text_Buffer_mod *styleBuffer, const Style_Table_Entry *styleTable, int nStyles, char unfinishedStyle, Unfinished_Style_Cb unfinishedHighlightCB, void *cbArg ) { mStyleBuffer = styleBuffer; mStyleTable = styleTable; mNStyles = nStyles; mUnfinishedStyle = unfinishedStyle; mUnfinishedHighlightCB = unfinishedHighlightCB; mHighlightCBArg = cbArg; mColumnScale = 0; mStyleBuffer->canUndo(0); damage(FL_DAMAGE_EXPOSE); } /** \brief Find the longest line of all visible lines. \return the width of the longest visible line in pixels */ int Fl_Text_Display_mod::longest_vline() const { int longest = 0; for (int i = 0; i < mNVisibleLines; i++) longest = max(longest, measure_vline(i)); return longest; } /** \brief Change the size of the displayed text area. Calling this function will trigger a recalculation of all lines visible and of all scrollbar sizes. \param X, Y, W, H new position and size of this widget */ void Fl_Text_Display_mod::resize(int X, int Y, int W, int H) { #ifdef DEBUG printf("Fl_Text_Display_mod::resize(X=%d, Y=%d, W=%d, H=%d)\n", X, Y, W, H); #endif // DEBUG const int oldWidth = w(); #ifdef DEBUG printf(" oldWidth=%d, mContinuousWrap=%d, mWrapMargin=%d\n", oldWidth, mContinuousWrap, mWrapMarginPix); #endif // DEBUG Fl_Widget::resize(X,Y,W,H); if (!buffer()) return; X += Fl::box_dx(box()); Y += Fl::box_dy(box()); W -= Fl::box_dw(box()); H -= Fl::box_dh(box()); text_area.x = X+LEFT_MARGIN; text_area.y = Y+TOP_MARGIN; text_area.w = W-LEFT_MARGIN-RIGHT_MARGIN - (mVScrollBar->visible() ? scrollbar_width() : 0); text_area.h = H-TOP_MARGIN-BOTTOM_MARGIN - (mHScrollBar->visible() ? scrollbar_width() : 0); int i; if (!mStyleTable) return; /* Find the new maximum font height for this text display */ for (i = 0, mMaxsize = fl_height(textfont(), textsize()); i < mNStyles; i++) mMaxsize = max(mMaxsize, fl_height(mStyleTable[i].font, mStyleTable[i].size)); // did we have scrollbars initially? unsigned int hscrollbarvisible = mHScrollBar->visible(); unsigned int vscrollbarvisible = mVScrollBar->visible(); // try without scrollbars first mVScrollBar->clear_visible(); mHScrollBar->clear_visible(); for (int again = 1; again;) { again = 0; /* In continuous wrap mode, a change in width affects the total number of lines in the buffer, and can leave the top line number incorrect, and the top character no longer pointing at a valid line start */ if (!mFastDisplay && mContinuousWrap && !mWrapMarginPix && W!=oldWidth) { int oldFirstChar = mFirstChar; mNBufferLines = count_lines(0, buffer()->length(), true); mFirstChar = line_start(mFirstChar); mTopLineNum = count_lines(0, mFirstChar, true)+1; absolute_top_line_number(oldFirstChar); #ifdef DEBUG printf(" mNBufferLines=%d\n", mNBufferLines); #endif // DEBUG } /* reallocate and update the line starts array, which may have changed size and / or contents. */ int nvlines = (text_area.h + mMaxsize - 1) / mMaxsize; if (nvlines < 1) nvlines = 1; if (mNVisibleLines != nvlines) { mNVisibleLines = nvlines; if (mLineStarts) delete[] mLineStarts; mLineStarts = new int [mNVisibleLines]; } calc_line_starts(0, mNVisibleLines); calc_last_char(); // figure the scrollbars if (scrollbar_width()) { /* Decide if the vertical scrollbar needs to be visible */ // always display vertical scroll bar // if (scrollbar_align() & (FL_ALIGN_LEFT|FL_ALIGN_RIGHT) && // mNBufferLines >= mNVisibleLines - 1) { mVScrollBar->set_visible(); if (scrollbar_align() & FL_ALIGN_LEFT) { text_area.x = X+scrollbar_width()+LEFT_MARGIN; text_area.w = W-scrollbar_width()-LEFT_MARGIN-RIGHT_MARGIN - scrollbar_width(); mVScrollBar->resize(X, text_area.y-TOP_MARGIN, scrollbar_width(), text_area.h+TOP_MARGIN+BOTTOM_MARGIN); } else { text_area.x = X+LEFT_MARGIN; text_area.w = W-scrollbar_width()-LEFT_MARGIN-RIGHT_MARGIN; mVScrollBar->resize(X+W-scrollbar_width(), text_area.y-TOP_MARGIN, scrollbar_width(), text_area.h+TOP_MARGIN+BOTTOM_MARGIN); } } /* Decide if the horizontal scrollbar needs to be visible. If there is a vertical scrollbar, a horizontal is always created too. This is because the alternatives are unattractive: * Dynamically creating a horizontal scrollbar based on the currently visible lines is what the original nedit does, but it always wastes space for the scrollbar even when it's not used. Since the FLTK widget dynamically allocates the space for the scrollbar and rearranges the widget to make room for it, this would create a very visually displeasing "bounce" effect when the vertical scrollbar is dragged. Trust me, I tried it and it looks really bad. * The other alternative would be to keep track of what the longest line in the entire buffer is and base the scrollbar on that. I didn't do this because I didn't see any easy way to do that using the nedit code and this could involve a lengthy calculation for large buffers. If an efficient and non-costly way of doing this can be found, this might be a way to go. */ /* WAS: Suggestion: Try turning the horizontal scrollbar on when you first see a line that is too wide in the window, but then don't turn it off (ie mix both of your solutions). */ if (!mFastDisplay && !mContinuousWrap && scrollbar_align() & (FL_ALIGN_TOP|FL_ALIGN_BOTTOM) && (mVScrollBar->visible() || longest_vline() > text_area.w)) { if (!mHScrollBar->visible()) { mHScrollBar->set_visible(); again = 1; // loop again to see if we now need vert. & recalc sizes } if (scrollbar_align() & FL_ALIGN_TOP) { text_area.y = Y + scrollbar_width()+TOP_MARGIN; text_area.h = H - scrollbar_width()-TOP_MARGIN-BOTTOM_MARGIN; mHScrollBar->resize(text_area.x-LEFT_MARGIN, Y, text_area.w+LEFT_MARGIN+RIGHT_MARGIN, scrollbar_width()); } else { text_area.y = Y+TOP_MARGIN; text_area.h = H - scrollbar_width()-TOP_MARGIN-BOTTOM_MARGIN; mHScrollBar->resize(text_area.x-LEFT_MARGIN, Y+H-scrollbar_width(), text_area.w+LEFT_MARGIN+RIGHT_MARGIN, scrollbar_width()); } } } } // user request to change viewport if (mTopLineNumHint != mTopLineNum || mHorizOffsetHint != mHorizOffset) scroll_(mTopLineNumHint, mHorizOffsetHint); // everything will fit in the viewport if (mNBufferLines < mNVisibleLines || mBuffer == NULL || mBuffer->length() == 0) { scroll_(1, mHorizOffset); /* if empty lines become visible, there may be an opportunity to display more text by scrolling down */ } else { while ( mNVisibleLines>=2 && (mLineStarts[mNVisibleLines-2]==-1) && scroll_(mTopLineNum-1, mHorizOffset)) { } } // user request to display insert position if (display_insert_position_hint) display_insert(); // in case horizontal offset is now greater than longest line int maxhoffset = max(0, longest_vline()-text_area.w); if (mHorizOffset > maxhoffset) scroll_(mTopLineNumHint, maxhoffset); mTopLineNumHint = mTopLineNum; mHorizOffsetHint = mHorizOffset; display_insert_position_hint = 0; if ((!mFastDisplay && mContinuousWrap) || hscrollbarvisible != mHScrollBar->visible() || vscrollbarvisible != mVScrollBar->visible()) redraw(); update_v_scrollbar(); update_h_scrollbar(); } /** \brief Refresh a rectangle of the text display. \param left, top are in coordinates of the text drawing window. \param width, height size in pixels */ void Fl_Text_Display_mod::draw_text( int left, int top, int width, int height ) { int fontHeight, firstLine, lastLine, line; /* find the line number range of the display */ fontHeight = mMaxsize ? mMaxsize : textsize_; firstLine = ( top - text_area.y - fontHeight + 1 ) / fontHeight; lastLine = ( top + height - text_area.y ) / fontHeight + 1; fl_push_clip( left, top, width, height ); /* draw the lines */ for ( line = firstLine; line <= lastLine; line++ ) draw_vline( line, left, left + width, 0, INT_MAX ); /* draw the line numbers if exposed area includes them */ if (mLineNumWidth != 0 && left <= mLineNumLeft + mLineNumWidth) draw_line_numbers(false); fl_pop_clip(); } /** \brief Marks text from start to end as needing a redraw. This function will trigger a damage event and later a redraw of parts of the widget. \param startpos index of first character needing redraw \param endpos index after last character needing redraw */ void Fl_Text_Display_mod::redisplay_range(int startpos, int endpos) { IS_UTF8_ALIGNED2(buffer(), startpos) IS_UTF8_ALIGNED2(buffer(), endpos) if (damage_range1_start == -1 && damage_range1_end == -1) { damage_range1_start = startpos; damage_range1_end = endpos; } else if ((startpos >= damage_range1_start && startpos <= damage_range1_end) || (endpos >= damage_range1_start && endpos <= damage_range1_end)) { damage_range1_start = min(damage_range1_start, startpos); damage_range1_end = max(damage_range1_end, endpos); } else if (damage_range2_start == -1 && damage_range2_end == -1) { damage_range2_start = startpos; damage_range2_end = endpos; } else { damage_range2_start = min(damage_range2_start, startpos); damage_range2_end = max(damage_range2_end, endpos); } damage(FL_DAMAGE_SCROLL); } /** \brief Draw a range of text. Refresh all of the text between buffer positions \p startpos and \p endpos not including the character at the position \p endpos. If \p endpos points beyond the end of the buffer, refresh the whole display after \p startpos, including blank lines which are not technically part of any range of characters. \param startpos index of first character to draw \param endpos index after last character to draw */ void Fl_Text_Display_mod::draw_range(int startpos, int endpos) { startpos = buffer()->utf8_align(startpos); endpos = buffer()->utf8_align(endpos); int i, startLine, lastLine, startIndex, endIndex; /* If the range is outside of the displayed text, just return */ if ( endpos < mFirstChar || ( startpos > mLastChar && !empty_vlines() ) ) return; /* Clean up the starting and ending values */ if ( startpos < 0 ) startpos = 0; if ( startpos > mBuffer->length() ) startpos = mBuffer->length(); if ( endpos < 0 ) endpos = 0; if ( endpos > mBuffer->length() ) endpos = mBuffer->length(); /* Get the starting and ending lines */ if ( startpos < mFirstChar ) startpos = mFirstChar; if ( !position_to_line( startpos, &startLine ) ) startLine = mNVisibleLines - 1; if ( endpos >= mLastChar ) { lastLine = mNVisibleLines - 1; } else { if ( !position_to_line( endpos, &lastLine ) ) { /* shouldn't happen */ lastLine = mNVisibleLines - 1; } } /* Get the starting and ending positions within the lines */ startIndex = mLineStarts[ startLine ] == -1 ? 0 : startpos - mLineStarts[ startLine ]; if ( endpos >= mLastChar ) endIndex = INT_MAX; else if ( mLineStarts[ lastLine ] == -1 ) endIndex = 0; else endIndex = endpos - mLineStarts[ lastLine ]; /* If the starting and ending lines are the same, redisplay the single line between "start" and "end" */ if ( startLine == lastLine ) { draw_vline( startLine, 0, INT_MAX, startIndex, endIndex ); return; } /* Redisplay the first line from "start" */ draw_vline( startLine, 0, INT_MAX, startIndex, INT_MAX ); /* Redisplay the lines in between at their full width */ for ( i = startLine + 1; i < lastLine; i++ ) draw_vline( i, 0, INT_MAX, 0, INT_MAX ); /* Redisplay the last line to "end" */ draw_vline( lastLine, 0, INT_MAX, 0, endIndex ); } /** \brief Sets the position of the text insertion cursor for text display. Move the insertion cursor in front of the character at \p newPos. This function may trigger a redraw. \param newPos new caret position */ void Fl_Text_Display_mod::insert_position( int newPos ) { IS_UTF8_ALIGNED2(buffer(), newPos) /* make sure new position is ok, do nothing if it hasn't changed */ if ( newPos == mCursorPos ) return; if ( newPos < 0 ) newPos = 0; if ( newPos > mBuffer->length() ) newPos = mBuffer->length(); /* cursor movement cancels vertical cursor motion column */ mCursorPreferredXPos = -1; /* erase the cursor at its previous position */ redisplay_range(buffer()->prev_char_clipped(mCursorPos), buffer()->next_char(mCursorPos)); mCursorPos = newPos; /* draw cursor at its new position */ redisplay_range(buffer()->prev_char_clipped(mCursorPos), buffer()->next_char(mCursorPos)); } /** \brief Shows the text cursor. This function may trigger a redraw. \param b show(1) or hide(0) the text cursor (caret). */ void Fl_Text_Display_mod::show_cursor(int b) { mCursorOn = b; redisplay_range(buffer()->prev_char_clipped(mCursorPos), buffer()->next_char(mCursorPos)); } /** \brief Sets the text cursor style. Sets the text cursor style to one of the following: \li Fl_Text_Display_mod::NORMAL_CURSOR - Shows an I beam. \li Fl_Text_Display_mod::CARET_CURSOR - Shows a caret under the text. \li Fl_Text_Display_mod::DIM_CURSOR - Shows a dimmed I beam. \li Fl_Text_Display_mod::BLOCK_CURSOR - Shows an unfilled box around the current character. \li Fl_Text_Display_mod::HEAVY_CURSOR - Shows a thick I beam. This call also switches the cursor on and may trigger a redraw. \param style new cursor style */ void Fl_Text_Display_mod::cursor_style(int style) { mCursorStyle = style; if (mCursorOn) show_cursor(); } /** \brief Set the new text wrap mode. If \p wrap mode is not zero, this call enables automatic word wrapping at column \p wrapMargin. Word-wrapping does not change the text buffer itself, only the way the text is displayed. Different Text Displays can have different wrap modes, even if they share the same Text Buffer. \param wrap new wrap mode is WRAP_NONE (don't wrap text at all), WRAP_AT_COLUMN (wrap text at the given text column), WRAP_AT_PIXEL (wrap text at a pixel position), or WRAP_AT_BOUNDS (wrap text so that it fits into the widget width) \param wrapMargin in WRAP_AT_COLUMN mode, text will wrap at the n'th character. For variable width fonts, an average character width is calculated. The column width is calculated using the current textfont or the first style when this function is called. If the font size changes, this function must be called again. In WRAP_AT_PIXEL mode, this is the pixel position. \todo we need new wrap modes to wrap at the window edge and based on pixel width or average character width. */ void Fl_Text_Display_mod::wrap_mode(int wrap, int wrapMargin) { switch (wrap) { case WRAP_NONE: mWrapMarginPix = 0; mContinuousWrap = 0; break; case WRAP_AT_COLUMN: default: mWrapMarginPix = int(col_to_x(wrapMargin)); mContinuousWrap = 1; break; case WRAP_AT_PIXEL: mWrapMarginPix = wrapMargin; mContinuousWrap = 1; break; case WRAP_AT_BOUNDS: mWrapMarginPix = 0; mContinuousWrap = 1; break; } if (buffer()) { /* wrapping can change the total number of lines, re-count */ mNBufferLines = count_lines(0, buffer()->length(), true); /* changing wrap margins or changing from wrapped mode to non-wrapped can leave the character at the top no longer at a line start, and/or change the line number */ mFirstChar = line_start(mFirstChar); mTopLineNum = count_lines(0, mFirstChar, true) + 1; reset_absolute_top_line_number(); /* update the line starts array */ calc_line_starts(0, mNVisibleLines); calc_last_char(); } else { // No buffer, so just clear the state info for later... mNBufferLines = 0; mFirstChar = 0; mTopLineNum = 1; mAbsTopLineNum = 0; } resize(x(), y(), w(), h()); } /** \brief Inserts "text" at the current cursor location. This has the same effect as inserting the text into the buffer using BufInsert and then moving the insert position after the newly inserted text, except that it's optimized to do less redrawing. \param text new text in UTF-8 encoding. */ void Fl_Text_Display_mod::insert(const char* text) { IS_UTF8_ALIGNED2(buffer(), mCursorPos) IS_UTF8_ALIGNED(text) int pos = mCursorPos; mCursorToHint = pos + strlen( text ); mBuffer->insert( pos, text ); mCursorToHint = NO_HINT; } /** \brief Replaces text at the current insert position. \param text new text in UTF-8 encoding \todo Unicode? Find out exactly what we do here and simplify. */ void Fl_Text_Display_mod::overstrike(const char* text) { IS_UTF8_ALIGNED2(buffer(), mCursorPos) IS_UTF8_ALIGNED(text) int startPos = mCursorPos; Fl_Text_Buffer_mod *buf = mBuffer; int lineStart = buf->line_start( startPos ); int textLen = strlen( text ); int i, p, endPos, indent, startIndent, endIndent; const char *c; unsigned int ch; char *paddedText = NULL; /* determine how many displayed character positions are covered */ startIndent = mBuffer->count_displayed_characters( lineStart, startPos ); indent = startIndent; for ( c = text; *c != '\0'; c += fl_utf8len1(*c) ) indent++; endIndent = indent; /* find which characters to remove, and if necessary generate additional padding to make up for removed control characters at the end */ indent = startIndent; for ( p = startPos; ; p=buffer()->next_char(p) ) { if ( p == buf->length() ) break; ch = buf->char_at( p ); if ( ch == '\n' ) break; indent++; if ( indent == endIndent ) { p++; break; } else if ( indent > endIndent ) { if ( ch != '\t' ) { p++; paddedText = new char [ textLen + FL_TEXT_MAX_EXP_CHAR_LEN + 1 ]; strcpy( paddedText, text ); for ( i = 0; i < indent - endIndent; i++ ) paddedText[ textLen + i ] = ' '; paddedText[ textLen + i ] = '\0'; } break; } } endPos = p; mCursorToHint = startPos + textLen; buf->replace( startPos, endPos, paddedText == NULL ? text : paddedText ); mCursorToHint = NO_HINT; if ( paddedText != NULL ) delete [] paddedText; } /** \brief Convert a character index into a pixel position. Translate a buffer text position to the XY location where the top left of the cursor would be positioned to point to that character. Returns 0 if the position is not displayed because it is \e \b vertically out of view. If the position is horizontally out of view, returns the X coordinate where the position would be if it were visible. \param pos character index \param[out] X, Y pixel position of character on screen \return 0 if character vertically out of view, X position otherwise */ int Fl_Text_Display_mod::position_to_xy( int pos, int* X, int* Y ) const { IS_UTF8_ALIGNED2(buffer(), pos) int lineStartPos, fontHeight; int visLineNum; /* If position is not displayed, return false */ if (pos < mFirstChar || (pos > mLastChar && !empty_vlines())) { return 0; } /* Calculate Y coordinate */ if (!position_to_line(pos, &visLineNum)) { return 0; } if (visLineNum < 0 || visLineNum > mNBufferLines) { return 0; } fontHeight = mMaxsize; *Y = text_area.y + visLineNum * fontHeight; /* Get the text, length, and buffer position of the line. If the position is beyond the end of the buffer and should be at the first position on the first empty line, don't try to get or scan the text */ lineStartPos = mLineStarts[visLineNum]; if ( lineStartPos == -1 ) { *X = text_area.x - mHorizOffset; return 1; } *X = text_area.x + handle_vline(GET_WIDTH, lineStartPos, pos-lineStartPos, 0, 0, 0, 0, 0, 0) - mHorizOffset; return 1; } /** \brief Find the line and column number of position \p pos. This only works for displayed lines. If the line is not displayed, the function returns 0 (without the mLineStarts array it could turn in to very long calculation involving scanning large amounts of text in the buffer). If continuous wrap mode is on, returns the absolute line number (as opposed to the wrapped line number which is used for scrolling). \param pos character index \param[out] lineNum absolute (unwrapped) line number \param[out] column character offset to the beginning of the line \return 0 if \p pos is off screen, line number otherwise \todo a column number makes little sense in the UTF-8/variable font width environment. We will have to further define what exactly we want to return. Please check the functions that call this particular function. */ int Fl_Text_Display_mod::position_to_linecol( int pos, int* lineNum, int* column ) const { IS_UTF8_ALIGNED2(buffer(), pos) int retVal; /* In continuous wrap mode, the absolute (non-wrapped) line count is maintained separately, as needed. Only return it if we're actually keeping track of it and pos is in the displayed text */ if (!mFastDisplay && mContinuousWrap) { if (!maintaining_absolute_top_line_number() || pos < mFirstChar || pos > mLastChar) return 0; *lineNum = mAbsTopLineNum + buffer()->count_lines(mFirstChar, pos); *column = buffer()->count_displayed_characters(buffer()->line_start(pos), pos); return 1; } retVal = position_to_line( pos, lineNum ); if ( retVal ) { *column = mBuffer->count_displayed_characters( mLineStarts[ *lineNum ], pos ); *lineNum += mTopLineNum; } return retVal; } /** \brief Check if a pixel position is within the primary selection. \param X, Y pixel position to test \return 1 if position (X, Y) is inside of the primary Fl_Text_Selection */ int Fl_Text_Display_mod::in_selection( int X, int Y ) const { int pos = xy_to_position( X, Y, CHARACTER_POS ); IS_UTF8_ALIGNED2(buffer(), pos) Fl_Text_Buffer_mod *buf = mBuffer; return buf->primary_selection()->includes(pos); } /** \brief Nobody knows what this function does. Correct a column number based on an unconstrained position (as returned by TextDXYToUnconstrainedPosition) to be relative to the last actual newline in the buffer before the row and column position given, rather than the last line start created by line wrapping. This is an adapter for rectangular selections and code written before continuous wrap mode, which thinks that the unconstrained column is the number of characters from the last newline. Obviously this is time consuming, because it invloves character re-counting. \param row \param column \return something unknown \todo What does this do and how is it useful? Column numbers mean little in this context. Which functions depend on this one? \todo Unicode? */ int Fl_Text_Display_mod::wrapped_column(int row, int column) const { int lineStart, dispLineStart; if (mFastDisplay || !mContinuousWrap || row < 0 || row > mNVisibleLines) return column; dispLineStart = mLineStarts[row]; if (dispLineStart == -1) return column; lineStart = buffer()->line_start(dispLineStart); return column + buffer()->count_displayed_characters(lineStart, dispLineStart); } /** \brief Nobody knows what this function does. Correct a row number from an unconstrained position (as returned by TextDXYToUnconstrainedPosition) to a straight number of newlines from the top line of the display. Because rectangular selections are based on newlines, rather than display wrapping, and anywhere a rectangular selection needs a row, it needs it in terms of un-wrapped lines. \param row \return something unknown \todo What does this do and how is it useful? Column numbers mean little in this context. Which functions depend on this one? */ int Fl_Text_Display_mod::wrapped_row(int row) const { if (mFastDisplay || !mContinuousWrap || row < 0 || row > mNVisibleLines) return row; return buffer()->count_lines(mFirstChar, mLineStarts[row]); } /** \brief Scroll the display to bring insertion cursor into view. Note: it would be nice to be able to do this without counting lines twice (scroll_() counts them too) and/or to count from the most efficient starting point, but the efficiency of this routine is not as important to the overall performance of the text display. \todo Unicode? */ void Fl_Text_Display_mod::display_insert() { int hOffset, topLine, X, Y; hOffset = mHorizOffset; topLine = mTopLineNum; if (insert_position() < mFirstChar) { topLine -= count_lines(insert_position(), mFirstChar, false); } else if (mNVisibleLines>=2 && mLineStarts[mNVisibleLines-2] != -1) { int lastChar = line_end(mLineStarts[mNVisibleLines-2],true); if (insert_position() >= lastChar) topLine += count_lines(lastChar - (wrap_uses_character(mLastChar) ? 0 : 1), insert_position(), false); } /* Find the new setting for horizontal offset (this is a bit ungraceful). If the line is visible, just use PositionToXY to get the position to scroll to, otherwise, do the vertical scrolling first, then the horizontal */ if (!position_to_xy( mCursorPos, &X, &Y )) { scroll_(topLine, hOffset); if (!position_to_xy( mCursorPos, &X, &Y )) { #ifdef DEBUG printf ("*** display_insert/position_to_xy # GIVE UP !\n"); fflush(stdout); #endif // DEBUG return; /* Give up, it's not worth it (but why does it fail?) */ } } if (X > text_area.x + text_area.w) hOffset += X-(text_area.x + text_area.w); else if (X < text_area.x) hOffset += X-text_area.x; /* Do the scroll */ if (topLine != mTopLineNum || hOffset != mHorizOffset) scroll_(topLine, hOffset); } /** \brief Scrolls the text buffer to show the current insert position. This function triggers a complete recalculation, ending in a call to Fl_Text_Display_mod::display_insert() */ void Fl_Text_Display_mod::show_insert_position() { display_insert_position_hint = 1; resize(x(), y(), w(), h()); } /* Cursor movement functions */ /** \brief Moves the current insert position right one character. \return 1 if the cursor moved, 0 if the end of the text was reached */ int Fl_Text_Display_mod::move_right() { if ( mCursorPos >= mBuffer->length() ) return 0; int p = insert_position(); int q = buffer()->next_char(p); insert_position(q); return 1; } /** \brief Moves the current insert position left one character. \return 1 if the cursor moved, 0 if the beginning of the text was reached */ int Fl_Text_Display_mod::move_left() { if ( mCursorPos <= 0 ) return 0; int p = insert_position(); int q = buffer()->prev_char_clipped(p); insert_position(q); return 1; } /** \brief Moves the current insert position up one line. \return 1 if the cursor moved, 0 if the beginning of the text was reached */ int Fl_Text_Display_mod::move_up() { int lineStartPos, xPos, prevLineStartPos, newPos, visLineNum; /* Find the position of the start of the line. Use the line starts array if possible */ if ( position_to_line( mCursorPos, &visLineNum ) ) lineStartPos = mLineStarts[ visLineNum ]; else { lineStartPos = line_start( mCursorPos ); visLineNum = -1; } if ( lineStartPos == 0 ) return 0; /* Decide what column to move to, if there's a preferred column use that */ if (mCursorPreferredXPos >= 0) xPos = mCursorPreferredXPos; else xPos = handle_vline(GET_WIDTH, lineStartPos, mCursorPos-lineStartPos, 0, 0, 0, 0, 0, INT_MAX); /* count forward from the start of the previous line to reach the column */ if ( visLineNum != -1 && visLineNum != 0 ) prevLineStartPos = mLineStarts[ visLineNum - 1 ]; else prevLineStartPos = rewind_lines( lineStartPos, 1 ); int lineEnd = line_end(prevLineStartPos, true); newPos = handle_vline(FIND_INDEX_FROM_ZERO, prevLineStartPos, lineEnd-prevLineStartPos, 0, 0, 0, 0, 0, xPos); /* move the cursor */ insert_position( newPos ); /* if a preferred column wasn't aleady established, establish it */ mCursorPreferredXPos = xPos; return 1; } /** \brief Moves the current insert position down one line. \return 1 if the cursor moved, 0 if the beginning of the text was reached */ int Fl_Text_Display_mod::move_down() { int lineStartPos, xPos, newPos, visLineNum; if ( mCursorPos == mBuffer->length() ) return 0; if ( position_to_line( mCursorPos, &visLineNum ) ) lineStartPos = mLineStarts[ visLineNum ]; else { lineStartPos = line_start( mCursorPos ); visLineNum = -1; } if (mCursorPreferredXPos >= 0) { xPos = mCursorPreferredXPos; } else { xPos = handle_vline(GET_WIDTH, lineStartPos, mCursorPos-lineStartPos, 0, 0, 0, 0, 0, INT_MAX); } int nextLineStartPos = skip_lines( lineStartPos, 1, true ); int lineEnd = line_end(nextLineStartPos, true); newPos = handle_vline(FIND_INDEX_FROM_ZERO, nextLineStartPos, lineEnd-nextLineStartPos, 0, 0, 0, 0, 0, xPos); insert_position( newPos ); mCursorPreferredXPos = xPos; return 1; } /** \brief Count the number of lines between two positions. Same as BufCountLines, but takes into account wrapping if wrapping is turned on. If the caller knows that \p startPos is at a line start, it can pass \p startPosIsLineStart as True to make the call more efficient by avoiding the additional step of scanning back to the last newline. \param startPos index to first character \param endPos index after last character \param startPosIsLineStart avoid scanning back to the line start \return number of lines */ int Fl_Text_Display_mod::count_lines(int startPos, int endPos, bool startPosIsLineStart) const { IS_UTF8_ALIGNED2(buffer(), startPos) IS_UTF8_ALIGNED2(buffer(), endPos) int retLines, retPos, retLineStart, retLineEnd; #ifdef DEBUG printf("Fl_Text_Display_mod::count_lines(startPos=%d, endPos=%d, startPosIsLineStart=%d\n", startPos, endPos, startPosIsLineStart); #endif // DEBUG /* If we're not wrapping use simple (and more efficient) BufCountLines */ if (mFastDisplay || !mContinuousWrap) return buffer()->count_lines(startPos, endPos); wrapped_line_counter(buffer(), startPos, endPos, INT_MAX, startPosIsLineStart, 0, &retPos, &retLines, &retLineStart, &retLineEnd); #ifdef DEBUG printf(" # after WLC: retPos=%d, retLines=%d, retLineStart=%d, retLineEnd=%d\n", retPos, retLines, retLineStart, retLineEnd); #endif // DEBUG return retLines; } /** \brief Skip a number of lines forward. Same as BufCountForwardNLines, but takes into account line breaks when wrapping is turned on. If the caller knows that startPos is at a line start, it can pass "startPosIsLineStart" as True to make the call more efficient by avoiding the additional step of scanning back to the last newline. \param startPos index to starting character \param nLines number of lines to skip ahead \param startPosIsLineStart avoid scanning back to the line start \return new position as index */ int Fl_Text_Display_mod::skip_lines(int startPos, int nLines, bool startPosIsLineStart) { IS_UTF8_ALIGNED2(buffer(), startPos) int retLines, retPos, retLineStart, retLineEnd; /* if we're not wrapping use more efficient BufCountForwardNLines */ if (mFastDisplay || !mContinuousWrap) return buffer()->skip_lines(startPos, nLines); /* wrappedLineCounter can't handle the 0 lines case */ if (nLines == 0) return startPos; /* use the common line counting routine to count forward */ wrapped_line_counter(buffer(), startPos, buffer()->length(), nLines, startPosIsLineStart, 0, &retPos, &retLines, &retLineStart, &retLineEnd); IS_UTF8_ALIGNED2(buffer(), retPos) return retPos; } /** \brief Returns the end of a line. Same as BufEndOfLine, but takes into account line breaks when wrapping is turned on. If the caller knows that \p startPos is at a line start, it can pass "startPosIsLineStart" as True to make the call more efficient by avoiding the additional step of scanning back to the last newline. Note that the definition of the end of a line is less clear when continuous wrap is on. With continuous wrap off, it's just a pointer to the newline that ends the line. When it's on, it's the character beyond the last \b displayable character on the line, where a whitespace character which has been "converted" to a newline for wrapping is not considered displayable. Also note that a line can be wrapped at a non-whitespace character if the line had no whitespace. In this case, this routine returns a pointer to the start of the next line. This is also consistent with the model used by visLineLength. \param startPos index to starting character \param startPosIsLineStart avoid scanning back to the line start \return new position as index */ int Fl_Text_Display_mod::line_end(int startPos, bool startPosIsLineStart) const { IS_UTF8_ALIGNED2(buffer(), startPos) int retLines, retPos, retLineStart, retLineEnd; /* If we're not wrapping use more efficient BufEndOfLine */ if (mFastDisplay || !mContinuousWrap) return buffer()->line_end(startPos); if (startPos == buffer()->length()) return startPos; wrapped_line_counter(buffer(), startPos, buffer()->length(), 1, startPosIsLineStart, 0, &retPos, &retLines, &retLineStart, &retLineEnd); IS_UTF8_ALIGNED2(buffer(), retLineEnd) return retLineEnd; } /** \brief Return the beginning of a line. Same as BufStartOfLine, but returns the character after last wrap point rather than the last newline. \param pos index to starting character \return new position as index */ int Fl_Text_Display_mod::line_start(int pos) const { IS_UTF8_ALIGNED2(buffer(), pos) int retLines, retPos, retLineStart, retLineEnd; /* If we're not wrapping, use the more efficient BufStartOfLine */ if (mFastDisplay || !mContinuousWrap) return buffer()->line_start(pos); wrapped_line_counter(buffer(), buffer()->line_start(pos), pos, INT_MAX, true, 0, &retPos, &retLines, &retLineStart, &retLineEnd); IS_UTF8_ALIGNED2(buffer(), retLineStart) return retLineStart; } /** \brief Skip a number of lines back. Same as BufCountBackwardNLines, but takes into account line breaks when wrapping is turned on. \param startPos index to starting character \param nLines number of lines to skip back \return new position as index */ int Fl_Text_Display_mod::rewind_lines(int startPos, int nLines) { IS_UTF8_ALIGNED2(buffer(), startPos) Fl_Text_Buffer_mod *buf = buffer(); int pos, lineStart, retLines, retPos, retLineStart, retLineEnd; /* If we're not wrapping, use the more efficient BufCountBackwardNLines */ if (mFastDisplay || !mContinuousWrap) return buf->rewind_lines(startPos, nLines); pos = startPos; for (;;) { lineStart = buf->line_start(pos); wrapped_line_counter(buf, lineStart, pos, INT_MAX, true, 0, &retPos, &retLines, &retLineStart, &retLineEnd, false); if (retLines > nLines) return skip_lines(lineStart, retLines-nLines, true); nLines -= retLines; pos = lineStart - 1; if (pos < 0) return 0; nLines -= 1; } } static inline int fl_isseparator(unsigned int c) { // FIXME: this does not take UCS-4 encoding into account return c != '$' && c != '_' && (isspace(c) || ispunct(c)); } /** \brief Moves the current insert position right one word. */ void Fl_Text_Display_mod::next_word() { int pos = insert_position(); while (pos < buffer()->length() && !fl_isseparator(buffer()->char_at(pos))) { pos = buffer()->next_char(pos); } while (pos < buffer()->length() && fl_isseparator(buffer()->char_at(pos))) { pos = buffer()->next_char(pos); } insert_position( pos ); } /** \brief Moves the current insert position left one word. */ void Fl_Text_Display_mod::previous_word() { int pos = insert_position(); if (pos==0) return; pos = buffer()->prev_char(pos); while (pos && fl_isseparator(buffer()->char_at(pos))) { pos = buffer()->prev_char(pos); } while (pos && !fl_isseparator(buffer()->char_at(pos))) { pos = buffer()->prev_char(pos); } if (fl_isseparator(buffer()->char_at(pos))) { pos = buffer()->next_char(pos); } insert_position( pos ); } /** \brief This is called before any characters are deleted. Callback attached to the text buffer to receive delete information before the modifications are actually made. \param pos starting index of deletion \param nDeleted number of bytes we will delete (must be UTF-8 aligned!) \param cbArg "this" pointer for static callback function */ void Fl_Text_Display_mod::buffer_predelete_cb(int pos, int nDeleted, void *cbArg) { Fl_Text_Display_mod *textD = (Fl_Text_Display_mod *)cbArg; if (textD->mContinuousWrap && !textD->mFastDisplay) { /* Note: we must perform this measurement, even if there is not a single character deleted; the number of "deleted" lines is the number of visual lines spanned by the real line in which the modification takes place. Also, a modification of the tab distance requires the same kind of calculations in advance, even if the font width is "fixed", because when the width of the tab characters changes, the layout of the text may be completely different. */ IS_UTF8_ALIGNED2(textD->buffer(), pos) textD->measure_deleted_lines(pos, nDeleted); } else { textD->mSuppressResync = 0; /* Probably not needed, but just in case */ } } /** \brief This is called whenever the buffer is modified. Callback attached to the text buffer to receive modification information \param pos starting index of modification \param nInserted number of bytes we inserted (must be UTF-8 aligned!) \param nDeleted number of bytes deleted (must be UTF-8 aligned!) \param nRestyled ?? \param deletedText this is what was removed, must not be NULL if nDeleted is set \param cbArg "this" pointer for static callback function */ void Fl_Text_Display_mod::buffer_modified_cb( int pos, int nInserted, int nDeleted, int nRestyled, const char *deletedText, void *cbArg ) { int linesInserted, linesDeleted, startDispPos, endDispPos; Fl_Text_Display_mod *textD = ( Fl_Text_Display_mod * ) cbArg; Fl_Text_Buffer_mod *buf = textD->mBuffer; int oldFirstChar = textD->mFirstChar; int scrolled, origCursorPos = textD->mCursorPos; int wrapModStart = 0, wrapModEnd = 0; IS_UTF8_ALIGNED2(buf, pos) IS_UTF8_ALIGNED2(buf, oldFirstChar) /* buffer modification cancels vertical cursor motion column */ if ( nInserted != 0 || nDeleted != 0 ) textD->mCursorPreferredXPos = -1; /* Count the number of lines inserted and deleted, and in the case of continuous wrap mode, how much has changed */ if (textD->mContinuousWrap && !textD->mFastDisplay) { textD->find_wrap_range(deletedText, pos, nInserted, nDeleted, &wrapModStart, &wrapModEnd, &linesInserted, &linesDeleted); } else { linesInserted = nInserted == 0 ? 0 : buf->count_lines( pos, pos + nInserted ); linesDeleted = nDeleted == 0 ? 0 : countlines( deletedText ); } /* Update the line starts and mTopLineNum */ if ( nInserted != 0 || nDeleted != 0 ) { if (textD->mContinuousWrap && !textD->mFastDisplay) { textD->update_line_starts( wrapModStart, wrapModEnd-wrapModStart, nDeleted + pos-wrapModStart + (wrapModEnd-(pos+nInserted)), linesInserted, linesDeleted, &scrolled ); } else { textD->update_line_starts( pos, nInserted, nDeleted, linesInserted, linesDeleted, &scrolled ); } } else scrolled = 0; /* If we're counting non-wrapped lines as well, maintain the absolute (non-wrapped) line number of the text displayed */ if (textD->maintaining_absolute_top_line_number() && (nInserted != 0 || nDeleted != 0)) { if (deletedText && (pos + nDeleted < oldFirstChar)) textD->mAbsTopLineNum += buf->count_lines(pos, pos + nInserted) - countlines(deletedText); else if (pos < oldFirstChar) textD->reset_absolute_top_line_number(); } /* Update the line count for the whole buffer */ textD->mNBufferLines += linesInserted - linesDeleted; /* Update the cursor position */ if ( textD->mCursorToHint != NO_HINT ) { textD->mCursorPos = textD->mCursorToHint; textD->mCursorToHint = NO_HINT; } else if ( textD->mCursorPos > pos ) { if ( textD->mCursorPos < pos + nDeleted ) textD->mCursorPos = pos; else textD->mCursorPos += nInserted - nDeleted; } // refigure scrollbars & stuff textD->resize(textD->x(), textD->y(), textD->w(), textD->h()); // don't need to do anything else if not visible? if (!textD->visible_r()) return; /* If the changes caused scrolling, re-paint everything and we're done. */ if ( scrolled ) { textD->damage(FL_DAMAGE_EXPOSE); if ( textD->mStyleBuffer ) /* See comments in extendRangeForStyleMods */ textD->mStyleBuffer->primary_selection()->selected(0); return; } /* If the changes didn't cause scrolling, decide the range of characters that need to be re-painted. Also if the cursor position moved, be sure that the redisplay range covers the old cursor position so the old cursor gets erased, and erase the bits of the cursor which extend beyond the left and right edges of the text. */ startDispPos = (textD->mContinuousWrap && !textD->mFastDisplay) ? wrapModStart : pos; IS_UTF8_ALIGNED2(buf, startDispPos) if ( origCursorPos == startDispPos && textD->mCursorPos != startDispPos ) startDispPos = min( startDispPos, buf->prev_char_clipped(origCursorPos) ); IS_UTF8_ALIGNED2(buf, startDispPos) if ( linesInserted == linesDeleted ) { if ( nInserted == 0 && nDeleted == 0 ) endDispPos = pos + nRestyled; else { endDispPos = textD->mContinuousWrap ? wrapModEnd : buf->line_end( pos + nInserted ) + 1; if (textD->mContinuousWrap && !textD->mFastDisplay) endDispPos = wrapModEnd; else endDispPos = buf->next_char(buf->line_end( pos + nInserted )); // CET - FIXME if ( origCursorPos >= startDispPos && // ( origCursorPos <= endDispPos || endDispPos == buf->length() ) ) } if (linesInserted > 1) textD->draw_line_numbers(false); } else { endDispPos = buf->next_char(textD->mLastChar); // CET - FIXME if ( origCursorPos >= pos ) /* If more than one line is inserted/deleted, a line break may have been inserted or removed in between, and the line numbers may have changed. If only one line is altered, line numbers cannot be affected (the insertion or removal of a line break always results in at least two lines being redrawn). */ textD->draw_line_numbers(false); } IS_UTF8_ALIGNED2(buf, startDispPos) IS_UTF8_ALIGNED2(buf, endDispPos) /* If there is a style buffer, check if the modification caused additional changes that need to be redisplayed. (Redisplaying separately would cause double-redraw on almost every modification involving styled text). Extend the redraw range to incorporate style changes */ if ( textD->mStyleBuffer ) textD->extend_range_for_styles( &startDispPos, &endDispPos ); IS_UTF8_ALIGNED2(buf, startDispPos) IS_UTF8_ALIGNED2(buf, endDispPos) /* Redisplay computed range */ textD->redisplay_range( startDispPos, endDispPos ); } /** \brief Line numbering stuff, currently unused. In continuous wrap mode, internal line numbers are calculated after wrapping. A separate non-wrapped line count is maintained when line numbering is turned on. There is some performance cost to maintaining this line count, so normally absolute line numbers are not tracked if line numbering is off. This routine allows callers to specify that they still want this line count maintained (for use via TextDPosToLineAndCol). More specifically, this allows the line number reported in the statistics line to be calibrated in absolute lines, rather than post-wrapped lines. */ void Fl_Text_Display_mod::maintain_absolute_top_line_number(int state) { mNeedAbsTopLineNum = state; reset_absolute_top_line_number(); } /** \brief Line numbering stuff, currently unused. Returns the absolute (non-wrapped) line number of the first line displayed. Returns 0 if the absolute top line number is not being maintained. */ int Fl_Text_Display_mod::get_absolute_top_line_number() const { if (mFastDisplay || !mContinuousWrap) return mTopLineNum; if (maintaining_absolute_top_line_number()) return mAbsTopLineNum; return 0; } /** \brief Line numbering stuff, currently unused. Re-calculate absolute top line number for a change in scroll position. */ void Fl_Text_Display_mod::absolute_top_line_number(int oldFirstChar) { if (maintaining_absolute_top_line_number()) { if (mFirstChar < oldFirstChar) mAbsTopLineNum -= buffer()->count_lines(mFirstChar, oldFirstChar); else mAbsTopLineNum += buffer()->count_lines(oldFirstChar, mFirstChar); } } /** \brief Line numbering stuff, currently unused. Return true if a separate absolute top line number is being maintained (for displaying line numbers or showing in the statistics line). */ int Fl_Text_Display_mod::maintaining_absolute_top_line_number() const { return (!mFastDisplay && mContinuousWrap && (mLineNumWidth != 0 || mNeedAbsTopLineNum)); } /** \brief Line numbering stuff, probably unused. Count lines from the beginning of the buffer to reestablish the absolute (non-wrapped) top line number. If mode is not continuous wrap, or the number is not being maintained, does nothing. */ void Fl_Text_Display_mod::reset_absolute_top_line_number() { mAbsTopLineNum = 1; absolute_top_line_number(0); } /** \brief Convert a position index into a line number offset. Find the line number of position \p pos relative to the first line of displayed text. Returns 0 if the line is not displayed. \param pos ?? \param[out] lineNum ?? \return ?? \todo What does this do? */ int Fl_Text_Display_mod::position_to_line( int pos, int *lineNum ) const { IS_UTF8_ALIGNED2(buffer(), pos) int i; *lineNum = 0; if ( pos < mFirstChar ) return 0; if ( pos > mLastChar ) { if ( empty_vlines() ) { if ( mLastChar < mBuffer->length() ) { if ( !position_to_line( mLastChar, lineNum ) ) { Fl::error("Fl_Text_Display_mod::position_to_line(): Consistency check ptvl failed"); return 0; } return ++( *lineNum ) <= mNVisibleLines - 1; } else { position_to_line( buffer()->prev_char_clipped(mLastChar), lineNum ); return 1; } } return 0; } for ( i = mNVisibleLines - 1; i >= 0; i-- ) { if ( mLineStarts[ i ] != -1 && pos >= mLineStarts[ i ] ) { *lineNum = i; return 1; } } return 0; /* probably never be reached */ } /** Universal pixel machine. We use a single function that handles all line layout, measuring, and drawing \li draw a text range \li return the width of a text range in pixels \li return the index of a character that is at a pixel position \param[in] mode DRAW_LINE, GET_WIDTH, FIND_INDEX \param[in] lineStartPos index of first character \param[in] lineLen size of string in bytes \param[in] leftChar, rightChar \param[in] Y drawing position \param[in] bottomClip, leftClip, rightClip stop work when we reach the clipped area. rightClip is the X position that we search in FIND_INDEX. \retval DRAW_LINE index of last drawn character \retval GET_WIDTH width in pixels of text segment if we would draw it \retval FIND_INDEX index of character at given x position in window coordinates \retval FIND_INDEX_FROM_ZERO index of character at given x position without scrolling and widget offsets \todo we need to handle hidden hyphens and tabs here! \todo we handle all styles and selections \todo we must provide code to get pixel positions of the middle of a character as well */ int Fl_Text_Display_mod::handle_vline( int mode, int lineStartPos, int lineLen, int leftChar, int rightChar, int Y, int bottomClip, int leftClip, int rightClip) const { IS_UTF8_ALIGNED2(buffer(), lineStartPos) // FIXME: we need to allow two modes for FIND_INDEX: one on the edge of the // FIXME: character for selection, and one on the character center for cursors. int i, X, startX, startIndex, style, charStyle; char *lineStr; if ( lineStartPos == -1 ) { lineStr = NULL; } else { lineStr = mBuffer->text_range( lineStartPos, lineStartPos + lineLen ); } if (mode==GET_WIDTH) { X = 0; } else if (mode==FIND_INDEX_FROM_ZERO) { X = 0; mode = FIND_INDEX; } else { X = text_area.x - mHorizOffset; } startX = X; startIndex = 0; if (!lineStr) { // just clear the background if (mode==DRAW_LINE) { style = position_style(lineStartPos, lineLen, -1); draw_string( style|BG_ONLY_MASK, text_area.x, Y, text_area.x+text_area.w, lineStr, lineLen ); } if (mode==FIND_INDEX) { IS_UTF8_ALIGNED2(buffer(), lineStartPos) return lineStartPos; } return 0; } char currChar = 0, prevChar = 0; // draw the line style = position_style(lineStartPos, lineLen, 0); for (i=0; itab_distance()); int xAbs = (mode==GET_WIDTH) ? startX : startX+mHorizOffset-text_area.x; w = (((xAbs/tab)+1)*tab) - xAbs; if (mode==DRAW_LINE) draw_string( style|BG_ONLY_MASK, startX, Y, startX+w, 0, 0 ); if (mode==FIND_INDEX && startX+w>rightClip) { // find x pos inside block free(lineStr); return lineStartPos + startIndex; } } else { // draw a text segment w = int( string_width( lineStr+startIndex, i-startIndex, style ) ); if (mode==DRAW_LINE) draw_string( style, startX, Y, startX+w, lineStr+startIndex, i-startIndex ); if (mode==FIND_INDEX && startX+w>rightClip) { // find x pos inside block int di = find_x(lineStr+startIndex, i-startIndex, style, rightClip-startX); free(lineStr); IS_UTF8_ALIGNED2(buffer(), (lineStartPos+startIndex+di)) return lineStartPos + startIndex + di; } } style = charStyle; startX += w; startIndex = i; } i += len; prevChar = currChar; } int w = 0; if (currChar=='\t') { // draw a single Tab space int tab = (int)col_to_x(mBuffer->tab_distance()); int xAbs = (mode==GET_WIDTH) ? startX : startX+mHorizOffset-text_area.x; w = (((xAbs/tab)+1)*tab) - xAbs; if (mode==DRAW_LINE) draw_string( style|BG_ONLY_MASK, startX, Y, startX+w, 0, 0 ); if (mode==FIND_INDEX) { // find x pos inside block free(lineStr); return lineStartPos + startIndex + ( rightClip-startX>w ? 1 : 0 ); } } else { w = int( string_width( lineStr+startIndex, i-startIndex, style ) ); if (mode==DRAW_LINE) draw_string( style, startX, Y, startX+w, lineStr+startIndex, i-startIndex ); if (mode==FIND_INDEX) { // find x pos inside block int di = find_x(lineStr+startIndex, i-startIndex, style, rightClip-startX); free(lineStr); IS_UTF8_ALIGNED2(buffer(), (lineStartPos+startIndex+di)) return lineStartPos + startIndex + di; } } if (mode==GET_WIDTH) { free(lineStr); return startX+w; } // clear the rest of the line startX += w; style = position_style(lineStartPos, lineLen, i); if (mode==DRAW_LINE) draw_string( style|BG_ONLY_MASK, startX, Y, text_area.x+text_area.w, lineStr, lineLen ); free(lineStr); IS_UTF8_ALIGNED2(buffer(), (lineStartPos+lineLen)) return lineStartPos + lineLen; } /** \brief Find the index of the character that lies at the given x position. \param s UTF-8 text string \param len length of string \param style index into style lookup table \param x position in pixels \return index into buffer */ int Fl_Text_Display_mod::find_x(const char *s, int len, int style, int x) const { IS_UTF8_ALIGNED(s) // TODO: use binary search which may be quicker. int i = 0; while (ix) return i; i += cl; } return len; } /** \brief Draw a single line of text. Draw the text on a single line represented by \p visLineNum (the number of lines down from the top of the display), limited by \p leftClip and \p rightClip window coordinates and \p leftCharIndex and \p rightCharIndex character positions (not including the character at position \p rightCharIndex). \param visLineNum index of line in the visible line number lookup \param leftClip, rightClip pixel position of clipped area \param leftCharIndex, rightCharIndex index into line of segment that we want to draw */ void Fl_Text_Display_mod::draw_vline(int visLineNum, int leftClip, int rightClip, int leftCharIndex, int rightCharIndex) { int Y, lineStartPos, lineLen, fontHeight; // printf("draw_vline(visLineNum=%d, leftClip=%d, rightClip=%d, leftCharIndex=%d, rightCharIndex=%d)\n", // visLineNum, leftClip, rightClip, leftCharIndex, rightCharIndex); // printf("nNVisibleLines=%d\n", mNVisibleLines); /* If line is not displayed, skip it */ if ( visLineNum < 0 || visLineNum >= mNVisibleLines ) return; /* Calculate Y coordinate of the string to draw */ fontHeight = mMaxsize; Y = text_area.y + visLineNum * fontHeight; /* Get the text, length, and buffer position of the line to display */ lineStartPos = mLineStarts[ visLineNum ]; if ( lineStartPos == -1 ) { lineLen = 0; } else { lineLen = vline_length( visLineNum ); } /* Shrink the clipping range to the active display area */ leftClip = max( text_area.x, leftClip ); rightClip = min( rightClip, text_area.x + text_area.w ); handle_vline(DRAW_LINE, lineStartPos, lineLen, leftCharIndex, rightCharIndex, Y, Y+fontHeight, leftClip, rightClip); return; } /** \brief Draw a text segment in a single style. Draw a string or blank area according to parameter \p style, using the appropriate colors and drawing method for that style, with top left corner at \p X, \p Y. If style says to draw text, use \p string as source of characters, and draw \p nChars, if style is FILL, erase rectangle where text would have drawn from \p X to \p toX and from \p Y to the maximum y extent of the current font(s). \param style index into style lookup table \param X, Y drawing origin \param toX rightmost position if this is a fill operation \param string text if this is a drawing operation \param nChars number of characters to draw */ void Fl_Text_Display_mod::draw_string(int style, int X, int Y, int toX, const char *string, int nChars) const { IS_UTF8_ALIGNED(string) const Style_Table_Entry * styleRec; /* Draw blank area rather than text, if that was the request */ if ( style & FILL_MASK ) { if (style & TEXT_ONLY_MASK) return; clear_rect( style, X, Y, toX - X, mMaxsize ); return; } /* Set font, color, and gc depending on style. For normal text, GCs for normal drawing, or drawing within a Fl_Text_Selection or highlight are pre-allocated and pre-configured. For syntax highlighting, GCs are configured here, on the fly. */ Fl_Font font = textfont(); int fsize = textsize(); Fl_Color foreground; Fl_Color background; if ( style & STYLE_LOOKUP_MASK ) { int si = (style & STYLE_LOOKUP_MASK) - 'A'; if (si < 0) si = 0; else if (si >= mNStyles) si = mNStyles - 1; styleRec = mStyleTable + si; font = styleRec->font; fsize = styleRec->size; if (style & PRIMARY_MASK) { if (Fl::focus() == (Fl_Widget*)this) background = selection_color(); else background = fl_color_average(color(), selection_color(), 0.4f); } else if (style & HIGHLIGHT_MASK) { if (Fl::focus() == (Fl_Widget*)this) background = fl_color_average(color(), selection_color(), 0.5f); else background = fl_color_average(color(), selection_color(), 0.6f); } else background = color(); foreground = fl_contrast(styleRec->color, background); } else if (style & PRIMARY_MASK) { if (Fl::focus() == (Fl_Widget*)this) background = selection_color(); else background = fl_color_average(color(), selection_color(), 0.4f); foreground = fl_contrast(textcolor(), background); } else if (style & HIGHLIGHT_MASK) { if (Fl::focus() == (Fl_Widget*)this) background = fl_color_average(color(), selection_color(), 0.5f); else background = fl_color_average(color(), selection_color(), 0.6f); foreground = fl_contrast(textcolor(), background); } else { foreground = textcolor(); background = color(); } if (!(style & TEXT_ONLY_MASK)) { fl_color( background ); fl_rectf( X, Y, toX - X, mMaxsize ); } if (!(style & BG_ONLY_MASK)) { fl_color( foreground ); fl_font( font, fsize ); #if !(defined(__APPLE__) || defined(WIN32)) && USE_XFT // makes sure antialiased ÄÖÜ do not leak on line above fl_push_clip(X, Y, toX - X, mMaxsize); #endif fl_draw( string, nChars, X, Y + mMaxsize - fl_descent()); #if !(defined(__APPLE__) || defined(WIN32)) && USE_XFT fl_pop_clip(); #endif } // CET - FIXME /* If any space around the character remains unfilled (due to use of different sized fonts for highlighting), fill in above or below to erase previously drawn characters */ /* if (fs->ascent < mAscent) clear_rect( style, X, Y, toX - X, mAscent - fs->ascent); if (fs->descent < mDescent) clear_rect( style, X, Y + mAscent + fs->descent, toX - x, mDescent - fs->descent); */ /* Underline if style is secondary Fl_Text_Selection */ /* if (style & SECONDARY_MASK) XDrawLine(XtDisplay(mW), XtWindow(mW), gc, x, y + mAscent, toX - 1, Y + fs->ascent); */ } /** \brief Clear a rectangle with the appropriate background color for \p style. \param style index into style table \param X, Y, width, height size and position of background area */ void Fl_Text_Display_mod::clear_rect(int style, int X, int Y, int width, int height) const { /* A width of zero means "clear to end of window" to XClearArea */ if ( width == 0 ) return; if (style & PRIMARY_MASK) { if (Fl::focus()==(Fl_Widget*)this) { fl_color(selection_color()); } else { fl_color(fl_color_average(color(), selection_color(), 0.4f)); } } else if (style & HIGHLIGHT_MASK) { if (Fl::focus()==(Fl_Widget*)this) { fl_color(fl_color_average(color(), selection_color(), 0.5f)); } else { fl_color(fl_color_average(color(), selection_color(), 0.6f)); } } else { fl_color( color() ); } fl_rectf( X, Y, width, height ); } /** \brief Draw a cursor with top center at \p X, \p Y. \param X, Y cursor position in pixels */ void Fl_Text_Display_mod::draw_cursor( int X, int Y ) { typedef struct { int x1, y1, x2, y2; } Segment; Segment segs[ 5 ]; int left, right, cursorWidth, midY; // int fontWidth = mFontStruct->min_bounds.width, nSegs = 0; int fontWidth = TMPFONTWIDTH; // CET - FIXME int nSegs = 0; int fontHeight = mMaxsize; int bot = Y + fontHeight - 1; if ( X < text_area.x - 1 || X > text_area.x + text_area.w ) return; /* For cursors other than the block, make them around 2/3 of a character width, rounded to an even number of pixels so that X will draw an odd number centered on the stem at x. */ cursorWidth = 4; //(fontWidth/3) * 2; left = X - cursorWidth / 2; right = left + cursorWidth; /* Create segments and draw cursor */ if ( mCursorStyle == CARET_CURSOR ) { midY = bot - fontHeight / 5; segs[ 0 ].x1 = left; segs[ 0 ].y1 = bot; segs[ 0 ].x2 = X; segs[ 0 ].y2 = midY; segs[ 1 ].x1 = X; segs[ 1 ].y1 = midY; segs[ 1 ].x2 = right; segs[ 1 ].y2 = bot; segs[ 2 ].x1 = left; segs[ 2 ].y1 = bot; segs[ 2 ].x2 = X; segs[ 2 ].y2 = midY - 1; segs[ 3 ].x1 = X; segs[ 3 ].y1 = midY - 1; segs[ 3 ].x2 = right; segs[ 3 ].y2 = bot; nSegs = 4; } else if ( mCursorStyle == NORMAL_CURSOR ) { segs[ 0 ].x1 = left; segs[ 0 ].y1 = Y; segs[ 0 ].x2 = right; segs[ 0 ].y2 = Y; segs[ 1 ].x1 = X; segs[ 1 ].y1 = Y; segs[ 1 ].x2 = X; segs[ 1 ].y2 = bot; segs[ 2 ].x1 = left; segs[ 2 ].y1 = bot; segs[ 2 ].x2 = right; segs[ 2 ].y2 = bot; nSegs = 3; } else if ( mCursorStyle == HEAVY_CURSOR ) { segs[ 0 ].x1 = X - 1; segs[ 0 ].y1 = Y; segs[ 0 ].x2 = X - 1; segs[ 0 ].y2 = bot; segs[ 1 ].x1 = X; segs[ 1 ].y1 = Y; segs[ 1 ].x2 = X; segs[ 1 ].y2 = bot; segs[ 2 ].x1 = X + 1; segs[ 2 ].y1 = Y; segs[ 2 ].x2 = X + 1; segs[ 2 ].y2 = bot; segs[ 3 ].x1 = left; segs[ 3 ].y1 = Y; segs[ 3 ].x2 = right; segs[ 3 ].y2 = Y; segs[ 4 ].x1 = left; segs[ 4 ].y1 = bot; segs[ 4 ].x2 = right; segs[ 4 ].y2 = bot; nSegs = 5; } else if ( mCursorStyle == DIM_CURSOR ) { midY = Y + fontHeight / 2; segs[ 0 ].x1 = X; segs[ 0 ].y1 = Y; segs[ 0 ].x2 = X; segs[ 0 ].y2 = Y; segs[ 1 ].x1 = X; segs[ 1 ].y1 = midY; segs[ 1 ].x2 = X; segs[ 1 ].y2 = midY; segs[ 2 ].x1 = X; segs[ 2 ].y1 = bot; segs[ 2 ].x2 = X; segs[ 2 ].y2 = bot; nSegs = 3; } else if ( mCursorStyle == BLOCK_CURSOR ) { right = X + fontWidth; segs[ 0 ].x1 = X; segs[ 0 ].y1 = Y; segs[ 0 ].x2 = right; segs[ 0 ].y2 = Y; segs[ 1 ].x1 = right; segs[ 1 ].y1 = Y; segs[ 1 ].x2 = right; segs[ 1 ].y2 = bot; segs[ 2 ].x1 = right; segs[ 2 ].y1 = bot; segs[ 2 ].x2 = X; segs[ 2 ].y2 = bot; segs[ 3 ].x1 = X; segs[ 3 ].y1 = bot; segs[ 3 ].x2 = X; segs[ 3 ].y2 = Y; nSegs = 4; } fl_color( mCursor_color ); for ( int k = 0; k < nSegs; k++ ) { fl_line( segs[ k ].x1, segs[ k ].y1, segs[ k ].x2, segs[ k ].y2 ); } } /** \brief Find the correct style for a character. Determine the drawing method to use to draw a specific character from "buf". \p lineStartPos gives the character index where the line begins, \p lineIndex, the number of characters past the beginning of the line, and \p lineIndex the number of displayed characters past the beginning of the line. Passing \p lineStartPos of -1 returns the drawing style for "no text". Why not just: position_style(pos)? Because style applies to blank areas of the window beyond the text boundaries, and because this routine must also decide whether a position is inside of a rectangular Fl_Text_Selection, and do so efficiently, without re-counting character positions from the start of the line. Note that style is a somewhat incorrect name, drawing method would be more appropriate. \param lineStartPos beginning of this line \param lineLen number of bytes in line \param lineIndex position of character within line \return style for the given character */ int Fl_Text_Display_mod::position_style( int lineStartPos, int lineLen, int lineIndex) const { IS_UTF8_ALIGNED2(buffer(), lineStartPos) Fl_Text_Buffer_mod * buf = mBuffer; Fl_Text_Buffer_mod *styleBuf = mStyleBuffer; int pos, style = 0; if ( lineStartPos == -1 || buf == NULL ) return FILL_MASK; pos = lineStartPos + min( lineIndex, lineLen ); if ( lineIndex >= lineLen ) style = FILL_MASK; else if ( styleBuf != NULL ) { style = ( unsigned char ) styleBuf->byte_at( pos ); if (style == mUnfinishedStyle && mUnfinishedHighlightCB) { /* encountered "unfinished" style, trigger parsing */ (mUnfinishedHighlightCB)( pos, mHighlightCBArg); style = (unsigned char) styleBuf->byte_at( pos); } } if (buf->primary_selection()->includes(pos)) style |= PRIMARY_MASK; if (buf->highlight_selection()->includes(pos)) style |= HIGHLIGHT_MASK; if (buf->secondary_selection()->includes(pos)) style |= SECONDARY_MASK; return style; } /** \brief Find the width of a string in the font of a particular style. \param string the text \param length number of bytes in string \param style index into style table \return width of text segment in pixels */ double Fl_Text_Display_mod::string_width( const char *string, int length, int style ) const { IS_UTF8_ALIGNED(string) Fl_Font font; Fl_Fontsize fsize; if ( mNStyles && (style & STYLE_LOOKUP_MASK) ) { int si = (style & STYLE_LOOKUP_MASK) - 'A'; if (si < 0) si = 0; else if (si >= mNStyles) si = mNStyles - 1; font = mStyleTable[si].font; fsize = mStyleTable[si].size; } else { font = textfont(); fsize = textsize(); } fl_font( font, fsize ); return fl_width( string, length ); } /** \brief Translate a pixel position into a character index. Translate window coordinates to the nearest (insert cursor or character cell) text position. The parameter \p posType specifies how to interpret the position: CURSOR_POS means translate the coordinates to the nearest cursor position, and CHARACTER_POS means return the position of the character closest to (\p X, \p Y). \param X, Y pixel position \param posType CURSOR_POS or CHARACTER_POS \return index into text buffer */ int Fl_Text_Display_mod::xy_to_position( int X, int Y, int posType ) const { int lineStart, lineLen, fontHeight; int visLineNum; /* Find the visible line number corresponding to the Y coordinate */ fontHeight = mMaxsize; visLineNum = ( Y - text_area.y ) / fontHeight; if ( visLineNum < 0 ) return mFirstChar; if ( visLineNum >= mNVisibleLines ) visLineNum = mNVisibleLines - 1; /* Find the position at the start of the line */ lineStart = mLineStarts[ visLineNum ]; /* If the line start was empty, return the last position in the buffer */ if ( lineStart == -1 ) return mBuffer->length(); /* Get the line text and its length */ lineLen = vline_length( visLineNum ); return handle_vline(FIND_INDEX, lineStart, lineLen, 0, 0, 0, 0, text_area.x, X); } /** \brief Translate pixel coordinates into row and column. Translate window coordinates to the nearest row and column number for positioning the cursor. This, of course, makes no sense when the font is proportional, since there are no absolute columns. The parameter posType specifies how to interpret the position: CURSOR_POS means translate the coordinates to the nearest position between characters, and CHARACTER_POS means translate the position to the nearest character cell. \param X, Y pixel coordinates \param[out] row, column neares row and column \param posType CURSOR_POS or CHARACTER_POS */ void Fl_Text_Display_mod::xy_to_rowcol( int X, int Y, int *row, int *column, int posType ) const { int fontHeight = mMaxsize; int fontWidth = TMPFONTWIDTH; //mFontStruct->max_bounds.width; /* Find the visible line number corresponding to the Y coordinate */ *row = ( Y - text_area.y ) / fontHeight; if ( *row < 0 ) *row = 0; if ( *row >= mNVisibleLines ) *row = mNVisibleLines - 1; *column = ( ( X - text_area.x ) + mHorizOffset + ( posType == CURSOR_POS ? fontWidth / 2 : 0 ) ) / fontWidth; if ( *column < 0 ) * column = 0; } /** \brief Offset line start counters for a new vertical scroll position. Offset the line starts array, mTopLineNum, mFirstChar and lastChar, for a new vertical scroll position given by newTopLineNum. If any currently displayed lines will still be visible, salvage the line starts values, otherwise, count lines from the nearest known line start (start or end of buffer, or the closest value in the mLineStarts array) \param newTopLineNum index into buffer */ void Fl_Text_Display_mod::offset_line_starts( int newTopLineNum ) { int oldTopLineNum = mTopLineNum; int oldFirstChar = mFirstChar; int lineDelta = newTopLineNum - oldTopLineNum; int nVisLines = mNVisibleLines; int *lineStarts = mLineStarts; int i, lastLineNum; Fl_Text_Buffer_mod *buf = mBuffer; /* If there was no offset, nothing needs to be changed */ if ( lineDelta == 0 ) return; /* Find the new value for mFirstChar by counting lines from the nearest known line start (start or end of buffer, or the closest value in the lineStarts array) */ lastLineNum = oldTopLineNum + nVisLines - 1; if ( newTopLineNum < oldTopLineNum && newTopLineNum < -lineDelta ) { mFirstChar = skip_lines( 0, newTopLineNum - 1, true ); } else if ( newTopLineNum < oldTopLineNum ) { mFirstChar = rewind_lines( mFirstChar, -lineDelta ); } else if ( newTopLineNum < lastLineNum ) { mFirstChar = lineStarts[ newTopLineNum - oldTopLineNum ]; } else if ( newTopLineNum - lastLineNum < mNBufferLines - newTopLineNum ) { mFirstChar = skip_lines( lineStarts[ nVisLines - 1 ], newTopLineNum - lastLineNum, true ); } else { mFirstChar = rewind_lines( buf->length(), mNBufferLines - newTopLineNum + 1 ); } /* Fill in the line starts array */ if ( lineDelta < 0 && -lineDelta < nVisLines ) { for ( i = nVisLines - 1; i >= -lineDelta; i-- ) lineStarts[ i ] = lineStarts[ i + lineDelta ]; calc_line_starts( 0, -lineDelta ); } else if ( lineDelta > 0 && lineDelta < nVisLines ) { for ( i = 0; i < nVisLines - lineDelta; i++ ) lineStarts[ i ] = lineStarts[ i + lineDelta ]; calc_line_starts( nVisLines - lineDelta, nVisLines - 1 ); } else calc_line_starts( 0, nVisLines ); /* Set lastChar and mTopLineNum */ calc_last_char(); mTopLineNum = newTopLineNum; /* If we're numbering lines or being asked to maintain an absolute line number, re-calculate the absolute line number */ absolute_top_line_number(oldFirstChar); } /** \brief Update line start arrays and variables. Update the line starts array, mTopLineNum, mFirstChar and lastChar for this text display after a modification to the text buffer, given by the position \p pos where the change began, and the numbers of characters and lines inserted and deleted. \param pos index into buffer of recent changes \param charsInserted number of bytes(!) inserted \param charsDeleted number of bytes(!) deleted \param linesInserted number of lines \param linesDeleted number of lines \param[out] scrolled set to 1 if the text display needs to be scrolled */ void Fl_Text_Display_mod::update_line_starts(int pos, int charsInserted, int charsDeleted, int linesInserted, int linesDeleted, int *scrolled ) { IS_UTF8_ALIGNED2(buffer(), pos) int *lineStarts = mLineStarts; int i, lineOfPos, lineOfEnd, nVisLines = mNVisibleLines; int charDelta = charsInserted - charsDeleted; int lineDelta = linesInserted - linesDeleted; /* If all of the changes were before the displayed text, the display doesn't change, just update the top line num and offset the line start entries and first and last characters */ if ( pos + charsDeleted < mFirstChar ) { mTopLineNum += lineDelta; for ( i = 0; i < nVisLines && lineStarts[i] != -1; i++ ) lineStarts[ i ] += charDelta; mFirstChar += charDelta; mLastChar += charDelta; *scrolled = 0; return; } /* The change began before the beginning of the displayed text, but part or all of the displayed text was deleted */ if ( pos < mFirstChar ) { /* If some text remains in the window, anchor on that */ if ( position_to_line( pos + charsDeleted, &lineOfEnd ) && ++lineOfEnd < nVisLines && lineStarts[ lineOfEnd ] != -1 ) { mTopLineNum = max( 1, mTopLineNum + lineDelta ); mFirstChar = rewind_lines(lineStarts[ lineOfEnd ] + charDelta, lineOfEnd ); /* Otherwise anchor on original line number and recount everything */ } else { if ( mTopLineNum > mNBufferLines + lineDelta ) { mTopLineNum = 1; mFirstChar = 0; } else mFirstChar = skip_lines( 0, mTopLineNum - 1, true ); } calc_line_starts( 0, nVisLines - 1 ); /* calculate lastChar by finding the end of the last displayed line */ calc_last_char(); *scrolled = 1; return; } /* If the change was in the middle of the displayed text (it usually is), salvage as much of the line starts array as possible by moving and offsetting the entries after the changed area, and re-counting the added lines or the lines beyond the salvaged part of the line starts array */ if ( pos <= mLastChar ) { /* find line on which the change began */ position_to_line( pos, &lineOfPos ); /* salvage line starts after the changed area */ if ( lineDelta == 0 ) { for ( i = lineOfPos + 1; i < nVisLines && lineStarts[ i ] != -1; i++ ) lineStarts[ i ] += charDelta; } else if ( lineDelta > 0 ) { for ( i = nVisLines - 1; i >= lineOfPos + lineDelta + 1; i-- ) lineStarts[ i ] = lineStarts[ i - lineDelta ] + ( lineStarts[ i - lineDelta ] == -1 ? 0 : charDelta ); } else /* (lineDelta < 0) */ { for ( i = max( 0, lineOfPos + 1 ); i < nVisLines + lineDelta; i++ ) lineStarts[ i ] = lineStarts[ i - lineDelta ] + ( lineStarts[ i - lineDelta ] == -1 ? 0 : charDelta ); } /* fill in the missing line starts */ if ( linesInserted >= 0 ) calc_line_starts( lineOfPos + 1, lineOfPos + linesInserted ); if ( lineDelta < 0 ) calc_line_starts( nVisLines + lineDelta, nVisLines ); /* calculate lastChar by finding the end of the last displayed line */ calc_last_char(); *scrolled = 0; return; } /* Change was past the end of the displayed text, but displayable by virtue of being an insert at the end of the buffer into visible blank lines */ if ( empty_vlines() ) { position_to_line( pos, &lineOfPos ); calc_line_starts( lineOfPos, lineOfPos + linesInserted ); calc_last_char(); *scrolled = 0; return; } /* Change was beyond the end of the buffer and not visible, do nothing */ *scrolled = 0; } /** \brief Update the line start arrays. Scan through the text in the "textD"'s buffer and recalculate the line starts array values beginning at index "startLine" and continuing through (including) "endLine". It assumes that the line starts entry preceding "startLine" (or mFirstChar if startLine is 0) is good, and re-counts newlines to fill in the requested entries. Out of range values for "startLine" and "endLine" are acceptable. \param startLine, endLine range of lines to scan as line numbers */ void Fl_Text_Display_mod::calc_line_starts( int startLine, int endLine ) { int startPos, bufLen = mBuffer->length(); int line, lineEnd, nextLineStart, nVis = mNVisibleLines; int *lineStarts = mLineStarts; /* Clean up (possibly) messy input parameters */ if ( endLine < 0 ) endLine = 0; if ( endLine >= nVis ) endLine = nVis - 1; if ( startLine < 0 ) startLine = 0; if ( startLine >= nVis ) startLine = nVis - 1; if ( startLine > endLine ) return; /* Find the last known good line number -> position mapping */ if ( startLine == 0 ) { lineStarts[ 0 ] = mFirstChar; startLine = 1; } startPos = lineStarts[ startLine - 1 ]; /* If the starting position is already past the end of the text, fill in -1's (means no text on line) and return */ if ( startPos == -1 ) { for ( line = startLine; line <= endLine; line++ ) lineStarts[ line ] = -1; return; } /* Loop searching for ends of lines and storing the positions of the start of the next line in lineStarts */ for ( line = startLine; line <= endLine; line++ ) { find_line_end(startPos, true, &lineEnd, &nextLineStart); startPos = nextLineStart; if ( startPos >= bufLen ) { /* If the buffer ends with a newline or line break, put buf->length() in the next line start position (instead of a -1 which is the normal marker for an empty line) to indicate that the cursor may safely be displayed there */ if ( line == 0 || ( lineStarts[ line - 1 ] != bufLen && lineEnd != nextLineStart ) ) { lineStarts[ line ] = bufLen; line++; } break; } lineStarts[ line ] = startPos; } /* Set any entries beyond the end of the text to -1 */ for ( ; line <= endLine; line++ ) lineStarts[ line ] = -1; } /** \brief Update last display character index. Given a Fl_Text_Display_mod with a complete, up-to-date lineStarts array, update the lastChar entry to point to the last buffer position displayed. */ void Fl_Text_Display_mod::calc_last_char() { int i; for (i = mNVisibleLines - 1; i >= 0 && mLineStarts[i] == -1; i--) ; mLastChar = i < 0 ? 0 : line_end(mLineStarts[i], true); } /** \brief Scrolls the current buffer to start at the specified line and column. \param topLineNum top line number \param horizOffset column number \todo Column numbers make little sense here. */ void Fl_Text_Display_mod::scroll(int topLineNum, int horizOffset) { mTopLineNumHint = topLineNum; mHorizOffsetHint = horizOffset; resize(x(), y(), w(), h()); } /** \brief Scrolls the current buffer to start at the specified line and column. \param topLineNum top line number \param horizOffset in pixels \return 0 if nothing changed, 1 if we scrolled */ int Fl_Text_Display_mod::scroll_(int topLineNum, int horizOffset) { /* Limit the requested scroll position to allowable values */ if (topLineNum > mNBufferLines + 3 - mNVisibleLines) topLineNum = mNBufferLines + 3 - mNVisibleLines; if (topLineNum < 1) topLineNum = 1; if (horizOffset > longest_vline() - text_area.w) horizOffset = longest_vline() - text_area.w; if (horizOffset < 0) horizOffset = 0; /* Do nothing if scroll position hasn't actually changed or there's no window to draw in yet */ if (mHorizOffset == horizOffset && mTopLineNum == topLineNum) return 0; /* If the vertical scroll position has changed, update the line starts array and related counters in the text display */ offset_line_starts(topLineNum); /* Just setting mHorizOffset is enough information for redisplay */ mHorizOffset = horizOffset; // redraw all text damage(FL_DAMAGE_EXPOSE); return 1; } /** \brief Update vertical scrollbar. Update the minimum, maximum, slider size, page increment, and value for vertical scrollbar. */ void Fl_Text_Display_mod::update_v_scrollbar() { /* The vertical scrollbar value and slider size directly represent the top line number, and the number of visible lines respectively. The scroll bar maximum value is chosen to generally represent the size of the whole buffer, with minor adjustments to keep the scrollbar widget happy */ #ifdef DEBUG printf("Fl_Text_Display_mod::update_v_scrollbar():\n" " mTopLineNum=%d, mNVisibleLines=%d, mNBufferLines=%d\n", mTopLineNum, mNVisibleLines, mNBufferLines); #endif // DEBUG mVScrollBar->value(mTopLineNum, mNVisibleLines, 1, mNBufferLines + 2); mVScrollBar->linesize(3); } /** \brief Update vertical scrollbar. Update the minimum, maximum, slider size, page increment, and value for the horizontal scrollbar. */ void Fl_Text_Display_mod::update_h_scrollbar() { int sliderMax = max(longest_vline(), text_area.w + mHorizOffset); mHScrollBar->value( mHorizOffset, text_area.w, 0, sliderMax ); } /** \brief Callbacks for drag or valueChanged on scrollbars. */ void Fl_Text_Display_mod::v_scrollbar_cb(Fl_Scrollbar* b, Fl_Text_Display_mod* textD) { if (b->value() == textD->mTopLineNum) return; textD->scroll(b->value(), textD->mHorizOffset); } /** \brief Callbacks for drag or valueChanged on scrollbars. */ void Fl_Text_Display_mod::h_scrollbar_cb(Fl_Scrollbar* b, Fl_Text_Display_mod* textD) { if (b->value() == textD->mHorizOffset) return; textD->scroll(textD->mTopLineNum, b->value()); } /** \brief Refresh the line number area. If clearAll is False, writes only over the character cell areas. Setting clearAll to True will clear out any stray marks outside of the character cell area, which might have been left from before a resize or font change. This function is not used. */ void Fl_Text_Display_mod::draw_line_numbers(bool /*clearAll*/) { #if 0 int y, line, visLine, nCols, lineStart; char lineNumString[12]; int lineHeight = mMaxsize ? mMaxsize : textsize_; int charWidth = TMPFONTWIDTH; //mFontStruct->max_bounds.width; /* Don't draw if mLineNumWidth == 0 (line numbers are hidden), or widget is not yet realized */ if (mLineNumWidth == 0 || visible_r()) return; /* GC is allocated on demand, since not everyone will use line numbering */ if (textD->lineNumGC == NULL) { XGCValues values; values.foreground = textD->lineNumFGPixel; values.background = textD->bgPixel; values.font = textD->fontStruct->fid; textD->lineNumGC = XtGetGC(textD->w, GCFont| GCForeground | GCBackground, &values); } /* Erase the previous contents of the line number area, if requested */ if (clearAll) XClearArea(XtDisplay(textD->w), XtWindow(textD->w), textD->lineNumLeft, textD->top, textD->lineNumWidth, textD->height, False); /* Draw the line numbers, aligned to the text */ nCols = min(11, textD->lineNumWidth / charWidth); y = textD->top; line = getAbsTopLineNum(textD); for (visLine=0; visLine < textD->nVisibleLines; visLine++) { lineStart = textD->lineStarts[visLine]; if (lineStart != -1 && (lineStart==0 || BufGetCharacter(textD->buffer, lineStart-1)=='\n')) { sprintf(lineNumString, "%*d", nCols, line); XDrawImageString(XtDisplay(textD->w), XtWindow(textD->w), textD->lineNumGC, textD->lineNumLeft, y + textD->ascent, lineNumString, strlen(lineNumString)); line++; } else { XClearArea(XtDisplay(textD->w), XtWindow(textD->w), textD->lineNumLeft, y, textD->lineNumWidth, textD->ascent + textD->descent, False); if (visLine == 0) line++; } y += lineHeight; } #endif } static int max( int i1, int i2 ) { return i1 >= i2 ? i1 : i2; } static int min( int i1, int i2 ) { return i1 <= i2 ? i1 : i2; } /** Count the number of newlines in a null-terminated text string; */ static int countlines( const char *string ) { IS_UTF8_ALIGNED(string) const char * c; int lineCount = 0; if (!string) return 0; for ( c = string; *c != '\0'; c++ ) if ( *c == '\n' ) lineCount++; return lineCount; } /** \brief Returns the width in pixels of the displayed line pointed to by "visLineNum". \param visLineNum index into visible lines array \return width of line in pixels */ int Fl_Text_Display_mod::measure_vline( int visLineNum ) const { int lineLen = vline_length( visLineNum ); int lineStartPos = mLineStarts[ visLineNum ]; if (lineStartPos < 0 || lineLen == 0) return 0; return handle_vline(GET_WIDTH, lineStartPos, lineLen, 0, 0, 0, 0, 0, 0); } /** \brief Return true if there are lines visible with no corresponding buffer text. \return 1 if there are empty lines */ int Fl_Text_Display_mod::empty_vlines() const { return (mNVisibleLines > 0) && (mLineStarts[ mNVisibleLines - 1 ] == -1); } /** \brief Count number of bytes in a visible line. Return the length of a line (number of bytes) by examining entries in the line starts array rather than by scanning for newlines. \param visLineNum index of line in visible line array \return number of bytes in this line */ int Fl_Text_Display_mod::vline_length( int visLineNum ) const { int nextLineStart, lineStartPos; if (visLineNum < 0 || visLineNum >= mNVisibleLines) return (0); lineStartPos = mLineStarts[ visLineNum ]; if ( lineStartPos == -1 ) return 0; if ( visLineNum + 1 >= mNVisibleLines ) return mLastChar - lineStartPos; nextLineStart = mLineStarts[ visLineNum + 1 ]; if ( nextLineStart == -1 ) return mLastChar - lineStartPos; int nextLineStartMinus1 = buffer()->prev_char(nextLineStart); if (wrap_uses_character(nextLineStartMinus1)) return nextLineStartMinus1 - lineStartPos; return nextLineStart - lineStartPos; } /** \brief Wrapping calculations. When continuous wrap is on, and the user inserts or deletes characters, wrapping can happen before and beyond the changed position. This routine finds the extent of the changes, and counts the deleted and inserted lines over that range. It also attempts to minimize the size of the range to what has to be counted and re-displayed, so the results can be useful both for delimiting where the line starts need to be recalculated, and for deciding what part of the text to redisplay. \param deletedText \param pos \param nInserted \param nDeleted \param modRangeStart \param modRangeEnd \param linesInserted \param linesDeleted */ void Fl_Text_Display_mod::find_wrap_range(const char *deletedText, int pos, int nInserted, int nDeleted, int *modRangeStart, int *modRangeEnd, int *linesInserted, int *linesDeleted) { IS_UTF8_ALIGNED(deletedText) IS_UTF8_ALIGNED2(buffer(), pos) int length, retPos, retLines, retLineStart, retLineEnd; Fl_Text_Buffer_mod *deletedTextBuf, *buf = buffer(); int nVisLines = mNVisibleLines; int *lineStarts = mLineStarts; int countFrom, countTo, lineStart, adjLineStart, i; int visLineNum = 0, nLines = 0; /* ** Determine where to begin searching: either the previous newline, or ** if possible, limit to the start of the (original) previous displayed ** line, using information from the existing line starts array */ if (pos >= mFirstChar && pos <= mLastChar) { for (i=nVisLines-1; i>0; i--) { if (lineStarts[i] != -1 && pos >= lineStarts[i]) { break; } } if (i > 0) { countFrom = lineStarts[i-1]; visLineNum = i-1; } else { countFrom = buf->line_start(pos); } } else { countFrom = buf->line_start(pos); } IS_UTF8_ALIGNED2(buf, countFrom) /* ** Move forward through the (new) text one line at a time, counting ** displayed lines, and looking for either a real newline, or for the ** line starts to re-sync with the original line starts array */ lineStart = countFrom; *modRangeStart = countFrom; for (;;) { /* advance to the next line. If the line ended in a real newline or the end of the buffer, that's far enough */ wrapped_line_counter(buf, lineStart, buf->length(), 1, true, 0, &retPos, &retLines, &retLineStart, &retLineEnd); if (retPos >= buf->length()) { countTo = buf->length(); *modRangeEnd = countTo; if (retPos != retLineEnd) nLines++; break; } else { lineStart = retPos; } nLines++; if (lineStart > pos + nInserted && buf->char_at(buf->prev_char(lineStart)) == '\n') { countTo = lineStart; *modRangeEnd = lineStart; break; } /* Don't try to resync in continuous wrap mode with non-fixed font sizes; it would result in a chicken-and-egg dependency between the calculations for the inserted and the deleted lines. If we're in that mode, the number of deleted lines is calculated in advance, without resynchronization, so we shouldn't resynchronize for the inserted lines either. */ if (mSuppressResync) continue; /* check for synchronization with the original line starts array before pos, if so, the modified range can begin later */ if (lineStart <= pos) { while (visLineNumprev_char(lineStarts[visLineNum+1])); else *modRangeStart = countFrom; } else *modRangeStart = min(*modRangeStart, buf->prev_char(lineStart)); } /* check for synchronization with the original line starts array after pos, if so, the modified range can end early */ else if (lineStart > pos + nInserted) { adjLineStart = lineStart - nInserted + nDeleted; while (visLineNumcopy(buffer(), countFrom, pos, 0); if (nDeleted != 0) deletedTextBuf->insert(pos-countFrom, deletedText); deletedTextBuf->copy(buffer(), pos+nInserted, countTo, pos-countFrom+nDeleted); /* Note that we need to take into account an offset for the style buffer: the deletedTextBuf can be out of sync with the style buffer. */ wrapped_line_counter(deletedTextBuf, 0, length, INT_MAX, true, countFrom, &retPos, &retLines, &retLineStart, &retLineEnd, false); delete deletedTextBuf; *linesDeleted = retLines; mSuppressResync = 0; } /** \brief Wrapping calculations. This is a stripped-down version of the findWrapRange() function above, intended to be used to calculate the number of "deleted" lines during a buffer modification. It is called _before_ the modification takes place. This function should only be called in continuous wrap mode with a non-fixed font width. In that case, it is impossible to calculate the number of deleted lines, because the necessary style information is no longer available _after_ the modification. In other cases, we can still perform the calculation afterwards (possibly even more efficiently). \param pos \param nDeleted */ void Fl_Text_Display_mod::measure_deleted_lines(int pos, int nDeleted) { IS_UTF8_ALIGNED2(buffer(), pos) int retPos, retLines, retLineStart, retLineEnd; Fl_Text_Buffer_mod *buf = buffer(); int nVisLines = mNVisibleLines; int *lineStarts = mLineStarts; int countFrom, lineStart; int nLines = 0, i; /* ** Determine where to begin searching: either the previous newline, or ** if possible, limit to the start of the (original) previous displayed ** line, using information from the existing line starts array */ if (pos >= mFirstChar && pos <= mLastChar) { for (i=nVisLines-1; i>0; i--) if (lineStarts[i] != -1 && pos >= lineStarts[i]) break; if (i > 0) { countFrom = lineStarts[i-1]; } else countFrom = buf->line_start(pos); } else countFrom = buf->line_start(pos); /* ** Move forward through the (new) text one line at a time, counting ** displayed lines, and looking for either a real newline, or for the ** line starts to re-sync with the original line starts array */ lineStart = countFrom; for (;;) { /* advance to the next line. If the line ended in a real newline or the end of the buffer, that's far enough */ wrapped_line_counter(buf, lineStart, buf->length(), 1, true, 0, &retPos, &retLines, &retLineStart, &retLineEnd); if (retPos >= buf->length()) { if (retPos != retLineEnd) nLines++; break; } else lineStart = retPos; nLines++; if (lineStart > pos + nDeleted && buf->char_at(lineStart-1) == '\n') { break; } /* Unlike in the findWrapRange() function above, we don't try to resync with the line starts, because we don't know the length of the inserted text yet, nor the updated style information. Because of that, we also shouldn't resync with the line starts after the modification either, because we must perform the calculations for the deleted and inserted lines in the same way. This can result in some unnecessary recalculation and redrawing overhead, and therefore we should only use this two-phase mode of calculation when it's really needed (continuous wrap + variable font width). */ } mNLinesDeleted = nLines; mSuppressResync = 1; } /** \brief Wrapping calculations. Count forward from startPos to either maxPos or maxLines (whichever is reached first), and return all relevant positions and line count. The provided textBuffer may differ from the actual text buffer of the widget. In that case it must be a (partial) copy of the actual text buffer and the styleBufOffset argument must indicate the starting position of the copy, to take into account the correct style information. \param buf \param startPos \param maxPos \param maxLines \param startPosIsLineStart \param styleBufOffset \param[out] retPos Position where counting ended. When counting lines, the position returned is the start of the line "maxLines" lines beyond "startPos". \param[out] retLines Number of line breaks counted \param[out] retLineStart Start of the line where counting ended \param[out] retLineEnd End position of the last line traversed \param[out] countLastLineMissingNewLine */ void Fl_Text_Display_mod::wrapped_line_counter(Fl_Text_Buffer_mod *buf, int startPos, int maxPos, int maxLines, bool startPosIsLineStart, int styleBufOffset, int *retPos, int *retLines, int *retLineStart, int *retLineEnd, bool countLastLineMissingNewLine) const { IS_UTF8_ALIGNED2(buf, startPos) IS_UTF8_ALIGNED2(buf, maxPos) int lineStart, newLineStart = 0, b, p, colNum, wrapMarginPix; int i, foundBreak; double width; int nLines = 0; unsigned int c; /* Set the wrap margin to the wrap column or the view width */ if (mWrapMarginPix != 0) { wrapMarginPix = mWrapMarginPix; } else { wrapMarginPix = text_area.w; } /* Find the start of the line if the start pos is not marked as a line start. */ if (startPosIsLineStart) lineStart = startPos; else lineStart = line_start(startPos); /* ** Loop until position exceeds maxPos or line count exceeds maxLines. ** (actually, continues beyond maxPos to end of line containing maxPos, ** in case later characters cause a word wrap back before maxPos) */ colNum = 0; width = 0; for (p=lineStart; plength(); p=buf->next_char(p)) { c = buf->char_at(p); // UCS-4 /* If the character was a newline, count the line and start over, otherwise, add it to the width and column counts */ if (c == '\n') { if (p >= maxPos) { *retPos = maxPos; *retLines = nLines; *retLineStart = lineStart; *retLineEnd = maxPos; return; } nLines++; int p1 = buf->next_char(p); if (nLines >= maxLines) { *retPos = p1; *retLines = nLines; *retLineStart = p1; *retLineEnd = p; return; } lineStart = p1; colNum = 0; width = 0; } else { const char *s = buf->address(p); colNum++; // FIXME: it is not a good idea to simply add character widths because on // some platforms, the width is a floating point value and depends on the // previous character as well. width += measure_proportional_character(s, (int)width, p+styleBufOffset); } /* If character exceeded wrap margin, find the break point and wrap there */ if (width > wrapMarginPix) { foundBreak = false; for (b=p; b>=lineStart; b=buf->prev_char(b)) { c = buf->char_at(b); if (c == '\t' || c == ' ') { newLineStart = buf->next_char(b); colNum = 0; width = 0; int iMax = buf->next_char(p); for (i=buf->next_char(b); inext_char(i)) { width += measure_proportional_character(buf->address(i), (int)width, i+styleBufOffset); colNum++; } foundBreak = true; break; } } if (!foundBreak) { /* no whitespace, just break at margin */ newLineStart = max(p, buf->next_char(lineStart)); const char *s = buf->address(b); colNum++; width = measure_proportional_character(s, 0, p+styleBufOffset); } if (p >= maxPos) { *retPos = maxPos; *retLines = maxPos < newLineStart ? nLines : nLines + 1; *retLineStart = maxPos < newLineStart ? lineStart : newLineStart; *retLineEnd = maxPos; return; } nLines++; if (nLines >= maxLines) { *retPos = foundBreak ? buf->next_char(b) : max(p, buf->next_char(lineStart)); *retLines = nLines; *retLineStart = lineStart; *retLineEnd = foundBreak ? b : p; return; } lineStart = newLineStart; } } /* reached end of buffer before reaching pos or line target */ *retPos = buf->length(); *retLines = nLines; if (countLastLineMissingNewLine && colNum > 0) *retLines = buf->next_char(*retLines); *retLineStart = lineStart; *retLineEnd = buf->length(); } /** \brief Wrapping calculations. Measure the width in pixels of the first character of string "s" at a particular column "colNum" and buffer position "pos". This is for measuring characters in proportional or mixed-width highlighting fonts. A note about proportional and mixed-width fonts: the mixed width and proportional font code in nedit does not get much use in general editing, because nedit doesn't allow per-language-mode fonts, and editing programs in a proportional font is usually a bad idea, so very few users would choose a proportional font as a default. There are still probably mixed- width syntax highlighting cases where things don't redraw properly for insertion/deletion, though static display and wrapping and resizing should now be solid because they are now used for online help display. \param s text string \param xPix x pixel position needed for calculating tab widths \param pos offset within string \return width of character in pixels */ double Fl_Text_Display_mod::measure_proportional_character(const char *s, int xPix, int pos) const { IS_UTF8_ALIGNED(s) if (*s=='\t') { int tab = (int)col_to_x(mBuffer->tab_distance()); return (((xPix/tab)+1)*tab) - xPix; } int charLen = fl_utf8len1(*s), style = 0; if (mStyleBuffer) { style = mStyleBuffer->byte_at(pos); } return string_width(s, charLen, style); } /** \brief Finds both the end of the current line and the start of the next line. Why? In continuous wrap mode, if you need to know both, figuring out one from the other can be expensive or error prone. The problem comes when there's a trailing space or tab just before the end of the buffer. To translate an end of line value to or from the next lines start value, you need to know whether the trailing space or tab is being used as a line break or just a normal character, and to find that out would otherwise require counting all the way back to the beginning of the line. \param startPos \param startPosIsLineStart \param[out] lineEnd \param[out] nextLineStart */ void Fl_Text_Display_mod::find_line_end(int startPos, bool startPosIsLineStart, int *lineEnd, int *nextLineStart) const { IS_UTF8_ALIGNED2(buffer(), startPos) int retLines, retLineStart; /* if we're not wrapping use more efficient BufEndOfLine */ if (mFastDisplay || !mContinuousWrap) { int le = buffer()->line_end(startPos); int ls = buffer()->next_char(le); *lineEnd = le; *nextLineStart = min(buffer()->length(), ls); return; } /* use the wrapped line counter routine to count forward one line */ wrapped_line_counter(buffer(), startPos, buffer()->length(), 1, startPosIsLineStart, 0, nextLineStart, &retLines, &retLineStart, lineEnd); } /** \brief Check if the line break is caused by a \\n or by line wrapping. Line breaks in continuous wrap mode usually happen at newlines or whitespace. This line-terminating character is not included in line width measurements and has a special status as a non-visible character. However, lines with no whitespace are wrapped without the benefit of a line terminating character, and this distinction causes endless trouble with all of the text display code which was originally written without continuous wrap mode and always expects to wrap at a newline character. Given the position of the end of the line, as returned by TextDEndOfLine or BufEndOfLine, this returns true if there is a line terminating character, and false if there's not. On the last character in the buffer, this function can't tell for certain whether a trailing space was used as a wrap point, and just guesses that it wasn't. So if an exact accounting is necessary, don't use this function. \param lineEndPos index of character where the line wraps \return 1 if a \\n character causes the line wrap */ int Fl_Text_Display_mod::wrap_uses_character(int lineEndPos) const { IS_UTF8_ALIGNED2(buffer(), lineEndPos) unsigned int c; if (mFastDisplay || !mContinuousWrap || lineEndPos == buffer()->length()) return 1; c = buffer()->char_at(lineEndPos); return c == '\n' || ((c == '\t' || c == ' ') && lineEndPos + 1 < buffer()->length()); } /** \brief I don't know what this does! Extend the range of a redraw request (from *start to *end) with additional redraw requests resulting from changes to the attached style buffer (which contains auxiliary information for coloring or styling text). \param startpos ?? \param endpos ?? \todo Unicode? */ void Fl_Text_Display_mod::extend_range_for_styles( int *startpos, int *endpos ) { IS_UTF8_ALIGNED2(buffer(), (*startpos)) IS_UTF8_ALIGNED2(buffer(), (*endpos)) Fl_Text_Selection_mod * sel = mStyleBuffer->primary_selection(); int extended = 0; /* The peculiar protocol used here is that modifications to the style buffer are marked by selecting them with the buffer's primary Fl_Text_Selection. The style buffer is usually modified in response to a modify callback on the text buffer BEFORE Fl_Text_Display_mod.c's modify callback, so that it can keep the style buffer in step with the text buffer. The style-update callback can't just call for a redraw, because Fl_Text_Display_mod hasn't processed the original text changes yet. Anyhow, to minimize redrawing and to avoid the complexity of scheduling redraws later, this simple protocol tells the text display's buffer modify callback to extend its redraw range to show the text color/and font changes as well. */ if ( sel->selected() ) { if ( sel->start() < *startpos ) { *startpos = sel->start(); // somewhere while deleting, alignment is lost. We do this just to be sure. *startpos = buffer()->utf8_align(*startpos); IS_UTF8_ALIGNED2(buffer(), (*startpos)) extended = 1; } if ( sel->end() > *endpos ) { *endpos = sel->end(); *endpos = buffer()->utf8_align(*endpos); IS_UTF8_ALIGNED2(buffer(), (*endpos)) extended = 1; } } /* If the Fl_Text_Selection was extended due to a style change, and some of the fonts don't match in spacing, extend redraw area to end of line to redraw characters exposed by possible font size changes */ if ( extended ) *endpos = mBuffer->line_end( *endpos ) + 1; IS_UTF8_ALIGNED2(buffer(), (*endpos)) } /** \brief Draw the widget. This function tries to limit drawing to smaller areas if possible. */ void Fl_Text_Display_mod::draw(void) { // don't even try if there is no associated text buffer! if (!buffer()) { draw_box(); return; } fl_push_clip(x(),y(),w(),h()); // prevent drawing outside widget area // draw the non-text, non-scrollbar areas. if (damage() & FL_DAMAGE_ALL) { // draw the box() int W = w(), H = h(); draw_box(box(), x(), y(), W, H, color()); if (mHScrollBar->visible()) W -= scrollbar_width(); if (mVScrollBar->visible()) H -= scrollbar_width(); // left margin fl_rectf(text_area.x-LEFT_MARGIN, text_area.y-TOP_MARGIN, LEFT_MARGIN, text_area.h+TOP_MARGIN+BOTTOM_MARGIN, color()); // right margin fl_rectf(text_area.x+text_area.w, text_area.y-TOP_MARGIN, RIGHT_MARGIN, text_area.h+TOP_MARGIN+BOTTOM_MARGIN, color()); // top margin fl_rectf(text_area.x, text_area.y-TOP_MARGIN, text_area.w, TOP_MARGIN, color()); // bottom margin fl_rectf(text_area.x, text_area.y+text_area.h, text_area.w, BOTTOM_MARGIN, color()); // draw that little box in the corner of the scrollbars if (mVScrollBar->visible() && mHScrollBar->visible()) fl_rectf(mVScrollBar->x(), mHScrollBar->y(), mVScrollBar->w(), mHScrollBar->h(), FL_GRAY); // blank the previous cursor protrusions } else if (damage() & (FL_DAMAGE_SCROLL | FL_DAMAGE_EXPOSE)) { // printf("blanking previous cursor extrusions at Y: %d\n", mCursorOldY); // CET - FIXME - save old cursor position instead and just draw side needed? fl_push_clip(text_area.x-LEFT_MARGIN, text_area.y, text_area.w+LEFT_MARGIN+RIGHT_MARGIN, text_area.h); fl_rectf(text_area.x-LEFT_MARGIN, mCursorOldY, LEFT_MARGIN, mMaxsize, color()); fl_rectf(text_area.x+text_area.w, mCursorOldY, RIGHT_MARGIN, mMaxsize, color()); fl_pop_clip(); } // draw the scrollbars if (damage() & (FL_DAMAGE_ALL | FL_DAMAGE_CHILD)) { mVScrollBar->damage(FL_DAMAGE_ALL); mHScrollBar->damage(FL_DAMAGE_ALL); } update_child(*mVScrollBar); update_child(*mHScrollBar); // draw all of the text if (damage() & (FL_DAMAGE_ALL | FL_DAMAGE_EXPOSE)) { //printf("drawing all text\n"); int X, Y, W, H; if (fl_clip_box(text_area.x, text_area.y, text_area.w, text_area.h, X, Y, W, H)) { // Draw text using the intersected clipping box... // (this sets the clipping internally) draw_text(X, Y, W, H); } else { // Draw the whole area... draw_text(text_area.x, text_area.y, text_area.w, text_area.h); } } else if (damage() & FL_DAMAGE_SCROLL) { // draw some lines of text fl_push_clip(text_area.x, text_area.y, text_area.w, text_area.h); //printf("drawing text from %d to %d\n", damage_range1_start, damage_range1_end); draw_range(damage_range1_start, damage_range1_end); if (damage_range2_end != -1) { //printf("drawing text from %d to %d\n", damage_range2_start, damage_range2_end); draw_range(damage_range2_start, damage_range2_end); } damage_range1_start = damage_range1_end = -1; damage_range2_start = damage_range2_end = -1; fl_pop_clip(); } // draw the text cursor if (damage() & (FL_DAMAGE_ALL | FL_DAMAGE_SCROLL | FL_DAMAGE_EXPOSE) && !buffer()->primary_selection()->selected() && mCursorOn && Fl::focus() == (Fl_Widget*)this ) { fl_push_clip(text_area.x-LEFT_MARGIN, text_area.y, text_area.w+LEFT_MARGIN+RIGHT_MARGIN, text_area.h); int X, Y; if (position_to_xy(mCursorPos, &X, &Y)) draw_cursor(X, Y); // else puts("position_to_xy() failed - unable to draw cursor!"); //printf("drew cursor at pos: %d (%d,%d)\n", mCursorPos, X, Y); mCursorOldY = Y; fl_pop_clip(); } fl_pop_clip(); } // this processes drag events due to mouse for Fl_Text_Display_mod and // also drags due to cursor movement with shift held down for // Fl_Text_Editor_mod void fl_text_drag_me(int pos, Fl_Text_Display_mod* d) { if (d->dragType == Fl_Text_Display_mod::DRAG_CHAR) { if (pos >= d->dragPos) { d->buffer()->select(d->dragPos, pos); } else { d->buffer()->select(pos, d->dragPos); } d->insert_position(pos); } else if (d->dragType == Fl_Text_Display_mod::DRAG_WORD) { if (pos >= d->dragPos) { d->insert_position(d->word_end(pos)); d->buffer()->select(d->word_start(d->dragPos), d->word_end(pos)); } else { d->insert_position(d->word_start(pos)); d->buffer()->select(d->word_start(pos), d->word_end(d->dragPos)); } } else if (d->dragType == Fl_Text_Display_mod::DRAG_LINE) { if (pos >= d->dragPos) { d->insert_position(d->buffer()->line_end(pos)+1); d->buffer()->select(d->buffer()->line_start(d->dragPos), d->buffer()->line_end(pos)+1); } else { d->insert_position(d->buffer()->line_start(pos)); d->buffer()->select(d->buffer()->line_start(pos), d->buffer()->line_end(d->dragPos)+1); } } } /** \brief Timer callback for scroll events. This timer event scrolls the text view proportionally to how far the mouse pointer has left the text area. This allows for smooth scrolling without "wiggeling" the mouse. */ void Fl_Text_Display_mod::scroll_timer_cb(void *user_data) { Fl_Text_Display_mod *w = (Fl_Text_Display_mod*)user_data; int pos; switch (scroll_direction) { case 1: // mouse is to the right, scroll left w->scroll(w->mTopLineNum, w->mHorizOffset + scroll_amount); pos = w->xy_to_position(w->text_area.x + w->text_area.w, scroll_y, CURSOR_POS); break; case 2: // mouse is to the left, scroll right w->scroll(w->mTopLineNum, w->mHorizOffset + scroll_amount); pos = w->xy_to_position(w->text_area.x, scroll_y, CURSOR_POS); break; case 3: // mouse is above, scroll down w->scroll(w->mTopLineNum + scroll_amount, w->mHorizOffset); pos = w->xy_to_position(scroll_x, w->text_area.y, CURSOR_POS); break; case 4: // mouse is below, scroll up w->scroll(w->mTopLineNum + scroll_amount, w->mHorizOffset); pos = w->xy_to_position(scroll_x, w->text_area.y + w->text_area.h, CURSOR_POS); break; default: return; } fl_text_drag_me(pos, w); Fl::repeat_timeout(.1, scroll_timer_cb, user_data); } /** \brief Event handling. */ int Fl_Text_Display_mod::handle(int event) { if (!buffer()) return 0; // This isn't very elegant! if (!Fl::event_inside(text_area.x, text_area.y, text_area.w, text_area.h) && !dragging && event != FL_LEAVE && event != FL_ENTER && event != FL_MOVE && event != FL_FOCUS && event != FL_UNFOCUS && event != FL_KEYBOARD && event != FL_KEYUP) { return Fl_Group::handle(event); } switch (event) { case FL_ENTER: case FL_MOVE: if (active_r()) { if (Fl::event_inside(text_area.x, text_area.y, text_area.w, text_area.h)) window()->cursor(FL_CURSOR_INSERT); else window()->cursor(FL_CURSOR_DEFAULT); return 1; } else { return 0; } case FL_LEAVE: case FL_HIDE: if (active_r() && window()) { window()->cursor(FL_CURSOR_DEFAULT); return 1; } else { return 0; } case FL_PUSH: { if (active_r() && window()) { if (Fl::event_inside(text_area.x, text_area.y, text_area.w, text_area.h)) window()->cursor(FL_CURSOR_INSERT); else window()->cursor(FL_CURSOR_DEFAULT); } if (Fl::focus() != this) { Fl::focus(this); handle(FL_FOCUS); } if (Fl_Group::handle(event)) return 1; if (Fl::event_state()&FL_SHIFT) return handle(FL_DRAG); dragging = 1; int pos = xy_to_position(Fl::event_x(), Fl::event_y(), CURSOR_POS); dragPos = pos; if (buffer()->primary_selection()->includes(pos)) { dragType = DRAG_START_DND; return 1; } dragType = Fl::event_clicks(); if (dragType == DRAG_CHAR) { buffer()->unselect(); // Fl::copy("", 0, 0); /* removed for STR 2668 */ } else if (dragType == DRAG_WORD) { buffer()->select(word_start(pos), word_end(pos)); dragPos = word_start(pos); } if (buffer()->primary_selection()->selected()) insert_position(buffer()->primary_selection()->end()); else insert_position(pos); show_insert_position(); return 1; } case FL_DRAG: { if (dragType==DRAG_NONE) return 1; if (dragType==DRAG_START_DND) { if (!Fl::event_is_click() && Fl::dnd_text_ops()) { const char* copy = buffer()->selection_text(); Fl::dnd(); free((void*)copy); } return 1; } int X = Fl::event_x(), Y = Fl::event_y(), pos = insert_position(); // if we leave the text_area, we start a timer event // that will take care of scrolling and selecting if (Y < text_area.y) { scroll_x = X; scroll_amount = (Y - text_area.y) / 5 - 1; if (!scroll_direction) { Fl::add_timeout(.01, scroll_timer_cb, this); } scroll_direction = 3; } else if (Y >= text_area.y+text_area.h) { scroll_x = X; scroll_amount = (Y - text_area.y - text_area.h) / 5 + 1; if (!scroll_direction) { Fl::add_timeout(.01, scroll_timer_cb, this); } scroll_direction = 4; } else if (X < text_area.x) { scroll_y = Y; scroll_amount = (X - text_area.x) / 2 - 1; if (!scroll_direction) { Fl::add_timeout(.01, scroll_timer_cb, this); } scroll_direction = 2; } else if (X >= text_area.x+text_area.w) { scroll_y = Y; scroll_amount = (X - text_area.x - text_area.w) / 2 + 1; if (!scroll_direction) { Fl::add_timeout(.01, scroll_timer_cb, this); } scroll_direction = 1; } else { if (scroll_direction) { Fl::remove_timeout(scroll_timer_cb, this); scroll_direction = 0; } pos = xy_to_position(X, Y, CURSOR_POS); pos = buffer()->next_char(pos); } fl_text_drag_me(pos, this); return 1; } case FL_RELEASE: { if (Fl::event_is_click() && (! Fl::event_clicks()) && buffer()->primary_selection()->includes(dragPos) && !(Fl::event_state()&FL_SHIFT) ) { buffer()->unselect(); // clicking in the selection: unselect and move cursor insert_position(dragPos); return 1; } else if (Fl::event_clicks() == DRAG_LINE && Fl::event_button() == FL_LEFT_MOUSE) { buffer()->select(buffer()->line_start(dragPos), buffer()->next_char(buffer()->line_end(dragPos))); dragPos = line_start(dragPos); dragType = DRAG_CHAR; } else { dragging = 0; if (scroll_direction) { Fl::remove_timeout(scroll_timer_cb, this); scroll_direction = 0; } // convert from WORD or LINE selection to CHAR /*if (insert_position() >= dragPos) dragPos = buffer()->primary_selection()->start(); else dragPos = buffer()->primary_selection()->end();*/ dragType = DRAG_CHAR; } const char* copy = buffer()->selection_text(); if (*copy) Fl::copy(copy, strlen(copy), 0); free((void*)copy); return 1; } case FL_MOUSEWHEEL: if (Fl::event_dy()) return mVScrollBar->handle(event); else return mHScrollBar->handle(event); case FL_UNFOCUS: if (active_r() && window()) window()->cursor(FL_CURSOR_DEFAULT); case FL_FOCUS: if (buffer()->selected()) { int start, end; if (buffer()->selection_position(&start, &end)) redisplay_range(start, end); } if (buffer()->secondary_selected()) { int start, end; if (buffer()->secondary_selection_position(&start, &end)) redisplay_range(start, end); } if (buffer()->highlight()) { int start, end; if (buffer()->highlight_position(&start, &end)) redisplay_range(start, end); } return 1; case FL_KEYBOARD: // Copy? if ((Fl::event_state()&(FL_CTRL|FL_COMMAND)) && Fl::event_key()=='c') { if (!buffer()->selected()) return 1; const char *copy = buffer()->selection_text(); if (*copy) Fl::copy(copy, strlen(copy), 1); free((void*)copy); return 1; } // Select all ? if ((Fl::event_state()&(FL_CTRL|FL_COMMAND)) && Fl::event_key()=='a') { buffer()->select(0,buffer()->length()); const char *copy = buffer()->selection_text(); if (*copy) Fl::copy(copy, strlen(copy), 0); free((void*)copy); return 1; } if (mVScrollBar->handle(event)) return 1; if (mHScrollBar->handle(event)) return 1; break; case FL_SHORTCUT: if (!(shortcut() ? Fl::test_shortcut(shortcut()) : test_shortcut())) return 0; if (Fl::visible_focus() && handle(FL_FOCUS)) { Fl::focus(this); return 1; } break; } return 0; } /* Convert an x pixel position into a column number. */ double Fl_Text_Display_mod::x_to_col(double y) const { if (!mColumnScale) { mColumnScale = string_width("Mitg", 4, 'A') / 4.0; } return (y/mColumnScale)+0.5; } /** Convert a column number into an x pixel position. */ double Fl_Text_Display_mod::col_to_x(double col) const { if (!mColumnScale) { // recalculate column scale value x_to_col(0); } return col*mColumnScale; } // // End of "$Id: Fl_Text_Display_mod.cxx 8808 2011-06-16 13:31:25Z manolo $". // flamp-2.2.12/src/widgets/flslider2.cxx0000644000175000017500000000451414463050061014470 00000000000000// ---------------------------------------------------------------------------- // flslider2.cxx // // Copyright (C) 2010 // Stelios Bounanos, M0GLD // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ---------------------------------------------------------------------------- #include #include #include "util.h" #include "flslider2.h" inline static int handle_scroll(Fl_Valuator* w, int event) { if (!(event == FL_MOUSEWHEEL && Fl::event_inside(w))) return 0; double d; if ((d = Fl::event_dy()) || (d = Fl::event_dx())) { if (Fl::event_state() & FL_SHIFT) d *= 10.0; if (!dynamic_cast(w) && !dynamic_cast(w) && !(w->type() & FL_HOR_SLIDER)) d = -d; w->value(w->clamp(w->increment(w->value(), static_cast(-d)))); w->do_callback(); } return 1; } int Fl_Slider2::handle(int event) { return handle_scroll(this, event) ? 1 : Fl_Slider::handle(event); } int Fl_Value_Slider2::handle(int event) { return handle_scroll(this, event) ? 1 : Fl_Value_Slider::handle(event); } int Fl_Counter2::handle(int event) { return handle_scroll(this, event) ? 1 : Fl_Counter::handle(event); } int Fl_Value_Input2::handle(int event) { return handle_scroll(this, event) ? 1 : Fl_Value_Input::handle(event); } inline static int handle_scroll(Fl_Spinner* w, int event) { if (!(event == FL_MOUSEWHEEL && Fl::event_inside(w))) return 0; double d; if ((d = Fl::event_dy()) || (d = Fl::event_dx())) { if (Fl::event_state() & FL_SHIFT) d *= 10.0; d = w->value() - d * w->step(); w->value(WCLAMP(d, w->minimum(), w->maximum())); w->do_callback(); } return 1; } int Fl_Spinner2::handle(int event) { return handle_scroll(this, event) ? 1 : Fl_Spinner::handle(event); } flamp-2.2.12/src/widgets/calendar.cxx0000644000175000017500000002730114463050061014352 00000000000000// ===================================================================== // // calendar.cxx // // Author: Dave Freese, W1HKJ // Copyright: 2010 // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ===================================================================== #include #include #include #include #include #include #include "pixmaps.h" #include "calendar.h" void popcal_cb (Fl_Widget *v, long d); static void fl_calendar_button_cb (Fl_Button *a, void *b) { long j=0; Fl_Calendar *c = (Fl_Calendar *)b; Fl_Button *sb; int numdays = c->daysinmonth () + 1; for (int i=1; i < numdays; i++) { sb = c->day_button(i); sb->color (52); if (a == sb) { c->Day (i); j = i; sb->color (sb->selection_color()); if (c->target) { ((Fl_Input2 *)(c->target))->value(c->szDate(c->calfmt)); (c->target)->redraw(); } } } c->redraw(); c->do_callback(c, j); } void Fl_Calendar_Base::setTarget (Fl_Widget *tgt) { target = tgt; } Fl_Calendar_Base::Fl_Calendar_Base (int x, int y, int w, int h, const char *l) : Fl_Group (x, y, w, h, l), Date () { int i; for (i = 0; i<(7*6); i++) { days[i] = new Fl_Button ((w/7)*(i%7) + x, (h/6)*(i/7) + y, (w/7), (h/6)); days[i]->down_box (FL_THIN_DOWN_BOX); days[i]->labelsize (10); days[i]->box (FL_THIN_UP_BOX); days[i]->color (52); days[i]->callback ((Fl_Callback*)&fl_calendar_button_cb, (void *)this); } calfmt = 0; } void Fl_Calendar_Base::csize (int cx, int cy, int cw, int ch) { int i; for (i = 0; i<(7*6); i++) { days[i]->resize ((cw/7)*(i%7) + cx, (ch/6)*(i/7) + cy, (cw/7), (ch/6)); } } void Fl_Calendar_Base::update () { int dow = dayofweek (Year(), Month(), 1); int dim = daysinmonth (Month(), isleapyear (Year())); int i; for (i=0; ihide (); } for (i=(dim+dow); i<(6*7); i++) { days[i]->hide (); } for (i=dow; i<(dim+dow); i++) { char t[8]; snprintf (t, sizeof(t), "%d", (i-dow+1)); days[i]->label (strdup(t)); days[i]->color (52); if ((i-dow+1) == Day()) days[i]->color (selection_color()); days[i]->show (); } } Fl_Button * Fl_Calendar_Base::day_button (int i) { if ((i > 0) && (i <= daysinmonth ())) return days[i + dayofweek (Year(), Month(), 1) - 1]; return 0; } static void fl_calendar_prv_month_cb (Fl_Button *, void *b) { Fl_Calendar *c = (Fl_Calendar *)b; c->previous_month (); c->do_callback(c, (long)0); } static void fl_calendar_nxt_month_cb (Fl_Button *, void *b) { Fl_Calendar *c = (Fl_Calendar *)b; c->next_month (); c->do_callback(c, (long)0); } static void fl_calendar_prv_year_cb (Fl_Button *, void *b) { Fl_Calendar *c = (Fl_Calendar *)b; c->previous_year (); c->do_callback(c, (long)0); } static void fl_calendar_nxt_year_cb (Fl_Button *, void *b) { Fl_Calendar *c = (Fl_Calendar *)b; c->next_year (); c->do_callback(c, (long)0); } Fl_Calendar::Fl_Calendar (int x, int y, int w, int h, const char *l) : Fl_Calendar_Base (x, y, w, h, l) { int i, bw; for (i = 0; i<7; i++) { // weekdays[i] = new Fl_Button ((w/7)*(i%7) + x, weekdays[i] = new Fl_Box ((w/7)*(i%7) + x, (h/8)*((i/7)+1) + y, (w/7), (h/8)); weekdays[i]->box (FL_THIN_UP_BOX); weekdays[i]->labelsize (10); weekdays[i]->color (52); } weekdays[SUNDAY]->label ("S"); weekdays[MONDAY]->label ("M"); weekdays[TUESDAY]->label ("T"); weekdays[WEDNESDAY]->label ("W"); weekdays[THURSDAY]->label ("T"); weekdays[FRIDAY]->label ("F"); weekdays[SATURDAY]->label ("S"); bw = w/10 < 16 ? 16 : w/10; prv_year = new Fl_Button (x, y, bw, (h/8), "@<<"); prv_year->box (FL_THIN_UP_BOX); prv_year->labeltype (FL_SYMBOL_LABEL); prv_year->labelsize (10); prv_year->down_box (FL_THIN_DOWN_BOX); prv_year->callback ((Fl_Callback*)&fl_calendar_prv_year_cb, (void *)this); prv_month = new Fl_Button (x + bw, y, bw, (h/8), "@<"); prv_month->box (FL_THIN_UP_BOX); prv_month->labeltype (FL_SYMBOL_LABEL); prv_month->labelsize (10); prv_month->down_box (FL_THIN_DOWN_BOX); prv_month->callback ((Fl_Callback*)&fl_calendar_prv_month_cb, (void *)this); nxt_month = new Fl_Button (x + w - 2*bw, y, bw, (h/8), "@>"); nxt_month->box (FL_THIN_UP_BOX); nxt_month->labeltype (FL_SYMBOL_LABEL); nxt_month->labelsize (10); nxt_month->down_box (FL_THIN_DOWN_BOX); nxt_month->callback ((Fl_Callback*)&fl_calendar_nxt_month_cb, (void *)this); nxt_year = new Fl_Button (x + w - bw, y, bw, (h/8), "@>>"); nxt_year->box (FL_THIN_UP_BOX); nxt_year->labeltype (FL_SYMBOL_LABEL); nxt_year->labelsize (10); nxt_year->down_box (FL_THIN_DOWN_BOX); nxt_year->callback ((Fl_Callback*)&fl_calendar_nxt_year_cb, (void *)this); // caption = new Fl_Button (x + (w/10)*2, y, (6*w/10), (h/8)); caption = new Fl_Box (x + 2*bw, y, w - 4*bw, (h/8)); caption->box (FL_THIN_UP_BOX); caption->labeltype (FL_SYMBOL_LABEL); caption->labelfont (1); if (bw < 20) caption->labelsize (9); else caption->labelsize (11); // caption->down_box (FL_THIN_DOWN_BOX); Fl_Calendar_Base::csize (x, y + (2*h/8), w, (6*h/8)); target = 0; update (); } void Fl_Calendar::csize (int cx, int cy, int cw, int ch) { int i; for (i = 0; i<7; i++) { // weekdays[i] = new Fl_Button ((cw/7)*(i%7) + cx, weekdays[i] = new Fl_Box ((cw/7)*(i%7) + cx, (ch/8)*((i/7)+1) + cy, (cw/7), (ch/8)); } prv_month->resize (cx + (cw/10), cy, (cw/10), (ch/8)); nxt_month->resize (cx + (cw/10)*8, cy, (cw/10), (ch/8)); prv_year->resize (cx, cy, (cw/10), (ch/8)); nxt_year->resize (cx + (cw/10)*9, cy, (cw/10), (ch/8)); caption->resize (cx + (cw/10)*2, cy, (cw/10)*6, (ch/8)); Fl_Calendar_Base::csize (cx, cy + (2*ch/8), cw, (6*ch/8)); } void Fl_Calendar::update () { int dow = dayofweek (Year(), Month(), 1); int dim = daysinmonth (Month(), isleapyear (Year())); int i; for (i=dow; i<(dim+dow); i++) { char t[8]; snprintf (t, sizeof(t), "%d", (i-dow+1)); days[i]->label (strdup(t)); } char tmp[32]; snprintf (tmp, sizeof(tmp), "%s %d", month_name[Month()-1], Year()); Fl_Calendar_Base::update (); if (caption->label ()) free ((void *) caption->label ()); caption->label (strdup(tmp)); redraw (); } void Fl_Calendar::today () { Date::today(); update (); } void Fl_Calendar::previous_month () { Date::previous_month(); update (); } void Fl_Calendar::next_month () { Date::next_month(); update (); } void Fl_Calendar::previous_year () { Date::previous_year(); update (); } void Fl_Calendar::next_year () { Date::next_year(); update (); } void Fl_Calendar::setDate(int m, int d, int y) { Date::setDate(m,d,y); } int Fl_Calendar::handle (int event) { int m, d, y, o, md; switch (event) { case FL_FOCUS: case FL_UNFOCUS: return 1; case FL_KEYBOARD: m = Month (); d = Day (); y = Year (); switch(Fl::event_key ()) { case FL_Enter: do_callback(this, d); return 1; break; case FL_Up: o = -7; break; case FL_Down: o = 7; break; case FL_Right: o = 1; break; case FL_Left: o = -1; break; case FL_Page_Up: previous_month (); return 1; case FL_Page_Down: next_month (); return 1; default: return Fl_Group::handle (event); } if (datevalid (y, m, d + o)) setDate (m, d + o, y); else { if (o < 0) { previous_month (); m = Month (); y = Year (); md = daysinmonth (m, isleapyear (y)); d = d + o + md; setDate (m, d, y); } else { md = daysinmonth (m, isleapyear (y)); next_month (); m = Month (); y = Year (); d = d + o - md; setDate (m, d, y); } } return 1; } return Fl_Group::handle (event); } // Popup Calendar class Fl_PopCal::Fl_PopCal (int X, int Y, int W, int H, Fl_Input2 * tgt) : Fl_Window (X, Y, W, H, "") { target = tgt; clear_border(); box(FL_UP_BOX); // popcal = new Fl_Calendar(2, 2); popcal = new Fl_Calendar(2, 2, W-4, H-4); popcal->callback ( (Fl_Callback*)popcal_cb); end(); } Fl_PopCal::~Fl_PopCal () { } void Fl_PopCal::popcalfmt (int i) { popcalfmt_ = i; } int Fl_PopCal::popcalfmt () { return popcalfmt_; } void Fl_PopCal::setDate (int m, int d, int y) { popcal->setDate (m,d,y); popcal->update(); } int Fl_PopCal::handle(int event) { int ex = Fl::event_x_root(), ey = Fl::event_y_root(); if (event == FL_PUSH) { if ( ex < x() || ex > (x() + w()) || ey < y() || ey > (y() + h()) ) { pophide(); return 1; } } if (Fl_Group::handle(event)) return 1; return 0; } void Fl_PopCal::popposition (int x, int y) { position (x, y); } void Fl_PopCal::popshow () { show (); Fl::grab(this); } void Fl_PopCal::pophide () { hide (); Fl::release(); } void Fl_PopCal::popcal_cb_i (Fl_Widget *v, long d) { int ey = Fl::event_y_root(); Fl_PopCal *me = (Fl_PopCal *)(v->parent()); Fl_Input2 *tgt = me->target; if (ey > me->y() + 40) { if (d && tgt) tgt->value (((Fl_Calendar *)v)->szDate (me->popcalfmt_)); me->pophide(); } return; } void popcal_cb (Fl_Widget *v, long d) { ((Fl_PopCal *)(v))->popcal_cb_i (v, d); return; } void Fl_DateInput::fl_popcal() { Fl_Widget *who = this, *parent; int xpos = who->x(), ypos = who->h() + who->y(); int w = who->w(), h; int m = 0, d = 0, y = 0; w = w < 140 ? 140 : w; w = w - (w % 7); h = 8*(w/7); w += 4; h += 4; parent = who; while (parent) { who = parent; parent = parent->parent(); if (parent == 0) { xpos += who->x(); ypos += who->y(); } } if (!Cal) // Cal = new Fl_PopCal(xpos, ypos, 7*20+4, 8*20+4, Input); Cal = new Fl_PopCal(xpos, ypos, w, h, Input); else Cal->popposition(xpos, ypos); if (popcalfmt_ < 3) { switch (popcalfmt_) { case 0: case 1: sscanf(Input->value(), "%d/%d/%d", &m, &d, &y); break; case 2: default: sscanf(Input->value(),"%4d%2d%2d", &y, &m, &d); break; } if (y < 10) y+=2000; if (y < 100) y+=1900; Cal->setDate (m,d,y); } Cal->popcalfmt (popcalfmt_); Cal->popshow(); return; } void btnDateInput_cb (Fl_Widget *v, void *d) { ((Fl_DateInput *)(v->parent()))->fl_popcal (); return; } Fl_DateInput::Fl_DateInput (int X,int Y,int W,int H, const char *L) : Fl_Group (X, Y, W, H, 0) { Btn = new Fl_Button (X + W - H + 1, Y + 1, H - 2, H - 2); (new Fl_Pixmap (time_icon))->label (Btn); Btn->callback ((Fl_Callback *)btnDateInput_cb, 0); Input = new Fl_Input2 (X, Y, W-H, H, L); popcalfmt_ = 0; Cal = 0; end(); } void Fl_DateInput::align (Fl_Align how) { Input->align(how); } // DateInput value is contained in the Input widget void Fl_DateInput::value( const char *s ) { Input->value (s); } const char *Fl_DateInput::value() { return (Input->value ()); } void Fl_DateInput::textfont(int tf) { Input->textfont (tf); } void Fl_DateInput::textsize(int sz) { Input->textsize (sz); } void Fl_DateInput::labelfont(int fnt) { Input->labelfont(fnt); } void Fl_DateInput::labelsize(int size) { Input->labelsize(size); } void Fl_DateInput::labelcolor(int clr) { Input->labelcolor(clr); } void Fl_DateInput::format (int fmt) { switch (fmt) { case 0: case 1: case 2: case 3: case 4: popcalfmt_ = fmt; break; default : popcalfmt_ = 0; } } void Fl_DateInput::take_focus() { Input->take_focus(); } flamp-2.2.12/src/widgets/pixmaps_tango.cxx0000644000175000017500000033374514463050061015466 00000000000000#include // This file contains pixmap versions of icons from the Tango Icon Library // (version 0.8.90) at http://tango.freedesktop.org/Tango_Icon_Library // which was released into the Public Domain. This file was prepared by // Kamal Mostafa , and is likewise released into the // Public Domain. // These #define's map the (new) Tango icon names (named after their source // files) to the pixmap identifier names used throughout the fldigi source: #define tango_x_office_address_book address_book_icon #define tango_applications_system applications_system_icon #define tango_internet_group_chat chat_icon #define tango_dialog_information dialog_information_icon #define tango_edit_clear edit_clear_icon #define tango_edit_copy edit_copy_icon #define tango_edit_cut edit_cut_icon #define tango_edit_paste edit_paste_icon #define tango_edit_select_all edit_select_all_icon #define tango_edit_undo edit_undo_icon #define tango_emblem_system emblems_system_icon #define tango_application_x_executable executable_icon #define tango_document_open file_open_icon #define tango_folder_open folder_open_icon #define tango_help_browser help_browser_icon #define tango_image_x_generic image_icon #define tango_go_previous left_arrow_icon #define tango_system_log_out log_out_icon #define tango_list_remove minus_icon #define tango_multimedia_player multimedia_player_icon #define tango_internet_web_browser net_icon #define tango_list_add plus_icon #define tango_preferences_desktop_font preferences_desktop_font_icon #define tango_process_stop process_stop_icon #define tango_view_refresh refresh_icon #define tango_go_next right_arrow_icon #define tango_document_save_as save_as_icon #define tango_document_save save_icon #define tango_system_shutdown shutdown_icon #define tango_start_here start_here_icon #define tango_system_software_update system_software_update_icon #define tango_system_users system_users_icon #define tango_accessories_text_editor text_editor_icon #define tango_text_x_generic text_icon #define tango_x_office_calendar time_icon #define tango_user_trash trash_icon #define tango_utilities_system_monitor utilities_system_monitor_icon #define tango_utilities_terminal utilities_terminal_icon #define tango48_dialog_information dialog_information_48_icon #define tango48_dialog_warning dialog_warning_48_icon // --------------------------------------------------------------------- // Tango icons // --------------------------------------------------------------------- /* mimetypes/x-office-address-book.png */ /* XPM */ const char *tango_x_office_address_book[] = { /* width height ncolors chars_per_pixel */ "16 16 125 2", /* colors */ " c #000000", " . c #C0D2E4", " X c #ACC3DA", " o c #A78AB1", " O c #9DB029", " + c #C3CFE0", " @ c #9AA5C5", " # c #D8E4F1", " $ c #A7BFD8", " % c #D7E4F0", " & c #99A7C7", " * c #A9B8D0", " = c #D2DEEB", " - c #ABB0BE", " ; c #A887AE", " : c #9CA2C3", " > c #AC80A8", " , c #CBD8E7", " < c #A789B0", " 1 c #617296", " 2 c #AB82AA", " 3 c #C3D0E2", " 4 c #AA84AC", " 5 c #B7CBE0", " 6 c #A9B3CF", " 7 c #8290AC", " 8 c #7E8CA8", " 9 c #ACB1BE", " 0 c #95B1CF", " q c #CEDBE9", " w c #99A580", " e c #7E8CAB", " r c #AAACC9", " t c #B5B5B6", " y c #A491B6", " u c #7B8AA8", " i c #7A88A7", " p c #9BA3C4", " a c #727E0A", " s c #DEDEDE", " d c #AB92B6", " f c #8F9FB8", " g c #96AECC", " h c #B1C0D6", " j c #AA83AB", " k c #A2AB7B", " l c #FCE94F", " z c #808DA9", " x c #C7D7E8", " c c #8F9E86", " v c #95B0CE", " b c #CC0000", " n c #A5BDD7", " m c #A8B8D0", " M c #D1DEEB", " N c #D0DCEA", " B c #CFDCE9", " V c #CEDAE8", " C c #A8AEBC", " Z c #A889AF", " A c #AC80A9", " S c #9BA2C3", " D c #CFDCEC", " F c #9DB7D2", " G c #6F6384", " H c #5A7AA4", " J c #A78BB1", " K c #67837F", " L c #9AA4C5", " P c #AFBAC9", " I c #B9CBE0", " U c #B4B9C4", " Y c #9E9DBF", " T c #BCC8D9", " R c #828EAA", " E c #95AFCD", " W c #9FABC3", " Q c #D7E3F0", " ! c #D3DFEC", " ~ c #A9B9D0", " ^ c #9D9FC1", " / c #B4C9DE", " ( c #AFB5C2", " ) c #ABB1BE", " _ c #EDD400", " ` c #C1C1C3", " ' c #9CA1C3", " ] c #698373", " [ c #A7ADBD", " { c #A9C1D9", " } c #A8BFD8", " | c #A9ACB8", ". c #AA85AC", ".. c #9D9EC0", ".X c #B7CAE0", ".o c #818FAB", ".O c #808DAA", ".+ c #AC8BB1", ".@ c #A987AE", ".# c #8B96AE", ".$ c #CFDCEA", ".% c #6C7CA0", ".& c #785977", ".* c #A889B0", ".= c #AC82AA", ".- c #DDDDDD", ".; c #CCDAEA", ".: c #9AA6C6", ".> c #BACDE2", "., c #B8CBE0", ".< c #9E9DC0", ".1 c #8390AC", ".2 c #EF2929", ".3 c #C6D6E7", ".4 c #95AFCE", ".5 c #A58DB3", ".6 c #A986AD", ".7 c #BFCCE0", ".8 c #A9B9D1", ".9 c #CFDBE9", ".0 c #B9B9B9", ".q c #CEDBE8", ".w c #B7B7B7", ".e c #CBD7E5", ".r c None", /* pixels */ ".r H H H H H H H H H H H H H.r.r", " H.% =.3.> / n n $ $ } } F c _.r", " H T N 3 D { L < A. .< 0 X c l _", " H +.$ h.; 6 4 p.4 & ; S X w l _", " H.e B m.; d ^ Y 2 j & o X k l _", " H M.9 m.;.= g 4...6 E A X ] O a", " H Q q *.; A E A '.@ : Z X ] O a", " H #.q ~.;.+ L y.*.5 4.: X K O a", " H #.q.8.; r ; & v 0 0 0 X G.2 b", " H % V.7.; { @ J >.6 0 0 X G.2 b", " H Q ! D x ..X 5 5.,.,., I G.2 b", " H , e R z 8 i u.o 7.1.O 1.& b.r", " H W t.w.w.w.w.w.w.w.0 P H H.r.r", " H f `.-.-.-.-.- s s s U H H.r.r", " H H.# [ ( - - ) ) 9 9 C | H.r.r", ".r H H H H H H H H H H H H H.r.r" }; /* categories/applications-system.png */ /* XPM */ const char *tango_applications_system[] = { /* width height ncolors chars_per_pixel */ "16 16 19 1", /* colors */ " c #000000", ". c #7CA1CF", "X c #497CBA", "o c #3F638F", "O c #6490C7", "+ c #467ABA", "@ c #395578", "# c #436FA5", "$ c #BCCDE3", "% c #5682B7", "& c #86A7D2", "* c #82A5D1", "= c #4C7FBD", "- c #426B9C", "; c #5686C3", ": c #9DB8DA", "> c #457ABE", ", c #8FAED5", "< c None", /* pixels */ "<<<<<<<<<<<<<<<<", "<<<<<<>>><<<<<<<", "<<<>><>$><>><<<<", "<<>$&>O:O>&$><<<", "<<>&:::::::&><<<", "<<<>:.+;+*:><<<<", "<>>O:+-><<", "<>$::;<<<;::$><<", "<>>O:=%<#+:O>><<", "<<<>$.=;+,:><<<<", "<<>&:::::::&><<<", "<<>$&>O:O>&$><<<", "<<<>><>$><>><<<<", "<<<<<<>>><<<<<<<", "<<<<<<<<<<<<<<<<", "<<<<<<<<<<<<<<<<" }; /* apps/internet-group-chat.png */ /* XPM */ const char *tango_internet_group_chat[] = { /* width height ncolors chars_per_pixel */ "16 16 23 1", /* colors */ " c #000000", ". c #9D9D9D", "X c #F2F2F2", "o c #F0F0F0", "O c #EEEEEE", "+ c #ECECEC", "@ c #EAEAEA", "# c #2D2D2D", "$ c #767774", "% c #888A85", "& c #858682", "* c #797A76", "= c #C6C6C4", "- c #FFFFFF", "; c #F1F1F1", ": c #EFEFEF", "> c #EDEDED", ", c #EBEBEB", "< c #E9E9E9", "1 c #343434", "2 c #2A2A2A", "3 c #868884", "4 c None", /* pixels */ "4444%%%%%%%%%%%4", "444%-----------%", "444%-,@<<<<<<<-%", "4%%%%%%%%%%%=<-%", "%-----------%<-%", "%-<<<<<<<@,-%@-%", "%-<<<<<@,++-%,-%", "%-<<<<@,+>O-%--%", "%-<<@,+>O::-%-%4", "%-@,++>O:o;-%-%4", "%-,+>O::o;X-%%%4", "%--O:-------%4%4", "4%-:-%%%%%%%.444", "4%--%44444444444", "4%%%444444444444", "4%44444444444444" }; /* status/dialog-information.png */ /* XPM */ const char *tango_dialog_information[] = { /* width height ncolors chars_per_pixel */ "16 16 127 2", /* colors */ " c #000000", " . c #394B7A", " X c #E8EFF4", " o c #4A577A", " O c #CBD9E8", " + c #40507A", " @ c #E3E6BA", " # c #F5F8FA", " $ c #80805C", " % c #C8D7E8", " & c #C5D5E5", " * c #3B4C78", " = c #3A4A77", " - c #D4E0ED", " ; c #C1CCD7", " : c #E0E9F2", " > c #546083", " , c #394A79", " < c #EBF0F6", " 1 c #475780", " 2 c #EBEDC1", " 3 c #46557F", " 4 c #F7F9FB", " 5 c #C5D2E1", " 6 c #5988B9", " 7 c #3D4D76", " 8 c #D9E3EE", " 9 c #495985", " 0 c #595942", " q c #B5C7DB", " w c #586383", " e c #9BAEC8", " r c #A9C0D9", " t c #3C4D78", " y c #F3F7FA", " u c #3B4B77", " i c #5382B6", " p c #D3DFEB", " a c #EDEFF4", " s c #E2EAF3", " d c #393936", " f c #5E8DBA", " g c #F5F8CA", " h c #A5BED8", " j c #616471", " k c #384977", " l c #EEF3F8", " z c #D0DDEB", " x c #CEDBE9", " c c #4F5873", " v c #FAFCFD", " b c #779DC5", " n c #485883", " m c #E8EFF5", " M c #ABB198", " N c #B5C6DA", " B c #E2E7EF", " V c #AAC1D9", " C c #3E4E79", " Z c #E0E5ED", " A c #DDDFAB", " S c #435177", " D c #8C9BB8", " F c #C3D3E4", " G c #98A4BD", " H c #B5CAE0", " J c #D0D5E0", " K c #DFE7F2", " L c #DEE7F1", " P c #91AECD", " I c #384A79", " U c #41517B", " Y c #8A8B66", " T c #E0E6EC", " R c #5E5E3E", " E c #B9C4D6", " W c #5E6880", " Q c #8D9CB8", " ! c #3A4B77", " ~ c #EFF3F7", " ^ c #9AA5BE", " / c #FCFCFD", " ( c #A6AC98", " ) c #789DC4", " _ c #C1D2E4", " ` c #F3F6C9", " ' c #3A4B7A", " ] c #C0D0E3", " [ c #384978", " { c #87A8CC", " } c #ECF1F7", " | c #4B7EB2", ". c #45547E", ".. c #CCD9E8", ".X c #D3D5B0", ".o c #3D4C76", ".O c #D8E2ED", ".+ c #4A5A86", ".@ c #D4E0EC", ".# c #5281B5", ".$ c #7E90B2", ".% c #FFFFFF", ".& c #A7AD98", ".* c #608EBC", ".= c #C2D3E4", ".- c #464646", ".; c #4B5B83", ".: c #EBF0F5", ".> c #FAFBFD", "., c #A4ADC3", ".< c #303030", ".1 c #C9D6E7", ".2 c #C7D6E5", ".3 c #F4F7FA", ".4 c #C2D0E0", ".5 c #D6E1ED", ".6 c #9DB9D6", ".7 c #7E91B1", ".8 c #B7C2D5", ".9 c #59627C", ".0 c #A6BED8", ".q c #A8AA84", ".w c #D2DAE2", ".e c #DFE8F2", ".r c #5C89BA", ".t c #5B89B9", ".y c None", /* pixels */ ".y.y.y.y.y u = [ I !.o.y.y.y.y.y", ".y.y.y.y *., a / 4 B ^ C.y.y.y.y", ".y.y.y t J # X s 8 p.O E U.y.y.y", ".y.y 7., # ~.3 <.e -.= & Q S.y.y", ".y.y + a m y v } K z _ ) 5 3.y.y", ".y.y ,.> : l.%.%.%.% ;.y x ..y.y", ".y.y '.3.5 L.%.: T.w P.y.1 ..y.y", ".y.y. Z O %.% ] H.6.y.* q n.y.y", ".y.y o G.@.0.% h {.y | V.7 >.y.y", ".y.y.y 1.8 F b.%.y f r e 9.y.y.y", ".y.y.y.y 1 D.4...2 N.$.+.y.y.y.y", ".y.y.y.y.y w.; (.& M W.y.y.y.y.y", ".y.y.y.y.y.y R 2 g A R.y.y.y.y.y", ".y.y.y.y.y.y R $.q Y R.y.y.y.y.y", ".y.y.y.y.y.y R @ `.X R.y.y.y.y.y", ".y.y.y.y.y.y.y d.-.<.y.y.y.y.y.y" }; /* actions/edit-clear.png */ /* XPM */ const char *tango_edit_clear[] = { /* width height ncolors chars_per_pixel */ "16 16 113 2", /* colors */ " c #E7D75B", " . c #EED723", " X c #AB1B0D", " o c #C86D33", " O c #BBA529", " + c #FDEC6D", " @ c #C5B536", " # c #DCC407", " $ c #EDDA46", " % c #A08E01", " & c #9F8E00", " * c #CDBD41", " = c #E8DA6C", " - c #D7B162", " ; c #E6D656", " : c #E1D35B", " > c #CCBD43", " , c #FDE952", " < c #E7D018", " 1 c #9C8800", " 2 c #C6B633", " 3 c #C5B432", " 4 c #BC7A0F", " 5 c #FDEA5F", " 6 c #CFC149", " 7 c #A29009", " 8 c #A19008", " 9 c #FDEB6C", " 0 c #D2C34F", " q c #DCC610", " w c #AE9E1B", " e c #F8EA88", " r c #AB6D0B", " t c #C17D10", " y c #F3E365", " u c #B2760B", " i c #9E8D01", " p c #E4D249", " a c #ECDC68", " s c #E7D96D", " d c #BB4A28", " f c #9F8F05", " g c #F6D861", " h c #9A8500", " j c #FDEC6B", " k c #FDEB61", " l c #EBDD77", " z c #804E01", " x c #DAC203", " c c #9F8E01", " v c #AB9B1A", " b c #E2D467", " n c #9F8E04", " m c #EADC72", " M c #A12400", " N c #B8381D", " B c #876400", " V c #FDEA63", " C c #DDCF5E", " Z c #FDEF84", " A c #A08F01", " S c #9F8D00", " D c #D8C84F", " F c #E3CB11", " G c #A96B0A", " H c #C6B530", " J c #BEAE32", " K c #FDEE7D", " L c #B2720C", " P c #9C8B00", " I c #9C7F00", " U c #A6690A", " Y c #FDEF8A", " T c #E5D44E", " R c #B06917", " E c #F3DB2A", " W c #DCC510", " Q c #FBED8B", " ! c #A18801", " ~ c #D6C856", " ^ c #7B4A00", " / c #FBEA84", " ( c #FFFFFF", " ) c #9D8C00", " _ c #FCE53C", " ` c #A03600", " ' c #E4D34C", " ] c #DCCD58", " [ c #DFCA26", " { c #784800", " } c #EBDE77", " | c #B1A01D", ". c #C0B02F", ".. c #DBC304", ".X c #F6DE2F", ".o c #AD4213", ".O c #E7D85F", ".+ c #A59411", ".@ c #FBE437", ".# c #7C4B00", ".$ c #9F8D01", ".% c #9E8D00", ".& c #E5CD14", ".* c #FBE544", ".= c #DCC615", ".- c #FDE63C", ".; c #865203", ".: c #845201", ".> c #A08F05", "., c #CDBE45", ".< c #794900", ".1 c #8A6900", ".2 c None", /* pixels */ ".2.# ^.2.2.2.2.2.2.2.2.2.2.2.2.2", " ^ U r ^.2.2.2.2.2.2.2.2.2.2.2.2", " ^ L t G ^.2 P.2.2.2.2.2.2.2.2.2", ".2.; 4 t.: h P.2.2.2.2.2.2.2.2.2", ".2 ^ z u ! J |.2.2.2.2.2.2.2.2.2", ".2.2 B 1 * } R ` A.2.2.2.2.2.2.2", ".2.2 i D a o X - m > 7 c.2.2.2.2", ".2.2.% O d N g V 9 K e., f &.2.2", ".2.2.2 M.o / j Z + ,.* y l 6 w )", ".2.2.2.2. Y 5 k ,.- E < q p b.$", ".2.2.2.2.+ Q _.@.X ..&.. x ; 2 &", ".2.2.2.2 % C $ < F # x x ' ] n.2", ".2.2.2.2.2 v = W x x.= ~.>.2.2", ".2.2.2.2.2 & @.O [ T s 3.%.2.2.2", ".2.2.2.2.2.2.% 0 : H 8 S.2.2.2.2", ".2.2.2.2.2.2.2 ).%.%.2.2.2.2.2.2" }; /* actions/edit-copy.png */ /* XPM */ const char *tango_edit_copy[] = { /* width height ncolors chars_per_pixel */ "16 16 44 1", /* colors */ " c #000000", ". c #E3E4E2", "X c #9A9B97", "o c #8D8F8A", "O c #898B86", "+ c #C8C8C7", "@ c #C6C6C5", "# c #C4C4C3", "$ c #8F908B", "% c #FEFEFE", "& c #FAFAFA", "* c #F4F4F4", "= c #F2F2F2", "- c #EEEEEE", "; c #ECECEC", ": c #EAEAEA", "> c #8E9189", ", c #D4D4D4", "< c #C3C4C3", "1 c #F7F7F6", "2 c #F3F3F2", "3 c #EFEFEE", "4 c #EDEDEC", "5 c #E3E3E2", "6 c #989A95", "7 c #8C8E89", "8 c #8A8C87", "9 c #888A85", "0 c #C7C7C6", "q c #FFFFFF", "w c #FBFBFB", "e c #F9F9F9", "r c #F3F3F3", "t c #EBEBEB", "y c #989A96", "u c #FEFEFD", "i c #FCFCFB", "p c #FAFAF9", "a c #F8F8F7", "s c #F6F6F5", "d c #F4F4F3", "f c #F0F0EF", "g c #EEEEED", "h c None", /* pixels */ "hhhhhhhhhhhhhhhh", "hhhhhhhhhhhhhhhh", "hhhhhhhhhhhhhhhh", "hhhhX9999999999o", "hhhh8qqqqqqqqqq9", "hhhhOqffffffffq9", "hhhh8qf000000fq9", "hhhhOqffffffffq9", "hhhh8qf00000ffq9", "hhhhOqfffffff&r9", "hhhh8qf00000-1<9", "hhhh8qfffff77779", "hhhhOuffff&6&a.9", "hhhhOpfff&&6&599", "hhhhO*1siw,y.9hh", "hhhh7O9999999hhh" }; /* actions/edit-cut.png */ /* XPM */ const char *tango_edit_cut[] = { /* width height ncolors chars_per_pixel */ "16 16 94 2", /* colors */ " c #000000", " . c #AA0909", " X c #A80707", " o c #959792", " O c #939590", " + c #91938E", " @ c #AB0D0D", " # c #90918D", " $ c #8F918C", " % c #A90B0B", " & c #8D8F8A", " * c #8B8D88", " = c #CB1F1F", " - c #9C2F2C", " ; c #B3B2AF", " : c #C01514", " > c #A80403", " , c #A70202", " < c #AB1313", " 1 c #AA0808", " 2 c #A80606", " 3 c #E1E1DF", " 4 c #AE1919", " 5 c #B70F0E", " 6 c #CE1E1E", " 7 c #A90A0A", " 8 c #D2D3D0", " 9 c #AA0E0E", " 0 c #DB2727", " q c #F5F6F5", " w c #AE1818", " e c #EFF0EF", " r c #D01F1F", " t c #CE1D1D", " y c #CD1D1C", " u c #898984", " i c #CCCEC9", " p c #C6C8C3", " a c #AA0D0D", " s c #B8BAB5", " d c #AB1111", " f c #B6B8B3", " g c #B5B6B2", " h c #F7F7F6", " j c #D42222", " k c #AAACA7", " l c #A60202", " z c #D22020", " x c #B80D0D", " c c #9FA09C", " v c #A70606", " b c #9A9C97", " n c #92948F", " m c #C91A1A", " M c #AA0C0C", " N c #8E908B", " B c #8C8E89", " V c #8A8C87", " C c #AB1010", " Z c #D62323", " A c #A80303", " S c #A60101", " D c #A90707", " F c #AF1A1A", " G c #A40502", " H c #AB1616", " J c #DBDCD9", " K c #CD1D1D", " L c #CA1B1A", " P c #AA0B0B", " I c #D2D4D0", " U c #CDCECB", " Y c #C5C6C3", " T c #C01513", " R c #B5B6B3", " E c #F7F7F7", " W c #AD1717", " Q c #D12020", " ! c #A34A45", " ~ c #B50B0B", " ^ c #A60606", " / c #A00A00", " ( c #C71A19", " ) c #BABBB7", " _ c #B3B5B0", " ` c #AEAFAB", " ' c #D52323", " ] c #D32121", " [ c #A8A9A5", " { c #D11F1F", " } c #AB1414", " | c #CF1D1D", ". c #E7E8E6", ".. c None", /* pixels */ "........ * O........ * $........", "...... N E *........ # 8 $......", "...... * I e n...... k p &......", "...... & _ h *.... N i ` *......", "........ * J e + B f U *........", "........ & g E * c R s *........", ".......... * 3 q b [ *..........", ".......... & ). k N V..........", "............ u Y ; -............", "........ w H ^ ! l ( W w........", "...... D z 6 5 G > m Q = 7......", ".... 2 r A : S.... y T A K v....", ".. } '.... t 7.... A L.... Q }..", ".. @ |.. ~ ] M.... . Z x.. { d..", ".. < 0 r t X........ 1 j | t <..", ".... 9 C H............ a P %...." }; /* actions/edit-paste.png */ /* XPM */ const char *tango_edit_paste[] = { /* width height ncolors chars_per_pixel */ "16 16 79 1", /* colors */ " c #000000", ". c #6A6C68", "X c #666864", "o c #C68827", "O c #6E4602", "+ c #6D4401", "@ c #C08424", "# c #7F7F7C", "$ c #EFEFED", "% c #EDEDEB", "& c #EBEBE9", "* c #E9E9E7", "= c #E7E7E5", "- c #676964", "; c #DBDBD9", ": c #B2B4B4", "> c #6E6C64", ", c #CCCDCA", "< c #6B4301", "1 c #FEFEFE", "2 c #F2F2F2", "3 c #EDEEED", "4 c #BA7F23", "5 c #D8D8D5", "6 c #E0E0E0", "7 c #A77D3B", "8 c #5C5C5B", "9 c #6C4401", "0 c #C1C2BE", "q c #B9BAB6", "w c #6B4403", "e c #B37B22", "r c #EFEFEE", "t c #EDEDEC", "y c #EBEBEA", "u c #C58726", "i c #97978A", "p c #6E4502", "a c #80807D", "s c #7E7E7B", "d c #ECECEA", "f c #EAEAE8", "g c #716F64", "h c #E8E8E6", "j c #706D63", "k c #DADAD8", "l c #6F4602", "z c #B97F23", "x c #B3B5B5", "c c #6E6D64", "v c #CDCECB", "b c #A17C40", "n c #5E5E5E", "m c #5C5C5C", "M c #6A4200", "N c #C28628", "B c #FFFFFF", "V c #E7E7E4", "C c #F1F1F1", "Z c #D9D9D6", "A c #B1B2B2", "S c #C58727", "D c #5F5F5E", "F c #959589", "G c #6C4301", "H c #6B4300", "J c #B9B9B6", "K c #B8B9B5", "L c #FEFEFD", "P c #B7B7B4", "I c #736F64", "U c #BBBBBB", "Y c #F0F0EF", "T c #EEEEED", "R c #A47E3E", "E c #A37C3D", "W c #ECECEB", "Q c #706D64", "! c None", /* pixels */ "!!!!!DmmmmD!!!!!", "!!+9w8FiiF8w99!!", "!+@RQn#aasn>bzG!", "!logC6UUUU62cSM!", "!loXBYYYYYYB-NM!", "!luXBYxxxxrB-NM!", "!luXBYYYY$%B-NM!", "!OuXBYxx:AfB-NM!", "!OuXBYrtyf;B-NM!", "!OuXBTW&*k,B-NM!", "!OuXBdfhvqKB-NM!", "!puXB*=ZJBBB-NM!", "!puXBV50PBB-SNM!", "!puj3111rL-SSSM!", "!G47I.....EEEe c #F2F2F2", ", c #F0F0F0", "< c #EEEEEE", "1 c #ECECEC", "2 c #8B8D89", "3 c #B2C8E0", "4 c #B0C6DE", "5 c #AEC4DC", "6 c #ACC2DA", "7 c #AAC0D8", "8 c #8C8E89", "9 c #A8BED6", "0 c #888A85", "q c #8298B0", "w c #FFFFFF", "e c #FDFDFD", "r c #FBFBFB", "t c #F9F9F9", "y c #F7F7F7", "u c #F5F5F5", "i c #EBEBEB", "p c None", /* pixels */ "p20000000000008p", "p0e&&ee**rr==t$p", "p0e9##77+++++-$p", "p0&#%%%%6%%%6-$p", "p0e7%%%%OOOOO-$p", "p0e7%%%%O555i-$p", "p0*+%%%%5%%o1-$p", "p0*66O5oo444<-$p", "p0*6O5oo44XX,-$p", "p0r6%%%%%%%3>y$p", "p0rO5o44 3 .:y$p", "p0=O5o4X3 u;;y$p", "p0tOqqqq3 y-yy$p", "p0tO5o4X3 yt-y$p", "p0------ - ---$p", "p8000000000000@p" }; /* actions/edit-undo.png */ /* XPM */ const char *tango_edit_undo[] = { /* width height ncolors chars_per_pixel */ "16 16 70 1", /* colors */ " c #000000", ". c #F3E56A", "X c #F4DF2C", "o c #F1DB29", "O c #F9EA69", "+ c #DFC80A", "@ c #BB9F15", "# c #F6E131", "$ c #EBDC6F", "% c #C4A000", "& c #EFE276", "* c #D6C004", "= c #C19E00", "- c #BBA11B", "; c #EEE16E", ": c #FAEC73", "> c #BCA015", ", c #F8E232", "< c #DAC304", "1 c #F5E02F", "2 c #C1A313", "3 c #7D7905", "4 c #FAEB6F", "5 c #DFC90F", "6 c #BEA113", "7 c #ECD936", "8 c #E3CD16", "9 c #BF9D00", "0 c #C1A319", "q c #DBC443", "w c #C8AC02", "e c #BCA114", "r c #F7DD05", "t c #FBED76", "y c #DFC80B", "u c #FBED79", "i c #B99900", "p c #7C7A06", "a c #D8C207", "s c #E9DA5D", "d c #CBAA0E", "f c #F7E86E", "g c #F2E469", "h c #E8D21D", "j c #C0A41A", "k c #F7E232", "l c #FBF3AD", "z c #C1A314", "x c #F6E769", "c c #FBE425", "v c #C5AB1B", "b c #C4A71A", "n c #C0A623", "m c #E1CD40", "M c #C2A611", "N c #BDA116", "B c #C2A211", "V c #FAE320", "C c #BFA31B", "Z c #EADB66", "A c #C3A618", "S c #F7E86C", "D c #F2E788", "F c #E3CE41", "G c #F5E66D", "H c #F6E02F", "J c #D8C543", "K c #7E7905", "L c #C4A901", "P c None", /* pixels */ "PPPPPP%PPPPPPPPP", "PPPPP%%PPPPPPPPP", "PPPP%l%PPPPPPPPP", "PPP%lc%%6@-PPPPP", "PP%l#V:4fSezPPPP", "P%lHko1o87xF2PPP", "%lH,kk1ohhh7mNPP", "P%u,X***hhhy.v>P", "PP%t c #979993", ", c #C0C0BE", "< c None", /* pixels */ "<<<<<<<<<<<<<<<<", "<<<<<<---<<<<<<<", "<<<--<-:-<--<<<<", "<<-:,-@&@-,:-<<<", "<<-,&&&&&&&,-<<<", "<<<-&O+>+;&-<<<<", "<--@&+%<*#&@--<<", "<-:&&><<<>&&:-<<", "<--@&oX<$+&@--<<", "<<<-:Oo>+.&-<<<<", "<<-,&&&&&&&,-<<<", "<<-:,-@&@-,:-<<<", "<<<--<-:-<--<<<<", "<<<<<<---<<<<<<<", "<<<<<<<<<<<<<<<<", "<<<<<<<<<<<<<<<<" }; /* mimetypes/application-x-executable.png */ /* XPM */ const char *tango_application_x_executable[] = { /* width height ncolors chars_per_pixel */ "16 16 70 1", /* colors */ " c #000000", ". c #9BABC3", "X c #8790B6", "o c #ADB8CE", "O c #ABB6CC", "+ c #5F7A9F", "@ c #7F90B1", "# c #A5B2C9", "$ c #A4B2C8", "% c #9197BC", "& c #9FAEC6", "* c #8991B7", "= c #AFB9CF", "- c #AEB9CE", "; c #BFC4D8", ": c #7382AB", "> c #95A2BF", ", c #949ABE", "< c #7D89B1", "1 c #7C89B0", "2 c #8D9EBA", "3 c #8E9CBB", "4 c #A0AFC6", "5 c #B0BACF", "6 c #9D9FC3", "7 c #C1C5D9", "8 c #7483AB", "9 c #99A3C2", "0 c #858EB5", "q c #AAB6CC", "w c #8F9BBB", "e c #9099BC", "r c #A2AEC7", "t c #A1AAC6", "y c #7786AD", "u c #8895B7", "i c #ACB7CD", "p c #7182AA", "a c #566F99", "s c #7A87AF", "d c #ACB0CC", "f c #8394B4", "g c #A8B4CB", "h c #A7B4CA", "j c #A7B2CA", "k c #50688F", "l c #A5B0C8", "z c #C8CADD", "x c #546C96", "c c #7C8EB0", "v c #7C8CB0", "b c #7B88AF", "n c #8D9FBA", "m c #7A88AE", "M c #B2BBD1", "N c #B1BBD0", "B c #516A96", "V c #7584AC", "C c #364878", "Z c #858FB5", "A c #98A2C1", "S c #ABB5CD", "D c #A9B5CB", "F c #A9B3CB", "G c #A7B1C9", "H c #486490", "J c #A3B1C8", "K c #B3BCD1", "L c #C3C7DA", "P c None", /* pixels */ "PPPPPPPCPPPPPPPP", "PPPPPPCLCPPPPPPP", "PPPPPCL.+CPPPPPP", "PPPPCL&4nHCPPPPP", "PPPCLJ$#2BaCPPPP", "PPCLhgDqcf@aCPPP", "PCLOio-rv>FpaCPP", "CL=5NMj3SKy:VaCP", "PCLGlwu8t9b c #969796", " , c #BFD2E9", " < c #7EA7D4", " 1 c #98B9DD", " 2 c #BBD2E8", " 3 c #797979", " 4 c #737373", " 5 c #3768A5", " 6 c #3666A4", " 7 c #C5D7EB", " 8 c #5689C0", " 9 c #85ACD7", " 0 c #9FA09E", " q c #656565", " w c #5F5F5F", " e c #C1D5EA", " r c #5B5B5B", " t c #555555", " y c #7FA8D4", " u c #515151", " i c #FEFEFE", " p c #FCFCFC", " a c #8AAFD8", " s c #494949", " d c #FAFAFA", " f c #95B8DC", " g c #EAEAEA", " h c #E8E8E8", " j c #E6E6E6", " k c #E2E2E2", " l c #E0E0E0", " z c #DEDEDE", " x c #77A2D2", " c c #DCDCDC", " v c #3667A6", " b c #DADADA", " n c #3465A4", " m c #5B5E5A", " M c #D2D2D2", " N c #81A9D5", " B c #D0D0D0", " V c #4B7EB7", " C c #3265A5", " Z c #8BB0D8", " A c #C4C4C4", " S c #96B7DC", " D c #3968A5", " F c #B0B0B0", " G c #B9D0E7", " H c #AEAEAE", " J c #ACACAC", " K c #AAAAAA", " L c #79A3D3", " P c #92B5DB", " I c #A6A6A6", " U c #5F615D", " Y c #3666A5", " T c #3566A4", " R c #5D5F5B", " E c #5B5D59", " W c #595B57", " Q c #D5D5D4", " ! c #575955", " ~ c #83AAD6", " ^ c #82AAD5", " / c #555753", " ( c #9BBADD", " ) c #C0D5EA", " _ c #C1C1C0", " ` c #7A7A7A", " ' c #787878", " ] c #3767A5", " [ c #A5A5A4", " { c #6E6E6E", " } c #5B5C58", " | c #5588BF", ". c #6A6A6A", ".. c #9C9D9B", ".X c #3567A6", ".o c #8FB2DA", ".O c #8EB2D9", ".+ c #939392", ".@ c #3465A5", ".# c #C1D6EA", ".$ c #565656", ".% c #B1C9E4", ".& c #4C4C4C", ".* c #FDFDFD", ".= c #FBFBFB", ".- c #484848", ".; c #F9F9F9", ".: c #F7F7F7", ".> c #7BA5D3", "., c #95B7DC", ".< c #94B5DB", ".1 c #3868A5", ".2 c #EBEBEB", ".3 c #E9E9E9", ".4 c #E7E7E7", ".5 c #E5E5E5", ".6 c #E3E3E3", ".7 c #B8CEE7", ".8 c #DFDFDF", ".9 c #DDDDDD", ".0 c #3566A5", ".q c #3466A4", ".w c #D9D9D9", ".e c #D3D3D3", ".r c #D0D1D0", ".t c #9ABADD", ".y c #CFCFCF", ".u c #CDCDCD", ".i c #C9C9C9", ".p c #C7C7C7", ".a c #C5C5C5", ".s c #A5C1E1", ".d c #7DA6D4", ".f c #BDBDBD", ".g c #95B6DB", ".h c #B7B7B7", ".j c #454A51", ".k c #B3B3B3", ".l c None", /* pixels */ ".l.l.l.l = ! = ! ! W * U.l.l.l.l", " ` 3 3 3 =.:.; d.=.= p $ }.l.l.l", " '.i.p A / b.e.e M.y.u i.+ m.l.l", " 4.a F J / c - - - - Q i.* > E.l", " { _ J K = k.8 z z.9 l.3.5 B R.l", ". .f o + = j 0.......9.6.6.r E.l", " q.h I & !.2 g g.3.3 h h.4.w %.l", " w.k X.1.1 5 Y Y.0 T T T n n n O", " r H.0 ) ) ) ) ) ) e.#.#.#.# 2.@", ".$ o T # P P P P P P P P P f G.q", " u [ 6 7 1 1 1 1 1 1 1 1 1.,.7.0", ".& & ] , (.t.t.t.t.t.t S.o Z.%.0", ".- ;.1.s.O a 9 ~ N < L x x.>.g.X", " s : D.< ^.d.d.d.d.d.d.d.d y Y", ".- . D | 8 8 8 8 8 8 8 8 8 8 V v", ".j n n n n n n n n n n n n n @.l" }; /* status/folder-open.png */ /* XPM */ const char *tango_folder_open[] = { /* width height ncolors chars_per_pixel */ "16 16 123 2", /* colors */ " c #000000", " . c #ADADAD", " X c #ABABAB", " o c #A9A9A9", " O c #92B6DB", " + c #92B4DB", " @ c #A7A7A7", " # c #3667A5", " $ c #A5A5A5", " % c #A3A3A3", " & c #A1A1A1", " * c #9F9F9F", " = c #9DBDDF", " - c #9D9D9D", " ; c #9B9B9B", " : c #B5CDE6", " > c #999999", " , c #7EA7D4", " < c #3968A4", " 1 c #484849", " 2 c #797979", " 3 c #757575", " 4 c #94B7DC", " 5 c #737373", " 6 c #93B5DB", " 7 c #6D6D6D", " 8 c #86AED8", " 9 c #6B6B6B", " 0 c #B7CEE7", " q c #656565", " w c #5F5F5F", " e c #C1D5EA", " r c #5B5B5B", " t c #7FA8D4", " y c #515151", " u c #B1CAE4", " i c #4779B4", " p c #494949", " a c #A2BFDF", " s c #86ABD4", " d c #95B8DC", " f c #AEC8E4", " g c #4971A5", " h c #B8CFE7", " j c #3567A5", " k c #4F79AE", " l c #3465A4", " z c #81A9D5", " x c #9BBBDE", " c c #3C6AA5", " v c #CACACA", " b c #C8C8C8", " n c #8CB0D9", " m c #C4C4C4", " M c #C0C0C0", " N c #BABABA", " B c #3968A5", " V c #3766A3", " C c #88AED8", " Z c #B2B2B2", " A c #B0B0B0", " S c #AEAEAE", " D c #ACACAC", " F c #AAAAAA", " G c #92B5DB", " H c #3868A7", " J c #A6A6A6", " K c #3666A5", " L c #A4A4A4", " P c #C4D7EB", " I c #A0A0A0", " U c #9E9E9E", " Y c #82AAD5", " T c #9C9C9C", " R c #9A9A9A", " E c #406DA8", " W c #6A7F99", " Q c #8EB3DA", " ! c #C1C1C0", " ~ c #808080", " ^ c #7A7A7A", " / c #787878", " ( c #454F5D", " ) c #747474", " _ c #94B6DC", " ` c #93B6DB", " ' c #A5A5A4", " ] c #598CC3", " [ c #6E6E6E", " { c #3463A2", " } c #6C6C6C", " | c #6A6A6A", ". c #84ABD6", ".. c #B7CFE7", ".X c #606060", ".o c #608FC3", ".O c #3465A5", ".+ c #565656", ".@ c #B3CBE6", ".# c #8F949B", ".$ c #FFFFFF", ".% c #4C4C4C", ".& c #8BB0D9", ".* c #484848", ".= c #688FBD", ".- c #3868A5", ".; c #85ACD6", ".: c #B7CEE6", ".> c #68809F", "., c #91B5DB", ".< c #3768A7", ".1 c #3566A5", ".2 c #B4CCE6", ".3 c #C9C9C9", ".4 c #8DB1DA", ".5 c #C7C7C7", ".6 c #C5C5C5", ".7 c #BED3E9", ".8 c #BDBDBD", ".9 c #5C8EC4", ".0 c #B7B7B7", ".q c #B3B3B3", ".w c None", /* pixels */ ".w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w", " ^ 2 2 2 2 2 2.w.w.w.w.w.w.w.w.w", " /.3.5.6 m m Z 3.w.w.w.w.w.w.w.w", " 5.6 A . X F F ^ 7 } 9 9 | [.w.w", " [ ! D F @ $ L o N.6 b v M q.w.w", " |.8 o J % & I * * I & % % w.w.w", " q.0 J % I - T ; R ; T U U r.w.w", " w.q % g B B B B B B B B B V K.<", " r S I.-.2 0 0...:.:.:.:.:.: u.O", ".+ o U <.7 O., G O O O O ` d.@.1", " y ' T c e 4 4 4 4 4 4 4 Q 8 :.1", ".% & ; E P x x x x x _.& C.4 h.1", ".* ;.# k f 6 + n.; t , , , Y a #", " p >.>.= =.& Y z z z z z z. s H", " 1 W B.o.9 ] ] ] ] ] ] ] ] ] i j", " ( l l l l l l l l l l l l l l.w" }; /* apps/help-browser.png */ /* XPM */ const char *tango_help_browser[] = { /* width height ncolors chars_per_pixel */ "16 16 153 2", /* colors */ " c #7497C1", " . c #D6DEE9", " X c #466DA1", " o c #8BA5C7", " O c #2F5891", " + c #E6EBF2", " @ c #E4E9F0", " # c #4B6E9F", " $ c #8CA2C1", " % c #6B8FBB", " & c #567CAD", " * c #5278A9", " = c #829DC1", " - c #AABAD1", " ; c #EDF0F5", " : c #FDFDFE", " > c #6387B6", " , c #4B72A5", " < c #345D95", " 1 c #6482AD", " 2 c #335B94", " 3 c #617EAA", " 4 c #BAC9DD", " 5 c #CDDAE9", " 6 c #E8ECF3", " 7 c #2E558F", " 8 c #2D558E", " 9 c #E6EAF1", " 0 c #C8D4E4", " q c #7296C1", " w c #C2CEDE", " e c #4D6FA0", " r c #A0B9D7", " t c #5A7FB0", " y c #728FB7", " u c #5B7AA7", " i c #2A538E", " p c #7999C1", " a c #F2F5F9", " s c #F0F3F7", " d c #365C93", " f c #BDCADC", " g c #FEFEFE", " h c #597AA8", " j c #6D8BB5", " k c #6B89B3", " l c #6987B1", " z c #6286B4", " x c #4D73A6", " c c #386098", " v c #214B88", " b c #6381AB", " n c #EDF1F7", " m c #315891", " M c #E9EDF3", " N c #6C8DB7", " B c #2D5690", " V c #86A1C3", " C c #5C7BA7", " Z c #9BB2D1", " A c #C9D7E7", " S c #6C88B0", " D c #6587B3", " F c #BDC9DB", " G c #547AAC", " H c #3B639A", " J c #6B88B2", " K c #244E8A", " L c #234C89", " P c #224C88", " I c #8FA8C8", " U c #6582AC", " Y c #CBD6E5", " T c #6085B4", " R c #94A9C6", " E c #5E83B2", " W c #325B94", " Q c #E5EAF1", " ! c #3B6096", " ~ c #C0CCDD", " ^ c #8CA1C1", " / c #6A8EBA", " ( c #5978A6", " ) c #5878A5", " _ c #3C649A", " ` c #264F8B", " ' c #254F8A", " ] c #94ADCC", " [ c #6284B2", " { c #F1F5F9", " } c #F0F3F8", " | c #EFF3F7", ". c #A9B9D0", ".. c #496FA3", ".X c #345C95", ".o c #335C94", ".O c #E8EDF3", ".+ c #B7C6DA", ".@ c #E7EBF2", ".# c #2C548D", ".$ c #A6B9D3", ".% c #7093BF", ".& c #42699F", ".* c #40679D", ".= c #5176A7", ".- c #27508B", ".; c #6A86AF", ".: c #ADBCD3", ".> c #F1F4F8", "., c #7594BD", ".< c #EFF2F6", ".1 c #A0B5D0", ".2 c #FFFFFF", ".3 c #678BB9", ".4 c #9BAFCB", ".5 c #6589B7", ".6 c #4C72A5", ".7 c #204A87", ".8 c #6482AC", ".9 c #A7B8D0", ".0 c #E9EEF3", ".q c #2F578F", ".w c #2D558D", ".e c #CAD6E5", ".r c #F9FBFC", ".t c #C6D2E1", ".y c #7396C1", ".u c #90A5C3", ".i c #6F92BD", ".p c #456CA1", ".a c #9FB7D5", ".s c #436A9F", ".d c #5D7CA8", ".f c #718DB5", ".g c #E3E8F0", ".h c #385E94", ".j c #9DB7D6", ".k c #D1DBE8", ".l c #47699C", ".z c #A0B4CF", ".x c #3A6299", ".c c #254F8B", ".v c #386097", ".b c #234D89", ".n c #224B88", ".m c #EFF3F8", ".M c #7191BB", ".N c #EBEFF4", ".B c #89A1C2", ".V c #CCD7E6", ".C c #FBFCFD", ".Z c #789BC5", ".A c None", /* pixels */ ".A.A.A.A.A.7.7.7.7.7.7.A.A.A.A.A", ".A.A.A.A.# ^ F.N.N F $.#.A.A.A.A", ".A.A.7 u.g. U ! ! U - @ C.7.A.A", ".A.A 3.@ (.l w s 9.9 e 1.O.d.A.A", ".A 8 Q ).7 S : ..<.2 f c k +.w.A", ".7.u. .7.7 # e W h.2.C X.s.+ R.7", ".7 ~ U.7.- B.X.x.B.2 6 , x V.t L", ".7 ; d ' B < H j.r g = G & N | v", ".7 ;.h i 2.x.&.O.2.1 t E T., }.n", ".7 ~.; O.v.*.= 0.e z >.3 / Z.V K", ".7.u.:.o _.p * I ].5 %.%.y A.z v", ".A 8 + l.*.. [.2.2.i q.Z.j n.q.A", ".A.A b.0 y.6 D.2.2 .Z r { J.A.A", ".A.A.7.8 M 4 o.M p.a 5.m.f `.A.A", ".A.A.A.A 7.4 Y.> a.k.$ m.A.A.A.A", ".A.A.A.A.A.7.b P P.c v.A.A.A.A.A" }; /* mimetypes/image-x-generic.png */ /* XPM */ const char *tango_image_x_generic[] = { /* width height ncolors chars_per_pixel */ "16 16 87 1", /* colors */ " c #6583AF", ". c #95A8C7", "X c #6381AD", "o c #617FAB", "O c #A5B5D0", "+ c #738EB6", "@ c #3F516F", "# c #384151", "$ c #3D4F6D", "% c #5B7BA8", "& c #45546E", "* c #7A8698", "= c #5475A4", "- c #98ABC9", "; c #67758F", ": c #A8B8D2", "> c #9CA7B9", ", c #839ABE", "< c #6180AD", "1 c #D1DCB1", "2 c #8691A3", "3 c #A4B8A9", "4 c #515151", "5 c #FEFEFE", "6 c #485773", "7 c #E2EBBE", "8 c #5778A6", "9 c #9AACCA", "0 c #7D899D", "q c #F6F6F6", "w c #9EA8BA", "e c #7892B9", "r c #A8B7D1", "t c #374762", "y c #818A9A", "u c #93A6C6", "i c #A2B3CE", "p c #8099BD", "a c #FFFFFE", "s c #405374", "d c #889EC1", "f c #869CBF", "g c #455672", "h c #435470", "j c #96A9C8", "k c #A6B6D1", "l c #33476A", "z c #FEFEF9", "x c #3D4E6D", "c c #888A85", "v c #3B4C6B", "b c #B6C5B2", "n c #8CA1C1", "m c #6D89B3", "M c #415474", "N c #C4D1AF", "B c #EEF3CB", "V c #475773", "C c #818DA2", "Z c #2F4262", "A c #DCE5B9", "S c #384C6E", "D c #A7B7D1", "F c #7590B7", "G c #34486A", "H c #9DAFC7", "J c #5072A3", "K c #6884AA", "L c #233659", "P c #8FA6AF", "I c #FDFDFD", "U c #6986B1", "Y c #819AB8", "T c #9FA9BB", "R c #9EA9BA", "E c #5F7EAA", "W c #B3C2B7", "Q c #728DB6", "! c #A1B3C3", "~ c #FCFDEE", "^ c #8EA3C4", "/ c #F7FADF", "( c #495973", ") c #C5D1B1", "_ c #3D5071", "` c #718DA7", "' c None", /* pixels */ "cccccccccccccccc", "c55555555555555c", "cI*tttttttttt*qc", "c5@oXK`E%8==Jtqc", "cIh+PAB3mU 44ytqc", "cItx$$xvZL44#tqc", "cItMs_SGl4444tqc", "cItC;;;;;;;;;tqc", "cI*tttttttttt*qc", "c5qqqqqqqqqqqqIc", "cccccccccccccccc" }; /* actions/go-previous.png */ /* XPM */ const char *tango_go_previous[] = { /* width height ncolors chars_per_pixel */ "16 16 99 2", /* colors */ " c #65A827", " . c #6EC915", " X c #C6DEAE", " o c #C2DCAA", " O c #52891E", " + c #3B7504", " @ c #CAE0B5", " # c #7CC833", " $ c #67C111", " % c #AACF88", " & c #97DA54", " * c #97BD72", " = c #6BA236", " - c #A0C37E", " ; c #55A409", " : c #61B70E", " > c #A9D480", " , c #60B50D", " < c #87B65B", " 1 c #3C7604", " 2 c #C7DFB1", " 3 c #9DC477", " 4 c #87BB54", " 5 c #3A7405", " 6 c #82B74F", " 7 c #A5DC6E", " 8 c #457C13", " 9 c #88BB58", " 0 c #60A420", " q c #B8D69B", " w c #90BF63", " e c #B3D296", " r c #3D7904", " t c #A6CF7F", " y c #C5DEAE", " u c #8DC459", " i c #96CA65", " p c #3A7304", " a c #59AC0B", " s c #598B29", " d c #578927", " f c #41790E", " g c #ACD881", " h c #5EA31D", " j c #70AD35", " k c #6EA23D", " l c #7FB947", " z c #C4DDAC", " x c #7AB742", " c c #4E9A06", " v c #3B7604", " b c #4D8419", " n c #3B7404", " m c #A5D576", " M c #A3CA7E", " N c #5AAD0B", " B c #AEDB82", " V c #65B519", " C c #A9D77D", " Z c #5A8C2C", " A c #7DA855", " S c #8BBD5C", " D c #61B60E", " F c #71B035", " G c #7BB642", " H c #66AF20", " J c #BFDAA6", " K c #75B23C", " L c #B0DE83", " P c #3F790A", " I c #A7CD84", " U c #FFFFFF", " Y c #A5C982", " T c #80B64D", " R c #5D8D2E", " E c #7FA956", " W c #56A609", " Q c #8ABC5A", " ! c #89BC59", " ~ c #87BA57", " ^ c #91C064", " / c #68A92B", " ( c #BDD9A3", " ) c #519E07", " _ c #5EB30D", " ` c #94C26A", " ' c #C8DFB1", " ] c #A3D572", " [ c #69C211", " { c #66AC22", " } c #3A7404", " | c #5CAD0E", ". c #7DB549", ".. c #58A90A", ".X c #437A10", ".o c #62AF17", ".O c #85B954", ".+ c #B5D497", ".@ c None", /* pixels */ ".@.@.@.@.@.@.@.@.@.@ +.@.@.@.@.@", ".@.@.@.@.@.@.@.@ n s p.@.@.@.@.@", ".@.@.@.@.@.@.@ } E ' p.@.@.@.@.@", ".@.@.@.@.@.@.X - ( @ p.@.@.@.@.@", ".@.@.@.@ n R e % ^ 2 v p p p p }", ".@.@.@ 5 A.+ ` ~ S z y X y z o p", ".@.@ 8 * I T. 6.O 9 ! Q ! 9 J p", " + Z Y w j K G l x F h 0 / q p", " + d 3 4 { H.o | a.. ; ) c c M p", ".@.@ f < i V , : D _ N W ) c M p", ".@.@.@ + k m # [ $ B g > t M M p", ".@.@.@.@ v O ] & . L r p p p p }", ".@.@.@.@.@.@ P u 7 L p.@.@.@.@.@", ".@.@.@.@.@.@.@ 1 = C p.@.@.@.@.@", ".@.@.@.@.@.@.@.@ v b p.@.@.@.@.@", ".@.@.@.@.@.@.@.@.@.@ +.@.@.@.@.@" }; /* actions/system-log-out.png */ /* XPM */ const char *tango_system_log_out[] = { /* width height ncolors chars_per_pixel */ "16 16 186 2", /* colors */ " c #E26E6E", " . c #D94141", " X c #E5E6E4", " o c #ECE3E1", " O c #AFAFAF", " + c #ADADAD", " @ c #ABABAB", " # c #A9A9A9", " $ c #A7A7A7", " % c #E88E8E", " & c #A5A5A5", " * c #A3A3A3", " = c #5C5E5A", " - c #A1A1A1", " ; c #A20E0E", " : c #585A56", " > c #9D9D9D", " , c #565854", " < c #D23D3D", " 1 c #999999", " 2 c #979797", " 3 c #959595", " 4 c #939393", " 5 c #AC1111", " 6 c #919191", " 7 c #8F8F8F", " 8 c #8D8D8D", " 9 c #8B8B8B", " 0 c #898989", " q c #EA9696", " w c #E16969", " e c #F1F1EF", " r c #858585", " t c #A50000", " y c #EFEFED", " u c #645F5E", " i c #7F7F7F", " p c #EB9A9A", " a c #797979", " s c #A60404", " d c #757575", " f c #A11616", " g c #E88D8D", " h c #6F6F6F", " j c #D9DBD7", " k c #A61111", " l c #D7D9D5", " z c #656565", " x c #D23C3C", " c c #989897", " v c #DB4848", " b c #D21B1B", " n c #5D5D5D", " m c #C7C9C5", " M c #C6C9C4", " N c #595959", " B c #B02121", " V c #898A88", " C c #EA9595", " Z c #CF0E0E", " A c #878886", " S c #EDD4D3", " D c #FAFAFA", " F c #E78888", " G c #A60303", " H c #CD6161", " J c #686A67", " K c #D32525", " L c #9A9B98", " P c #D73636", " I c #D79292", " U c #929390", " Y c #8A6464", " T c #C6C8C3", " R c #B12221", " E c #8D8F8B", " W c #DD5656", " Q c #B51B1B", " ! c #C42D2D", " ~ c #D0D2D0", " ^ c #F3F1EF", " / c #D63838", " ( c #7F817D", " ) c #FBFBFA", " _ c #D52D2D", " ` c #BEBEBE", " ' c #F3F3F2", " ] c #BABABA", " [ c #737571", " { c #EFEFEE", " } c #DB4D4D", " | c #AC1515", ". c #C46C6B", ".. c #E4E5E3", ".X c #686966", ".o c #656763", ".O c #DC5151", ".+ c #646562", ".@ c #AAAAAA", ".# c #C58886", ".$ c #61635F", ".% c #CE0808", ".& c #A6A6A6", ".* c #5F615D", ".= c #A4A4A4", ".- c #A2A2A2", ".; c #5B5D59", ".: c #C5C7C1", ".> c #A0A0A0", "., c #595B57", ".< c #9E9E9E", ".1 c #575955", ".2 c #9C9C9C", ".3 c #555753", ".4 c #9A9A9A", ".5 c #989898", ".6 c #969696", ".7 c #949494", ".8 c #BC2424", ".9 c #929292", ".0 c #867979", ".q c #8C8C8C", ".w c #F4F4F2", ".e c #888888", ".r c #868686", ".t c #858685", ".y c #F0F0EE", ".u c #DB4C4C", ".i c #BC3E3E", ".p c #828282", ".a c #808080", ".s c #7E7E7E", ".d c #767676", ".f c #707070", ".g c #7E6A6A", ".h c #6E6E6E", ".j c #D8DAD6", ".k c #C53636", ".l c #A2A3A1", ".z c #6C6C6C", ".x c #AC2524", ".c c #D6D8D4", ".v c #AA0B0B", ".b c #D4D6D2", ".n c #B01E1E", ".m c #686868", ".M c #646464", ".N c #DA9696", ".B c #606060", ".V c #B72828", ".C c #A51413", ".Z c #D11A1A", ".A c #C3C6C1", ".S c #8B7373", ".D c #BC3030", ".F c #FFFFFF", ".G c #FBFBFB", ".H c #F9F9F9", ".J c #D43A3A", ".K c #ECA7A7", ".L c #C76565", ".P c #696B68", ".I c #C6C9C3", ".U c #A90C0C", ".Y c #BEC1BB", ".T c #CE0C0C", ".R c #D33535", ".E c #DB4A4A", ".W c #C45151", ".Q c #C3C3C3", ".! c #F8F8F7", ".~ c #F6F6F5", ".^ c #BB4948", "./ c #CF1010", ".( c #F4F4F3", ".) c #BDBDBD", "._ c #BBBBBB", ".` c #B64543", ".' c #A50101", ".] c #EDEEEC", ".[ c #D26565", ".{ c #B93C3C", ".} c #6D6E6B", ".| c #A28988", "X c #D55E5E", "X. c None", /* pixels */ ".;.3.3.3.3.3.3.3 , =.+.X J.o.}X.", ".3.& r a.h z n N y e.(.~.~.] (X.", ".3 +.q i d.z.M.B y '.! ).G.H LX.", ".3 ] 3 0.s d.h.m {.w.H I.i D.lX.", ".3._ >.7 0 i.d.f.y ^.L.W | S.|X.", ".3.).> 2 7.r.s.d o.{ H.K.D.V R.'", ".3 `.-.4 6.e.a.g B.[ F % C q p.'", ".3 `.=.2 4 9 Y kX w v.E.u } g G", ".3 ` $.<.6 8 f.k W _ K.Z./ b s", ".3 ` # -.5 7.S ; ! P.%.T.T Z.O.'", ".3 `.@ *.4.9 0.0.x.8 / ..J x < t", ".3 `.@ & > 3 7.p u.^ Q.R s.n.C.v", ".3 `.@ # - 1 h V ~... 5.U X AX.", ".3 ` @ O.t E m.b l.j j.#.`.c [X.", ".3.Q c U.Y.A T.I M M M M M.:.$X.", ".;.P ,.1 : : : :.,.,.,.,., :.*X." }; /* actions/list-remove.png */ /* XPM */ const char *tango_list_remove[] = { /* width height ncolors chars_per_pixel */ "16 16 20 1", /* colors */ " c #000000", ". c #7DA6D7", "X c #86ADD9", "o c #9FBEE0", "O c #B6CCE6", "+ c #83AAD8", "@ c #BBD1E7", "# c #7FA8D7", "$ c #94B6DB", "% c #3465A4", "& c #95B7DB", "* c #B5CCE6", "= c #B4CCE5", "- c #92B4DA", "; c #B6CDE6", ": c #B7CEE6", "> c #90B3DA", ", c #C0D3E8", "< c #BCD1E7", "1 c None", /* pixels */ "1111111111111111", "1111111111111111", "1111111111111111", "1111111111111111", "1111111111111111", "1111111111111111", "11%%%%%%%%%%%%11", "11%,@<::::;*O%11", "11%=&$->X+#.o%11", "11%%%%%%%%%%%%11", "1111111111111111", "1111111111111111", "1111111111111111", "1111111111111111", "1111111111111111", "1111111111111111" }; /* devices/multimedia-player.png */ /* XPM */ const char *tango_multimedia_player[] = { /* width height ncolors chars_per_pixel */ "16 16 79 1", /* colors */ " c #666864", ". c #626460", "X c #858782", "o c #80817D", "O c #7E7F7B", "+ c #7D7F7A", "@ c #7C7D79", "# c #7B7D78", "$ c #CBCFAC", "% c #7A7B77", "& c #696B66", "* c #CBD0A5", "= c #676964", "- c #C9D0A3", "; c #A4A6A3", ": c #D1D6AE", "> c #5B5B58", ", c #BDC58D", "< c #B2B796", "1 c #C3C996", "2 c #8A8C89", "3 c #B8B9B6", "4 c #A5A7A3", "5 c #989996", "6 c #C3C79F", "7 c #BFC59B", "8 c #C5C9A4", "9 c #838581", "0 c #7C7D7A", "q c #AEAEAB", "w c #A8AAA5", "e c #6E6F6C", "r c #A2A49F", "t c #BEC496", "y c #969893", "u c #92948F", "i c #91928E", "p c #BBC096", "a c #555753", "s c #535551", "d c #888A85", "f c #80827D", "g c #B8BCAA", "h c #CFD4B0", "j c #7E807B", "k c #7C7E79", "l c #7A7C77", "z c #787A75", "x c #747671", "c c #70726D", "v c #6E706B", "b c #6C6E69", "n c #6A6C67", "m c #686A65", "M c #9B9D9A", "N c #939592", "B c #C3CA96", "V c #B6B6B4", "C c #B4B5A8", "Z c #BBC291", "A c #ADAEAB", "S c #A5A6A3", "D c #A4A6A2", "F c #9FA09D", "G c #696968", "H c #B8BCA8", "J c #B3BC78", "K c #B6BAA6", "L c #898A87", "P c #C4CAA3", "I c #C5CB9A", "U c #B9B9B6", "Y c #C9CEAB", "T c #787A76", "R c #767874", "E c #BBC286", "W c #747672", "Q c #A6A7A3", "! c None", /* pixels */ "saaaaaaaaaaaaaaa", "aRQQQ444444S;DRa", "a5i%%%@@@@@Ood5a", "a5N<68Y$P7tZh25a", "a5rpBI-*1,EJ:y5a", "a5uCgHHHHHHKKX5a", "a5vbbnbvbnnbnn5a", "a5&=m==&m==&=m5a", "a5zqMwAWxWc>. 5a", "a5L3DVU+++TG0e5a", "a5+++++++++9fj5a", "a5kkkkkkkkkkkk5a", "a5#F#F########5a", "a5llllllllllll5a", "aR555555555555Ra", "aaaaaaaaaaaaaaaa" }; /* apps/internet-web-browser.png */ /* XPM */ const char *tango_internet_web_browser[] = { /* width height ncolors chars_per_pixel */ "16 16 167 2", /* colors */ " c #000000", " . c #56719D", " X c #6984A9", " o c #DCE1E5", " O c #F1F2F3", " + c #8BA7C7", " @ c #84A6CA", " # c #DFEFFF", " $ c #93B6DC", " % c #EDEEEF", " & c #5A79A4", " * c #5979A3", " = c #5877A2", " - c #BCC4CC", " ; c #B1C0D5", " : c #E3E4E5", " > c #5685B7", " , c #B1CEEC", " < c #627CA5", " 1 c #B3C1D0", " 2 c #F0F4F8", " 3 c #B5BEC8", " 4 c #CCDDEF", " 5 c #DBDEE0", " 6 c #7591B4", " 7 c #759FCB", " 8 c #BED4EB", " 9 c #F8F9F9", " 0 c #B7C2CD", " q c #BECFE1", " w c #BCCDDF", " e c #5B7AA4", " r c #B5C5D8", " t c #5978A2", " y c #93ABC7", " u c #C6CFD8", " i c #D4DDE9", " p c #A3B8D0", " a c #A0B4CD", " s c #BEC7D0", " d c #CAD5DF", " f c #5988BC", " g c #E0E3E4", " h c #DFE1E3", " j c #83A7CE", " k c #637FA8", " l c #617FA6", " z c #FEFEFE", " x c #D7D9DB", " c c #DCE4ED", " v c #F6F6F6", " b c #5E7DA6", " n c #628FC1", " m c #CCD9E7", " M c #E6EBF0", " N c #C0C6CE", " B c #57759F", " V c #DBE4EF", " C c #E2E2E2", " Z c #80A7D1", " A c #E0E0E0", " S c #B7C8DC", " D c #B1C2D6", " F c #DCE3E9", " G c #6B96C6", " H c #7A95B7", " J c #BABFC4", " K c #A9BCD1", " L c #D9E1E9", " P c #CED0D1", " I c #6983A6", " U c #C8CFD5", " Y c #7591B5", " T c #9DA6AE", " R c #6D90B7", " E c #D2E5F9", " W c #819ABA", " Q c #DEE2E7", " ! c #D6DFE9", " ~ c #A3B6CE", " ^ c #DAEAFA", " / c #CFD9E2", " ( c #5A7AA4", " ) c #5C8ABD", " _ c #A2BDDA", " ` c #D5DFEB", " ' c #A5B7C9", " ] c #CCD7E2", " [ c #C3D2E3", " { c #5686BA", " } c #E3F1FF", " | c #C8CED4", ". c #E2EFFE", ".. c #7792B6", ".X c #516994", ".o c #9BB2CC", ".O c #9AB0CB", ".+ c #839BBB", ".@ c #C9E1F9", ".# c #F4F4F5", ".$ c #CED1D3", ".% c #E0EFFF", ".& c #4F80B6", ".* c #CEDBEA", ".= c #5D7DA6", ".- c #5A79A3", ".; c #5877A1", ".: c #E0E5EB", ".> c #94ACC8", "., c #7E97B9", ".< c #6C96C5", ".1 c #BECBDA", ".2 c #E6EBF4", ".3 c #DAEBFC", ".4 c #D4E5F6", ".5 c #E4E6E8", ".6 c #E2E4E6", ".7 c #9CBDE0", ".8 c #6380A8", ".9 c #C7CDD2", ".0 c #ACCAE9", ".q c #BBC9DA", ".w c #9DB3CD", ".e c #5E7AA3", ".r c #FDFDFD", ".t c #BCD7F2", ".y c #FBFBFB", ".u c #5A769F", ".i c #F9F9F9", ".p c #58749D", ".a c #AABED3", ".s c #F5F5F5", ".d c #E1F0FF", ".f c #EFEFEF", ".g c #BECAD6", ".h c #BCC8D4", ".j c #5876A0", ".k c #719BC9", ".l c #B5D1EE", ".z c #B8BFC6", ".x c #576F95", ".c c #D5DFE9", ".v c #DEEEFF", ".b c #B8C9DD", ".n c #627BA3", ".m c #101221", ".M c #AEB5BC", ".N c #AFBFD4", ".B c #4B6189", ".V c #D3D3D3", ".C c #D1D1D1", ".Z c #7994B6", ".A c #DCDDDF", ".S c #B4C7DC", ".D c #9FB4CE", ".F c #A4B5C9", ".G c #9CB2CB", ".H c #708AAD", ".J c #CCE3FA", ".K c #ABBDD3", ".L c #B3CCE8", ".P c #E2F1FF", ".I c #617FA8", ".U c #DEEDFB", ".Y c #D5E8FC", ".T c #5977A0", ".R c None", /* pixels */ ".R.R.R.R.R.j e ( t =.R.R.R.R.R.R", ".R.R.R.e.+.q c.2 ` D., *.R.R.R.R", ".R.R l ;.: / J.1 8.g L ~.-.R.R.R", ".R X.N Q.$. .U.4.h N 5 M a (.R.R", ".n W 2 : d.P } ^ u x.#.y.c.Z.R.R", ".H r g 4.%.d.d.3.9 s.F 3.5 p (.R", ".8 i.a.J.v # #.*.r z.r.6.A w (.R", " e V.0.t.@.Y E U z z z.i.M [ (.R", " b m 0 |.L.l , K 9 O z.f P.b (.R", " k.K o z h _.7 $ @ +.s C T.w (.R", " < H ! z z % j Z 7.< A.V ' Y.R.R", ".R.I.G F v.z.k G n f.C -.> (.R.R", ".R.R.=.O ] R ) {.& > 1 y *.R.R.R", ".R.R.R I...D S q.S.o 6.T.R.R.R.R", ".R.R.R.R.x.u.- & t.p.R.R.R.R.R.R", ".R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R" }; /* actions/list-add.png */ /* XPM */ const char *tango_list_add[] = { /* width height ncolors chars_per_pixel */ "16 16 20 1", /* colors */ " c #000000", ". c #7DA6D7", "X c #86ADD9", "o c #9FBEE0", "O c #B6CCE6", "+ c #83AAD8", "@ c #BBD1E7", "# c #7FA8D7", "$ c #94B6DB", "% c #3465A4", "& c #95B7DB", "* c #B5CCE6", "= c #B4CCE5", "- c #92B4DA", "; c #B6CDE6", ": c #B7CEE6", "> c #90B3DA", ", c #C0D3E8", "< c #BCD1E7", "1 c None", /* pixels */ "1111111111111111", "1111111111111111", "111111%%%%111111", "111111%::%111111", "111111%::%111111", "111111%::%111111", "11%%%%%::%%%%%11", "11%,@<::::;*O%11", "11%=&$->X+#.o%11", "11%%%%%XX%%%%%11", "111111%:X%111111", "111111%:X%111111", "111111%::%111111", "111111%%%%111111", "1111111111111111", "1111111111111111" }; /* apps/preferences-desktop-font.png */ /* XPM */ const char *tango_preferences_desktop_font[] = { /* width height ncolors chars_per_pixel */ "16 16 79 1", /* colors */ " c #000000", ". c #B1B1B1", "X c #ADADAD", "o c #A7A7A7", "O c #797979", "+ c #EAEBEB", "@ c #E9E9EA", "# c #E8E9E9", "$ c #5F5F5F", "% c #4D4D4D", "& c #4B4B4B", "* c #FCFCFC", "= c #494949", "- c #FAFAFA", "; c #474747", ": c #F8F8F8", "> c #F6F6F6", ", c #F4F4F4", "< c #F2F2F2", "1 c #F0F0F0", "2 c #EEEEEE", "3 c #ECECEC", "4 c #E8E8E8", "5 c #E6E6E6", "6 c #E5E6E5", "7 c #E4E4E4", "8 c #E2E2E2", "9 c #2F2F2F", "0 c #CECECE", "q c #050505", "w c #EAE9E9", "e c #010101", "r c #E8E7E7", "t c #E7E7E6", "y c #8A8C87", "u c #888A85", "i c #828282", "p c #7C7C7C", "a c #767676", "s c #747474", "d c #E4E4E5", "f c #666666", "g c #626262", "h c #565656", "j c #FFFFFF", "k c #FDFDFD", "l c #4A4A4A", "z c #FBFBFB", "x c #484848", "c c #F9F9F9", "v c #F7F7F7", "b c #F5F5F5", "n c #F3F3F3", "m c #F1F1F1", "M c #EFEFEF", "N c #EDEDED", "B c #ECEDEC", "V c #ECEBEC", "C c #EBEBEB", "Z c #EAEBEA", "A c #E9E9E9", "S c #E6E7E6", "D c #343434", "F c #E4E5E4", "G c #E4E3E4", "H c #E3E3E3", "J c #2E2E2E", "K c #2C2C2C", "L c #DBDBDB", "P c #222222", "I c #D3D3D3", "U c #202020", "Y c #BFBFBF", "T c #B8B9B8", "R c #060606", "E c #ECECEB", "W c #040404", "Q c #EBEAEA", "! c None", /* pixels */ "!uuuuuuuuuuuuuu!", "ujjjjjjjjjjjjjju", "ujHoi99H5555HHku", "ujH8L09H4A44HHku", "ujH.9s95S56dGHku", "ujH9IY9AAw#r5Fzu", "uj7999T&9BV+Atzu", "uj53N2M;K1M2E@:u", "uj4NM1mxUD eg<>u", "ujwM1=RmzI aMu", "uj+<,>vl Ov$ XMu", "ujQ<,>:hJPW %vMu", "uj******--->>>Mu", "!uuuuuuuuuuuuuu!" }; /* actions/process-stop.png */ /* XPM */ const char *tango_process_stop[] = { /* width height ncolors chars_per_pixel */ "16 16 136 2", /* colors */ " c #000000", " . c #BF0000", " X c #EB4C4C", " o c #F68888", " O c #D89292", " + c #E8BCBC", " @ c #FCF7F7", " # c #EF6A6A", " $ c #DB3C3C", " % c #ED4747", " & c #DF2C2C", " * c #B22424", " = c #B82323", " - c #D75F5F", " ; c #D52F2F", " : c #F58383", " > c #C41B1B", " , c #B41F1F", " < c #F26969", " 1 c #C10101", " 2 c #CC0F0F", " 3 c #E4AAAA", " 4 c #E9A5A5", " 5 c #F68787", " 6 c #D22F2F", " 7 c #C70000", " 8 c #BF1919", " 9 c #F78B8B", " 0 c #E6A5A5", " q c #D13131", " w c #DF2B2B", " e c #BF0505", " r c #D85C5C", " t c #CF2F2F", " y c #BD0303", " u c #E83737", " i c #E6E0E0", " p c #C92929", " a c #FEFEFE", " s c #880000", " d c #CC2F2F", " f c #DB4141", " g c #C10000", " h c #E6ABAB", " j c #E6D9D9", " k c #DA6464", " l c #ECECEC", " z c #EA3F3F", " x c #E8E8E8", " c c #D75757", " v c #DACDCD", " b c #EB4343", " n c #D85B5B", " m c #ED5252", " M c #BD0202", " N c #D31111", " B c #BC1818", " V c #E6DFDF", " C c #E63434", " Z c #B32626", " A c #AF2222", " S c #DB4040", " D c #B41D1D", " F c #EC6161", " G c #EF5A5A", " H c #890303", " J c #D65F5F", " K c #ED6565", " L c #D85A5A", " P c #D65858", " I c #DA3B3B", " U c #E39696", " Y c #E5A5A5", " T c #BE0505", " R c #CE2F2F", " E c #C30000", " W c #D01010", " Q c #E73737", " ! c #B01818", " ~ c #D21F1F", " ^ c #890202", " / c #CB0101", " ( c #870000", " ) c #E83B3B", " _ c #CE2828", " ` c #F17575", " ' c #EE6868", " ] c #BD0000", " [ c #F3EDED", " { c #F68A8A", " } c #DB5F5F", " | c #C70303", ". c #B12222", ".. c #BE0404", ".X c #D75B5B", ".o c #E5DFDF", ".O c #E94545", ".+ c #C71D1D", ".@ c #B72121", ".# c #F9F9F9", ".$ c #DC4242", ".% c #B11B1B", ".& c #F1F1F1", ".* c #9E3333", ".= c #EDEDED", ".- c #F58585", ".; c #F38383", ".: c #DFDFDF", ".> c #DA6767", "., c #DBDBDB", ".< c #F68989", ".1 c #D23131", ".2 c #A43F3F", ".3 c #D02F2F", ".4 c #C50000", ".5 c #D93B3B", ".6 c #D53737", ".7 c #DE9292", ".8 c #DF2D2D", ".9 c #F06F6F", ".0 c #890000", ".q c #C51A1A", ".w c #B11A1A", ".e c #D63B3B", ".r c #D52323", ".t c #EC4A4A", ".y c #E2DEDE", ".u c #D89999", ".i c #DEACAC", ".p c #B82424", ".a c #D76060", ".s c #D53030", ".d c #DAD6D6", ".f c #880202", ".g c #860000", ".h c None", /* pixels */ ".h.h.h.h.0.g.g.g.g.g.g.0.h.h.h.h", ".h.h.h.0 A o 9 9 { 5 : =.0.h.h.h", ".h.h.0. .;.$ ; ; ; ; $ ` ,.0.h.h", ".h.0 *.;.$.6 ; ; ; ;.6 I.9.%.0.h", ".0 Z.; f c v - ; ; r j }.5 # !.0", ".f.< S ; O.,.d.a L i.= Y 6.e '.f", " H o ; ;.s.u.:.y V l h.1.3 R K ^", " H o ; ; ;.s.i x l + q t R d F ^", " H o ; ; ; n V l.& [ k R d p.O ^", " H.- ; ;.X.o l 3 0.# @.>.q M u ^", ".f <.r ~.7 l 3.3 _ 4 a U ] y C ^", ".0.p G N / P |.4 E 1 J M.. w.+ (", ".h.0.@ m W 7.4 E g . ] T & > s.h", ".h.h.0 D X 2 E g . ] e.8 8 s.h.h", ".h.h.h.0.w.t % b z ) Q B s.h.h.h", ".h.h.h.h.0.g.g.g.g.g.g s.h.h.h.h" }; /* actions/view-refresh.png */ /* XPM */ const char *tango_view_refresh[] = { /* width height ncolors chars_per_pixel */ "16 16 100 2", /* colors */ " c #9DBDDC", " . c #6990C0", " X c #3767A6", " o c #3667A5", " O c #3565A4", " + c #DDE8F3", " @ c #8AACD3", " # c #99B9DB", " $ c #B4CBE5", " % c #D8E4F1", " & c #5783BB", " * c #537FB7", " = c #4B77AF", " - c #A0BEDE", " ; c #3868A6", " : c #3768A5", " > c #4C79B3", " , c #769DCF", " < c #5580B5", " 1 c #97B6D8", " 2 c #8FACD0", " 3 c #E4ECF5", " 4 c #4E7AB1", " 5 c #C8D8EA", " 6 c #4C78AF", " 7 c #8FB0D3", " 8 c #6D94C2", " 9 c #6891C7", " 0 c #3C6BA9", " q c #3A69A7", " w c #3969A6", " e c #C6D8EB", " r c #4774AD", " t c #C1D2E6", " y c #6890C0", " u c #CDDBEB", " i c #3465A4", " p c #6188B9", " a c #DBE6F2", " s c #BFD2E7", " d c #84A6CE", " f c #E5EDF5", " g c #C9D9EA", " h c #8FADD2", " j c #A1BEDD", " k c #3A6AA6", " l c #E2EBF5", " z c #88A7CE", " x c #3768A6", " c c #95B2D4", " v c #3566A4", " b c #C4D7EB", " n c #4371AB", " m c #A1BBD9", " M c #E7EEF6", " N c #BFD3E9", " B c #5F87B9", " V c #7298C5", " C c #5D85B7", " Z c #6C95C9", " A c #82A5CE", " S c #9CB7D7", " D c #C9DAEC", " F c #E3ECF5", " G c #4C78B0", " H c #8EAED3", " J c #4F7CB6", " K c #3969A7", " L c #3869A6", " P c #3767A5", " I c #A8C2DF", " U c #93B1D4", " Y c #4170AB", " T c #CCDDEE", " R c #B0C9E3", " E c #E5EDF6", " W c #E4EDF5", " Q c #FFFFFF", " ! c #4D79B0", " ~ c #C7D7E9", " ^ c #4C77AF", " / c #5B84B7", " ( c #D5E2F0", " ) c #3C6CA9", " _ c #3A6AA7", " ` c #E0E9F4", " ' c #A8C1DE", " ] c #8CADD3", " [ c #B4CAE3", " { c #3566A5", " } c #7299CD", " | c #88ABD2", ". c #CCDCED", ".. c #E6EEF6", ".X c #BCD1E7", ".o c #7EA4D5", ".O c #3D6DA9", ".+ c #3C6BA8", ".@ c #3B6BA7", ".# c None", /* pixels */ ".#.#.#.# q _ o K _.#.#.#.#.#.#.#", ".#.#.# ; y 7 I ' U B P.#.#.# i.#", ".#.# w ] j $ N T ( s = o n v.#", ".# K . V.+ v _ C m % a + z 5 _.#", ".# ; Y ) _.#.#.# L p u l.... _.#", ".# O _ 9 P.#.#.#.#.# v ~ e F k.#", ".# i.#.#.#.#.#.#.# ; 2 M a.. k.#", ".#.#.#.#.#.#.#.# i i r ^ ^ 6 i.#", ".# i i i i i i i.#.#.#.#.#.#.#.#", ".# i f E 3 S x.#.#.#.#.#.#.# i.#", ".# v.. b g i.#.#.#.#.# { Z * i.#", ".# P.. F W t ! L.#.#.# 0 J _ :.#", ".# ; % c ` +. h G { w w.O G _.#", ".# P / o 4 [ D.X R - | A H ;.#.#", ".# i o.#.# X < d 1 # @ 8 ;.#.#.#", ".# i.#.#.#.#.# _ L v _.@.#.#.#.#" }; /* actions/go-next.png */ /* XPM */ const char *tango_go_next[] = { /* width height ncolors chars_per_pixel */ "16 16 101 2", /* colors */ " c #8BBB5D", " . c #78B63D", " X c #9CD267", " o c #A7D17F", " O c #B7D49C", " + c #6EAC33", " @ c #C3DCAB", " # c #9EC976", " $ c #C2DCAA", " % c #66B817", " & c #8AC255", " * c #CBE0B6", " = c #3B7504", " - c #5AAC0B", " ; c #66BF10", " : c #5F8F31", " > c #5E8F30", " , c #82AB5A", " < c #6FBA26", " 1 c #9CC37A", " 2 c #54A408", " 3 c #89C350", " 4 c #61B70E", " 5 c #BBD99F", " 6 c #6CBF1C", " 7 c #C0DBA7", " 8 c #74AF3B", " 9 c #4F9C06", " 0 c #3C7804", " q c #3C7604", " w c #4D8418", " e c #A4CC7E", " r c #8BC158", " t c #AFD48C", " y c #CEE3BB", " u c #3A7405", " i c #598C2A", " p c #467C14", " a c #B1D291", " s c #88BB58", " d c #ABD781", " f c #A4C684", " g c #91C164", " h c #5FB20E", " j c #C7DEB0", " k c #C6DEAF", " l c #40790A", " z c #3A7304", " x c #568926", " c c #9BCA6D", " v c #81AB5A", " b c #52A007", " n c #A5D773", " m c #C5DDAD", " M c #4E9A06", " N c #3B7604", " B c #3B7404", " V c #A3CA7E", " C c #427A0E", " Z c #80BE44", " A c #8BBD5C", " S c #64BA11", " D c #AAD581", " F c #82BE49", " G c #92D352", " H c #6BAC2F", " J c #538B1E", " K c #A8DA78", " L c #5BAE0B", " P c #6CBA1F", " I c #8DC25A", " U c #FFFFFF", " Y c #8CBE5C", " T c #8BBC5B", " R c #ABD681", " E c #62B90E", " W c #B9D79C", " Q c #71A63E", " ! c #A0D56C", " ~ c #68A92B", " ^ c #9DC873", " / c #BDD9A3", " ( c #99C46F", " ) c #5EB30D", " _ c #7FCB34", " ` c #8CC358", " ' c #CBE1B7", " ] c #3A7404", " [ c #8DC15C", " { c #57A709", " } c #437A10", " | c #64BC0F", ". c #88C44D", ".. c #AACE89", ".X c #85B954", ".o c #84C249", ".O c #A6D37B", ".+ c #8FC161", ".@ c #6AA136", ".# c #8DC655", ".$ c None", /* pixels */ ".$.$.$.$.$ =.$.$.$.$.$.$.$.$.$.$", ".$.$.$.$.$ z i ].$.$.$.$.$.$.$.$", ".$.$.$.$.$ z ' , ].$.$.$.$.$.$.$", ".$.$.$.$.$ z y @ f }.$.$.$.$.$.$", " ] z z z z N * ( a O : B.$.$.$.$", " z 7 $ m k j j g.+ ^ 5 v u.$.$.$", " z /.X s T A Y [ I & ` t 1 p.$.$", " z W 8 + ~ H . F 3. .o Z c.. > =", " z V M M M b { L h % P <.# # x =", " z V M M 9 2 - ) E | 6 X C.$.$", " z V V V e o D 4 ; _ K Q N.$.$.$", " ] z z z z 0 R S G n J q.$.$.$.$", ".$.$.$.$.$ z d ! r l.$.$.$.$.$.$", ".$.$.$.$.$ z.O.@ q.$.$.$.$.$.$.$", ".$.$.$.$.$ z w N.$.$.$.$.$.$.$.$", ".$.$.$.$.$ =.$.$.$.$.$.$.$.$.$.$" }; /* actions/document-save-as.png */ /* XPM */ const char *tango_document_save_as[] = { /* width height ncolors chars_per_pixel */ "16 16 101 2", /* colors */ " c #000000", " . c #739FC0", " X c #6C8577", " o c #81ADD1", " O c #DFE2DE", " + c #DCDCDB", " @ c #8FB3CE", " # c #96BBD8", " $ c #4A7180", " % c #95A9AF", " & c #B7B8B6", " * c #4E6A7D", " = c #3D698A", " - c #AFB0AE", " ; c #AEB0AD", " : c #ACCBE3", " > c #ABCBE2", " , c #EDEDEE", " < c #E9E9EA", " 1 c #A2A4A1", " 2 c #6B716E", " 3 c #9BC2DF", " 4 c #38678B", " 5 c #6E99B6", " 6 c #FCFCFC", " 7 c #FAFAFA", " 8 c #6B7F88", " 9 c #F4F4F4", " 0 c #F3F4F3", " q c #F2F2F2", " w c #CED4C8", " e c #F0F0F0", " r c #EFEEEF", " t c #EEEEEE", " y c #EDEEED", " u c #ECECEC", " i c #627075", " p c #3F6C8E", " a c #719FBF", " s c #E4E4E4", " d c #79A7CA", " f c #DCDCDC", " g c #DBDCDB", " h c #C9D6DD", " j c #DDE1D6", " k c #D5DFE5", " l c #AEB0AE", " z c #44789F", " x c #5186AF", " c c #7798B0", " v c #ACBCC3", " b c #DCDBDB", " n c #C5DBEC", " m c #3D6B8E", " M c #58787A", " N c #C1D9EB", " B c #6A7F5A", " V c #3B6B8F", " C c #9EBFD9", " Z c #E2E6DD", " A c #9AAEB4", " S c #ABC8DF", " D c #6E706B", " F c #92A6AC", " G c #EEEEEF", " H c #EDEEEE", " J c #427092", " K c #EBECEC", " L c #688BA0", " P c #D0DFEF", " I c #6296BB", " U c #DBDCDC", " Y c #72756B", " T c #92B7D3", " R c #667173", " E c #98BFDC", " W c #FFFFFF", " Q c #FDFDFD", " ! c #FCFBFC", " ~ c #F9F9F9", " ^ c #F7F7F7", " / c #AFB0AD", " ( c #F3F3F3", " ) c #F1F1F1", " _ c #41749A", " ` c #EFEFEF", " ' c #EEEFEE", " ] c #CACFC4", " [ c #EDEDED", " { c #EAE9EA", " } c #A3A4A1", " | c #C5CBBF", ". c #4A6D85", ".. c #436E88", ".X c #E3E3E3", ".o c #DCDBDC", ".O c #5892BD", ".+ c #B1CEE6", ".@ c #4D7991", ".# c #547D9B", ".$ c None", /* pixels */ ".$.$.$ 4 4 4 = $ M.$.$.$.$.$.$.$", ".$.$.$.+ P n 3 L...$.$.$.$.$.$.$", " 8 R i. _ z C N x * D D D D D D", " 2 Z W j h 5 4 > T.# k W W W 9 D", " Y Q t [ O c 4 d @ m v , H y 0 D", " D ! K 4 4 4 4 d.O 4 4 4 4 u ( D", " D 7 < ] 4 E a a a . # 4 % { q D", " D ~ 7 s | 4 E . . S 4 F s 9 ) D", " D ~ t 7 s | 4 : E V F s 7 t ) D", " D ^.X t 7 7 w p 4 A 7 6 t.X e D", " D } 1 } } } } } } } } } } } } D", " D f b + f.o +.o f g U + U f D", " D ` / l - ; / / / / r ' G r D", " D W & & & & & & & & W W W W D", " D W W W W W W W W W W W W W D", " D D D D D D D D D D D D D D D D" }; /* actions/document-save.png */ /* XPM */ const char *tango_document_save[] = { /* width height ncolors chars_per_pixel */ "16 16 114 2", /* colors */ " c #000000", " . c #739FC0", " X c #AFAFAF", " o c #6C8577", " O c #81ADD1", " + c #DFE2DE", " @ c #A9A9A9", " # c #A8A7A8", " $ c #8FB3CE", " % c #9F9F9F", " & c #96BBD8", " * c #4A7180", " = c #95A9AF", " - c #B7B6B6", " ; c #4E6A7D", " : c #3D698A", " > c #AAAAA9", " , c #ACCBE3", " < c #ABCBE2", " 1 c #EDEDEE", " 2 c #E9E9EA", " 3 c #6B716E", " 4 c #9BC2DF", " 5 c #38678B", " 6 c #6E99B6", " 7 c #FEFEFE", " 8 c #FCFCFC", " 9 c #FAFAFA", " 0 c #6B7F88", " q c #F4F4F4", " w c #F3F4F3", " e c #F2F2F2", " r c #CED4C8", " t c #F0F0F0", " y c #EEEEEE", " u c #EDEEED", " i c #ECECEC", " p c #627075", " a c #3F6C8E", " s c #719FBF", " d c #E4E4E4", " f c #79A7CA", " g c #DCDCDC", " h c #D6D6D6", " j c #C9D6DD", " k c #D2D2D2", " l c #D0D0D0", " z c #CECECE", " x c #DDE1D6", " c c #CACACA", " v c #C8C8C8", " b c #C4C4C4", " n c #C2C2C2", " m c #BCBCBC", " M c #D5DFE5", " N c #B4B4B4", " B c #44789F", " V c #5186AF", " C c #7798B0", " Z c #ACBCC3", " A c #C5DBEC", " S c #3D6B8E", " D c #58787A", " F c #C1D9EB", " G c #6A7F5A", " H c #3B6B8F", " J c #9EBFD9", " K c #E2E6DD", " L c #9AAEB4", " P c #ABC8DF", " I c #6E706B", " U c #92A6AC", " Y c #A8A7A7", " T c #EDEEEE", " R c #427092", " E c #EBECEC", " W c #688BA0", " Q c #D0DFEF", " ! c #6296BB", " ~ c #72756B", " ^ c #92B7D3", " / c #667173", " ( c #98BFDC", " ) c #FFFFFF", " _ c #FDFDFD", " ` c #FCFBFC", " ' c #F9F9F9", " ] c #F7F7F7", " [ c #F3F3F3", " { c #F1F1F1", " } c #41749A", " | c #CACFC4", ". c #EDEDED", ".. c #EBEBEB", ".X c #EAE9EA", ".o c #C5CBBF", ".O c #4A6D85", ".+ c #436E88", ".@ c #E3E3E3", ".# c #DDDDDD", ".$ c #D5D5D5", ".% c #D1D1D1", ".& c #CFCFCF", ".* c #CDCDCD", ".= c #CBCBCB", ".- c #C9C9C9", ".; c #5892BD", ".: c #C5C5C5", ".> c #C3C3C3", "., c #B1CEE6", ".< c #4D7991", ".1 c #B9B9B9", ".2 c #547D9B", ".3 c None", /* pixels */ ".3.3.3 5 5 5 : * D.3.3.3.3.3.3.3", ".3.3.3., Q A 4 W.+.3.3.3.3.3.3.3", " 0 / p.O } B J F V ; I I I I I I", " 3 K ) x j 6 5 < ^.2 M ) ) ) q I", " ~ _ y. + C 5 f $ S Z 1 T u w I", " I ` E 5 5 5 5 f.; 5 5 5 5 i [ I", " I 9 2 | 5 ( s s s . & 5 =.X e I", " I ' 9 d.o 5 ( . . P 5 U d q { I", " I ' y 9 d.o 5 , ( H U d 9 y { I", " I ].@ y 9 9 r a 5 L 9 8 y.@ t I", " I 7 ) ) ) ) ) ) ) q q.....@ t I", " I z.-.-.-.-.:.-.-.:.:.:.:.: h I", " I z.: % X m b v l @ k @ k.1 c I", " I.*.> > N n b v.= #.% Y.% - c I", " I.# g g g.$.$.&.&.&.&.&.&.& c I", " I I I I I I I I I I I I I I I I" }; /* actions/system-shutdown.png */ /* XPM */ const char *tango_system_shutdown[] = { /* width height ncolors chars_per_pixel */ "16 16 66 1", /* colors */ " c #ABABAB", ". c #A9A9A9", "X c #8F8F8F", "o c #858585", "O c #7D7D7D", "+ c #6F6F6F", "@ c #6D6D6D", "# c #656565", "$ c #616161", "% c #5F5F5F", "& c #555555", "* c #515151", "= c #F6F6F6", "- c #F4F4F4", "; c #F0F0F0", ": c #EEEEEE", "> c #ECECEC", ", c #EAEAEA", "< c #E8E8E8", "1 c #E6E6E6", "2 c #E4E4E4", "3 c #E2E2E2", "4 c #E0E0E0", "5 c #2D2D2D", "6 c #DEDEDE", "7 c #2B2B2B", "8 c #272727", "9 c #D8D8D8", "0 c #D4D4D4", "q c #D2D2D2", "w c #CCCCCC", "e c #C2C2C2", "r c #BCBCBC", "t c #A6A6A6", "y c #A2A2A2", "u c #A0A0A0", "i c #888A85", "p c #8E8E8E", "a c #848484", "s c #808080", "d c #7A7A7A", "f c #6C6C6C", "g c #606060", "h c #F7F7F7", "j c #F5F5F5", "k c #F3F3F3", "l c #F1F1F1", "z c #EFEFEF", "x c #EDEDED", "c c #EBEBEB", "v c #E9E9E9", "b c #E7E7E7", "n c #E5E5E5", "m c #E3E3E3", "M c #E1E1E1", "N c #DFDFDF", "B c #282828", "V c #C9C9C9", "C c #C7C7C7", "Z c #C5C5C5", "A c #C3C3C3", "S c #C1C1C1", "D c #BBBBBB", "F c #B9B9B9", "G c #B3B3B3", "H c None", /* pixels */ "HiiiiiiiiiiiiiiH", "immmmmmmmmmmmmmi", "i3mz=hhhhhhh=1mi", "imz=jjjjjjjjjk2i", "in-kkwaooop;kkbi", "i1-ll*****B3lli", "ix,22dC>>m%22m:i", "i:<33O6jjj+63Mzi", "iz144oyeeDO946;i", "iz,66wf@$f q6Nli", "izlcMM6rSZV0M;li", "illlllllllllllli", "HiiiiiiiiiiiiiiH" }; /* places/start-here.png */ /* XPM */ const char *tango_start_here[] = { /* width height ncolors chars_per_pixel */ "16 16 53 1", /* colors */ " c #6593C6", ". c #5080B8", "X c #3869A7", "o c #3667A5", "O c #2F5F9E", "+ c #4474AF", "@ c #4272AD", "# c #234E8B", "$ c #214C89", "% c #204A88", "& c #507FB7", "* c #3A6AA8", "= c #295694", "- c #3868A6", "; c #5E8CC1", ": c #214B88", "> c #25518F", ", c #2C5B99", "< c #3667A6", "1 c #3465A4", "2 c #4070AC", "3 c #25508E", "4 c #24508D", "5 c #6492C5", "6 c #2A5896", "7 c #4E7DB6", "8 c #3768A6", "9 c #3566A4", "0 c #3162A0", "q c #30609F", "w c #729FCF", "e c #5B8ABF", "r c #4575B0", "t c #244F8C", "y c #214B89", "u c #204B88", "i c #6895C8", "p c #6795C7", "a c #5180B8", "s c #285593", "d c #31619F", "f c #2F5F9D", "g c #5D8BC0", "h c #FFFFFF", "j c #6B98CA", "k c #6996C8", "l c #5483BA", "z c #204A87", "x c #3D6EAA", "c c #2D5C9A", "v c #3566A5", "b c #234F8C", "n c None", /* pixels */ "nnnnnnnnnn%z:nnn", "nno9-nnnnn#d6unn", "nnxklunn", "nn2 ronnnnzzunnn", "nnvv c #B1CEEC", " , c #607AA3", " < c #B3C1D0", " 1 c #B5BEC8", " 2 c #5B6D94", " 3 c #5A6B93", " 4 c #CCDDEF", " 5 c #DBDEE0", " 6 c #7591B4", " 7 c #759FCB", " 8 c #BED4EB", " 9 c #F8F9F9", " 0 c #B7C2CD", " q c #BECFE1", " w c #BCCDDF", " e c #506A96", " r c #5978A2", " t c #93ABC7", " y c #B4BCCD", " u c #C6CFD8", " i c #A3B8D0", " p c #843345", " a c #A0B4CD", " s c #516790", " d c #BEC7D0", " f c #CAD5DF", " g c #5988BC", " h c #DFE1E3", " j c #83A7CE", " k c #AFB8CB", " l c #FEFEFE", " z c #D7D9DB", " x c #5C77A1", " c c #DCE4ED", " v c #F6F6F6", " b c #6B7B9F", " n c #628FC1", " m c #E6EBF0", " M c #C0C6CE", " N c #768BAD", " B c #E2E2E2", " V c #80A7D1", " C c #E0E0E0", " Z c #B7C8DC", " A c #B1C2D6", " S c #DCE3E9", " D c #6B96C6", " F c #705472", " G c #9E080B", " H c #7A95B7", " J c #656588", " K c #4E648F", " L c #6F5674", " P c #BABFC4", " I c #A9BCD1", " U c #D9E1E9", " Y c #CED0D1", " T c #6983A6", " R c #C8CFD5", " E c #8593B1", " W c #546E98", " Q c #A40000", " ! c #D9DCDF", " ~ c #9DA6AE", " ^ c #6D90B7", " / c #686284", " ( c #991116", " ) c #D2E5F9", " _ c #ADB9CE", " ` c #D6DFE9", " ' c #A3B6CE", " ] c #DAEAFA", " [ c #CFD9E2", " { c #5A7AA4", " } c #5C8ABD", " | c #A2BDDA", ". c #597199", ".. c #D5DFEB", ".X c #A5B7C9", ".o c #CCD7E2", ".O c #C3D2E3", ".+ c #5686BA", ".@ c #E3F1FF", ".# c #C8CED4", ".$ c #E2EFFE", ".% c #7792B6", ".& c #516994", ".* c #9BB2CC", ".= c #9AB0CB", ".- c #9EADC5", ".; c #C9E1F9", ".: c #F4F4F5", ".> c #CED1D3", "., c #E0EFFF", ".< c #4F80B6", ".1 c #CEDBEA", ".2 c #405583", ".3 c #5D7DA6", ".4 c #5A79A3", ".5 c #94ACC8", ".6 c #7E97B9", ".7 c #6C96C5", ".8 c #BECBDA", ".9 c #C4CAD6", ".0 c #E6EBF4", ".q c #DAEBFC", ".w c #D4E5F6", ".e c #E4E6E8", ".r c #E2E4E6", ".t c #9CBDE0", ".y c #6E5471", ".u c #95A7C2", ".i c #C7CDD2", ".p c #ACCAE9", ".a c #9DB3CD", ".s c #FDFDFD", ".d c #BCD7F2", ".f c #FBFBFB", ".g c #5A769F", ".h c #F9F9F9", ".j c #58749D", ".k c #AABED3", ".l c #F5F5F5", ".z c #E1F0FF", ".x c #EFEFEF", ".c c #BECAD6", ".v c #BCC8D4", ".b c #719BC9", ".n c #B5D1EE", ".m c #B8BFC6", ".M c #364878", ".N c #576F95", ".B c #D5DFE9", ".V c #DEEEFF", ".C c #B8C9DD", ".Z c #101221", ".A c #AEB5BC", ".S c #4B6189", ".D c #D3D3D3", ".F c #D1D1D1", ".G c #7994B6", ".H c #DCDDDF", ".J c #931821", ".K c #B4C7DC", ".L c #9FB4CE", ".P c #A4B5C9", ".I c #9CB2CB", ".U c #CCE3FA", ".Y c #B3CCE8", ".T c #E2F1FF", ".R c #617FA8", ".E c #DEEDFB", ".W c #D5E8FC", ".Q c None", /* pixels */ ".Q.M.M.M.M.M.M.M r =.Q.Q.Q.Q.Q.Q", ".Q.Q.M.M.M b c.0.. A.6 *.Q.Q.Q.Q", ".Q.Q W 3 y [ P.8 8.c U '.4.Q.Q.Q", ".Q. 3.9.>.$.E.w.v M 5 m a {.Q.Q", " K.M k ; f.T.@ ] u z.:.f.B.G.Q.Q", " s 2 ! 4.,.z.z.q.i d.P 1.e i {.Q", ".2 E.k.U.V @ @.1.s l.s.r.H w /.Q", ".M _.p.d.;.W ) R l l l.h.A.O F.Q", " e.- 0.#.Y.n > I 9 o l.x Y.C L.Q", " x.u X l h |.t # + O.l B ~.a p Q", " , H ` l l $ j V 7.7 C.D.X N ( Q", ".Q.R.I S v.m.b D n g.F -.5 % Q.Q", ".Q.Q.3.=.o ^ }.+.< : < t J G.Q.Q", ".Q.Q.Q T.%.L Z q.K.* 6.y G.Q.Q.Q", ".Q.Q.Q.Q.N.g.4 & r.j.J Q Q Q.Q.Q", ".Q.Q.Q.Q.Q.Q.Q.Q Q Q Q Q Q Q Q.Q" }; /* apps/system-users.png */ /* XPM */ const char *tango_system_users[] = { /* width height ncolors chars_per_pixel */ "16 16 147 2", /* colors */ " c #000000", " . c #F3BE71", " X c #ECBD74", " o c #4071AF", " O c #E6AA4D", " + c #868F41", " @ c #4A78B2", " # c #7E6040", " $ c #AF7D2E", " % c #E3A340", " & c #3263A1", " * c #547FB5", " = c #905841", " - c #616519", " ; c #797F37", " : c #B99355", " > c #6C3F3B", " , c #E3A23C", " < c #EBAA5B", " 1 c #4172AF", " 2 c #F6CB8A", " 3 c #E5A255", " 4 c #D1A55F", " 5 c #C0934B", " 6 c #6D4A0A", " 7 c #9F5203", " 8 c #6A692B", " 9 c #8BA6C9", " 0 c #D08F4A", " q c #723C51", " w c #3E558E", " e c #E3A256", " r c #F3C680", " t c #5C3B59", " y c #3466A5", " u c #895443", " i c #C2893C", " p c #6087B9", " a c #5A3464", " s c #C16710", " d c #3568A9", " f c #DDA053", " g c #AF8033", " h c #BC8E43", " j c #ECB868", " k c #C29142", " l c #8B6B58", " z c #8E5105", " x c #5A85B9", " c c #614D7E", " v c #687214", " b c #90563F", " n c #DAAE6D", " m c #D8994A", " M c #5F86B7", " N c #E6A251", " B c #645370", " V c #E0992A", " C c #D6DBE3", " Z c #E5A746", " A c #3467A7", " S c #E09B2D", " D c #BF6C10", " F c #767B35", " G c #829FC5", " H c #32629E", " J c #B78940", " K c #616B09", " L c #F1BD6F", " P c #864F06", " I c #5E83B2", " U c #386DB1", " Y c #3D538B", " T c #C77D28", " R c #485F99", " E c #3364A2", " W c #3264A1", " Q c #E1A23E", " ! c #6F7131", " ~ c #955104", " ^ c #6D712F", " / c #E8AA5C", " ( c #B88530", " ) c #624F0D", " _ c #C16404", " ` c #BA5C11", " ' c #E5AE5C", " ] c #D9AC64", " [ c #DDAB5E", " { c #815107", " } c #AA7722", " | c #A9A3B9", ". c #F9C780", ".. c #A0B6D1", ".X c #C4680A", ".o c #6B8BB4", ".O c #8DA7C8", ".+ c #B68134", ".@ c #C38F44", ".# c #E2B369", ".$ c #596921", ".% c #465440", ".& c #CC5E01", ".* c #C49A52", ".= c #6A6A2B", ".- c #CC5E04", ".; c #B98633", ".: c #5C3566", ".> c #DCA552", "., c #A35403", ".< c #55315F", ".1 c #4576B2", ".2 c #965435", ".3 c #B4C1D3", ".4 c #EFC075", ".5 c #885106", ".6 c #366BAD", ".7 c #BC7625", ".8 c #32629F", ".9 c #30609D", ".0 c #EBBC74", ".q c #5680B5", ".w c #DF8E3A", ".e c #D56402", ".r c #3466A4", ".t c #3364A3", ".y c #CB9A51", ".u c #685D14", ".i c #6E771D", ".p c #3B6EAE", ".a c #815330", ".s c #B0B6CB", ".d c #4F649A", ".f c #C99C66", ".g c #3568A8", ".h c #9E5807", ".j c #B85410", ".k c #E6AD54", ".l c #5981B4", ".z c #844240", ".x c #366AAC", ".c c #D16604", ".v c #A6ACC4", ".b c #CF9D51", ".n c #F0CE99", ".m c #CD5C00", ".M c None", /* pixels */ ".M.M.M.M P ~ z.,.M.M.M.M.M.M.M.M", ".M.M.M.c m 4.b.@ 7.M.M.M.M.M.M.M", ".M.M.h f.* 5.;.7 s.m.&.m.M.M.M.M", ".M.M.5.y h : T.X N 2 . /.m.M.M.M", ".M.M { k ( J D < r.0 O.4.w.m.M.M", ".M.M ) i g }.e. X.n.k , '.m.M.M", ".M.M >.a.+ $ _ L Z.# S Q.>.m.M.M", ".M.% ^ - # 6.u 3 j V % ] 0.j.M.M", ".% F.i + + 8 q = e [ n.f b.z.M.M", ".% F v +.=.: 9 B l.- `.2 u p.:.:", ".% F v v.:.O.x U.s c |.v.g W p.:", ".% F.$ K t p A.6.. C x G y.9.p.:", ".% F ; !.: M.t A d.3.l.r & &.p.:", ".M.%.%.%.: I.t w E.o & H Y.8.p.:", ".M.M.M.M.:.q *.d @ o o o R 1.1.:", ".M.M.M.M.<.:.:.:.:.:.:.:.:.:.: a" }; /* apps/accessories-text-editor.png */ /* XPM */ const char *tango_accessories_text_editor[] = { /* width height ncolors chars_per_pixel */ "16 16 52 1", /* colors */ " c #000000", ". c #B1B1B1", "X c #705B39", "o c #9D9D9D", "O c #C89F64", "+ c #C4A000", "@ c #8F8F8F", "# c #A08457", "$ c #CFAD71", "% c #D2AC6A", "& c #757575", "* c #EBB13D", "= c #717171", "- c #A48757", "; c #636363", ": c #A08356", "> c #EEEEEE", ", c #ECECEC", "< c #EAEAEA", "1 c #EEEAC6", "2 c #EDE6C5", "3 c #DADADA", "4 c #D6D6D6", "5 c #CCCCCC", "6 c #CACACA", "7 c #C2AB8A", "8 c #C4C4C4", "9 c #BCBCBC", "0 c #B8B8B8", "q c #B2B2B2", "w c #AEAEAE", "e c #F9E8C6", "r c #EDE5C4", "t c #4C4226", "y c #A18355", "u c #888A85", "i c #8C8C8C", "p c #868686", "a c #6B5736", "s c #FFFFFF", "d c #EBEBEB", "f c #E9E9E9", "g c #A38555", "h c #CFAA69", "j c #CEA668", "k c #EFEBC7", "l c #DBDBDB", "z c #D3D3D3", "x c #CBCBCB", "c c #8F5902", "v c #B7B7B7", "b c None", /* pixels */ "bbbbbbbbbbbbbbbb", "bbb+b+b+b+b+bbbb", "bb+e+e+e+e+e+bbb", "bu+*+*+*+*+*+ccb", "bud+9+0+0+0+c1$c", "bus,,,,,,,zck%yc", "busl55555vck%-cb", "bus,,,,,zc1h:cbb", "busl555vc2j#cubb", "bus,,,dcrO-c=ubb", "busl5x&X7gc@pubb", "bus,,fctaco4wubb", "buslx8 c;i63qubb", "bus,d<qqqqqqq.qqubb", "buuuuuuuuuuuuubb" }; /* mimetypes/text-x-generic.png */ /* XPM */ const char *tango_text_x_generic[] = { /* width height ncolors chars_per_pixel */ "16 16 22 1", /* colors */ " c #000000", ". c #EDEDE5", "X c #999999", "o c #959595", "O c #818181", "+ c #F2F2F2", "@ c #F0F0F0", "# c #EEEEEE", "$ c #ECECEC", "% c #EAEAEA", "& c #EDEDE6", "* c #C8C8C8", "= c #C6C6C6", "- c #C4C4C4", "; c #FFFFFF", ": c #F1F1F1", "> c #EFEFEF", ", c #EDEDED", "< c #EBEBEB", "1 c #C7C7C7", "2 c #C5C5C5", "3 c None", /* pixels */ "XOOOOOOOOOOOO333", "O;;;;;;;;;;;;O33", "O;$%%<<<$$,@;O33", "O;%-22====1@;O33", "O;%<<$$$,,#@;O33", "O;<2======1@;O33", "O;<<$$,,.$#@;O33", "O;<====##&#@;O33", "O;$$,,##>>>@;O33", "O;$===11***@;O33", "O;$,##>>@:::;O33", "O;,=11***::+;O33", "O;,,#>>@@:++;O33", "O;;;;;;;;;;;;O33", "oOOOOOOOOOOOOo33", "3333333333333333" }; /* mimetypes/x-office-calendar.png */ /* XPM */ const char *tango_x_office_calendar[] = { /* width height ncolors chars_per_pixel */ "16 16 61 1", /* colors */ " c #000000", ". c #686A66", "X c #646662", "o c #818485", "O c #CACAC9", "+ c #C3C4C2", "@ c #959798", "# c #C2C4C4", "$ c #9B9C9A", "% c #4D5254", "& c #3B4042", "* c #393E40", "= c #C9C9CA", "- c #B0B1AE", "; c #AAABA8", ": c #EEEEEE", "> c #ECECEC", ", c #E6E6E6", "< c #E4E4E4", "1 c #E2E2E2", "2 c #E0E0E0", "3 c #939591", "4 c #D6D6D6", "5 c #D2D2D2", "6 c #CDCECD", "7 c #C8C8C8", "8 c #FBFBFA", "9 c #E3E3E2", "0 c #636561", "q c #61635F", "w c #B0B2B3", "e c #555753", "r c #898C86", "t c #888A85", "y c #4A5052", "u c #A0A2A3", "i c #7C7E79", "p c #C2C3C1", "a c #404648", "s c #383E40", "d c #B8B9B7", "f c #C8C9CA", "g c #32383A", "h c #2E3436", "j c #4C5153", "k c #414748", "l c #FFFFFF", "z c #FDFDFD", "x c #C5C6C6", "c c #F3F3F3", "v c #F1F1F1", "b c #E9E9E9", "n c #E7E7E7", "m c #E3E3E3", "M c #E1E1E1", "N c #DFDFDF", "B c #D9D9D9", "V c #CECFCE", "C c #CACBCA", "Z c #6E706C", "A c None", /* pixels */ "AAttAAAtAAAtAAAA", "AtttttttttttttAA", "tlt+llt4zzt4zltA", "tlt3,,tt9,tt,ltA", "tl4B,,44<,444ltA", "il,:v,VCdc-$XA", "Xlllllllllll;ZXA", "0qqqqqqqqqqqqqXA", "AhteeeeeeeeeehAA", "AhhhhhhhhhhhhhAA" }; /* places/user-trash.png */ /* XPM */ const char *tango_user_trash[] = { /* width height ncolors chars_per_pixel */ "16 16 135 2", /* colors */ " c #000000", " . c #6A6C68", " X c #D6DBC8", " o c #686A66", " O c #CCD29D", " + c #D3D8BB", " @ c #5E605C", " # c #A9B260", " $ c #959E49", " % c #BCC662", " & c #8A915C", " * c #CDD2A1", " = c #AAB264", " - c #5D6329", " ; c #BAC36D", " : c #B1B4AD", " > c #7F865E", " , c #6B6D68", " < c #545B23", " 1 c #D4D9BB", " 2 c #989A94", " 3 c #D2D7B9", " 4 c #61635E", " 5 c #B5BB82", " 6 c #C3CA89", " 7 c #A0A956", " 8 c #CCD19F", " 9 c #C8CEA5", " 0 c #A8AD75", " q c #A1A76E", " w c #BDC765", " e c #909946", " r c #D1D793", " t c #98A247", " y c #666D2D", " u c #B8BE84", " i c #BDC675", " p c #939A59", " a c #494D4C", " s c #81893A", " d c #8C9548", " f c #646663", " g c #4E541F", " h c #B2B881", " j c #B6BBA6", " k c #9FA46B", " l c #A5AE49", " z c #D0D691", " x c #788134", " c c #9AA252", " v c #8C9162", " b c #929C4A", " n c #ACB27E", " m c #545B21", " M c #797B77", " N c #757773", " B c #737571", " V c #737B32", " C c #6D6F6B", " Z c #CAD184", " A c #C7CC8B", " S c #919A4C", " D c #8A9259", " F c #B8C065", " G c #767B77", " H c #D4D9BC", " J c #636561", " K c #D3D9BB", " L c #61682A", " P c #879042", " I c #6F7731", " U c #969F4A", " Y c #BDC763", " T c #BBC561", " R c #9FA956", " E c #7A8235", " W c #B5C051", " Q c #A9B259", " ! c #ADB17E", " ~ c #787A75", " ^ c #798237", " / c #BCC286", " ( c #B8C257", " ) c #CDD590", " _ c #B7BE81", " ` c #70726D", " ' c #575E26", " ] c #535A22", " [ c #686A65", " { c #666863", " } c #62645F", " | c #C4CB9E", ". c #A7AF67", ".. c #A9AD94", ".X c #5C5E59", ".o c #BCC661", ".O c #A8B154", ".+ c #8B9348", ".@ c #CBD09E", ".# c #4C521E", ".$ c #8B943E", ".% c #A5AC72", ".& c #AEB75D", ".* c #ADB75C", ".= c #AAB263", ".- c #565D21", ".; c #A6AF55", ".: c #B2BB64", ".> c #767F33", "., c #CCD28E", ".< c #B2BD50", ".1 c #C3CA99", ".2 c #5B6129", ".3 c #96A04F", ".4 c #888E69", ".5 c #C9D181", ".6 c #BBC469", ".7 c #BBC55F", ".8 c #B9C35D", ".9 c #899245", ".0 c #6C732F", ".q c #BFC687", ".w c #B3BD5A", ".e c #A3AB72", ".r c #B3BE50", ".t c #98A150", ".y c #C7D07E", ".u c #9CA64D", ".i c #727470", ".p c #DBE0D7", ".a c #70726E", ".s c #C9D18D", ".d c #ADB757", ".f c #949D4F", ".g c None", /* pixels */ ".g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g", ".g.g < < < < < < < < < < < <.g.g", ".g >.p.p.p.p.p.p.p.p.p.p.p.p.4.g", " <.p G.X @ 4 J { o , C `.i :.p <", " <.p a } f [ . C.a B N ~ M 2.p <", " < j.p.p.p.p.p.p.p.p.p.p.p.p.. <", " < < p E x.> V I.0 y L -.2 ' < ]", ".g <.y W W.r l.; = t.$ s ^ D <.g", ".g <.y W W.< F X X.@ 7 $ d & <.g", ".g <.5 W W O ;.: 8 * R c.f k <.g", ".g < Z (.o 1 X.* Q # _.t S.% <.g", ".g < z w Y K i.& 9.= 3.3.+ 0 <.g", ".g < r % T.6 *.1 H +. b.9.e <.g", ".g < ).7.8.w.d.O |.u U e P q <.g", ".g < !.,.s A 6.q / u 5 h n v <.g", ".g.g < < < < < < < < < < < <.g.g" }; /* apps/utilities-system-monitor.png */ /* XPM */ const char *tango_utilities_system_monitor[] = { /* width height ncolors chars_per_pixel */ "16 16 116 2", /* colors */ " c #000000", " . c #8199BA", " X c #DEE0DD", " o c #EDEAB0", " O c #F6F8FB", " + c #F5F8FA", " @ c #316696", " # c #4280AD", " $ c #407EAB", " % c #316A99", " & c #7D7D7A", " * c #2F6697", " = c #F1F6F9", " - c #2C6294", " ; c #3772A2", " : c #BFCFA0", " > c #97B893", " , c #E7E8B0", " < c #E4E5E2", " 1 c #E2E3E0", " 2 c #DFE1DD", " 3 c #BBC774", " 4 c #265987", " 5 c #D7D9D5", " 6 c #D5D7D3", " 7 c #4D8DB7", " 8 c #98C0D9", " 9 c #CCCFCA", " 0 c #EEE788", " q c #4D8FBA", " w c #D7E5EF", " e c #3D79A7", " r c #3D77A7", " t c #4A8DB7", " y c #7792B5", " u c #FEFEFE", " i c #F9FAF9", " p c #B6C496", " a c #829B7A", " s c #90AF8B", " d c #89A584", " f c #85A180", " g c #E9F1F6", " h c #C9CCC6", " j c #5294BE", " k c #346A9A", " l c #D8E6EF", " z c #316697", " x c #4D8EB9", " c c #D6E4ED", " v c #2C6292", " b c #3A74A3", " n c #4584B1", " m c #346E9D", " M c #B4B6B1", " N c #316A9A", " B c #F9F9F8", " V c #EFF4F8", " C c #F4F5F3", " Z c #8CAA86", " A c #89A483", " S c #87A481", " D c #E5E7E4", " F c #829C7C", " G c #2C5D8E", " H c #DCDDDB", " J c #5495BF", " K c #BAD1E1", " L c #4887B3", " P c #7E7E7B", " I c #3D7BA8", " U c #F0F5F8", " Y c #BECE9F", " T c #DBDCD9", " R c #DADCD8", " E c #D3D6D1", " W c #D0D2CE", " Q c #2C6090", " ! c #CBCEC9", " ~ c #4280AC", " ^ c #488AB5", " / c #3772A1", " ( c #FFFFFF", " ) c #34709E", " _ c #4284AF", " ` c #346E9E", " ' c #316C9B", " ] c #FAFBFA", " [ c #96B691", " { c #F8F9F8", " } c #3D7CAA", " | c #94B48F", ". c #F6F7F6", ".. c #93B28E", ".X c #849E7C", ".o c #204A87", ".O c #91B08C", ".+ c #90AE8B", ".@ c #8EAC89", ".# c #8BAA86", ".$ c #D5DBA7", ".% c #D3D9A5", ".& c #85A280", ".* c #D6E3ED", ".= c #3D77A6", ".- c #4587B1", ".; c #4283AE", ".: c #B4B7B1", ".> c #96B590", "., c #F0F5F9", ".< c #EEEEED", ".1 c #8BA785", ".2 c #BACA9C", ".3 c #E9EAE8", ".4 c #B7C699", ".5 c None", /* pixels */ " P P P P P P P P P P P P P P P &", " P B { ( ( ( ( ( ( ( ( u ] ] ] P", " P B y.o.o.o.o.o.o.o.o.o.o y H P", " P u.o 4 G - a F ' N % @ v.o D P", " P u.o Q z.X o.& b b ; ) k.o 1 P", " P u.o * ` p V.4.1 } I.= /.o X P", " P u.o m S.% K c.@ n.; $ e.o T P", " P u.o f d.*.2 w.O 3 s.@.#.o 5 P", " P u.o + O.$.O l Y 0 =., U.o E P", " P u.o A Z.+.. : g 8 |.O.@.o W P", " P u.o r # L x [ , >.> 7 n.o 9 P", " P u.o.= ~.- t | J j q ^ _.o h P", " P B ..o.o.o.o.o.o.o.o.o.o y M P", " P B. i C.<.3 < 2 R 6 W !.:.: P", " P P P P P P P P P P P P P P P &", ".5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5" }; /* apps/utilities-terminal.png */ /* XPM */ const char *tango_utilities_terminal[] = { /* width height ncolors chars_per_pixel */ "16 16 163 2", /* colors */ " c #000000", " . c #A0A19D", " X c #8E9F74", " o c #8C9D72", " O c #9A9B97", " + c #989995", " @ c #DDDEDC", " # c #849074", " $ c #939590", " % c #D7D8D6", " & c #8F918C", " * c #374525", " = c #8D8F8A", " - c #CDCECC", " ; c #81837E", " : c #E0E3DB", " > c #ACBC94", " , c #0A0B09", " < c #090908", " 1 c #657C41", " 2 c #AABA92", " 3 c #192011", " 4 c #070706", " 5 c #4F6332", " 6 c #ECEDEA", " 7 c #A5B68D", " 8 c #B2B4B1", " 9 c #DBDBD9", " 0 c #29331D", " q c #26311A", " w c #91928D", " e c #D7D7D5", " r c #364423", " t c #555952", " y c #46572C", " u c #8B8C87", " i c #7E807A", " p c #7D8079", " a c #6A7559", " s c #0F100D", " d c #C0C1BE", " f c #787C74", " g c #777A73", " h c #747870", " j c #A9B990", " k c #6A6E66", " l c #B0B1AE", " z c #D3D6CD", " x c #B1BF9B", " c c #646860", " v c #5F625B", " b c #29341C", " n c #28341B", " m c #828E70", " M c #92958D", " N c #27321A", " B c #374523", " V c #8C8F87", " C c #46562B", " Z c #888B83", " A c #989996", " S c #DDDEDD", " D c #4E5E36", " F c #D7D8D7", " G c #A8B88E", " H c #A3A69D", " J c #B4B6B1", " K c #AFBE98", " L c #F2F3F1", " P c #747772", " I c #768560", " U c #536537", " Y c #182011", " T c #060706", " R c #3C4C27", " E c #4E6132", " W c #3B4A26", " Q c #4C5A3A", " ! c #273119", " ~ c #020302", " ^ c #808D6D", " / c #343633", " ( c #90A076", " ) c #CFD3CB", " _ c #DDDDDC", " ` c #969893", " ' c #616A55", " ] c #4C563D", " [ c #94A27D", " { c #D6D7D5", " } c #8A8C87", " | c #657152", ". c #647151", ".. c #CCCDCB", ".X c #848681", ".o c #131412", ".O c #A2B387", ".+ c #0D0E0C", ".@ c #0B0C0A", ".# c #080807", ".$ c #070806", ".% c #758954", ".& c #4F6232", ".* c #D9DED4", ".= c #7F8C6B", ".- c #2F312D", ".; c #636660", ".: c #73825F", ".> c #27321B", "., c #5A5E57", ".< c #364523", ".1 c #364323", ".2 c #545851", ".3 c #878983", ".4 c #868782", ".5 c #616E4D", ".6 c #82857E", ".7 c #81837D", ".8 c #7E817A", ".9 c #7D7F79", ".0 c #797D75", ".q c #7A846C", ".w c #767972", ".e c #6F736B", ".r c #A3A69E", ".t c #7E8B69", ".y c #7C8967", ".u c #9DA098", ".i c #798764", ".p c #656961", ".a c #999C94", ".s c #CED1C8", ".d c #99A38A", ".f c #62655E", ".g c #979A92", ".h c #859869", ".j c #29351C", ".k c #3B4A27", ".l c #28331B", ".z c #27311A", ".x c #92A279", ".c c #8D9088", ".v c #878A82", ".b c #97A681", ".n c #83867E", ".m c #95A47F", ".M c #232423", ".N c #737D64", ".B c #B7B9B4", ".V c #A4B58A", ".C c #A2A59C", ".Z c #7B8865", ".A c #697850", ".S c #AEBD97", ".D c #CDD2C6", ".F c #181F11", ".G c #060606", ".H c #849071", ".J c #3C4B27", ".K c #28321A", ".L c #273019", ".P c #010201", ".I c None", /* pixels */ ".I.u.a M.c Z.n.8.0 h.e k.p.f.,.I", " H J e S @ _ _ _ _ _ _ 9.. 8 P t", " H { /.#.#.#.#.#.#.#.# 4 4.- A t", ".C F s x K.S > 2 j G 7.V.O O.2", ".C F.+ #.H m ^.=.t.y.Z.i I `.2", ".C F.@.b.m [.x ( X o.h.% 1 $.2", ".C F , a.*.q |. .5 D C C y w.2", ".C F <.:.d :.D.A U E.&.& 5 =.2", ".C F.$ ] ' ) z *.1 r r.< B }.2", ".C F 4 Q.s.N.k W W W.J.J R .3.2", ".C F 4 0.z.L ! L L L 6.K.K .X.2", ".C F T q N.>.>.l.l n b b.j .7.2", ".C F.G.F.F.F.F.F.F.F Y 3 3 i.2", " H %.M ~.P.P.P.P.P.P.P.P.P.o.w t", ".r.B - d l . + $ & u.4 ;.9 g.; t", ".I.u.g M V.v.6 p f h.e k c v.,.I" }; /* XPM */ const char *tango48_dialog_information[] = { /* width height ncolors chars_per_pixel */ "48 48 678 2", /* colors */ " c #000000", " . c #626674", " X c #8C895B", " o c #BACDE8", " O c #7F8697", " + c #B8CDE6", " @ c #DCE1E5", " # c #D1DFEE", " $ c #9BB9DA", " % c #ACAA77", " & c #D0DDED", " * c #F0F0F2", " = c #B4CBE2", " - c #CFDDEC", " ; c #C9CDCF", " : c #A9A9A9", " > c #B4C9E2", " , c #7DA3CD", " < c #C5C7A0", " 1 c #D8DAAC", " 2 c #A7A472", " 3 c #C6D6ED", " 4 c #ABC2E3", " 5 c #C5D4EC", " 6 c #717168", " 7 c #8EAED7", " 8 c #C3D4EA", " 9 c #BDC4CD", " 0 c #BCBEA1", " q c #F7FAFC", " w c #DCE6F2", " e c #DDE4F3", " r c #A2AEC3", " t c #626677", " y c #505037", " u c #C0D2E7", " i c #616676", " p c #DBE4F1", " a c #BFD2E6", " s c #868997", " d c #89ACD2", " f c #D9E4EF", " g c #88ACD1", " h c #85A7D8", " j c #848795", " k c #63636E", " l c #A4A686", " z c #4A4A31", " x c #DFE0E1", " c c #B4C9E5", " v c #EEF0F3", " b c #EAEDF9", " n c #7EA3D1", " m c #B3C9E4", " M c #4B4B28", " N c #C6CDCF", " B c #CCDBEC", " V c #CBDBEB", " C c #CBD9EB", " Z c #AFC7E0", " A c #CAD9EA", " S c #E4EDF3", " D c #EBEDBB", " F c #AEC5DF", " G c #1A1A0F", " H c #9EB1CC", " J c #E9EBB9", " K c #C4C698", " L c #DBDC9E", " P c #A7C0E2", " I c #E7E9B7", " U c #C2C496", " Y c #686841", " T c #A8A862", " R c #8BACD7", " E c #A0A499", " W c #8D8D8D", " Q c #F4F7C7", " ! c #D7E4F0", " ~ c #9EA497", " ^ c #626570", " / c #D7E2F0", " ( c #E5E7E0", " ) c #D6E2EF", " _ c #F0F4F8", " ` c #9FBCDA", " ' c #9FBADA", " ] c #B6C9EA", " [ c #83A8CF", " { c #4D4D2D", " } c #73767A", " | c #A7ABAD", ". c #799ED9", ".. c #DBDEE0", ".X c #ECEEF4", ".o c #B7BA8B", ".O c #E4EDF6", ".+ c #C8D9EB", ".@ c #84887A", ".# c #57573A", ".$ c #C7D9EA", ".% c #E2EBF4", ".& c #C7D7EA", ".* c #C6D7E9", ".= c #8FB1D4", ".- c #AAC3DE", ".; c #C5D5E8", ".: c #8FAFD4", ".> c #656976", "., c #B9C4CF", ".< c #7098D0", ".1 c #636774", ".2 c #C0C2C2", ".3 c #616572", ".4 c #606371", ".5 c #D5E0F1", ".6 c #9EBADC", ".7 c #777777", ".8 c #D2E0EE", ".9 c #D1DEED", ".0 c #B6CAE3", ".q c #7FA4CE", ".w c #F8FADB", ".e c #B2B7BE", ".r c #727C93", ".t c #C8CDC3", ".y c #CBD6E7", ".u c #B5B782", ".i c #A7BEE8", ".p c #8FAFD7", ".a c #C4D5EA", ".s c #DEE9F3", ".d c #7098D3", ".f c #6D6D6D", ".g c #DDE7F2", ".h c #A7C1DE", ".j c #C2D3E8", ".k c #DDE5F2", ".l c #F7F9FB", ".z c #C1D3E7", ".x c #8BADD3", ".c c #616775", ".v c #3F3F22", ".b c #616575", ".n c #606574", ".m c #9C9C70", ".M c #A3A359", ".N c #4B4B31", ".B c #515123", ".V c #F0F1F4", ".C c #D5D7BF", ".Z c #CEDEED", ".A c #4C4C28", ".S c #CDDCEC", ".D c #CCDAEB", ".F c #ECEDF0", ".G c #B0C8E0", ".H c #CBDAEA", ".J c #7AA2CC", ".K c #95B4D6", ".L c #6B6E78", ".P c #98AED9", ".I c #C6D5EF", ".U c #79A0CB", ".Y c #B2C5D8", ".T c #6F98D5", ".R c #5B5B5B", ".E c #BABFA1", ".W c #ABAC5A", ".Q c #7099CC", ".! c #595959", ".~ c #DAE5F2", ".^ c #86A8DB", "./ c #D9E5F1", ".( c #ABBCDB", ".) c #A3BFDD", "._ c #BDD1E6", ".` c #D8E3F0", ".' c #A2BDDC", ".] c #80A3DF", ".[ c #D7E3EF", ".{ c #A1BDDB", ".} c #F1F5F8", ".| c #606042", "X c #555555", "X. c #D6E1EE", "XX c #91927C", "Xo c #F2F4C4", "XO c #686A61", "X+ c #F1F4C3", "X@ c #535353", "X# c #83A7CE", "X$ c #555580", "X% c #858459", "X& c #7A9FD9", "X* c #CDCE99", "X= c #7D8290", "X- c #D2D5BF", "X; c #EBEEBD", "X: c #84854E", "X> c #C9DAEB", "X, c #C9D8EB", "X< c #929494", "X1 c #C8D8EA", "X2 c #696C79", "X3 c #464625", "X4 c #C7D8E9", "X5 c #E2EAF3", "X6 c #91B2D5", "X7 c #ACC4DF", "X8 c #C0C2A0", "X9 c #C6D6E8", "X0 c #759ECA", "Xq c #474747", "Xw c #636673", "Xe c #626672", "Xr c #96977A", "Xt c #A8A85A", "Xy c #616471", "Xu c #EFF5F9", "Xi c #BEBE8A", "Xp c #9CB9D9", "Xa c #B7CBE3", "Xs c #D4D68F", "Xd c #81A5CF", "Xf c #9BB9D8", "Xg c #80A5CE", "Xh c #F0F0F0", "Xj c #555744", "Xk c #BFC3AC", "Xl c #A4AFA2", "Xz c #AFC6E5", "Xx c #96AEDD", "Xc c #686C7B", "Xv c #676C7A", "Xb c #A6AC9A", "Xn c #DCDFCF", "Xm c #C4D6E9", "XM c #D9DBA1", "XN c #DDE8F1", "XB c #636876", "XV c #C1D4E6", "XC c #8BAED2", "XZ c #C1D2E6", "XA c #626675", "XS c #9FB8E9", "XD c #DBE4EF", "XF c #A1A495", "XG c #52512D", "XH c #313131", "XJ c #75744C", "XK c #6C7282", "XL c #EBF1F8", "XP c #CFDFED", "XI c #DADFE4", "XU c #CFDDED", "XY c #CEDDEC", "XT c #98B7D8", "XR c #B3C9E2", "XE c #97B7D7", "XW c #CDDBEB", "XQ c #96B5D6", "X! c #494924", "X~ c #749CCF", "X^ c #81837C", "X/ c #BCC6CD", "X( c #626878", "X) c #DBE6F2", "X_ c #C6CBB9", "X` c #BFD2E7", "X' c #DFE5EC", "X] c #A4BEDD", "X[ c #BED2E6", "X{ c #A3BEDC", "X} c #D8E4EF", "X| c #51512F", "o c #B9CBEB", "o. c #828594", "oX c #F1F3C2", "oo c #EAEDFA", "oO c #DDDFAB", "o+ c #E6EDF6", "o@ c #5D5E34", "o# c #CBD9EC", "o$ c #CAD9EB", "o% c #EBEDBC", "o& c #AEC7E0", "o* c #B6B688", "o= c #C9D9EA", "o- c #8DABE4", "o; c #AEC5E0", "o: c #C8D9E9", "o> c #E6EAEC", "o, c #E5E8EB", "o< c #C0C3CA", "o1 c #646773", "o2 c #9EB9E4", "o3 c #626571", "o4 c #BFC4BF", "o5 c #C0C0C0", "o6 c #60656F", "o7 c #D5E2EF", "o8 c #9FBCDB", "o9 c #D4E0EE", "o0 c #C9CFD6", "oq c #C5CCDC", "ow c #9EBADA", "oe c #D7DFE7", "or c #9BB8D7", "ot c #848785", "oy c #AEBCC2", "ou c #7E8289", "oi c #BAB985", "op c #95ADDB", "oa c #E3E9F6", "os c #E2E9F5", "od c #C6D7EA", "of c #303018", "og c #B2BAB2", "oh c #E0E9F3", "oj c #6C7995", "ok c #AAC3DF", "ol c #DFE9F2", "oz c #879AC0", "ox c #7D817E", "oc c #C4D5E8", "ov c #DEE9F1", "ob c #AAB0BE", "on c #C3D5E7", "om c #DEE7F1", "oM c #85A7DF", "oN c #626774", "oB c #B0B0B0", "oV c #616573", "oC c #616373", "oZ c #D5E0F2", "oA c #EDEECE", "oS c #9AB5E3", "oD c #D1E0EE", "oF c #72747D", "oG c #B6CCE4", "oH c #D1DEEE", "oJ c #D0DEED", "oK c #CFDEEC", "oL c #B3B595", "oP c #CFDCEC", "oI c #8F94A0", "oU c #B3CAE1", "oY c #B4B461", "oT c #98B6D7", "oR c #B2CAE0", "oE c #B3C8E1", "oW c #D8DCE1", "oQ c #57573E", "o! c #A1A276", "o~ c #DEE9F4", "o^ c #D5D7A9", "o/ c #F3F4D7", "o( c #DCE7F2", "o) c #8999BB", "o_ c #626777", "o` c #BFD1E6", "o' c #89ABD2", "o] c #51522E", "o[ c #64646F", "o{ c #A2BDDA", "o} c #DCE4E8", "o| c #9C9C9C", "O c #9FB6E1", "O. c #ECEEFB", "OX c #808491", "Oo c #C4C7AC", "OO c #EEF1F3", "O+ c #4C4C29", "O@ c #A0B3D8", "O# c #D8DCE4", "O$ c #C3C9D6", "O% c #C9CB9D", "O& c #CCDCEC", "O* c #686D80", "O= c #CCDAEC", "O- c #CBDAEB", "O; c #9B9E87", "O: c #CADAEA", "O> c #E5ECF4", "O, c #94B4D6", "O< c #AFC6E0", "O1 c #919266", "O2 c #94B2D6", "O3 c #E4EAF3", "O4 c #5B5B31", "O5 c #78A0CB", "O6 c #59592F", "O7 c #E3E6F2", "O8 c #E6E8B6", "O9 c #C8CBB3", "O0 c #F2F5FA", "Oq c #61666F", "Ow c #F1F5F9", "Oe c #D6E1EF", "Or c #9CB8E1", "Ot c #D5E1EE", "Oy c #9FBBDA", "Ou c #CCD1CE", "Oi c #E9EEFB", "Op c #CDCE9A", "Oa c #BDBC87", "Os c #E8ECFA", "Od c #878B7D", "Of c #769DD6", "Og c #CACA97", "Oh c #C9D8EC", "Oj c #C8D8EB", "Ok c #C7D8EA", "Ol c #949162", "Oz c #C8C895", "Ox c #E1EAF3", "Oc c #595932", "Ov c #C6D6E9", "Ob c #E0EAF2", "On c #9B9B80", "Om c #BBC3D1", "OM c #8FB0D4", "ON c #666677", "OB c #424222", "OV c #646875", "OC c #8DAED2", "OZ c #919480", "OA c #616472", "OS c #D3E1EF", "OD c #646436", "OF c #D4DDF0", "OG c #D2DFEE", "OH c #EDF1F8", "OJ c #D1DFED", "OK c #99976A", "OL c #B6CBE3", "OP c #D0DDEC", "OI c #9AB7D8", "OU c #CFDDEB", "OY c #7BA0D4", "OT c #A8B09D", "OR c #759BD8", "OE c #8890A2", "OW c #C6C9CB", "OQ c #8EADE0", "O! c #98ADD6", "O~ c #9FA4A8", "O^ c #7D8AAB", "O/ c #F4F5D7", "O( c #DEE8F3", "O) c #ABBEE2", "O_ c #DDE8F2", "O` c #7E8BA2", "O' c #F2F3D5", "O] c #636877", "O[ c #C1D4E7", "O{ c #626876", "O} c #F6FAFA", "O| c #C1D2E7", "+ c #626676", "+. c #DBE6F0", "+X c #9FB8EA", "+o c #8AAED2", "+O c #626276", "++ c #686868", "+@ c #8B895C", "+# c #3C3C1F", "+$ c #828592", "+% c #888559", "+& c #B1B9CA", "+* c #EAF1F8", "+= c #4D4D29", "+- c #CEDDED", "+; c #606035", "+: c #B9C8DF", "+> c #CDDBEC", "+, c #CCDBEB", "+< c #CBDBEA", "+1 c #666C7D", "+2 c #94B3D5", "+3 c #6B6A43", "+4 c #E8EAEC", "+5 c #E2E9F0", "+6 c #626879", "+7 c #93A9D4", "+8 c #DAE6F2", "+9 c #535332", "+0 c #8C8B60", "+q c #585858", "+w c #5D6874", "+e c #292916", "+r c #D8E4F0", "+t c #F4F7C6", "+y c #BDD0E6", "+u c #9B9972", "+i c #65643D", "+p c #3C3C22", "+a c #BCD0E5", "+s c #565656", "+d c #636370", "+f c #61656E", "+g c #D6E2EE", "+h c #85A8D0", "+j c #BACEE3", "+k c #80A5D5", "+l c #E8EDF9", "+z c #B8BA8B", "+x c #505050", "+c c #CDD9EF", "+v c #6C6F7C", "+b c #8CA2C3", "+n c #E7EBF8", "+m c #B4B9BC", "+M c #CAD9EC", "+N c #FFFFFF", "+B c #AFC5E2", "+V c #C9D9EB", "+C c #C8D9EA", "+Z c #B1B38E", "+A c #939460", "+S c #E2EBF3", "+D c #92B1D6", "+F c #ACC5DF", "+G c #C7D7E9", "+H c #E2E9F3", "+J c #B8C3D7", "+K c #D6D8DA", "+L c #90B1D4", "+P c #80804A", "+I c #CFD5DD", "+U c #56562E", "+Y c #464646", "+T c #7A7D79", "+R c #636373", "+E c #616571", "+W c #606370", "+Q c #B9CEE5", "+! c #D4E0EF", "+~ c #DEE2E5", "+^ c #83A8D1", "+/ c #9EBADB", "+( c #D3E0EE", "+) c #EEF2F8", "+_ c #798499", "+` c #9DBADA", "+' c #D2E0ED", "+] c #96B2E7", "+[ c #B6CCE2", "+{ c #71747A", "+} c #909074", "+| c #80A4CE", "@ c #7CA1D4", "@. c #E6EBFA", "@X c #B4B45F", "@o c #474729", "@O c #99B2D6", "@+ c #ACC3E2", "@@ c #E0E9F4", "@# c #E5EAEF", "@$ c #D6D9A8", "@% c #C4D5E9", "@& c #A1A074", "@* c #F9FBFC", "@= c #C3D5E8", "@- c #646977", "@; c #DDE7F1", "@: c #A7C1DD", "@> c #C2D3E7", "@, c #636776", "@< c #719BC9", "@1 c #8CADD3", "@2 c #626775", "@3 c #8D9AB3", "@4 c #C1CFE6", "@5 c #A1BAE1", "@6 c #F4F5F7", "@7 c #64646D", "@8 c #EDEECF", "@9 c #9A9A6D", "@0 c #B8CCE7", "@q c #F2F3F5", "@w c #D1DEEF", "@e c #4E4E29", "@r c #C7CBD8", "@t c #D0DEEE", "@y c #CFDEED", "@u c #ACAFA3", "@i c #99B6D9", "@p c #6A6F80", "@a c #CEDCEC", "@s c #EAECF7", "@d c #CDDCEB", "@f c #2C2C2C", "@g c #759CDA", "@h c #7CA2CD", "@j c #BCC6D7", "@k c #B3B6B7", "@l c #8199C8", "@z c #BCC5CD", "@x c #DEE5F5", "@c c #C2C4C9", "@v c #626778", "@b c #DBE7F2", "@n c #616777", "@m c #DBE5F2", "@M c #DAE5F1", "@N c #AABED9", "@B c #F5F8C6", "@V c #BED1E6", "@C c #D9E3F0", "@Z c #646470", "@A c #BDCFE5", "@S c #B0C0CB", "@D c #BBCFE3", "@F c #F1F4C2", "@G c #DFE1E2", "@H c #D0DCF1", "@J c #EFF1F5", "@K c #E8F2F8", "@L c #EFF2C0", "@P c #1C1C1C", "@I c #DDDFE0", "@U c #DEE0AC", "@Y c #E8EEF8", "@T c #D6D8B8", "@R c #CCDCED", "@E c #1A1A1A", "@W c #92A2BE", "@Q c #B2C4E4", "@! c #E6ECF6", "@~ c #B0C6E2", "@^ c #CADAEB", "@/ c #CFDBE6", "@( c #CAD8EB", "@) c #AEC6E0", "@_ c #C8D8E9", "@` c #DCE5F6", "@' c #6F778B", "@] c #F2F7FB", "@[ c #F3F6C7", "@{ c #D6E3F0", "@} c #626471", "@| c #B2BCD0", "# c #D6E1F0", "#. c #626271", "#X c #E0E3E6", "#o c #D5E1EF", "#O c #6B7387", "#+ c #D4E1EE", "#@ c #98B3E8", "## c #EFF3F8", "#$ c #515128", "#% c #9EBBDA", "#& c #B9CDE4", "#* c #9B996A", "#= c #B8CDE3", "#- c #D3DFED", "#; c #CED09C", "#: c #CCCFCF", "#> c #6B707D", "#, c #ADC3EC", "#< c #B9B9B9", "#1 c #CAD8EE", "#2 c #686C7A", "#3 c #E2EAF5", "#4 c #ACC4E1", "#5 c #AFB28E", "#6 c #C6D6EA", "#7 c #C5D6E9", "#8 c #B1C1DC", "#9 c #C4D6E8", "#0 c #DFE8F2", "#q c #A9C2DE", "#w c #8DAED3", "#e c #C2D4E6", "#r c #DDE6F0", "#t c None", /* pixels */ "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t.b+6o_oVoVo_+6.c#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t@n#Oo)O@O) ]o @Q.(@W@'@n#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t@2O*O!#,oS.^@ X~X~ n R P.I#8XK@2#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#tXAO^.iOQ.d+k.p+/o;oG+F.'@1X0.6+c@3XA#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t+1+7XS. h c.*.&X1Ok.&+GOv.;o`.: [ 5+:@p#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t iopo-X& 4#6X4.$X1o=+CX1X1+GX9oc@AXdO5@+@4+ #t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t+ @l#@OR oodOk.&o=o= A@^o$@^o=Ok#7@=X7 ,.U 3 H+ #t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#toj+X@gXz.a.*+GX1 C@^ B B B VO:o=@_X9.z+h.q+h@`+_#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t .Xx.]Or 8Xm#7X4+VO-O=XW@a.S@d+>.D A.XQ+^+|owOF.1#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t.r+].T@0O[@%X4+C@^+,oPoK &.9XU+-@aO&X,Ok.{ d+h+|@HOE#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#tX(ozoMOYX`.j#9.*X>XWXY &oJoD.8OJ.9OP -.So: $OMXC+h@~+JO{#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t@v.POf 7@VO[#7X1.H@a@yOJ#-o9#+OtOtOGoJXU.*XTO,.=+o+D e@,#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#tXAO .<+Lo`@>#6+VO-@y ##-#o )@{ / /# .8 # u 'orO,OMo'OsoN#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t.1o2.QX# a@=.* A.S@t+(#o /@C@M./ fX}X.OU@).)OyOIO2OC@..>#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#toV@5@@=+y+[O#tXV+QXRoZO$XB#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t@2 r#4XE `#q.0Xu+<#t#t#t#t#t#t#t q#t#tXmX[Oh+n#>#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#tXv@| mo{X7 =oh p#t#t#t#t#t#tOwO0#t#t#t@wooOX#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#2@joE FOLXP+5#t#t#t#t#t#t@J#t#t#t#tO.+$#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#tX=o#o;+[#e+I#t#t#t#t#t#t+K#t#t#toa@r#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t@-oq >#&O[@z 9#t#t#t#t#t#t#t#t#t+l j#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#tobO|#&XV.,O~#t#t#t#tX<#t#t#t#t b+v#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t s.5.Y@SoyoxXboL#5On 6#t#t#t#3O7o1#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#tOVOmX/XlOT.@OZ.EX8Xr+}+Z l E@soI#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#tX2o0 Nog ~OdXkOoO; 0@T.C@Go c #999999", " , c #E06565", " < c #D73838", " 1 c #979797", " 2 c #DBC6C6", " 3 c #9F0101", " 4 c #D21C1C", " 5 c #DFD7D7", " 6 c #CA3535", " 7 c #940000", " 8 c #DA5F5F", " 9 c #D85D5D", " 0 c #8D8D8D", " q c #800000", " w c #B31B1B", " e c #D02727", " r c #D83C3C", " t c #CF0F0F", " y c #C02B2B", " u c #C84040", " i c #D43838", " p c #A50000", " a c #7F7F7F", " s c #910000", " d c #DE5C5C", " f c #D52F2F", " g c #CC0202", " h c #7D7D7D", " j c #D94040", " k c #D01313", " l c #DCB6B6", " z c #ECE0E0", " x c #CE1111", " c c #777777", " v c #690000", " b c #DFDDDD", " n c #A20000", " m c #DF6060", " M c #D63333", " N c #CD0606", " B c #B72525", " V c #B52323", " C c #D02D2D", " Z c #E16F6F", " A c #D75858", " S c #676767", " D c #BE2F2F", " F c #636363", " G c #E4C4C4", " H c #E06464", " J c #D73737", " K c #CE0A0A", " L c #A10202", " P c #D53535", " I c #9F0000", " U c #C53939", " Y c #AC1010", " T c #D13131", " R c #5B5B5B", " E c #A80C0C", " W c #E1B7B7", " Q c #C42E2E", " ! c #DB5555", " ~ c #A40808", " ^ c #CF0E0E", " / c #4F4F4F", " ( c #BC2626", " ) c #DB6262", " _ c #9C0000", " ` c #4B4B4B", " ' c #DE5B5B", " ] c #D52E2E", " [ c #CC0101", " { c #D78C8C", " } c #474747", " | c #B21C1C", ". c #434343", ".. c #D85555", ".X c #E06A6A", ".o c #D88383", ".O c #DF8080", ".+ c #E1DEDE", ".@ c #F0F0F0", ".# c #D56969", ".$ c #D45151", ".% c #DB4E4E", ".& c #AC1616", ".* c #EEEEEE", ".= c #D13737", ".- c #ECECEC", ".; c #990000", ".: c #CE1D1D", ".> c #DF5F5F", "., c #D63232", ".< c #CD0505", ".1 c #DAC0C0", ".2 c #EAEAEA", ".3 c #E8E8E8", ".4 c #AB0B0B", ".5 c #DED1D1", ".6 c #850000", ".7 c #E6E6E6", ".8 c #E16E6E", ".9 c #E4E4E4", ".0 c #E2E2E2", ".q c #D9B5B5", ".w c #E0E0E0", ".e c #BC2C2C", ".r c #AA0000", ".t c #DEDEDE", ".y c #D03939", ".u c #D84E4E", ".i c #CE0909", ".p c #A10101", ".a c #B01313", ".s c #DCDCDC", ".d c #EEE7E7", ".f c #D01818", ".g c #CE1616", ".h c #A80B0B", ".j c #DD5656", ".k c #D83A3A", ".l c #CD0B0B", ".z c #A00303", ".x c #E9D8D8", ".c c #DD6363", ".v c #D34C4C", ".b c #171717", ".n c #C12020", ".m c #0D0000", ".M c #C6C6C6", ".N c #D52D2D", ".B c #CC0000", ".V c #D24141", ".C c #DA5656", ".Z c #E06969", ".A c #D65252", ".S c #E1DDDD", ".D c #DB4D4D", ".F c #D22020", ".G c #D24E4E", ".H c #AA1313", ".J c #DF5E5E", ".K c #CD0404", ".L c #CE4A4A", ".P c #010101", ".I c #DC7272", ".U c #B31F1F", ".Y c #DC5151", ".T c #D32424", ".R c #AD1919", ".E c #DFC7C7", ".W c #D23A3A", ".Q c #BA2929", ".! c #D15050", ".~ c #E06262", ".^ c #D73535", "./ c #A10000", ".( c #CE1515", ".) c #DD5555", "._ c #D42828", ".` c #FF0000", ".' c #D45656", ".] c #989898", ".[ c #CD0A0A", ".{ c #A00202", ".} c #CD3838", ".| c #9E0000", "X c #D46363", "X. c #DB6060", "XX c #DA4848", "Xo c #D11B1B", "XO c #DDBEBE", "X+ c #D14949", "X@ c #A90E0E", "X# c #C73232", "X$ c #DE5959", "X% c #A70C0C", "X& c #8C8C8C", "X* c #DD9D9D", "X= c #DBC9C9", "X- c #DB4C4C", "X; c #D21F1F", "X: c #AA1212", "X> c #DA9090", "X, c #808080", "X< c #D04B4B", "X1 c #DF5D5D", "X2 c #D63030", "X3 c #CD0303", "X4 c #E16C6C", "X5 c #DF6A6A", "X6 c #CD1010", "X7 c #E2E0E0", "X8 c #DC5050", "X9 c #747474", "X0 c #D35151", "Xq c #BA2828", "Xw c #D96464", "Xe c #CC0505", "Xr c #6E6E6E", "Xt c #D33030", "Xy c #D35E5E", "Xu c #D94343", "Xi c #686868", "Xp c #D65757", "Xa c #DD5454", "Xs c #D42727", "Xd c #A60707", "Xf c #D33D3D", "Xg c #DB5252", "Xh c #A40505", "Xj c #B31717", "Xk c #A20303", "Xl c #A00101", "Xz c #D11A1A", "Xx c #5A5A5A", "Xc c #DE5858", "Xv c #D52B2B", "Xb c #CF2525", "Xn c #AE1515", "Xm c #DFABAB", "XM c #D44E4E", "XN c #DC6363", "XB c #FFFFFF", "XV c #DB4B4B", "XC c #D21E1E", "XZ c #CF3232", "XA c #B72121", "XS c #DABDBD", "XD c #BE1E1E", "XF c #D83E3E", "XG c #DCCCCC", "XH c #424242", "XJ c #D75454", "XK c #DF6969", "XL c #CD0F0F", "XP c #D78282", "XI c #D43A3A", "XU c #DC4F4F", "XY c #EFEFEF", "XT c #A30000", "XR c #EDEDED", "XE c #EBEBEB", "XW c #D53131", "XQ c #E9E9E9", "X! c #8F0000", "X~ c #090000", "X^ c #D67777", "X/ c #B42121", "X( c #E7E7E7", "X) c #D94242", "X_ c #D01515", "X` c #E5E5E5", "X' c #B71A1A", "X] c #E3E3E3", "X[ c #DD5353", "X{ c #E1E1E1", "X} c #DFDFDF", "X| c #A20202", "o c #DDDDDD", "o. c #A00000", "oX c #D54B4B", "oo c #C31F1F", "oO c #DA4646", "o+ c #D11919", "o@ c #D95C5C", "o# c #C03333", "o$ c #DAA2A2", "o% c #D3D3D3", "o& c #A50808", "o* c #E06666", "o= c #D99797", "o- c #181818", "o; c #9D0000", "o: c #DB4A4A", "o> c #C7C7C7", "o, c #DDD6D6", "o< c #CC4545", "o1 c #D25858", "o2 c #E16A6A", "o3 c #D83D3D", "o4 c #C02C2C", "o5 c #DD6666", "o6 c #D32121", "o7 c #AD1616", "o8 c #DEDADA", "o9 c #CF1D1D", "o0 c #CC0303", "oq c #D67676", "ow c None", /* pixels */ "owowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowow", "owowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowow", "owowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowow", "owowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowow", "owowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowow", "owowowowowowowowowowowowowowowowowowowowowow./././ nowowowowowowowowowowowowowowowowowowowowowow", "owowowowowowowowowowowowowowowowowowowowow nX/ 8XNXq nowowowowowowowowowowowowowowowowowowowowow", "owowowowowowowowowowowowowowowowowowowowowX% Z._X;X4X@owowowowowowowowowowowowowowowowowowowowow", "owowowowowowowowowowowowowowowowowowowowXT.L o.B.B .B.Bo1o o o .t.#.B.Bo: (o.owowowowowowowowowowowowowowowow", "owowowowowowowowowowowowowowowow.p ).F.B $ 2o o .t.t.5XL.B O.CX|owowowowowowowowowowowowowowowow", "owowowowowowowowowowowowowowowow.eXc.B.BX o o .t.tX}X}oq.B.B j y./owowowowowowowowowowowowowowow", "owowowowowowowowowowowowowowowXko5Xz.B.lXGo .t.tX}X}X} 5.(.B ^ !Xhowowowowowowowowowowowowowowow", "owowowowowowowowowowowowowowo.o#.Y.B.B ;o .t.tX}X}X}.w.w.o.B.B < Q./owowowowowowowowowowowowowow", "owowowowowowowowowowowowowow :XK O.BX6 =.t.t 1 h h.].wX{.So9.B.iXgo&owowowowowowowowowowowowowow", "owowowowowowowowowowowowow./ Uo:.B.BX^.t.tX}XH . X{X{.0X>.B.B fX#./owowowowowowowowowowowowow", "owowowowowowowowowowowowow ~X5 t.B.go,.tX}X} / /X{.0.0X7 e.B N.%.howowowowowowowowowowowowow", "owowowowowowowowowowowow n uXu.B.BXP.tX}X}.wXx R.0.0.0X]X*.B.BXs 6./owowowowowowowowowowowow", "owowowowowowowowowowowow E.X K.B.:o8X}X}.w.w S Xi.0.0X].9.9 T.BX3XX Yowowowowowowowowowowowow", "owowowowowowowowowowow no< r.B.B {X}X}.w.w.wX9 X9X]X].9.9X`Xm.B.B.F.}./owowowowowowowowowowow", "owowowowowowowowowowowX:.Z $.BXb bX}.w.w.wX{ a X,X].9.9X`X`.7Xf.B [X).aowowowowowowowowowowow", "owowowowowowowowowow./X<.^.B.Bo=X}.w.w.wX{X{X& 0.9.9X`X`.7.7 W.B.Bo+.y./owowowowowowowowowow", "owowowowowowowowowow.&o*.K.B CX}.w.w.wX{X{.0.] >.9X`X`.7.7X(X(oX.B.B.kXjowowowowowowowowowow", "owowowowowowowowow./X0 ].B.Bo$.w.w.wX{X{.0.0 % %X`X`.7.7X(X(.3 Go0.B k.W.powowowowowowowowow", "owowowowowowowowow | # g.B.=.w.w.wX{X{.0.0X].M F Fo>X`.7.7X(X(.3XQXQ A.B.B MX'o.owowowowowowowow", "owowowowowowowow./XpXs.B.B @.w.wX{X{.0.0X]X].9.Mo>X`.7.7X(X(.3XQXQ.2 X N.B ^XI Lowowowowowowowow", "owowowowowowowow V d [.B.V.w.wX{X{.0.0X]X].9Xr .PX9.7X(.3.3XQXQ.2.2XEXw.B.BXv ../owowowowowowow", "owowowowowowow.po@o6.B [ l.wX{X{.0.0X]X].9.9.b o-X(.3.3XQXQ.2.2XEXE.x.[.B.i iXkowowowowowowow", "owowowowowowow.Q.).B.B.v.wX{X{.0.0X]X].9.9X` ` }.3.3XQXQ.2.2XEXE.-.-.I.B.B.TXD nowowowowowow", "owowowowowowX|X.Xo.Bo0XOX{X{.0.0X]X].9.9X`X`o% c co%.3XQXQ.2.2XEXE.-.-XR z x.B N P :owowowowowow", "owowowowow./ DXU.B.B.'X{X{.0.0X]X].9.9X`X`.7X(X(.3.3XQXQ.2.2XEXE.-XRXR.*.*.O.B.BXC.n./owowowowow", "owowowowowXk.cX_.B N.EX{.0.0X]X].9.9X`X`.7X(X(.3.3XQXQ.2.2XEXE.-XRXR.*.*XY.d.f.BX3XWXdowowowowow", "owowowow 7o4X-.B.B C.+.0.0X]X].9.9X`X`.7X(X(.3.3XQXQ.2.2XEXE.-XRXR.*.*XYXY.@.u.B.BXzooo.owowowow", "owowowow.| A 4.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.KXto.owowowow", "owowowow _.$ f.<.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B g t +o.owowowow", "owowowow qo7XJ.~ , # m.JX1 'X$Xc.j.)X[.YX8XU.DXVo:XXoO *XuX) jXFo3 r.k < J.^ M.,X2 +.4 sowowowow", "owowowowow.6o; I 3.z.z.z.z.z.z.z.{.{.{.{.{.{.{.{.{.{.{.{.{.{.{.{.{.{.{.{XlXlXl 3 I IX!owowowowow", "owowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowow", "owowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowow", "owowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowow", "owowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowow", "owowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowow" }; // --------------------------------------------------------------------- // end of Tango icons // --------------------------------------------------------------------- flamp-2.2.12/src/widgets/font_browser.cxx0000664000175000017500000002347714605333207015332 00000000000000// ---------------------------------------------------------------------------- // Font_Browser.cpp v 0.0.3 2007-04-21 // // for the Fast Light Tool Kit (FLTK) 1.1.x . // // David Freese, w1hkj@w1hkj.com // based on similar widget by Mariwan Jalal // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ---------------------------------------------------------------------------- #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "font_browser.h" #include "flslider2.h" #include "gettext.h" #include "threads.h" #include "debug.h" void find_fonts(); Font_Browser* font_browser; //====================================================================== // static members int Font_Browser::instance = 0; int *Font_Browser::fixed = 0; int Font_Browser::numfonts = 100; std::list Font_Browser::font_list; //====================================================================== static inline std::string uucase(std::string s) { for (size_t n = 0; n < s.length(); n++) s[n] = toupper(s[n]); return s; } static bool font_compare(font_pair &p1, font_pair &p2) { if (uucase(p1.name) > uucase(p2.name)) return false; return true; } // Font Color selected void Font_Browser::ColorSelect() { unsigned char r, g, b; Fl::get_color(fontcolor, r, g, b); if (fl_color_chooser(_("Font color"), r, g, b) == 0) return; fontcolor = fl_rgb_color(r, g, b); btn_Color->color(fontcolor); btn_Color->labelcolor( fl_contrast(FL_BLACK, fontcolor)); } void Font_Browser::fb_callback(Fl_Widget* w, void* arg) { Font_Browser* fb = reinterpret_cast(arg); if (w == fb->btn_fixed) { if (fb->btn_fixed->value()) fb->fontFilter(FIXED_WIDTH); else fb->fontFilter(ALL_TYPES); return; } if (w == fb->btn_Cancel) fb->hide(); else if (w == fb->btn_OK) { if (fb->callback_) (*fb->callback_)(fb, fb->data_); } else if (w == fb->btn_Color) fb->ColorSelect(); else if (w == fb->lst_Font) fb->FontNameSelect(); else { if (w == fb->lst_Size) fb->txt_Size->value(strtol(fb->lst_Size->text(fb->lst_Size->value()), NULL, 10)); fb->fontsize = static_cast(fb->txt_Size->value()); } fb->box_Example->SetFont(fb->fontnbr, fb->fontsize, fb->fontcolor); } // Font Name changed callback void Font_Browser::FontNameSelect() { int fn = lst_Font->value(); if (!fn) return; fontnbr = (Fl_Font)reinterpret_cast(lst_Font->data(fn)); // get sizes and fill browser; skip first element if it is zero lst_Size->clear(); int nsizes, *sizes; char buf[4]; nsizes = Fl::get_font_sizes(fontnbr, sizes); // for (int i = !*sizes; i < nsizes; i++) if ((size_t)snprintf(buf, sizeof(buf), "%d", sizes[i]) < sizeof(buf)) lst_Size->add(buf, reinterpret_cast(sizes[i])); // scalable font with no suggested sizes if (!lst_Size->size()) { for (int i = 1; i <= 48; i++) { snprintf(buf, sizeof(buf), "%d", i); lst_Size->add(buf, reinterpret_cast(i)); } } fontSize(fontsize); } Font_Browser::Font_Browser(int x, int y, int w, int h, const char *lbl ) : Fl_Window(x, y, w, h, lbl) { lst_Font = new Fl_Browser(5, 15, 280, 125, _("Font:")); lst_Font->align(FL_ALIGN_TOP_LEFT); lst_Font->type(FL_HOLD_BROWSER); lst_Font->callback(fb_callback, this); txt_Size = new Fl_Value_Input2(290, 15, 50, 22, _("Size:")); txt_Size->align(FL_ALIGN_TOP_LEFT); txt_Size->range(1.0, 48.0); txt_Size->step(1.0); txt_Size->callback(fb_callback, this); lst_Size = new Fl_Browser(290, 40, 50, 100); lst_Size->type(FL_HOLD_BROWSER); lst_Size->callback(fb_callback, this); btn_fixed = new Fl_Check_Button(345, 15, 18, 18, _("Fixed")); btn_fixed->callback(fb_callback, this); btn_fixed->value(0); btn_OK = new Fl_Return_Button(345, 40, 80, 25, _("&OK")); btn_OK->shortcut(0x8006f); btn_OK->callback(fb_callback, this); btn_Cancel = new Fl_Button(345, 70, 80, 25, _("Cancel")); btn_Cancel->labelsize(12); btn_Cancel->callback(fb_callback, this); btn_Color = new Fl_Button(345, 100, 80, 25, _("Color")); btn_Color->down_box(FL_BORDER_BOX); btn_Color->color(FL_FOREGROUND_COLOR); btn_Color->labelcolor( fl_contrast(FL_BLACK, FL_FOREGROUND_COLOR)); btn_Color->callback(fb_callback, this); box_Example = new Preview_Box(5, 145, 420, 75, _("\ abcdefghijklmnopqrstuvwxyz\n\ ABCDEFGHIJKLMNOPQRSTUVWXYZ\n\ 0123456789" ) ); box_Example->box(FL_DOWN_BOX); box_Example->align(FL_ALIGN_WRAP|FL_ALIGN_CLIP|FL_ALIGN_CENTER|FL_ALIGN_INSIDE); resizable(box_Example); set_modal(); end(); // Initializations this->callback_ = 0; // Initialize Widgets callback this->data_ = 0; // And the data std::string fntname; bool ok = true; if (instance == 0) { ++instance; numfonts = Fl::set_fonts("*"); // Nr of fonts available on the server font_list.clear(); fixed = new int[numfonts]; int j = 0; for (int i = 0; i < numfonts; i++) { fntname = Fl::get_font_name((Fl_Font)i); ok = true; for (size_t k = 0; k < fntname.length(); k++) { if (fntname[k] < ' ' || fntname[k] > 'z' || fntname[k] == '\\' || fntname[k] == '@') { // disallowed chars in browser widget ok = false; break; } } if (fntname.empty()) ok = false; if (ok) { nufont.name = fntname; nufont.nbr = i; font_list.push_back(nufont); j++; } } numfonts = j; font_list.sort(font_compare); std::list temp_list = font_list; int i = 0; while (!temp_list.empty()) { nufont = temp_list.front(); lst_Font->add( nufont.name.c_str(), reinterpret_cast(nufont.nbr) ); temp_list.pop_front(); fixed[i++] = 0; } find_fonts(); } else { ++instance; std::list temp_list = font_list; while (!temp_list.empty()) { nufont = temp_list.front(); lst_Font->add( nufont.name.c_str(), reinterpret_cast(nufont.nbr) ); temp_list.pop_front(); } } fontnbr = FL_HELVETICA;; fontsize = FL_NORMAL_SIZE; fontcolor = FL_FOREGROUND_COLOR; filter = ALL_TYPES; lst_Font->value(1); FontNameSelect(); xclass(PACKAGE_NAME); } Font_Browser::~Font_Browser() { --instance; if (instance == 0) { delete [] fixed; fixed = 0; font_list.clear(); } } void Font_Browser::fontNumber(Fl_Font n) { fontnbr = n; lst_Font->value(1); int s = lst_Font->size(); for (int i = 1; i < s; i++ ) { if ((Fl_Font)reinterpret_cast(lst_Font->data(i)) == n) { lst_Font->value(i); FontNameSelect(); break; } } } void Font_Browser::fontSize(int s) { fontsize = s; int n = lst_Size->size(); for (int i = 1; i < n; i++) { if ((intptr_t)lst_Size->data(i) == fontsize) { lst_Size->value(i); break; } } txt_Size->value(s); } void Font_Browser::fontColor(Fl_Color c) { btn_Color->color(fontcolor = c); box_Example->SetFont(fontnbr, fontsize, fontcolor); box_Example->redraw(); } void Font_Browser::fontName(const char* n) { int s = lst_Font->size(); for (int i = 1; i < s; i++) { if (!strcmp(lst_Font->text(i), n)) { lst_Font->value(i); FontNameSelect(); } } } void Font_Browser::fontFilter(filter_t filter) { int s = lst_Font->size(); switch (filter) { case FIXED_WIDTH: for (int i = 0; i < s; i++) { if (fixed[i]) lst_Font->show(i + 1); else lst_Font->hide(i + 1); } btn_fixed->value(1); break; case VARIABLE_WIDTH: for (int i = 0; i < s; i++) { if (!fixed[i]) lst_Font->show(i + 1); else lst_Font->hide(i + 1); } btn_fixed->value(0); break; case ALL_TYPES: for (int i = 0; i < s; i++) lst_Font->show(i + 1); btn_fixed->value(0); break; } lst_Font->redraw(); lst_Font->topline(lst_Font->value()); } // separate thread used to evaluate fixed / proportional fonts // friend of Font_Browser // launched by Font_Browser instance 1 static pthread_t find_font_thread; static int is_fixed; Fl_Font test_font; void font_test(void *) { fl_font(test_font, FL_NORMAL_SIZE); is_fixed = (fl_width(".") == fl_width("W")); } void *find_fixed_fonts(void *) { std::list temp_list = Font_Browser::font_list; int i = 0; while (!temp_list.empty()) { test_font = temp_list.front().nbr; is_fixed = -1; Fl::awake(font_test); while (is_fixed == -1) { MilliSleep(1); } Font_Browser::fixed[i] = is_fixed; i++; temp_list.pop_front(); } return NULL; } void find_fonts() { if (pthread_create(&find_font_thread, NULL, find_fixed_fonts, NULL) < 0) { LOG_ERROR("%s", "pthread_create find_fixed_fonts failed"); } return; } bool Font_Browser::fixed_width(Fl_Font f) { fl_font(f, FL_NORMAL_SIZE); return fl_width(".") == fl_width("W"); } //---------------------------------------------------------------------- Preview_Box::Preview_Box(int x, int y, int w, int h, const char* l) : Fl_Widget(x, y, w, h, l) { fontName = 1; fontSize = FL_NORMAL_SIZE; box(FL_DOWN_BOX); color(FL_BACKGROUND2_COLOR); fontColor = FL_FOREGROUND_COLOR; } void Preview_Box::draw() { draw_box(); fl_font((Fl_Font)fontName, fontSize); fl_color(fontColor); fl_draw(label(), x()+3, y()+3, w()-6, h()-6, align()); } void Preview_Box::SetFont(int fontname, int fontsize, Fl_Color c) { fontName = fontname; fontSize = fontsize; fontColor = c; redraw(); } flamp-2.2.12/src/widgets/FTextView.cxx0000664000175000017500000005647314507650001014503 00000000000000// ---------------------------------------------------------------------------- // FTextView.cxx // // Copyright (C) 2007-2009 // Stelios Bounanos, M0GLD // // Copyright (C) 2008-2009 // Dave Freese, W1HKJ // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ---------------------------------------------------------------------------- #include #include #include #include #include #include #include #include #include #include #include #include #include #include "flmisc.h" #include "fileselect.h" #include "font_browser.h" #include "ascii.h" #include "icons.h" #include "gettext.h" #include "FTextView.h" #include "debug.h" /// FTextBase constructor. /// Word wrapping is enabled by default at column 80, but see \c reset_wrap_col. /// @param x /// @param y /// @param w /// @param h /// @param l FTextBase::FTextBase(int x, int y, int w, int h, const char *l) : Fl_Text_Editor_mod(x, y, w, h, l), wrap(WRAP_AT_BOUNDS), wrap_col(80), max_lines(0), scroll_hint(false) { oldw = oldh = olds = -1; oldf = (Fl_Font)-1; textfont(FL_COURIER); textsize(FL_NORMAL_SIZE); textcolor(FL_FOREGROUND_COLOR); tbuf = new Fl_Text_Buffer_mod; sbuf = new Fl_Text_Buffer_mod; buffer(tbuf); highlight_data(sbuf, styles, NATTR, FTEXT_DEF, 0, 0); cursor_style(Fl_Text_Editor_mod::NORMAL_CURSOR); restore_wrap = wrap; // Do we want narrower scrollbars? The default width is 16. scrollbar_width((int)floor(scrollbar_width() * 7.0/8.0)); reset_styles(SET_FONT | SET_SIZE | SET_COLOR); read_cb = NULL; } void FTextBase::clear() { tbuf->text(""); sbuf->text(""); set_word_wrap(restore_wrap); } int FTextBase::handle(int event) { if (event == FL_MOUSEWHEEL && !Fl::event_inside(this)) return 1; // Fl_Text_Editor::handle() calls window()->cursor(FL_CURSOR_DONE) when // it receives an FL_KEYBOARD event, which crashes some buggy X drivers // (e.g. Intel on the Asus Eee PC). Call handle_key directly to work // around this problem. if (event == FL_KEYBOARD) return Fl_Text_Editor_mod::handle_key(); else return Fl_Text_Editor_mod::handle(event); } /// @see FTextRX::add /// /// @param s /// @param attr /// void FTextBase::add(const char *s, int attr) { // handle the text attribute first int n = strlen(s); char a[n + 1]; memset(a, FTEXT_DEF + attr, n); a[n] = '\0'; sbuf->replace(insert_position(), insert_position() + n, a); insert(s); } /// @see FTextBase::add /// /// @param s /// @param attr /// void FTextBase::add(unsigned char c, int attr) { char s[] = { static_cast(FTEXT_DEF + attr), '\0' }; sbuf->replace(insert_position(), insert_position() + 1, s); s[0] = c; insert(s); } void FTextBase::set_word_wrap(bool b) { if ((wrap = b)) wrap_mode(WRAP_AT_BOUNDS, 0); else wrap_mode(WRAP_NONE, 0); show_insert_position(); } void FTextBase::setFont(Fl_Font f, int attr) { set_style(attr, f, textsize(), textcolor(), SET_FONT); } void FTextBase::setFontSize(int s, int attr) { set_style(attr, textfont(), s, textcolor(), SET_SIZE); } void FTextBase::setFontColor(Fl_Color c, int attr) { set_style(attr, textfont(), textsize(), c, SET_COLOR); } /// Resizes the text widget. /// The real work is done by \c Fl_Text_Editor_mod::resize or, if \c HSCROLLBAR_KLUDGE /// is defined, a version of that code modified so that no horizontal /// scrollbars are displayed when word wrapping. /// /// @param X /// @param Y /// @param W /// @param H /// void FTextBase::resize(int X, int Y, int W, int H) { bool need_wrap_reset = false; bool need_margin_reset = false; if (unlikely(text_area.w != oldw)) { oldw = text_area.w; need_wrap_reset = true; } if (unlikely(text_area.h != oldh)) { oldh = text_area.h; need_margin_reset = true; } if (unlikely(textfont() != oldf || textsize() != olds)) { oldf = textfont(); olds = textsize(); need_wrap_reset = need_margin_reset = true; } if (need_wrap_reset) reset_wrap_col(); TOP_MARGIN = DEFAULT_TOP_MARGIN; int r = H - Fl::box_dh(box()) - TOP_MARGIN - BOTTOM_MARGIN; if (mHScrollBar->visible()) r -= scrollbar_width(); int msize = mMaxsize ? mMaxsize : textsize(); if (!msize) msize = 1; //printf("H %d, textsize %d, lines %d, extra %d\n", r, msize, r / msize, r % msize); if (r %= msize) TOP_MARGIN += r; if (scroll_hint) { mTopLineNumHint = mNBufferLines; mHorizOffsetHint = 0; // display_insert_position_hint = 1; scroll_hint = false; } bool hscroll_visible = mHScrollBar->visible(); Fl_Text_Editor_mod::resize(X, Y, W, H); if (hscroll_visible != mHScrollBar->visible()) oldh = 0; // reset margins next time } /// Checks the new widget height. /// This is registered with Fl_Tile_check and then called with horizontal /// and vertical size increments every time the Fl_Tile boundary is moved. /// /// @param arg The callback argument; should be a pointer to a FTextBase object /// @param xd The horizontal increment (ignored) /// @param yd The vertical increment /// /// @return True if the widget is visible, and the new text area height would be /// a multiple of the font height. /// bool FTextBase::wheight_mult_tsize(void *arg, int, int yd) { FTextBase *v = reinterpret_cast(arg); if (!v->visible()) return true; return v->mMaxsize > 0 && (v->text_area.h + yd) % v->mMaxsize == 0; } /// Changes text style attributes /// /// @param attr The attribute name to change, or \c NATTR to change all styles. /// @param f The new font /// @param s The new font size /// @param c The new font color /// @param set One or more (OR'd together) SET operations; @see set_style_op_e /// void FTextBase::set_style(int attr, Fl_Font f, int s, Fl_Color c, int set) { int start, end; if (attr == NATTR) { // update all styles start = 0; end = NATTR; if (set & SET_FONT) Fl_Text_Display_mod::textfont(f); if (set & SET_SIZE) textsize(s); if (set & SET_COLOR) textcolor(c); } else { start = attr; end = start + 1; } for (int i = start; i < end; i++) { styles[i].attr = 0; if (set & SET_FONT) styles[i].font = f; if (set & SET_SIZE) styles[i].size = s; if (set & SET_COLOR) styles[i].color = c; if (i == SKIP) // clickable styles always same as SKIP for now for (int j = CLICK_START; j < NATTR; j++) memcpy(&styles[j], &styles[i], sizeof(styles[j])); } if (set & SET_COLOR) mCursor_color = styles[0].color; resize(x(), y(), w(), h()); // to redraw and recalculate the wrap column } /// Reads a file and inserts its contents. /// /// @return 0 on success, -1 on error int FTextBase::readFile(const char* fn) { set_word_wrap(restore_wrap); if ( !(fn || (fn = FSEL::select(_("Insert text"), "Text\t*.txt"))) ) return -1; int ret = 0, pos = insert_position(); #ifdef __WOE32__ FILE* tfile = fopen(fn, "rt"); #else FILE* tfile = fopen(fn, "r"); #endif if (!tfile) return -1; char buf[BUFSIZ+1]; std::string newbuf; size_t p; memset(buf, 0, BUFSIZ+1); if (pos == tbuf->length()) { // optimise for append while (fgets(buf, sizeof(buf), tfile)) { newbuf = buf; tbuf->append(newbuf.c_str()); memset(buf, 0, BUFSIZ+1); } if (ferror(tfile)) ret = -1; pos = tbuf->length(); } else { while (fgets(buf, sizeof(buf), tfile)) { newbuf = buf; p = 0; while ((p = newbuf.find('^',p)) != std::string::npos) { newbuf.insert(p, "^"); p += 2; } tbuf->insert(pos, newbuf.c_str()); pos += strlen(buf); memset(buf, 0, BUFSIZ+1); } if (ferror(tfile)) ret = -1; } fclose(tfile); insert_position(pos); show_insert_position(); if (read_cb) (read_cb)(fn); return ret; } /// Writes all buffer text out to a file. /// /// void FTextBase::saveFile(void) { const char *fn = FSEL::saveas(_("Save text as"), "Text\t*.txt"); if (fn) { #ifdef __WOE32__ std::ofstream tfile(fn); if (!tfile) return; char *p1, *p2, *text = tbuf->text(); for (p1 = p2 = text; *p1; p1 = p2) { while (*p2 != '\0' && *p2 != '\n') p2++; if (*p2 == '\n') { *p2 = '\0'; tfile << p1 << "\r\n"; p2++; } else tfile << p1; } free(text); #else tbuf->outputfile(fn, 0, tbuf->length()); #endif } } /// Returns a character std::string containing the selected word, if any, /// or the word at (\a x, \a y) relative to the widget's \c x() and \c y(). /// If \a ontext is true, this function will return text only if the /// mouse cursor position is inside the text range. /// /// @param x /// @param y /// /// @return The selection, or the word text at (x,y). Must be freed by the caller. /// char* FTextBase::get_word(int x, int y, const char* nwchars, bool ontext) { int p = xy_to_position(x + this->x(), y + this->y(), Fl_Text_Display_mod::CURSOR_POS); int start, end; if (tbuf->selected()) { if (ontext && tbuf->selection_position(&start, &end) && (p < start || p >= end)) return 0; else return tbuf->selection_text(); } std::string nonword = nwchars; nonword.append(" \t\n"); if (!tbuf->findchars_backward(p, nonword.c_str(), &start)) start = 0; else start++; if (!tbuf->findchars_forward(p, nonword.c_str(), &end)) end = tbuf->length(); //#endif if (ontext && (p < start || p >= end)) return 0; else return tbuf->text_range(start, end); } /// Initialised the menu pointed to by \c context_menu. The menu items' user_data /// field is used to store the initialisation flag. void FTextBase::init_context_menu(void) { for (int i = 0; i < context_menu->size() - 1; i++) { if (context_menu[i].user_data() == 0 && context_menu[i].labeltype() == _FL_MULTI_LABEL) { icons::set_icon_label(&context_menu[i]); context_menu[i].user_data(this); } } } /// Displays the menu pointed to by \c context_menu and calls the menu function; /// @see call_cb. /// void FTextBase::show_context_menu(void) { const Fl_Menu_Item *m; int xpos = Fl::event_x(); int ypos = Fl::event_y(); popx = xpos - x(); popy = ypos - y(); window()->cursor(FL_CURSOR_DEFAULT); m = context_menu->popup(xpos, ypos, 0, 0, 0); if (m) menu_cb(m - context_menu); } /// Recalculates the wrap margin when the font is changed or the widget resized. /// Line wrapping works with proportional fonts but may be very slow. /// int FTextBase::reset_wrap_col(void) { if (!wrap || text_area.w == 0) return wrap_col; int old_wrap_col = wrap_col; if (Font_Browser::fixed_width(textfont())) { fl_font(textfont(), textsize()); wrap_col = (int)floorf(text_area.w / fl_width('X')); } else // use slower (but accurate) wrapping for variable width fonts wrap_col = 0; // wrap_mode triggers a resize; don't call it if wrap_col hasn't changed if (old_wrap_col != wrap_col) wrap_mode(wrap, wrap_col); return old_wrap_col; } void FTextBase::reset_styles(int set) { set_style(NATTR, FL_COURIER, FL_NORMAL_SIZE, FL_FOREGROUND_COLOR, set); set_style(XMIT, FL_COURIER, FL_NORMAL_SIZE, FL_RED, set); set_style(CTRL, FL_COURIER, FL_NORMAL_SIZE, FL_DARK_GREEN, set); set_style(SKIP, FL_COURIER, FL_NORMAL_SIZE, FL_BLUE, set); set_style(ALTR, FL_COURIER, FL_NORMAL_SIZE, FL_DARK_MAGENTA, set); } // ---------------------------------------------------------------------------- Fl_Menu_Item FTextView::menu[] = { { icons::make_icon_label(_("Copy"), edit_copy_icon), 0, 0, 0, 0, _FL_MULTI_LABEL }, { icons::make_icon_label(_("Clear"), edit_clear_icon), 0, 0, 0, 0, _FL_MULTI_LABEL }, { icons::make_icon_label(_("Select All"), edit_select_all_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL }, { icons::make_icon_label(_("Save as..."), save_as_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL }, { _("Word wrap"), 0, 0, 0, FL_MENU_TOGGLE, FL_NORMAL_LABEL }, { 0 } }; /// FTextView constructor. /// We remove \c Fl_Text_Display_mod::buffer_modified_cb from the list of callbacks /// because we want to scroll depending on the visibility of the last line; @see /// changed_cb. /// @param x /// @param y /// @param w /// @param h /// @param l FTextView::FTextView(int x, int y, int w, int h, const char *l) : FTextBase(x, y, w, h, l), quick_entry(false) { tbuf->remove_modify_callback(buffer_modified_cb, this); tbuf->add_modify_callback(changed_cb, this); tbuf->canUndo(0); // disable some keybindings that are not allowed in FTextView buffers change_keybindings(); context_menu = menu; init_context_menu(); } /// Handles fltk events for this widget. /// We only care about mouse presses (to display the popup menu and prevent /// pasting) and keyboard events (to make sure no text can be inserted). /// Everything else is passed to the base class handle(). /// /// @param event /// /// @return /// int FTextView::handle(int event) { switch (event) { case FL_PUSH: if (!Fl::event_inside(this)) break; if (Fl::event_button() == FL_RIGHT_MOUSE) { handle_context_menu(); return 1; } break; case FL_DRAG: if (Fl::event_button() != FL_LEFT_MOUSE) return 1; break; // catch some text-modifying events that are not handled by kf_* functions case FL_KEYBOARD: int k; if (Fl::compose(k)) return 1; k = Fl::event_key(); if (k == FL_BackSpace) return 1; else if (k == FL_Tab) return Fl_Widget::handle(event); } return FTextBase::handle(event); } void FTextView::handle_context_menu(void) { icons::set_active(&menu[VIEW_MENU_COPY], tbuf->selected()); icons::set_active(&menu[VIEW_MENU_CLEAR], tbuf->length()); icons::set_active(&menu[VIEW_MENU_SELECT_ALL], tbuf->length()); icons::set_active(&menu[VIEW_MENU_SAVE], tbuf->length()); if (wrap) menu[VIEW_MENU_WRAP].set(); else menu[VIEW_MENU_WRAP].clear(); show_context_menu(); } /// The context menu handler /// /// @param val /// void FTextView::menu_cb(size_t item) { switch (item) { case VIEW_MENU_COPY: kf_copy(Fl::event_key(), this); break; case VIEW_MENU_CLEAR: clear(); break; case VIEW_MENU_SELECT_ALL: tbuf->select(0, tbuf->length()); break; case VIEW_MENU_SAVE: saveFile(); break; case VIEW_MENU_WRAP: set_word_wrap(!wrap); restore_wrap = wrap; break; } } /// Scrolls down if the buffer has been modified and the last line is /// visible. See Fl_Text_Buffer::add_modify_callback() for parameter details. /// /// @param pos /// @param nins /// @param ndel /// @param nsty /// @param dtext /// @param arg /// inline void FTextView::changed_cb(int pos, int nins, int ndel, int nsty, const char *dtext, void *arg) { FTextView *v = reinterpret_cast(arg); if (v->mTopLineNum + v->mNVisibleLines - 1 == v->mNBufferLines) v->scroll_hint = true; v->buffer_modified_cb(pos, nins, ndel, nsty, dtext, v); } /// Removes Fl_Text_Edit keybindings that would modify text and put it out of /// sync with the style buffer. At some point we may decide that we want /// FTextView to be editable (e.g., to insert comments about a QSO), in which /// case we'll keep the keybindings and add some code to changed_cb to update /// the style buffer. /// void FTextView::change_keybindings(void) { Fl_Text_Editor_mod::Key_Func fdelete[] = { Fl_Text_Editor_mod::kf_default, Fl_Text_Editor_mod::kf_enter, Fl_Text_Editor_mod::kf_delete, Fl_Text_Editor_mod::kf_cut, Fl_Text_Editor_mod::kf_paste }; int n = sizeof(fdelete) / sizeof(fdelete[0]); // walk the keybindings linked list and delete items containing elements // of fdelete loop: for (Fl_Text_Editor_mod::Key_Binding *k = key_bindings; k; k = k->next) { for (int i = 0; i < n; i++) { if (k->function == fdelete[i]) { remove_key_binding(k->key, k->state); goto loop; } } } } // ---------------------------------------------------------------------------- Fl_Menu_Item FTextEdit::menu[] = { { icons::make_icon_label(_("Cut"), edit_cut_icon), 0, 0, 0, 0, _FL_MULTI_LABEL }, { icons::make_icon_label(_("Copy"), edit_copy_icon), 0, 0, 0, 0, _FL_MULTI_LABEL }, { icons::make_icon_label(_("Paste"), edit_paste_icon), 0, 0, 0, 0, _FL_MULTI_LABEL }, { icons::make_icon_label(_("Clear"), edit_clear_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL }, { icons::make_icon_label(_("Insert file..."), file_open_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL }, { _("Word wrap"), 0, 0, 0, FL_MENU_TOGGLE, FL_NORMAL_LABEL } , { 0 } }; FTextEdit::FTextEdit(int x, int y, int w, int h, const char *l) : FTextBase(x, y, w, h, l) { tbuf->remove_modify_callback(buffer_modified_cb, this); tbuf->add_modify_callback(changed_cb, this); ascii_cnt = 0; ascii_chr = 0; context_menu = menu; init_context_menu(); dnd_paste = false; } /// Handles fltk events for this widget. /// We pass keyboard events to handle_key() and handle mouse3 presses to show /// the popup menu. We also disallow mouse2 events in the transmitted text area. /// Everything else is passed to the base class handle(). /// /// @param event /// /// @return /// int FTextEdit::handle(int event) { if ( !(Fl::event_inside(this) || (event == FL_KEYBOARD && Fl::focus() == this)) ) return FTextBase::handle(event); switch (event) { case FL_KEYBOARD: return handle_key(Fl::event_key()) ? 1 : FTextBase::handle(event); case FL_DND_RELEASE: dnd_paste = true; // fall through case FL_DND_ENTER: case FL_DND_LEAVE: return 1; case FL_DND_DRAG: return handle_dnd_drag(xy_to_position(Fl::event_x(), Fl::event_y(), CHARACTER_POS)); case FL_PASTE: { int r = dnd_paste ? handle_dnd_drop() : FTextBase::handle(event); dnd_paste = false; return r; } case FL_PUSH: { int eb = Fl::event_button(); if (eb == FL_RIGHT_MOUSE) { handle_context_menu(); return 1; } } default: break; } return FTextBase::handle(event); } /// Handles keyboard events to override Fl_Text_Editor_mod's handling of some /// keystrokes. /// /// @param key /// /// @return /// int FTextEdit::handle_key(int key) { // read ctl-ddd, where d is a digit, as ascii characters (in base 10) // and insert verbatim; e.g. ctl-001 inserts a if (key == FL_Control_L || key == FL_Control_R) return 0; bool t1 = isdigit(key); bool t2 = false; if (key >= FL_KP) t2 = isdigit(key - FL_KP + '0'); bool t3 = (Fl::event_state() & FL_CTRL) == FL_CTRL; if (t3 && (t1 || t2)) return handle_key_ascii(key); ascii_cnt = 0; // restart the numeric keypad entries. ascii_chr = 0; return Fl_Text_Editor_mod::handle(FL_KEYBOARD); // return 0; } /// Composes ascii characters and adds them to the FTextEdit buffer. /// Control characters are inserted with the CTRL style. Values larger than 127 /// (0x7f) are ignored. We cannot really add NULs for the time being. /// /// @param key A digit character /// /// @return 1 /// int FTextEdit::handle_key_ascii(int key) { if (key >= FL_KP) key -= FL_KP; key -= '0'; ascii_cnt++; for (int i = 0; i < 3 - ascii_cnt; i++) key *= 10; ascii_chr += key; if (ascii_cnt == 3) { if (ascii_chr < 0x100) //0x7F) add(ascii_chr, (iscntrl(ascii_chr) ? CTRL : RECV)); ascii_cnt = ascii_chr = 0; } return 1; } /// Handles FL_DND_DRAG events by scrolling and moving the cursor /// /// @return 1 int FTextEdit::handle_dnd_drag(int pos) { // Scroll if the pointer is being dragged inside the scrollbars, // otherwise obtain keyboard focus and set the insert position. if (mVScrollBar->visible() && Fl::event_inside(mVScrollBar)) mVScrollBar->handle(FL_DRAG); else if (mHScrollBar->visible() && Fl::event_inside(mHScrollBar)) mHScrollBar->handle(FL_DRAG); else { if (Fl::focus() != this) take_focus(); insert_position(pos); } return 1; } /// Handles FL_PASTE events by inserting text /// /// @return 1 or FTextBase::handle(FL_PASTE) int FTextEdit::handle_dnd_drop(void) { // paste verbatim if the shift key was held down during dnd if (Fl::event_shift()) return FTextBase::handle(FL_PASTE); std::string text; std::string::size_type p, len; text = Fl::event_text(); const char sep[] = "\n"; #if defined(__APPLE__) || defined(__WOE32__) text += sep; #endif len = text.length(); while ((p = text.find(sep)) != std::string::npos) { text[p] = '\0'; #if !defined(__APPLE__) && !defined(__WOE32__) if (text.find("file://") == 0) { text.erase(0, 7); p -= 7; len -= 7; } #endif // paste everything verbatim if we cannot read the first file if (readFile(text.c_str()) == -1 && len == text.length()) return FTextBase::handle(FL_PASTE); text.erase(0, p + sizeof(sep) - 1); } return 1; } /// Handles mouse-3 clicks by displaying the context menu /// /// @param val /// void FTextEdit::handle_context_menu(void) { bool selected = tbuf->selected(); icons::set_active(&menu[EDIT_MENU_CUT], selected); icons::set_active(&menu[EDIT_MENU_COPY], selected); icons::set_active(&menu[EDIT_MENU_CLEAR], tbuf->length()); if (wrap) menu[EDIT_MENU_WRAP].set(); else menu[EDIT_MENU_WRAP].clear(); show_context_menu(); } /// The context menu handler /// /// @param val /// void FTextEdit::menu_cb(size_t item) { switch (item) { case EDIT_MENU_CLEAR: clear(); break; case EDIT_MENU_CUT: kf_cut(0, this); break; case EDIT_MENU_COPY: kf_copy(0, this); break; case EDIT_MENU_PASTE: kf_paste(0, this); break; case EDIT_MENU_READ: readFile(); break; case EDIT_MENU_WRAP: set_word_wrap(!wrap); restore_wrap = wrap; break; } } /// This function is called by Fl_Text_Buffer when the buffer is modified, and /// also by nextChar when a character has been passed up the transmit path. In /// the first case either nins or ndel will be nonzero, and we change a /// corresponding amount of text in the style buffer. /// /// In the latter case, nins, ndel, pos and nsty are all zero and we update the /// style buffer to mark the last character in the buffer with the XMIT /// attribute. /// /// @param pos /// @param nins /// @param ndel /// @param nsty /// @param dtext /// @param arg /// void FTextEdit::changed_cb(int pos, int nins, int ndel, int nsty, const char *dtext, void *arg) { FTextEdit *e = reinterpret_cast(arg); if (nins == 0 && ndel == 0) { if (nsty == -1) { // called by nextChar to update transmitted text style char s[] = { FTEXT_DEF + XMIT, '\0' }; e->sbuf->replace(pos - 1, pos, s); e->redisplay_range(pos - 1, pos); } else if (nsty > 0) // restyled, e.g. selected, text return e->buffer_modified_cb(pos, nins, ndel, nsty, dtext, e); // No changes, e.g., a paste with an empty clipboard. return; } else if (nins > 0 && e->sbuf->length() < e->tbuf->length()) { // New text not inserted by our add() methods, i.e., via a file // read, mouse-2 paste or, most likely, direct keyboard entry. int n = e->tbuf->length() - e->sbuf->length(); if (n == 1) { char s[] = { FTEXT_DEF, '\0' }; e->sbuf->append(s); } else { char *s = new char [n + 1]; memset(s, FTEXT_DEF, n); s[n] = '\0'; e->sbuf->append(s); delete [] s; } } else if (ndel > 0) e->sbuf->remove(pos, pos + ndel); e->sbuf->select(pos, pos + nins - ndel); e->buffer_modified_cb(pos, nins, ndel, nsty, dtext, e); // We may need to scroll if the text was inserted by the // add() methods, e.g. by a macro if (e->mTopLineNum + e->mNVisibleLines - 1 <= e->mNBufferLines) e->show_insert_position(); } flamp-2.2.12/src/widgets/date.cxx0000664000175000017500000002640314507650001013521 00000000000000// ==================================================================== // // Date.cxx date class for Fast Light Took Kit // // Copyright (C) 1998 David Freese // Copyright (c) 2010 David Freese // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // Author: Dave Freese // Internet: dfreese@intrepid.net // // ==================================================================== #include #include #include #include #include #include "date.h" const int Date::mdays[] = { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; const int Date::jdays[2][13] = { { 0, 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 }, { 0, 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335 } }; const char *Date::month_name[] = { "January", "Febuary", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }; /** ******************************************************** * ***********************************************************/ void Date::today() { time_t t; struct tm *now; time( &t ); // now = localtime( &t ); now = gmtime(&t); year = now->tm_year + 1900; month = now->tm_mon + 1; day = now->tm_mday; } /** ******************************************************** * ***********************************************************/ Date::Date() { today(); fmt = 0; } /** ******************************************************** * ***********************************************************/ Date::Date( int m, int d, int y ) { setDate( m, d, y ); fmt = 1; } /** ******************************************************** * ***********************************************************/ void Date::setDate( int mm, int dd, int yy ) { if( isvalid( mm, dd, yy ) ) { year = yy; month = mm; day = dd; } else today(); } /** ******************************************************** * ***********************************************************/ void Date::setDate( Date &dt ) { year = dt.year; month = dt.month; day = dt.day; } /** ******************************************************** * ***********************************************************/ void Date::setFormat( int iFmt ) { fmt = iFmt; } /** ******************************************************** * ***********************************************************/ void Date::Year( int y ) { year = y; } /** ******************************************************** * ***********************************************************/ int Date::Year() { return year; } /** ******************************************************** * ***********************************************************/ void Date::Month( int m ) { month = m; } /** ******************************************************** * ***********************************************************/ int Date::Month() { return month; } /** ******************************************************** * ***********************************************************/ void Date::Day( int d ) { day = d; } /** ******************************************************** * ***********************************************************/ int Date::Day() { return day; } /** ******************************************************** * ***********************************************************/ bool Date::leapYear( int y ) { if( y % 400 == 0 || ( y % 100 != 0 && y % 4 == 0 ) ) return true; return false; } /** ******************************************************** * ***********************************************************/ bool Date::isvalid( int m, int d, int y ) { if( y > 2035 ) return false; if( m < 1 || m > 12 ) return false; if( d < 1 ) return false; if( leapYear( y ) ){ if( m == 2 && d > 29 ) return false; else return true; } if( d > mdays[m] ) return false; return true; } /** ******************************************************** * ***********************************************************/ int Date::daysinmonth (int month, int leap) { /* Validate the month. */ if (month < JANUARY || month > DECEMBER) return -1; /* Return 28, 29, 30, or 31 based on month/leap. */ switch (month) { case FEBRUARY: return leap ? 29 : 28; default: return mdays[month]; } } /** ******************************************************** * ***********************************************************/ int Date::dayofyear (int year, int mon, int mday) { /* Return day of year. */ return mday + jdays[isleapyear (year) ? 1 : 0][mon]; } /** ******************************************************** * ***********************************************************/ int Date::dayofepoch (int year, int mon, int mday) { int doe; int era, cent, quad, rest; /* break down the year into 400, 100, 4, and 1 year multiples */ rest = year - 1; quad = rest / 4; rest %= 4; cent = quad / 25; quad %= 25; era = cent / 4; cent %= 4; /* set up doe */ doe = dayofyear (year, mon, mday); doe += era * (400 * 365 + 97); doe += cent * (100 * 365 + 24); doe += quad * (4 * 365 + 1); doe += rest * 365; return doe; } /** ******************************************************** * ***********************************************************/ int Date::dayofweek (int year, int mon, int mday) { return dayofepoch (year, mon, mday) % 7; } /** ******************************************************** * ***********************************************************/ void Date::previous_month () { if (month == 1) { month = 12; year--; } else month--; while ((day >= 1) && (!datevalid ())) day--; } /** ******************************************************** * ***********************************************************/ void Date::next_month () { if (month == 12) { month = 1; year++; } else month++; while ((day >= 1) && (!datevalid ())) day--; } /** ******************************************************** * ***********************************************************/ void Date::previous_year () { if (month == 2 && day == 29) day = 28; year--; } /** ******************************************************** * ***********************************************************/ void Date::next_year () { if (month == 2 && day == 29) day = 28; year++; } /** ******************************************************** * ***********************************************************/ char *Date::szDate (int fmt) { static char temp[20]; char szMonth[10]; switch (fmt) { case 1 : snprintf (temp, sizeof(temp), "%02d/%02d/%02d", month, day, year > 1999 ? year - 2000 : year - 1900); break; case 2 : snprintf (temp, sizeof(temp), "%4d-%02d-%02d", year, month, day); break; case 3 : snprintf (temp, sizeof(temp), "%s %2d, %4d", month_name[month - 1], day, year); break; case 4 : strcpy (szMonth, month_name [month - 1]); szMonth[3] = 0; snprintf (temp, sizeof(temp), "%s %2d, %4d", szMonth, day, year); break; case 5 : strcpy (szMonth, month_name [month - 1]); szMonth[3] = 0; for (int i = 0; i < 3; i++) szMonth[i] = toupper(szMonth[i]); snprintf (temp, sizeof(temp), "%s %d", szMonth, day); break; case 0 : default : snprintf (temp, sizeof(temp), "%02d/%02d/%04d", month, day, year); break; } return temp; } /** ******************************************************** * ***********************************************************/ char *Date::szDate () { return szDate (fmt); } // operator functions /** ******************************************************** * ***********************************************************/ std::ostream &operator<<( std::ostream &output, Date &d ) { output << d.szDate (); return output; } /** ******************************************************** * ***********************************************************/ bool Date::endOfMonth( int d ) { if( month == 2 && leapYear( year ) ) return (d == 29 ); // last day of Feb in leap year else return (d == mdays[ month ] ); } /** ******************************************************** * ***********************************************************/ void Date::helpIncrement() { if( endOfMonth( day ) && month == 12 ) { // end year day = 1; month = 1; ++year; } else if ( endOfMonth( day ) ) { day = 1; ++month; } else ++day; } /** ******************************************************** * ***********************************************************/ Date &Date::operator++() { helpIncrement(); return *this; // reference return to create an lvalue } /** ******************************************************** * ***********************************************************/ Date Date::operator++( int ) { Date temp = *this; helpIncrement(); return temp; // return non-increment, saved temporary object } /** ******************************************************** * ***********************************************************/ const Date &Date::operator+=( int ndays ) { for( int i = 0; i < ndays; i++ ) helpIncrement(); return *this; // enables cascading } /** ******************************************************** * ***********************************************************/ bool Date::operator==( const Date &d ) { if( this->year != d.year ) return false; if( this->month != d.month ) return false; if( this->day != d.day ) return false; return true; } /** ******************************************************** * ***********************************************************/ bool Date::operator!=( const Date &d ) { return ( !( *this == d ) ); } /** ******************************************************** * ***********************************************************/ bool Date::operator<( const Date &d ) { if( this->year < d.year ) return true; if( this->year > d.year ) return false; if( this->month < d.month ) return true; if( this->month > d.month ) return false; if( this->day < d.day ) return true; return false; } /** ******************************************************** * ***********************************************************/ bool Date::operator>( const Date &d ) { if( *this < d ) return false; if( *this == d ) return false; return true; } /** ******************************************************** * ***********************************************************/ void Date::operator=( const Date &d ) { this->year = d.year; this->month = d.month; this->day = d.day; } /** ******************************************************** * ***********************************************************/ double Date::dJulian () { int DaysInYear = 365; if (leapYear ()) DaysInYear++; return ( year + 1.0 * (dayofyear (year, month, day) - 1) / DaysInYear); } flamp-2.2.12/src/widgets/Fl_Text_Editor_mod.cxx0000644000175000017500000005510314463050062016315 00000000000000// // "$Id: Fl_Text_Editor_mod.cxx 8034 2010-12-15 12:21:55Z AlbrechtS $" // // Copyright 2001-2010 by Bill Spitzak and others. // Original code Copyright Mark Edel. Permission to distribute under // the LGPL for the FLTK library granted by Mark Edel. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public // License as published by the Free Software Foundation; either // version 2 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Library General Public License for more details. // // You should have received a copy of the GNU Library General Public // License along with this library; if not, write to the // // Free Software Foundation, Inc. // 51 Franklin Street, Fifth Floor // Boston, MA 02110-1301 USA. // // Please report all bugs and problems on the following page: // // http://www.fltk.org/str.php // #include #include #include "missing_strings.h" #include #include #include #include #include "Fl_Text_Editor_mod.H" #include #include "debug.h" #if FLAMP_FLTK_API_MAJOR == 1 && FLAMP_FLTK_API_MINOR < 3 # error "FLTK versions less then 1.3 are no longer supported" #endif /* Keyboard Control Matrix key\modifier plain Ctrl Alt Meta --------------------------------------- left 1/1 13/9 0/13 0/9 right 2/2 14/10 0/14 0/10 up 3/19 21/7 0/15 0/17 down 4/20 22/8 0/16 0/18 home 9/5 17/0 0/0 0/0 end 10/6 18/0 0/0 0/0 page up 11/7 23/0 0/11 0/0 page down 12/8 24/0 0/12 0/0 (FLTK action / OS X action) (adding the shift key extends the selection, all other combinations are no-op) 0: no-op 1: move cursor to the left, at line beginning wrap to end of prev line, at doc start no-op 2: move cursor to the right, at line end move to beginning of the next line, at doc end no-op 3: move cursor up, at doc top no-op 4: move cursor down, at doc bottom no-op 5: scroll display to top of text (cursor unchanged) 6: scroll display to end of text (cursor unchanged) 7: scroll text down one page (cursor unchanged) 8: scroll text up one page (cursor unchanged) 9: move cursor to beginning of line 10: move cursor to end of line 11: move cursor up one page and scroll down 12: move cursor down one page and scroll up 13: move to the beginning of the word or the previous word 14: move to the end of the word or the next word 15: if start of line: start of prev line, else start of this line 16: if end of line: end of next line, else end of this line 17: move cursor to the beginning of the document 18: move cursor to the end of the document 19: move cursor up, at doc top: home, at doc start: no-op) 20: move cursor down, at doc bot: end, at doc end: no-op) 21: scroll text down one line (cursor unchanged) 22: scroll text up one line (cursor unchanged) 23: move cursor to the beginning of the top of the screen 24: move cursor to the beginning of the bottom of the window */ /** The constructor creates a new text editor widget.*/ Fl_Text_Editor_mod::Fl_Text_Editor_mod(int X, int Y, int W, int H, const char* l) : Fl_Text_Display_mod(X, Y, W, H, l) { mCursorOn = 1; insert_mode_ = 1; key_bindings = 0; // handle the default key bindings add_default_key_bindings(&key_bindings); // handle everything else default_key_function(kf_default); } #ifndef FL_DOXYGEN Fl_Text_Editor_mod::Key_Binding* Fl_Text_Editor_mod::global_key_bindings = 0; #endif // These are the default key bindings every widget should start with static struct { int key; int state; Fl_Text_Editor_mod::Key_Func func; } default_key_bindings[] = { { FL_Escape, Fl_Text_Editor_mod_ANY_STATE, Fl_Text_Editor_mod::kf_ignore }, { FL_Enter, Fl_Text_Editor_mod_ANY_STATE, Fl_Text_Editor_mod::kf_enter }, { FL_KP_Enter, Fl_Text_Editor_mod_ANY_STATE, Fl_Text_Editor_mod::kf_enter }, { FL_BackSpace, Fl_Text_Editor_mod_ANY_STATE, Fl_Text_Editor_mod::kf_backspace }, { FL_Insert, Fl_Text_Editor_mod_ANY_STATE, Fl_Text_Editor_mod::kf_insert }, { FL_Delete, Fl_Text_Editor_mod_ANY_STATE, Fl_Text_Editor_mod::kf_delete }, { FL_Home, 0, Fl_Text_Editor_mod::kf_move }, { FL_End, 0, Fl_Text_Editor_mod::kf_move }, { FL_Left, 0, Fl_Text_Editor_mod::kf_move }, { FL_Up, 0, Fl_Text_Editor_mod::kf_move }, { FL_Right, 0, Fl_Text_Editor_mod::kf_move }, { FL_Down, 0, Fl_Text_Editor_mod::kf_move }, { FL_Page_Up, 0, Fl_Text_Editor_mod::kf_move }, { FL_Page_Down, 0, Fl_Text_Editor_mod::kf_move }, { FL_Home, FL_SHIFT, Fl_Text_Editor_mod::kf_shift_move }, { FL_End, FL_SHIFT, Fl_Text_Editor_mod::kf_shift_move }, { FL_Left, FL_SHIFT, Fl_Text_Editor_mod::kf_shift_move }, { FL_Up, FL_SHIFT, Fl_Text_Editor_mod::kf_shift_move }, { FL_Right, FL_SHIFT, Fl_Text_Editor_mod::kf_shift_move }, { FL_Down, FL_SHIFT, Fl_Text_Editor_mod::kf_shift_move }, { FL_Page_Up, FL_SHIFT, Fl_Text_Editor_mod::kf_shift_move }, { FL_Page_Down, FL_SHIFT, Fl_Text_Editor_mod::kf_shift_move }, { FL_Home, FL_CTRL, Fl_Text_Editor_mod::kf_ctrl_move }, { FL_End, FL_CTRL, Fl_Text_Editor_mod::kf_ctrl_move }, { FL_Left, FL_CTRL, Fl_Text_Editor_mod::kf_ctrl_move }, { FL_Up, FL_CTRL, Fl_Text_Editor_mod::kf_ctrl_move }, { FL_Right, FL_CTRL, Fl_Text_Editor_mod::kf_ctrl_move }, { FL_Down, FL_CTRL, Fl_Text_Editor_mod::kf_ctrl_move }, { FL_Page_Up, FL_CTRL, Fl_Text_Editor_mod::kf_ctrl_move }, { FL_Page_Down, FL_CTRL, Fl_Text_Editor_mod::kf_ctrl_move }, { FL_Home, FL_CTRL|FL_SHIFT, Fl_Text_Editor_mod::kf_c_s_move }, { FL_End, FL_CTRL|FL_SHIFT, Fl_Text_Editor_mod::kf_c_s_move }, { FL_Left, FL_CTRL|FL_SHIFT, Fl_Text_Editor_mod::kf_c_s_move }, { FL_Up, FL_CTRL|FL_SHIFT, Fl_Text_Editor_mod::kf_c_s_move }, { FL_Right, FL_CTRL|FL_SHIFT, Fl_Text_Editor_mod::kf_c_s_move }, { FL_Down, FL_CTRL|FL_SHIFT, Fl_Text_Editor_mod::kf_c_s_move }, { FL_Page_Up, FL_CTRL|FL_SHIFT, Fl_Text_Editor_mod::kf_c_s_move }, { FL_Page_Down, FL_CTRL|FL_SHIFT, Fl_Text_Editor_mod::kf_c_s_move }, //{ FL_Clear, 0, Fl_Text_Editor_mod::delete_to_eol }, { 'z', FL_CTRL, Fl_Text_Editor_mod::kf_undo }, { '/', FL_CTRL, Fl_Text_Editor_mod::kf_undo }, { FL_Home, FL_SHIFT, Fl_Text_Editor_mod::kf_undo }, { 'x', FL_CTRL, Fl_Text_Editor_mod::kf_cut }, { FL_Delete, FL_SHIFT, Fl_Text_Editor_mod::kf_cut }, { 'c', FL_CTRL, Fl_Text_Editor_mod::kf_copy }, { FL_Insert, FL_CTRL, Fl_Text_Editor_mod::kf_copy }, { 'v', FL_CTRL, Fl_Text_Editor_mod::kf_paste }, { FL_Insert, FL_SHIFT, Fl_Text_Editor_mod::kf_paste }, { 'a', FL_CTRL, Fl_Text_Editor_mod::kf_select_all }, #ifdef __APPLE__ // Define CMD+key accelerators... { 'z', FL_COMMAND, Fl_Text_Editor_mod::kf_undo }, { 'x', FL_COMMAND, Fl_Text_Editor_mod::kf_cut }, { 'c', FL_COMMAND, Fl_Text_Editor_mod::kf_copy }, { 'v', FL_COMMAND, Fl_Text_Editor_mod::kf_paste }, { 'a', FL_COMMAND, Fl_Text_Editor_mod::kf_select_all }, { FL_Left, FL_COMMAND, Fl_Text_Editor_mod::kf_meta_move }, { FL_Right, FL_COMMAND, Fl_Text_Editor_mod::kf_meta_move }, { FL_Up, FL_COMMAND, Fl_Text_Editor_mod::kf_meta_move }, { FL_Down, FL_COMMAND, Fl_Text_Editor_mod::kf_meta_move }, { FL_Left, FL_COMMAND|FL_SHIFT, Fl_Text_Editor_mod::kf_m_s_move }, { FL_Right, FL_COMMAND|FL_SHIFT, Fl_Text_Editor_mod::kf_m_s_move }, { FL_Up, FL_COMMAND|FL_SHIFT, Fl_Text_Editor_mod::kf_m_s_move }, { FL_Down, FL_COMMAND|FL_SHIFT, Fl_Text_Editor_mod::kf_m_s_move }, #endif // __APPLE__ { 0, 0, 0 } }; /** Adds all of the default editor key bindings to the specified key binding list.*/ void Fl_Text_Editor_mod::add_default_key_bindings(Key_Binding** list) { for (int i = 0; default_key_bindings[i].key; i++) { add_key_binding(default_key_bindings[i].key, default_key_bindings[i].state, default_key_bindings[i].func, list); } } /** Returns the function associated with a key binding.*/ Fl_Text_Editor_mod::Key_Func Fl_Text_Editor_mod::bound_key_function(int key, int state, Key_Binding* list) { Key_Binding* cur; if (!list) return 0; for (cur = list; cur; cur = cur->next) if (cur->key == key) if (cur->state == Fl_Text_Editor_mod_ANY_STATE || cur->state == state) break; if (!cur) return 0; return cur->function; } /** Removes all of the key bindings associated with the text editor or list.*/ void Fl_Text_Editor_mod::remove_all_key_bindings(Key_Binding** list) { Key_Binding *cur, *next; for (cur = *list; cur; cur = next) { next = cur->next; delete cur; } *list = 0; } /** Removes the key binding associated with the key "key" of state "state" */ void Fl_Text_Editor_mod::remove_key_binding(int key, int state, Key_Binding** list) { Key_Binding *cur, *last = 0; for (cur = *list; cur; last = cur, cur = cur->next) if (cur->key == key && cur->state == state) break; if (!cur) return; if (last) last->next = cur->next; else *list = cur->next; delete cur; } /** Adds a key of state "state" with the function "function" */ void Fl_Text_Editor_mod::add_key_binding(int key, int state, Key_Func function, Key_Binding** list) { Key_Binding* kb = new Key_Binding; kb->key = key; kb->state = state; kb->function = function; kb->next = *list; *list = kb; } //////////////////////////////////////////////////////////////// static void kill_selection(Fl_Text_Editor_mod* e) { if (e->buffer()->selected()) { e->insert_position(e->buffer()->primary_selection()->start()); e->buffer()->remove_selection(); } } /** Inserts the text associated with the key */ int Fl_Text_Editor_mod::kf_default(int c, Fl_Text_Editor_mod* e) { // FIXME: this function is a mess! Fix this! if (!c || (!isprint(c) && c != '\t')) return 0; char s[2] = "\0"; s[0] = (char)c; kill_selection(e); if (e->insert_mode()) e->insert(s); else e->overstrike(s); e->show_insert_position(); e->set_changed(); if (e->when()&FL_WHEN_CHANGED) e->do_callback(); return 1; } /** Ignores the keypress */ int Fl_Text_Editor_mod::kf_ignore(int, Fl_Text_Editor_mod*) { return 0; // don't handle } /** Does a backspace in the current buffer.*/ int Fl_Text_Editor_mod::kf_backspace(int, Fl_Text_Editor_mod* e) { if (!e->buffer()->selected() && e->move_left()) { int p1 = e->insert_position(); int p2 = e->buffer()->next_char(p1); e->buffer()->select(p1, p2); } kill_selection(e); e->show_insert_position(); e->set_changed(); if (e->when()&FL_WHEN_CHANGED) e->do_callback(); return 1; } /** Inserts a newline at the current cursor position */ int Fl_Text_Editor_mod::kf_enter(int, Fl_Text_Editor_mod* e) { kill_selection(e); e->insert("\n"); e->show_insert_position(); e->set_changed(); if (e->when()&FL_WHEN_CHANGED) e->do_callback(); return 1; } extern void fl_text_drag_me(int pos, Fl_Text_Display_mod* d); /** Moves the text cursor in the direction indicated by key c.*/ int Fl_Text_Editor_mod::kf_move(int c, Fl_Text_Editor_mod* e) { int i; int selected = e->buffer()->selected(); if (!selected) e->dragPos = e->insert_position(); e->buffer()->unselect(); Fl::copy("", 0, 0); switch (c) { case FL_Home: e->insert_position(e->buffer()->line_start(e->insert_position())); break; case FL_End: e->insert_position(e->buffer()->line_end(e->insert_position())); break; case FL_Left: e->move_left(); break; case FL_Right: e->move_right(); break; case FL_Up: e->move_up(); break; case FL_Down: e->move_down(); break; case FL_Page_Up: for (i = 0; i < e->mNVisibleLines - 1; i++) e->move_up(); break; case FL_Page_Down: for (i = 0; i < e->mNVisibleLines - 1; i++) e->move_down(); break; } e->show_insert_position(); return 1; } /** Extends the current selection in the direction of key c.*/ int Fl_Text_Editor_mod::kf_shift_move(int c, Fl_Text_Editor_mod* e) { kf_move(c, e); fl_text_drag_me(e->insert_position(), e); char *copy = e->buffer()->selection_text(); if (copy) { Fl::copy(copy, strlen(copy), 0); free(copy); } return 1; } /** Moves the current text cursor in the direction indicated by control key */ int Fl_Text_Editor_mod::kf_ctrl_move(int c, Fl_Text_Editor_mod* e) { if (!e->buffer()->selected()) e->dragPos = e->insert_position(); if (c != FL_Up && c != FL_Down) { e->buffer()->unselect(); Fl::copy("", 0, 0); e->show_insert_position(); } switch (c) { case FL_Home: e->insert_position(0); e->scroll(0, 0); break; case FL_End: e->insert_position(e->buffer()->length()); e->scroll(e->count_lines(0, e->buffer()->length(), 1), 0); break; case FL_Left: e->previous_word(); break; case FL_Right: e->next_word(); break; case FL_Up: e->scroll(e->mTopLineNum-1, e->mHorizOffset); break; case FL_Down: e->scroll(e->mTopLineNum+1, e->mHorizOffset); break; case FL_Page_Up: e->insert_position(e->mLineStarts[0]); break; case FL_Page_Down: e->insert_position(e->mLineStarts[e->mNVisibleLines-2]); break; } return 1; } /** Moves the current text cursor in the direction indicated by meta key */ int Fl_Text_Editor_mod::kf_meta_move(int c, Fl_Text_Editor_mod* e) { if (!e->buffer()->selected()) e->dragPos = e->insert_position(); if (c != FL_Up && c != FL_Down) { e->buffer()->unselect(); Fl::copy("", 0, 0); e->show_insert_position(); } switch (c) { case FL_Up: // top of buffer e->insert_position(0); e->scroll(0, 0); break; case FL_Down: // end of buffer e->insert_position(e->buffer()->length()); e->scroll(e->count_lines(0, e->buffer()->length(), 1), 0); break; case FL_Left: // beginning of line kf_move(FL_Home, e); break; case FL_Right: // end of line kf_move(FL_End, e); break; } return 1; } /** Extends the current selection in the direction indicated by meta key c. */ int Fl_Text_Editor_mod::kf_m_s_move(int c, Fl_Text_Editor_mod* e) { kf_meta_move(c, e); fl_text_drag_me(e->insert_position(), e); return 1; } /** Extends the current selection in the direction indicated by control key c. */ int Fl_Text_Editor_mod::kf_c_s_move(int c, Fl_Text_Editor_mod* e) { kf_ctrl_move(c, e); fl_text_drag_me(e->insert_position(), e); return 1; } /** Moves the text cursor to the beginning of the current line.*/ int Fl_Text_Editor_mod::kf_home(int, Fl_Text_Editor_mod* e) { return kf_move(FL_Home, e); } /** Moves the text cursor to the end of the current line.*/ int Fl_Text_Editor_mod::kf_end(int, Fl_Text_Editor_mod* e) { return kf_move(FL_End, e); } /** Moves the text cursor one character to the left.*/ int Fl_Text_Editor_mod::kf_left(int, Fl_Text_Editor_mod* e) { return kf_move(FL_Left, e); } /** Moves the text cursor one line up.*/ int Fl_Text_Editor_mod::kf_up(int, Fl_Text_Editor_mod* e) { return kf_move(FL_Up, e); } /** Moves the text cursor one character to the right.*/ int Fl_Text_Editor_mod::kf_right(int, Fl_Text_Editor_mod* e) { return kf_move(FL_Right, e); } /** Moves the text cursor one line down.*/ int Fl_Text_Editor_mod::kf_down(int, Fl_Text_Editor_mod* e) { return kf_move(FL_Down, e); } /** Moves the text cursor up one page.*/ int Fl_Text_Editor_mod::kf_page_up(int, Fl_Text_Editor_mod* e) { return kf_move(FL_Page_Up, e); } /** Moves the text cursor down one page.*/ int Fl_Text_Editor_mod::kf_page_down(int, Fl_Text_Editor_mod* e) { return kf_move(FL_Page_Down, e); } /** Toggles the insert mode in the text editor.*/ int Fl_Text_Editor_mod::kf_insert(int, Fl_Text_Editor_mod* e) { e->insert_mode(e->insert_mode() ? 0 : 1); return 1; } /** Does a delete of selected text or the current character in the current buffer.*/ int Fl_Text_Editor_mod::kf_delete(int, Fl_Text_Editor_mod* e) { if (!e->buffer()->selected()) { int p1 = e->insert_position(); int p2 = e->buffer()->next_char(p1); e->buffer()->select(p1, p2); } kill_selection(e); e->show_insert_position(); e->set_changed(); if (e->when()&FL_WHEN_CHANGED) e->do_callback(); return 1; } /** Does a copy of selected text or the current character in the current buffer.*/ int Fl_Text_Editor_mod::kf_copy(int, Fl_Text_Editor_mod* e) { if (!e->buffer()->selected()) return 1; const char *copy = e->buffer()->selection_text(); if (*copy) Fl::copy(copy, strlen(copy), 1); free((void*)copy); e->show_insert_position(); return 1; } /** Does a cut of selected text in the current buffer.*/ int Fl_Text_Editor_mod::kf_cut(int c, Fl_Text_Editor_mod* e) { kf_copy(c, e); kill_selection(e); e->set_changed(); if (e->when()&FL_WHEN_CHANGED) e->do_callback(); return 1; } /** Does a paste of selected text in the current buffer.*/ int Fl_Text_Editor_mod::kf_paste(int, Fl_Text_Editor_mod* e) { kill_selection(e); Fl::paste(*e, 1); e->show_insert_position(); e->set_changed(); if (e->when()&FL_WHEN_CHANGED) e->do_callback(); return 1; } /** Selects all text in the current buffer.*/ int Fl_Text_Editor_mod::kf_select_all(int, Fl_Text_Editor_mod* e) { e->buffer()->select(0, e->buffer()->length()); const char *copy = e->buffer()->selection_text(); if (*copy) Fl::copy(copy, strlen(copy), 0); free((void*)copy); return 1; } /** Undo last edit in the current buffer. Also deselect previous selection. */ int Fl_Text_Editor_mod::kf_undo(int , Fl_Text_Editor_mod* e) { e->buffer()->unselect(); Fl::copy("", 0, 0); int crsr; int ret = e->buffer()->undo(&crsr); e->insert_position(crsr); e->show_insert_position(); e->set_changed(); if (e->when()&FL_WHEN_CHANGED) e->do_callback(); return ret; } /** Handles a key press in the editor */ int Fl_Text_Editor_mod::handle_key() { // Call FLTK's rules to try to turn this into a printing character. // This uses the right-hand ctrl key as a "compose prefix" and returns // the changes that should be made to the text, as a number of // bytes to delete and a string to insert: int del = 0; int key = Fl::event_key(), state = Fl::event_state();//, c = Fl::event_text()[0]; if (key == FL_Caps_Lock) return 0; if (Fl::compose(del)) { if (del) { int dp = insert_position(), di = del; while (di--) dp = buffer()->prev_char_clipped(dp); buffer()->select(dp, insert_position()); } kill_selection(this); if (Fl::event_length()) { if (insert_mode()) insert(Fl::event_text()); else overstrike(Fl::event_text()); } show_insert_position(); set_changed(); if (when()&FL_WHEN_CHANGED) do_callback(); return 1; } state &= FL_SHIFT|FL_CTRL|FL_ALT|FL_META; // only care about these states Key_Func f; f = bound_key_function(key, state, global_key_bindings); if (!f && key_bindings) f = bound_key_function(key, state, key_bindings); if (f) return f(key, this); if (default_key_function_ && !state) return default_key_function_(key, this); return 0; } /** does or does not a callback according to changed() and when() settings */ void Fl_Text_Editor_mod::maybe_do_callback() { if (changed() || (when()&FL_WHEN_NOT_CHANGED)) do_callback(); } int Fl_Text_Editor_mod::handle(int event) { static int dndCursorPos; if (!buffer()) return 0; switch (event) { case FL_FOCUS: show_cursor(mCursorOn); // redraws the cursor if (buffer()->selected()) redraw(); // Redraw selections... Fl::focus(this); return 1; case FL_UNFOCUS: show_cursor(mCursorOn); // redraws the cursor if (buffer()->selected()) redraw(); // Redraw selections... case FL_HIDE: if (when() & FL_WHEN_RELEASE) maybe_do_callback(); return 1; case FL_KEYBOARD: if (active_r() && window() && this == Fl::belowmouse()) window()->cursor(FL_CURSOR_NONE); return handle_key(); case FL_PASTE: if (!Fl::event_text()) { fl_beep(); return 1; } buffer()->remove_selection(); if (insert_mode()) insert(Fl::event_text()); else overstrike(Fl::event_text()); show_insert_position(); set_changed(); if (when()&FL_WHEN_CHANGED) do_callback(); return 1; case FL_ENTER: // MRS: WIN32 only? Need to test! // case FL_MOVE: show_cursor(mCursorOn); return 1; case FL_PUSH: if (Fl::event_button() == 2) { // don't let the text_display see this event if (Fl_Group::handle(event)) return 1; dragType = DRAG_NONE; if(buffer()->selected()) { buffer()->unselect(); } int pos = xy_to_position(Fl::event_x(), Fl::event_y(), CURSOR_POS); insert_position(pos); Fl::paste(*this, 0); Fl::focus(this); set_changed(); if (when()&FL_WHEN_CHANGED) do_callback(); return 1; } break; case FL_SHORTCUT: if (!(shortcut() ? Fl::test_shortcut(shortcut()) : test_shortcut())) return 0; if (Fl::visible_focus() && handle(FL_FOCUS)) { Fl::focus(this); return 1; } break; // Handle drag'n'drop attempt by the user. This is a simplified // implementation which allows dnd operations onto the scroll bars. case FL_DND_ENTER: // save the current cursor position if (Fl::visible_focus() && handle(FL_FOCUS)) Fl::focus(this); show_cursor(mCursorOn); dndCursorPos = insert_position(); /* fall through */ case FL_DND_DRAG: // show a temporary insertion cursor insert_position(xy_to_position(Fl::event_x(), Fl::event_y(), CURSOR_POS)); return 1; case FL_DND_LEAVE: // restore original cursor insert_position(dndCursorPos); return 1; case FL_DND_RELEASE: // keep insertion cursor and wait for the FL_PASTE event buffer()->unselect(); // FL_PASTE must not destroy current selection! return 1; } return Fl_Text_Display_mod::handle(event); } // // End of "$Id: Fl_Text_Editor_mod.cxx 8034 2010-12-15 12:21:55Z AlbrechtS $". // flamp-2.2.12/src/widgets/flnfc_common.cxx0000644000175000017500000000455014463050061015242 00000000000000// // flnfc_common.cxx -- common string subs for Fl_Native_File_Chooser // // Copyright 2004 by Greg Ercolano. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public // License as published by the Free Software Foundation; either // version 2 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Library General Public License for more details. // // You should have received a copy of the GNU Library General Public // License along with this library; if not, write to the // // Free Software Foundation, Inc. // 51 Franklin Street, Fifth Floor // Boston, MA 02110-1301 USA. // // Please keep code 80 column compliant. // // 10 20 30 40 50 60 70 // | | | | | | | // 4567890123456789012345678901234567890123456789012345678901234567890123456789 // #include // COPY A STRING WITH 'new' // Value can be NULL // static char *strnew(const char *val) { if ( val == NULL ) return(NULL); char *s = new char[strlen(val)+1]; strcpy(s, val); return(s); } // FREE STRING CREATED WITH strnew(), NULLS OUT STRING // Value can be NULL // static char *strfree(char *val) { if ( val ) delete [] val; return(NULL); } #ifndef __WOE32__ // 'DYNAMICALLY' APPEND ONE STRING TO ANOTHER // Returns newly allocated string, or NULL // if s && val == NULL. // 's' can be NULL; returns a strnew(val). // 'val' can be NULL; s is returned unmodified. // // Usage: // char *s = strnew("foo"); // s = "foo" // s = strapp(s, "bar"); // s = "foobar" // static char *strapp(char *s, const char *val) { if ( ! val ) { return(s); // Nothing to append? return s } if ( ! s ) { return(strnew(val)); // New string? return copy of val } char *news = new char[strlen(s)+strlen(val)+1]; strcpy(news, s); strcat(news, val); delete [] s; // delete old string return(news); // return new copy } #endif // APPEND A CHARACTER TO A STRING // This does NOT allocate space for the new character. // static void chrcat(char *s, char c) { char tmp[2] = { c, '\0' }; strcat(s, tmp); } flamp-2.2.12/src/widgets/Fl_BlockMap.cxx0000644000175000017500000000524314463050062014714 00000000000000// ===================================================================== // Mapped values to x coordinate viewer // // Copyright 2012 - Dave Freese, // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // Contents: // // Fl_BlockMap::draw() - Draw the block mapping widget // Fl_BlockMap::Fl_BlockMap() - Construct a Fl_BlockMap widget // //====================================================================== #include #include #include #include "Fl_BlockMap.h" /** ******************************************************** * ***********************************************************/ void Fl_BlockMap::draw() { int tx = x(); int tw = w(); int ty = y(); int th = h(); // draw an empty widget fl_push_clip(x(), y(), w(), h()); draw_box(box(), tx, ty, tw, th, color()); if (blocks.empty() || nblocks_ == 0) { fl_pop_clip(); return; } std::string working = blocks; int blknbr = 0; int x1 = 0; int x2 = 0; float delta = 1.0 * tw / nblocks_; size_t p = std::string::npos; while(!working.empty()) { blknbr = atoi(working.c_str()); p = working.find(" "); if (p != std::string::npos) working.erase(0,p+1); else working.clear(); x1 = (int) ((blknbr - 1) * delta + 0.5); x2 = (int) (blknbr * delta + 0.5); draw_box(box(), tx + x1, ty, x2-x1, th, selection_color()); } fl_pop_clip(); } /** ******************************************************** The constructor creates the progress bar using the position, size, and label. You can set the background color with color() and the mapping color with selection_color(), or you can set both colors together with color(unsigned bg, unsigned sel). The default colors are FL_LIGHT3 and FL_DARK_BLUE, resp. ***********************************************************/ Fl_BlockMap::Fl_BlockMap(int X, int Y, int W, int H, const char* L) : Fl_Widget(X, Y, W, H, L) { align(FL_ALIGN_LEFT); box(FL_DOWN_BOX); color(FL_LIGHT2, FL_DARK_BLUE); nblocks_ = 0; blocks.clear(); } // // End of "$Id: Fl_BlockMap.cxx 7903 2010-11-28 21:06:39Z matt $". // flamp-2.2.12/src/widgets/fileselect.cxx0000664000175000017500000002465314517740617014746 00000000000000// ---------------------------------------------------------------------------- // // fileselect.cxx -- file selector front end // // Copyright (C) 2008-2009 // Stelios Bounanos, M0GLD // Dave Freese, 2015 // // This file is part of FLAMP. // // Fldigi is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Fldigi is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with flamp. If not, see . // ---------------------------------------------------------------------------- #include #include #include #include #include #include #include #include "config.h" #include "fileselect.h" #include "debug.h" /** \class Fl_Native_File_Chooser This class lets an FLTK application easily and consistently access the operating system's native file chooser. Some operating systems have very complex and specific file choosers that many users want access to specifically, instead of FLTK's default file chooser(s). In cases where there is no native file browser, FLTK's own file browser is used instead. To use this widget correctly, use the following include in your code: \code #include \endcode Do not include the other Fl_Native_File_Choser_XXX.H files in your code; those are platform specific files that will be included automatically depending on your build platform. The following example shows how to pick a single file: \code // Create and post the local native file chooser #include [..] Fl_Native_File_Chooser fnfc; fnfc.title("Pick a file"); fnfc.type(Fl_Native_File_Chooser::BROWSE_FILE); fnfc.filter("Text\t*.txt\n" "C Files\t*.{cxx,h,c}"); fnfc.directory("/var/tmp"); // default directory to use // Show native chooser switch ( fnfc.show() ) { case -1: printf("ERROR: %s\n", fnfc.errmsg()); break; // ERROR case 1: printf("CANCEL\n"); break; // CANCEL default: printf("PICKED: %s\n", fnfc.filename()); break; // FILE CHOSEN } \endcode Platform Specific Caveats - Under X windows, it's best if you call Fl_File_Icon::load_system_icons() at the start of main(), to enable the nicer looking file browser widgets. Use the static public attributes of class Fl_File_Chooser to localize the browser. - Some operating systems support certain OS specific options; see Fl_Native_File_Chooser::options() for a list. \image html Fl_Native_File_Chooser.png "The Fl_Native_File_Chooser on different platforms." \image latex Fl_Native_File_Chooser.png "The Fl_Native_File_Chooser on different platforms" width=14cm enum Type { BROWSE_FILE = 0, ///< browse files (lets user choose one file) BROWSE_DIRECTORY, ///< browse directories (lets user choose one directory) BROWSE_MULTI_FILE, ///< browse files (lets user choose multiple files) BROWSE_MULTI_DIRECTORY, ///< browse directories (lets user choose multiple directories) BROWSE_SAVE_FILE, ///< browse to save a file BROWSE_SAVE_DIRECTORY ///< browse to save a directory }; enum Option { NO_OPTIONS = 0x0000, ///< no options enabled SAVEAS_CONFIRM = 0x0001, ///< Show native 'Save As' overwrite confirm dialog (if supported) NEW_FOLDER = 0x0002, ///< Show 'New Folder' icon (if supported) PREVIEW = 0x0004 ///< enable preview mode }; IMPORTANT NOTICE: The filter type must be terminated with a '\n' on OS X or the application crashes with a Bus timeout */ namespace FSEL { void create(void) {}; void destroy(void) {}; std::string filename, stitle, sfilter, sdef, sdirectory; char dirbuf[FL_PATH_MAX + 1] = ""; char msg[400]; void pfile (const char *dir, const char *fname, const char *filt) { char fn[FL_PATH_MAX+1]; #ifdef __WIN32__ fl_filename_expand(fn, sizeof(fn) -1, "$USERPROFILE/"); #else fl_filename_expand(fn, sizeof(fn) -1, "$HOME/"); #endif strcat(fn, "pfile.txt"); FILE *f = fopen(fn, "a"); fprintf(f,"\ dir: %s\n\ file: %s\n\ filter: %s\n", dir, fname, filt); fclose(f); } void dosfname(std::string &s) { for (size_t i = 0; i < s.length(); i++) if (s[i] == '/') s[i] = '\\'; } const int select_multiple(const char* title, const char* filter, std::vector &filename_array, const char* def, int* fsel) { if (strlen(dirbuf) == 0) { #ifdef __WIN32__ fl_filename_expand(dirbuf, sizeof(dirbuf) -1, "$USERPROFILE/"); #else fl_filename_expand(dirbuf, sizeof(dirbuf) -1, "$HOME/"); #endif } size_t p = 0; Fl_Native_File_Chooser native; stitle.clear(); sfilter.clear(); sdef.clear(); sdirectory.clear(); if (title) stitle.assign(title); if (filter) sfilter.assign(filter); if (def) { sdef.assign(def); sdirectory.assign(def); p = sdirectory.rfind(fl_filename_name(sdef.c_str())); sdirectory.erase(p); } if (sdirectory.empty()) { sdirectory.assign(dirbuf); } if (sdef.empty()) { sdef.assign(sdirectory); sdef.append("temp"); } if (!sfilter.empty()) { if (sfilter[sfilter.length()-1] != '\n') sfilter += '\n'; native.filter(sfilter.c_str()); } native.title(stitle.c_str()); #if __WIN32__ dosfname(sdef); dosfname(sdirectory); #endif if (!sdef.empty()) native.preset_file(sdef.c_str()); if (!sdirectory.empty()) native.directory(sdirectory.c_str()); native.type(Fl_Native_File_Chooser::BROWSE_MULTI_FILE); native.options(Fl_Native_File_Chooser::NO_OPTIONS); pfile(sdirectory.c_str(), sdef.c_str(), sfilter.c_str()); switch ( native.show() ) { case -1: LOG_ERROR("ERROR: %s\n", native.errmsg()); // Error fall through case 1: return 0; break; default: filename_array.clear(); if (native.count()) { for (int n = 0; n < native.count(); n++ ) { filename_array.push_back(native.filename(n)); } } break; } if (fsel) *fsel = native.filter_value(); return native.count(); } const char* select(const char* title, const char* filter, const char* def, int* fsel) { if (strlen(dirbuf) == 0) { #ifdef __WIN32__ fl_filename_expand(dirbuf, sizeof(dirbuf) -1, "$USERPROFILE/"); #else fl_filename_expand(dirbuf, sizeof(dirbuf) -1, "$HOME/"); #endif } size_t p = 0; Fl_Native_File_Chooser native; stitle.clear(); sfilter.clear(); sdef.clear(); sdirectory.clear(); if (title) stitle.assign(title); if (filter) sfilter.assign(filter); if (def) { sdef.assign(def); sdirectory.assign(def); p = sdirectory.rfind(fl_filename_name(sdef.c_str())); sdirectory.erase(p); } if (sdirectory.empty()) { sdirectory.assign(dirbuf); } if (sdef.empty()) { sdef.assign(sdirectory); sdef.append("temp"); } if (!sfilter.empty()) { if (sfilter[sfilter.length()-1] != '\n') sfilter += '\n'; native.filter(sfilter.c_str()); } native.title(stitle.c_str()); #if __WIN32__ dosfname(sdef); dosfname(sdirectory); #endif if (!sdef.empty()) native.preset_file(sdef.c_str()); if (!sdirectory.empty()) native.directory(sdirectory.c_str()); native.type(Fl_Native_File_Chooser::BROWSE_FILE); native.options(Fl_Native_File_Chooser::PREVIEW); pfile(sdirectory.c_str(), sdef.c_str(), sfilter.c_str()); filename.clear(); switch ( native.show() ) { case -1: LOG_ERROR("ERROR: %s\n", native.errmsg()); // Error fall through case 1: return 0; break; default: if ( native.filename() ) { filename = native.filename(); } else { filename = ""; } break; } if (fsel) *fsel = native.filter_value(); return filename.c_str(); } const char* saveas(const char* title, const char* filter, const char* def, int* fsel) { if (strlen(dirbuf) == 0) { #ifdef __WIN32__ fl_filename_expand(dirbuf, sizeof(dirbuf) -1, "$USERPROFILE/"); #else fl_filename_expand(dirbuf, sizeof(dirbuf) -1, "$HOME/"); #endif } size_t p = 0; Fl_Native_File_Chooser native; stitle.clear(); sfilter.clear(); sdef.clear(); sdirectory.clear(); if (title) stitle.assign(title); if (filter) sfilter.assign(filter); if (def) { sdef.assign(def); sdirectory.assign(def); p = sdirectory.rfind(fl_filename_name(sdef.c_str())); sdirectory.erase(p); } if (sdirectory.empty()) { sdirectory.assign(dirbuf); } if (sdef.empty()) { sdef.assign(sdirectory); sdef.append("temp"); } if (!sfilter.empty()) { if (sfilter[sfilter.length()-1] != '\n') sfilter += '\n'; native.filter(sfilter.c_str()); } native.title(stitle.c_str()); #if __WIN32__ dosfname(sdef); dosfname(sdirectory); #endif if (!sdef.empty()) native.preset_file(sdef.c_str()); if (!sdirectory.empty()) native.directory(sdirectory.c_str()); native.type(Fl_Native_File_Chooser::BROWSE_SAVE_FILE); native.options(Fl_Native_File_Chooser::NEW_FOLDER | Fl_Native_File_Chooser::SAVEAS_CONFIRM); pfile(sdirectory.c_str(), sdef.c_str(), sfilter.c_str()); filename.clear(); switch ( native.show() ) { case -1: LOG_ERROR("ERROR: %s\n", native.errmsg()); break; // ERROR case 1: break; // CANCEL default: if ( native.filename() ) { filename = native.filename(); } else { filename = ""; } break; } if (fsel) *fsel = native.filter_value(); return filename.c_str(); } const char* dir_select(const char* title, const char* filter, const char* def) { Fl_Native_File_Chooser native; stitle.clear(); sfilter.clear(); sdef.clear(); if (title) stitle.assign(title); if (filter) sfilter.assign(filter); if (def) sdef.assign(def); if (!sfilter.empty() && sfilter[sfilter.length()-1] != '\n') sfilter += '\n'; if (!stitle.empty()) native.title(stitle.c_str()); native.type(Fl_Native_File_Chooser::BROWSE_DIRECTORY); if (!sfilter.empty()) native.filter(sfilter.c_str()); native.options(Fl_Native_File_Chooser::NO_OPTIONS); #if __WIN32__ dosfname(sdef); #endif if (!sdef.empty()) { native.directory(sdef.c_str()); sdirectory = sdef; } else sdirectory.clear(); filename.clear(); switch ( native.show() ) { case -1: LOG_ERROR("ERROR: %s\n", native.errmsg()); break; // ERROR case 1: break; // CANCEL default: if ( native.filename() ) { filename = native.filename(); } else { filename = ""; } break; } return filename.c_str(); } } // FSEL flamp-2.2.12/src/widgets/hamcast_group.cxx0000644000175000017500000000335314463050061015436 00000000000000/** ************************************************************** \page hamcast_group Hamcast_Group Subclass of Fl_Group \par hamcast_group.cxx (FLAMP) \par Author(s): Robert Stiles, KK5VD, Copyright © 2014

This is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see .

\par PURPOSE: Subclassed to allow the content be updated only when HAMCAST tab/panel has focus. *******************************************************************/ #include "hamcast_group.h" extern void estimate_bc(void); Hamcast_Group::Hamcast_Group(int x, int y, int w, int h, const char *label = 0) : Fl_Group(x, y, w, h, label) { } /** ************************************************************** * \brief Display the HAMACAST panel content. Update the time * measurements when the panel has focus. * \return void *****************************************************************/ void Hamcast_Group::draw() { estimate_bc(); Fl_Widget * const *widgets = array(); int i = 0; if(damage() == FL_DAMAGE_CHILD) { for(i = children(); i--; widgets++) update_child(**widgets); } else { for(i = children(); i--; widgets++) { draw_child(**widgets); draw_outside_label(**widgets); } } }flamp-2.2.12/src/widgets/combo.cxx0000644000175000017500000002534514463050062013707 00000000000000#include #include #include #include #include "combo.h" void popbrwsr_cb (Fl_Widget *v, long d); /** ******************************************************** * ***********************************************************/ Fl_PopBrowser::Fl_PopBrowser (int X, int Y, int W, int H, retvals R) : Fl_Window (X, Y, W, H, "") { Rvals = R; hRow = H; wRow = W; clear_border(); box(FL_BORDER_BOX); popbrwsr = new Fl_Select_Browser(0,0,wRow,hRow,0); popbrwsr->callback ( (Fl_Callback*)popbrwsr_cb); parent = 0; end(); set_modal(); } /** ******************************************************** * ***********************************************************/ Fl_PopBrowser::~Fl_PopBrowser () { } /** ******************************************************** * ***********************************************************/ int Fl_PopBrowser::handle(int event) { if (!Fl::event_inside( child(0) ) && event == FL_PUSH) { pophide(); return 1; } return Fl_Group::handle(event); } /** ******************************************************** * ***********************************************************/ void Fl_PopBrowser::add(char *s, void *d) { popbrwsr->add(s,d); } /** ******************************************************** * ***********************************************************/ void Fl_PopBrowser::clear() { popbrwsr->clear(); } /** ******************************************************** * ***********************************************************/ void Fl_PopBrowser::sort() { return; } /** ******************************************************** * ***********************************************************/ void Fl_PopBrowser::popshow (int x, int y) { int nRows = parent->numrows(); int fh = fl_height(); int height = nRows * fh + 4; if (popbrwsr->size() == 0) return; if (nRows > parent->lsize()) nRows = parent->lsize(); // locate first occurance of Output string value in the list // and display that if found int i = parent->index(); if (!(i >= 0 && i < parent->listsize)) { for (i = 0; i < parent->listsize; i++) if (!strcmp(parent->Output->value(), parent->datalist[i]->s)) break; if (i == parent->listsize) i = 0; } // resize and reposition the popup to insure that it is within the bounds // of the uppermost parent widget // preferred position is just below and at the same x position as the // parent widget Fl_Widget *gparent = parent; int xp = gparent->x(), yp = gparent->y(), hp = gparent->h(); while ((gparent = gparent->parent())) { xp = gparent->x(); yp = gparent->y(); hp = gparent->h(); } int nu = nRows, nl = nRows; int hu = nu * fh + 4, hl = nl * fh + 4; int yu = parent->y() - hu; int yl = y; while (nl > 1 && (yl + hl > hp)) { nl--; hl -= fh; } while (nu > 1 && yu < 0) { nu--; yu += fh; hu -= fh; } if (nl >= nu) { y = yl; height = hl; } else { y = yu; height = hu; } x += xp; y += yp; popbrwsr->size (wRow, height); resize (x, y, wRow, height); popbrwsr->topline (i); show(); Fl::grab(this); } /** ******************************************************** * ***********************************************************/ void Fl_PopBrowser::pophide () { hide (); Fl::release(); } /** ******************************************************** * ***********************************************************/ void Fl_PopBrowser::popbrwsr_cb_i (Fl_Widget *v, long d) { Fl_PopBrowser *me = (Fl_PopBrowser *)(v->parent()); Fl_Input *tgt = me->Rvals.Inp; // update the return values int row = (me->popbrwsr)->value(); if (row == 0) return; me->popbrwsr->deselect(); if (tgt) { tgt->value ((me->popbrwsr)->text (row)); me->Rvals.retval = (me->popbrwsr)->data (row); *(me->Rvals.idx) = row - 1; } me->pophide(); // user selected an item from the browser list, so execute the // callback if one is registered. if (me->parent) (me->parent)->do_callback(); return; } /** ******************************************************** * ***********************************************************/ void popbrwsr_cb (Fl_Widget *v, long d) { ((Fl_PopBrowser *)(v))->popbrwsr_cb_i (v, d); return; } /** ******************************************************** * ***********************************************************/ void Fl_ComboBox::fl_popbrwsr(Fl_Widget *p) { int xpos = p->x(), ypos = p->h() + p->y(); if (Brwsr == 0) { Brwsr = new Fl_PopBrowser(xpos, ypos, width, height, R); } // pass the calling widget to the popup browser so that the // correct callback function can be called when the user selects an item // from the browser list Brwsr->parent = (Fl_ComboBox *) p; Brwsr->popshow(xpos, ypos); return; } /** ******************************************************** * ***********************************************************/ void btnComboBox_cb (Fl_Widget *v, void *d) { Fl_Widget *p = v->parent(); ((Fl_ComboBox *)p)->fl_popbrwsr (p); return; } /** ******************************************************** * ***********************************************************/ Fl_ComboBox::Fl_ComboBox (int X,int Y,int W,int H, const char *L) : Fl_Group (X, Y, W, H, L) { width = W; height = H - 4; Btn = new Fl_Button (X + W - 18, Y + 1, 18, H - 2, "@#-32>"); Btn->callback ((Fl_Callback *)btnComboBox_cb, 0); Output = new Fl_Input (X, Y, W-18, H); Brwsr = 0; datalist = new datambr *[FL_COMBO_LIST_INCR]; maxsize = FL_COMBO_LIST_INCR; for (int i = 0; i < FL_COMBO_LIST_INCR; i++) datalist[i] = 0; listsize = 0; listtype = 0; end(); R.Inp = Output; R.retval = retdata; R.idx = &idx; numrows_ = 8; } /** ******************************************************** * ***********************************************************/ Fl_ComboBox::~Fl_ComboBox() { if (Brwsr) delete Brwsr; for (int i = 0; i < listsize; i++) { if (datalist[i]) { if (datalist[i]->s) delete [] datalist[i]->s; delete datalist[i]; } } delete [] datalist; } /** ******************************************************** * ***********************************************************/ void Fl_ComboBox::type (int t) { listtype = t; } /** ******************************************************** * ***********************************************************/ void Fl_ComboBox::readonly() { Output->type(FL_NORMAL_OUTPUT); } // ComboBox value is contained in the Output widget /** ******************************************************** * ***********************************************************/ void Fl_ComboBox::value( const char *s ) { int i = 0; if(!s) return; if ((listtype & FL_COMBO_UNIQUE_NOCASE) == FL_COMBO_UNIQUE_NOCASE) { for (i = 0; i < listsize; i++) { if (strcasecmp (s, datalist[i]->s) == 0) break; } } else { for (i = 0; i < listsize; i++) { if (strcmp (s, datalist[i]->s) == 0) break; } } if ( i < listsize) { //Output->value(datalist[i]->s); index(i); } } /** ******************************************************** * ***********************************************************/ void Fl_ComboBox::put_value(const char *s) { value(s); } /** ******************************************************** * ***********************************************************/ void Fl_ComboBox::index(int i) { if (i >= 0 && i < listsize) Output->value( datalist[idx = i]->s); } /** ******************************************************** * ***********************************************************/ const char *Fl_ComboBox::value() { return (Output->value ()); } /** ******************************************************** * ***********************************************************/ int Fl_ComboBox::index() { return idx; } /** ******************************************************** * ***********************************************************/ void * Fl_ComboBox::data() { return retdata; } /** ******************************************************** * ***********************************************************/ void Fl_ComboBox::add( const char *s, void * d) { if (Brwsr == 0) { Brwsr = new Fl_PopBrowser(0, 0, width, height, R); } // test for uniqueness of entry if required if ((listtype & FL_COMBO_UNIQUE) == FL_COMBO_UNIQUE) { if ((listtype & FL_COMBO_UNIQUE_NOCASE) == FL_COMBO_UNIQUE_NOCASE) { for (int i = 0; i < listsize; i++) { if (strcasecmp (s, datalist[i]->s) == 0) return; } } else { for (int i = 0; i < listsize; i++) { if (strcmp (s, datalist[i]->s) == 0) return; } } } // not unique or not in list, so add this entry datalist[listsize] = new datambr; datalist[listsize]->s = new char [strlen(s) + 1]; datalist[listsize]->s[0] = 0; strcpy (datalist[listsize]->s, s); datalist[listsize]->d = d; Brwsr->add(datalist[listsize]->s,d); listsize++; if (listsize == maxsize) { int nusize = maxsize + FL_COMBO_LIST_INCR; datambr **temparray = new datambr *[nusize]; for (int i = 0; i < listsize; i++) temparray[i] = datalist[i]; delete [] datalist; datalist = temparray; maxsize = nusize; } } /** ******************************************************** * ***********************************************************/ void Fl_ComboBox::clear() { if (Brwsr == 0) Brwsr = new Fl_PopBrowser(0, 0, width, height, R); else Brwsr->clear(); if (listsize == 0) return; for (int i = 0; i < listsize; i++) { delete [] datalist[i]->s; delete datalist[i]; } listsize = 0; } /** ******************************************************** * ***********************************************************/ int DataCompare( const void *x1, const void *x2 ) { int cmp; datambr *X1, *X2; X1 = *(datambr **)(x1); X2 = *(datambr **)(x2); cmp = strcasecmp (X1->s, X2->s); if (cmp < 0) return -1; if (cmp > 0) return 1; return 0; } /** ******************************************************** * ***********************************************************/ void Fl_ComboBox::sort() { Brwsr->clear (); qsort (&datalist[0], listsize, sizeof (datambr *), DataCompare); for (int i = 0; i < listsize; i++) Brwsr->add (datalist[i]->s, datalist[i]->d); } /** ******************************************************** * ***********************************************************/ void Fl_ComboBox::textfont (int fnt) { Output->textfont (fnt); } /** ******************************************************** * ***********************************************************/ void Fl_ComboBox::textsize (uchar n) { Output->textsize (n); } /** ******************************************************** * ***********************************************************/ void Fl_ComboBox::textcolor( Fl_Color c) { Output->textcolor (c); } /** ******************************************************** * ***********************************************************/ void Fl_ComboBox::color(Fl_Color c) { _color = c; Output->color(c); if (Brwsr) Brwsr->color(c); } flamp-2.2.12/src/widgets/flinput2.cxx0000644000175000017500000001205014463050061014337 00000000000000// ===================================================================== // // flinput2.cxx // // Author: Stelios Buononos, M0GLD // Copyright: 2010 // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. It is // copyright under the GNU General Public License. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ===================================================================== #include "config.h" #include #include #include #include #include #include #include #include "icons.h" #include "flinput2.h" #include "util.h" #include "gettext.h" enum { OP_UNDO, OP_CUT, OP_COPY, OP_PASTE, OP_DELETE, OP_CLEAR, OP_SELECT_ALL }; static Fl_Menu_Item cmenu[] = { { icons::make_icon_label(_("Undo"), edit_undo_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL }, { icons::make_icon_label(_("Cut"), edit_cut_icon), 0, 0, 0, 0, _FL_MULTI_LABEL }, { icons::make_icon_label(_("Copy"), edit_copy_icon), 0, 0, 0, 0, _FL_MULTI_LABEL }, { icons::make_icon_label(_("Paste"), edit_paste_icon), 0, 0, 0, 0, _FL_MULTI_LABEL }, { icons::make_icon_label(_("Delete"), trash_icon), 0, 0, 0, 0, _FL_MULTI_LABEL }, { icons::make_icon_label(_("Clear"), edit_clear_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL }, { icons::make_icon_label(_("Select All"), edit_select_all_icon), 0, 0, 0, 0, _FL_MULTI_LABEL }, { 0 } }; static bool cmenu_init = false; Fl_Input2::Fl_Input2(int x, int y, int w, int h, const char* l) : Fl_Input(x, y, w, h, l) { if (!cmenu_init) { for (size_t i = 0; i < sizeof(cmenu)/sizeof(*cmenu) - 1; i++) if (cmenu[i].labeltype() == _FL_MULTI_LABEL) icons::set_icon_label(&cmenu[i]); cmenu_init = true; } } int Fl_Input2::handle(int event) { switch (event) { case FL_KEYBOARD: { int b = Fl::event_key(); int p = position(); // stop the move-to-next-field madness, we have Tab for that! if (unlikely((b == FL_Left && p == 0) || (b == FL_Right && p == size()) || (b == FL_Up && line_start(p) == 0) || (b == FL_Down && line_end(p) == size()))) return 1; else if (unlikely(Fl::event_state() & (FL_ALT | FL_META))) { switch (b) { case 'c': { // capitalise if (readonly() || p == size()) return 1; while (p < size() && isspace(*(value() + p))) p++; if (p == size()) return 1; char c = toupper(*(value() + p)); replace(p, p + 1, &c, 1); position(word_end(p)); } return 1; case 'u': case 'l': { // upper/lower case if (readonly() || p == size()) return 1; while (p < size() && isspace(*(value() + p))) p++; int n = word_end(p) - p; if (n == 0) return 1; char* s = new char[n]; memcpy(s, value() + p, n); if (b == 'u') for (int i = 0; i < n; i++) s[i] = toupper(s[i]); else for (int i = 0; i < n; i++) s[i] = tolower(s[i]); replace(p, p + n, s, n); position(p + n); delete [] s; return 1; } default: break; } } } return Fl_Input::handle(event); case FL_MOUSEWHEEL: { if (!((type() & (FL_MULTILINE_INPUT | FL_MULTILINE_OUTPUT)) && Fl::event_inside(this))) return Fl_Input::handle(event); int d; if (!((d = Fl::event_dy()) || (d = Fl::event_dx()))) return Fl_Input::handle(event); if (Fl::focus() != this) take_focus(); up_down_position(d + (d > 0 ? line_end(position()) : line_start(position()))); return 1; } case FL_PUSH: if (Fl::event_button() == FL_RIGHT_MOUSE) break; // fall through default: return Fl_Input::handle(event); } bool sel = position() != mark(), ro = readonly(); icons::set_active(&cmenu[OP_UNDO], !ro); icons::set_active(&cmenu[OP_CUT], !ro && sel); icons::set_active(&cmenu[OP_COPY], sel); icons::set_active(&cmenu[OP_PASTE], !ro); icons::set_active(&cmenu[OP_DELETE], !ro && sel); icons::set_active(&cmenu[OP_CLEAR], !ro && size()); icons::set_active(&cmenu[OP_SELECT_ALL], size()); take_focus(); window()->cursor(FL_CURSOR_DEFAULT); int t = Fl_Tooltip::enabled(); Fl_Tooltip::disable(); const Fl_Menu_Item* m = cmenu->popup(Fl::event_x(), Fl::event_y()); Fl_Tooltip::enable(t); if (!m) return 1; switch (m - cmenu) { case OP_UNDO: undo(); break; case OP_CUT: cut(); copy_cuts(); break; case OP_COPY: copy(1); break; case OP_PASTE: Fl::paste(*this, 1); break; case OP_DELETE: cut(); break; case OP_CLEAR: cut(0, size()); break; case OP_SELECT_ALL: position(0, size()); break; } return 1; } flamp-2.2.12/src/widgets/icons.cxx0000664000175000017500000001514614507650001013721 00000000000000// ---------------------------------------------------------------------------- // icons.cxx // // Copyright (C) 2008 // Stelios Bounanos, M0GLD // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ===================================================================== // ---------------------------------------------------------------------------- #include #include "flamp_config.h" #include "icons.h" #include "util.h" #include #include #include #include #if USE_IMAGE_LABELS # include # include # include # include # include # include #endif namespace icons { #if USE_IMAGE_LABELS typedef std::map imap_t; static imap_t* imap = 0; #endif #define FL_EMPTY_LABEL FL_FREE_LABELTYPE static void draw_empty(const Fl_Label*, int, int, int, int, Fl_Align) { } static void measure_empty(const Fl_Label*, int& w, int& h) { w = h = 0; } // The following functions create image+text menu item labels. // You've had too much FLTK if you already know how to do that. // Return a multi_label pointer, cast to a std::string, for `text' and // `pixmap'. This goes into the label pointer of a widget or menu // item. The text label is copied if we are using multi labels. You must // call set_icon_label on the widget or menu item before its draw() // function is called for the first time. // // A NULL pixmap means that the caller wants an empty, transparent, icon. const char* make_icon_label(const char* text, const char** pixmap) { #if USE_IMAGE_LABELS static imap_t* imap_ = 0; if (unlikely(!imap_)) { imap = imap_ = new imap_t; Fl::set_labeltype(FL_EMPTY_LABEL, draw_empty, measure_empty); } // Create a multi label and associate it with an Fl_Image* array Fl_Multi_Label* mlabel = new Fl_Multi_Label; Fl_Image** images = new Fl_Image*[2]; images[0] = new Fl_Pixmap(pixmap ? pixmap : clear_row_icon); images[1] = 0; // we create this on demand // set_icon_label_ will set mlabel->labela later mlabel->typea = _FL_IMAGE_LABEL; if (!text) text = ""; size_t len = strlen(text); char* s = new char[len + 2]; s[0] = ' '; memcpy(s + 1, text, len + 1); mlabel->labelb = s; mlabel->typeb = FL_NORMAL_LABEL; (*imap)[mlabel] = images; return (const char*)mlabel; #else return text; #endif } #if USE_IMAGE_LABELS // Find the item's label, which should be something that was returned by // make_icon_label, and set the active or inactive image. template void set_icon_label_(T* item) { imap_t::iterator j = imap->find((Fl_Multi_Label*)(item->label())); if (j == imap->end()) return; Fl_Multi_Label* mlabel = j->first; Fl_Image** images = j->second; unsigned char i = !item->active(); if (!images[i]) { // create inactive version of other image images[i] = images[!i]->copy(); images[i]->inactive(); } if (mlabel->typea == _FL_IMAGE_LABEL) mlabel->labela = (const char*)images[i]; else mlabel->labelb = (const char*)images[i]; item->image(images[i]); mlabel->label(item); item->labeltype(_FL_MULTI_LABEL); } #endif void set_icon_label(Fl_Menu_Item* item) { #if USE_IMAGE_LABELS set_icon_label_(item); #else // this isn't needed but it simplifies fldigi's UI setup code if (item->labeltype() == _FL_MULTI_LABEL) item->labeltype(FL_NORMAL_LABEL); #endif } void set_icon_label(Fl_Widget* w) { #if USE_IMAGE_LABELS set_icon_label_(w); w->image(0); #else if (w->labeltype() == _FL_MULTI_LABEL) w->labeltype(FL_NORMAL_LABEL); #endif } void toggle_icon_labels(void) { #if USE_IMAGE_LABELS for (imap_t::iterator i = imap->begin(); i != imap->end(); ++i) { // swap sublabels const char* l = i->first->labela; i->first->labela = i->first->labelb; i->first->labelb = l; if (i->first->typea == _FL_IMAGE_LABEL) { i->first->typea = FL_NORMAL_LABEL; i->first->typeb = FL_EMPTY_LABEL; i->first->labela++; } else { i->first->typea = _FL_IMAGE_LABEL; i->first->typeb = FL_NORMAL_LABEL; i->first->labelb--; } } #endif } template const char* get_icon_label_text_(T* item) { #if USE_IMAGE_LABELS if (item->labeltype() == _FL_MULTI_LABEL) { imap_t::iterator i = imap->find((Fl_Multi_Label*)(item->label())); if (i == imap->end()) return 0; if (i->first->typeb == FL_NORMAL_LABEL) return i->first->labelb + 1; else // disabled icons return i->first->labela; } else #endif return item->label(); } const char* get_icon_label_text(Fl_Menu_Item* item) { return get_icon_label_text_(item); } const char* get_icon_label_text(Fl_Widget* w) { return get_icon_label_text_(w); } template void free_icon_label_(T* item) { #if USE_IMAGE_LABELS if (item->labeltype() == FL_NORMAL_LABEL) { delete [] item->label(); item->label(0); return; } imap_t::iterator i = imap->find((Fl_Multi_Label*)item->label()); if (i == imap->end()) return; item->label(0); // delete the images delete i->second[0]; delete i->second[1]; delete [] i->second; // delete the multi label delete [] ((i->first->typeb == FL_NORMAL_LABEL) ? i->first->labelb : i->first->labela-1); delete i->first; imap->erase(i); #endif } void free_icon_label(Fl_Menu_Item* item) { free_icon_label_(item); } void free_icon_label(Fl_Widget* w) { free_icon_label_(w); } template void set_active_(T* t, bool v) { if (v) t->activate(); else t->deactivate(); if (t->labeltype() == _FL_MULTI_LABEL) set_icon_label(t); } void set_active(Fl_Menu_Item* item, bool v) { set_active_(item, v); } void set_active(Fl_Widget* w, bool v) { set_active_(w, v); } static Fl_Image* msg_icon; void set_message_icon(const char** pixmap) { if (msg_icon && msg_icon->data() == pixmap) return; delete msg_icon; Fl_Widget* msg = fl_message_icon(); msg->label(""); msg->align(FL_ALIGN_TOP_LEFT | FL_ALIGN_INSIDE); if (!msg->parent()) msg->color(FL_BACKGROUND_COLOR); else msg->color(msg->parent()->color()); msg->box(FL_NO_BOX); msg->image(msg_icon = new Fl_Pixmap(pixmap)); } } // icons flamp-2.2.12/src/widgets/Fl_Text_Buffer_mod.cxx0000644000175000017500000012624014463050062016301 00000000000000// // "$Id: Fl_Text_Buffer_mod.cxx 8040 2010-12-15 17:38:39Z manolo $" // // Copyright 2001-2010 by Bill Spitzak and others. // Original code Copyright Mark Edel. Permission to distribute under // the LGPL for the FLTK library granted by Mark Edel. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public // License as published by the Free Software Foundation; either // version 2 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Library General Public License for more details. // // You should have received a copy of the GNU Library General Public // License along with this library; if not, write to the // // Free Software Foundation, Inc. // 51 Franklin Street, Fifth Floor // Boston, MA 02110-1301 USA. // // Please report all bugs and problems on the following page: // // http://www.fltk.org/str.php // #include #include #include #include "missing_strings.h" #include #include #include #include "Fl_Text_Buffer_mod.H" #include #if FLAMP_FLTK_API_MAJOR == 1 && FLAMP_FLTK_API_MINOR < 3 # error "FLTK versions less then 1.3 are no longer supported" #endif /* This file is based on a port of NEdit to FLTK many years ago. NEdit at that point was already stretched beyond the task it was designed for which explains why the source code is sometimes pretty convoluted. It still is a very useful widget for FLTK, and we are thankful that the nedit team allowed us to integrate their code. With the introduction of Unicode and UTF-8, Fl_Text_... has to go into a whole new generation of code. Originally designed for monospaced fonts only, many features make less sense in the multibyte and multiwidth world of UTF-8. Columns are a good example. There is simply no such thing. The new Fl_Text_... widget converts columns to pixels by multiplying them with the average character width for a given font. Rectangular selections were rarely used (if at all) and make little sense when using variable width fonts. They have been removed. Using multiple spaces to emulate tab stops has been replaced by pixel counting routines. They are slower, but give the expected result for proportional fonts. And constantly recalculating character widths is just much too expensive. Lines of text are now subdivided into blocks of text which are measured at once instead of individual characters. */ #ifndef min static int max(int i1, int i2) { return i1 >= i2 ? i1 : i2; } static int min(int i1, int i2) { return i1 <= i2 ? i1 : i2; } #endif static char *undobuffer; static int undobufferlength; static Fl_Text_Buffer_mod *undowidget; static int undoat; // points after insertion static int undocut; // number of characters deleted there static int undoinsert; // number of characters inserted static int undoyankcut; // length of valid contents of buffer, even if undocut=0 /* Resize the undo buffer to match at least the requested size. */ static void undobuffersize(int n) { if (n > undobufferlength) { if (undobuffer) { do { undobufferlength *= 2; } while (undobufferlength < n); undobuffer = (char *) realloc(undobuffer, undobufferlength); } else { undobufferlength = n + 9; undobuffer = (char *) malloc(undobufferlength); } } } static void def_transcoding_warning_action(Fl_Text_Buffer_mod *text) { fl_alert("%s", text->file_encoding_warning_message); } /* Initialize all variables. */ Fl_Text_Buffer_mod::Fl_Text_Buffer_mod(int requestedSize, int preferredGapSize) { mLength = 0; mPreferredGapSize = preferredGapSize; mBuf = (char *) malloc(requestedSize + mPreferredGapSize); mGapStart = 0; mGapEnd = mPreferredGapSize; mTabDist = 8; mPrimary.mSelected = 0; mPrimary.mStart = mPrimary.mEnd = 0; mSecondary.mSelected = 0; mSecondary.mStart = mSecondary.mEnd = 0; mHighlight.mSelected = 0; mHighlight.mStart = mHighlight.mEnd = 0; mModifyProcs = NULL; mCbArgs = NULL; mNModifyProcs = 0; mNPredeleteProcs = 0; mPredeleteProcs = NULL; mPredeleteCbArgs = NULL; mCursorPosHint = 0; mCanUndo = 1; input_file_was_transcoded = 0; transcoding_warning_action = def_transcoding_warning_action; } /* Free all resources. */ Fl_Text_Buffer_mod::~Fl_Text_Buffer_mod() { free(mBuf); if (mNModifyProcs != 0) { delete[]mModifyProcs; delete[]mCbArgs; } if (mNPredeleteProcs != 0) { delete[]mPredeleteProcs; delete[]mPredeleteCbArgs; } } /* This function copies verbose whatever is in front and after the gap into a single buffer. */ char *Fl_Text_Buffer_mod::text() const { char *t = (char *) malloc(mLength + 1); memcpy(t, mBuf, mGapStart); memcpy(t+mGapStart, mBuf+mGapEnd, mLength - mGapStart); t[mLength] = '\0'; return t; } /* Set the text buffer to a new string. */ void Fl_Text_Buffer_mod::text(const char *t) { IS_UTF8_ALIGNED(t) call_predelete_callbacks(0, length()); /* Save information for redisplay, and get rid of the old buffer */ const char *deletedText = text(); int deletedLength = mLength; free((void *) mBuf); /* Start a new buffer with a gap of mPreferredGapSize at the end */ int insertedLength = strlen(t); mBuf = (char *) malloc(insertedLength + mPreferredGapSize); mLength = insertedLength; mGapStart = insertedLength; mGapEnd = mGapStart + mPreferredGapSize; memcpy(mBuf, t, insertedLength); /* Zero all of the existing selections */ update_selections(0, deletedLength, 0); /* Call the saved display routine(s) to update the screen */ call_modify_callbacks(0, deletedLength, insertedLength, 0, deletedText); free((void *) deletedText); } /* Creates a range of text to a new buffer and copies verbose from around the gap. */ char *Fl_Text_Buffer_mod::text_range(int start, int end) const { IS_UTF8_ALIGNED2(this, (start)) IS_UTF8_ALIGNED2(this, (end)) char *s = NULL; /* Make sure start and end are ok, and allocate memory for returned string. If start is bad, return "", if end is bad, adjust it. */ if (start < 0 || start > mLength) { s = (char *) malloc(1); s[0] = '\0'; return s; } if (end < start) { int temp = start; start = end; end = temp; } if (end > mLength) end = mLength; int copiedLength = end - start; s = (char *) malloc(copiedLength + 1); /* Copy the text from the buffer to the returned string */ if (end <= mGapStart) { memcpy(s, mBuf + start, copiedLength); } else if (start >= mGapStart) { memcpy(s, mBuf + start + (mGapEnd - mGapStart), copiedLength); } else { int part1Length = mGapStart - start; memcpy(s, mBuf + start, part1Length); memcpy(s + part1Length, mBuf + mGapEnd, copiedLength - part1Length); } s[copiedLength] = '\0'; return s; } /* Return a UCS-4 character at the given index. Pos must be at a character boundary. */ unsigned int Fl_Text_Buffer_mod::char_at(int pos) const { if (pos < 0 || pos >= mLength) return '\0'; IS_UTF8_ALIGNED2(this, (pos)) const char *src = address(pos); return fl_utf8decode(src, 0, 0); } /* Return the raw byte at the given index. This function ignores all unicode encoding. */ char Fl_Text_Buffer_mod::byte_at(int pos) const { if (pos < 0 || pos >= mLength) return '\0'; const char *src = address(pos); return *src; } /* Insert some text at the given index. Pos must be at a character boundary. */ void Fl_Text_Buffer_mod::insert(int pos, const char *text) { IS_UTF8_ALIGNED2(this, (pos)) IS_UTF8_ALIGNED(text) /* check if there is actually any text */ if (!text || !*text) return; /* if pos is not contiguous to existing text, make it */ if (pos > mLength) pos = mLength; if (pos < 0) pos = 0; /* Even if nothing is deleted, we must call these callbacks */ call_predelete_callbacks(pos, 0); /* insert and redisplay */ int nInserted = insert_(pos, text); mCursorPosHint = pos + nInserted; IS_UTF8_ALIGNED2(this, (mCursorPosHint)) call_modify_callbacks(pos, 0, nInserted, 0, NULL); } /* Replace a range of text with new text. Start and end must be at a character boundary. */ void Fl_Text_Buffer_mod::replace(int start, int end, const char *text) { // Range check... if (!text) return; if (start < 0) start = 0; if (end > mLength) end = mLength; IS_UTF8_ALIGNED2(this, (start)) IS_UTF8_ALIGNED2(this, (end)) IS_UTF8_ALIGNED(text) call_predelete_callbacks(start, end - start); const char *deletedText = text_range(start, end); remove_(start, end); int nInserted = insert_(start, text); mCursorPosHint = start + nInserted; call_modify_callbacks(start, end - start, nInserted, 0, deletedText); free((void *) deletedText); } /* Remove a range of text. Start and End must be at a character boundary. */ void Fl_Text_Buffer_mod::remove(int start, int end) { /* Make sure the arguments make sense */ if (start > end) { int temp = start; start = end; end = temp; } if (start > mLength) start = mLength; if (start < 0) start = 0; if (end > mLength) end = mLength; if (end < 0) end = 0; IS_UTF8_ALIGNED2(this, (start)) IS_UTF8_ALIGNED2(this, (end)) if (start == end) return; call_predelete_callbacks(start, end - start); /* Remove and redisplay */ const char *deletedText = text_range(start, end); remove_(start, end); mCursorPosHint = start; call_modify_callbacks(start, end - start, 0, 0, deletedText); free((void *) deletedText); } /* Copy a range of text from another text buffer. fromStart, fromEnd, and toPos must be at a character boundary. */ void Fl_Text_Buffer_mod::copy(Fl_Text_Buffer_mod * fromBuf, int fromStart, int fromEnd, int toPos) { IS_UTF8_ALIGNED2(fromBuf, fromStart) IS_UTF8_ALIGNED2(fromBuf, fromEnd) IS_UTF8_ALIGNED2(this, (toPos)) int copiedLength = fromEnd - fromStart; /* Prepare the buffer to receive the new text. If the new text fits in the current buffer, just move the gap (if necessary) to where the text should be inserted. If the new text is too large, reallocate the buffer with a gap large enough to accomodate the new text and a gap of mPreferredGapSize */ if (copiedLength > mGapEnd - mGapStart) reallocate_with_gap(toPos, copiedLength + mPreferredGapSize); else if (toPos != mGapStart) move_gap(toPos); /* Insert the new text (toPos now corresponds to the start of the gap) */ if (fromEnd <= fromBuf->mGapStart) { memcpy(&mBuf[toPos], &fromBuf->mBuf[fromStart], copiedLength); } else if (fromStart >= fromBuf->mGapStart) { memcpy(&mBuf[toPos], &fromBuf->mBuf[fromStart + (fromBuf->mGapEnd - fromBuf->mGapStart)], copiedLength); } else { int part1Length = fromBuf->mGapStart - fromStart; memcpy(&mBuf[toPos], &fromBuf->mBuf[fromStart], part1Length); memcpy(&mBuf[toPos + part1Length], &fromBuf->mBuf[fromBuf->mGapEnd], copiedLength - part1Length); } mGapStart += copiedLength; mLength += copiedLength; update_selections(toPos, 0, copiedLength); } /* Take the previous changes and undo them. Return the previous cursor position in cursorPos. Returns 1 if the undo was applied. CursorPos will be at a character boundary. */ int Fl_Text_Buffer_mod::undo(int *cursorPos) { if (undowidget != this || (!undocut && !undoinsert && !mCanUndo)) return 0; int ilen = undocut; int xlen = undoinsert; int b = undoat - xlen; if (xlen && undoyankcut && !ilen) { ilen = undoyankcut; } if (xlen && ilen) { undobuffersize(ilen + 1); undobuffer[ilen] = 0; char *tmp = strdup(undobuffer); replace(b, undoat, tmp); if (cursorPos) *cursorPos = mCursorPosHint; free(tmp); } else if (xlen) { remove(b, undoat); if (cursorPos) *cursorPos = mCursorPosHint; } else if (ilen) { undobuffersize(ilen + 1); undobuffer[ilen] = 0; insert(undoat, undobuffer); if (cursorPos) *cursorPos = mCursorPosHint; undoyankcut = 0; } return 1; } /* Set a flag if undo function will work. */ void Fl_Text_Buffer_mod::canUndo(char flag) { mCanUndo = flag; // disabling undo also clears the last undo operation! if (!mCanUndo && undowidget==this) undowidget = 0; } /* Change the tab width. This will cause a couple of callbacks and a complete redisplay. Matt: I am not entirely sure why we need to trigger callbacks because tabs are only a graphical hint, not changing any text at all, but I leave this in here for back compatibility. */ void Fl_Text_Buffer_mod::tab_distance(int tabDist) { /* First call the pre-delete callbacks with the previous tab setting still active. */ call_predelete_callbacks(0, mLength); /* Change the tab setting */ mTabDist = tabDist; /* Force any display routines to redisplay everything (unfortunately, this means copying the whole buffer contents to provide "deletedText" */ const char *deletedText = text(); call_modify_callbacks(0, mLength, mLength, 0, deletedText); free((void *) deletedText); } /* Select a range of text. Start and End must be at a character boundary. */ void Fl_Text_Buffer_mod::select(int start, int end) { IS_UTF8_ALIGNED2(this, (start)) IS_UTF8_ALIGNED2(this, (end)) Fl_Text_Selection_mod oldSelection = mPrimary; mPrimary.set(start, end); redisplay_selection(&oldSelection, &mPrimary); } /* Clear the primary selection. */ void Fl_Text_Buffer_mod::unselect() { Fl_Text_Selection_mod oldSelection = mPrimary; mPrimary.mSelected = 0; redisplay_selection(&oldSelection, &mPrimary); } /* Return the primary selection range. */ int Fl_Text_Buffer_mod::selection_position(int *start, int *end) { return mPrimary.position(start, end); } /* Return a copy of the selected text. */ char *Fl_Text_Buffer_mod::selection_text() { return selection_text_(&mPrimary); } /* Remove the selected text. */ void Fl_Text_Buffer_mod::remove_selection() { remove_selection_(&mPrimary); } /* Replace the selected text. */ void Fl_Text_Buffer_mod::replace_selection(const char *text) { replace_selection_(&mPrimary, text); } /* Select text. Start and End must be at a character boundary. */ void Fl_Text_Buffer_mod::secondary_select(int start, int end) { Fl_Text_Selection_mod oldSelection = mSecondary; mSecondary.set(start, end); redisplay_selection(&oldSelection, &mSecondary); } /* Deselect text. */ void Fl_Text_Buffer_mod::secondary_unselect() { Fl_Text_Selection_mod oldSelection = mSecondary; mSecondary.mSelected = 0; redisplay_selection(&oldSelection, &mSecondary); } /* Return the selected range. */ int Fl_Text_Buffer_mod::secondary_selection_position(int *start, int *end) { return mSecondary.position(start, end); } /* Return a copy of the text in this selection. */ char *Fl_Text_Buffer_mod::secondary_selection_text() { return selection_text_(&mSecondary); } /* Remove the selected text. */ void Fl_Text_Buffer_mod::remove_secondary_selection() { remove_selection_(&mSecondary); } /* Replace selected text. */ void Fl_Text_Buffer_mod::replace_secondary_selection(const char *text) { replace_selection_(&mSecondary, text); } /* Highlight a range of text. Start and End must be at a character boundary. */ void Fl_Text_Buffer_mod::highlight(int start, int end) { Fl_Text_Selection_mod oldSelection = mHighlight; mHighlight.set(start, end); redisplay_selection(&oldSelection, &mHighlight); } /* Remove text highlighting. */ void Fl_Text_Buffer_mod::unhighlight() { Fl_Text_Selection_mod oldSelection = mHighlight; mHighlight.mSelected = 0; redisplay_selection(&oldSelection, &mHighlight); } /* Return position of highlight. */ int Fl_Text_Buffer_mod::highlight_position(int *start, int *end) { return mHighlight.position(start, end); } /* Return a copy of highlighted text. */ char *Fl_Text_Buffer_mod::highlight_text() { return selection_text_(&mHighlight); } /* Add a callback that is called whenever text is modified. */ void Fl_Text_Buffer_mod::add_modify_callback(Fl_Text_Modify_Cb bufModifiedCB, void *cbArg) { Fl_Text_Modify_Cb *newModifyProcs = new Fl_Text_Modify_Cb[mNModifyProcs + 1]; void **newCBArgs = new void *[mNModifyProcs + 1]; for (int i = 0; i < mNModifyProcs; i++) { newModifyProcs[i + 1] = mModifyProcs[i]; newCBArgs[i + 1] = mCbArgs[i]; } if (mNModifyProcs != 0) { delete[]mModifyProcs; delete[]mCbArgs; } newModifyProcs[0] = bufModifiedCB; newCBArgs[0] = cbArg; mNModifyProcs++; mModifyProcs = newModifyProcs; mCbArgs = newCBArgs; } /* Remove a callback. */ void Fl_Text_Buffer_mod::remove_modify_callback(Fl_Text_Modify_Cb bufModifiedCB, void *cbArg) { int i, toRemove = -1; /* find the matching callback to remove */ for (i = 0; i < mNModifyProcs; i++) { if (mModifyProcs[i] == bufModifiedCB && mCbArgs[i] == cbArg) { toRemove = i; break; } } if (toRemove == -1) { Fl::error ("Fl_Text_Buffer_mod::remove_modify_callback(): Can't find modify CB to remove"); return; } /* Allocate new lists for remaining callback procs and args (if any are left) */ mNModifyProcs--; if (mNModifyProcs == 0) { mNModifyProcs = 0; delete[]mModifyProcs; mModifyProcs = NULL; delete[]mCbArgs; mCbArgs = NULL; return; } Fl_Text_Modify_Cb *newModifyProcs = new Fl_Text_Modify_Cb[mNModifyProcs]; void **newCBArgs = new void *[mNModifyProcs]; /* copy out the remaining members and free the old lists */ for (i = 0; i < toRemove; i++) { newModifyProcs[i] = mModifyProcs[i]; newCBArgs[i] = mCbArgs[i]; } for (; i < mNModifyProcs; i++) { newModifyProcs[i] = mModifyProcs[i + 1]; newCBArgs[i] = mCbArgs[i + 1]; } delete[]mModifyProcs; delete[]mCbArgs; mModifyProcs = newModifyProcs; mCbArgs = newCBArgs; } /* Add a callback that is called before deleting text. */ void Fl_Text_Buffer_mod::add_predelete_callback(Fl_Text_Predelete_Cb bufPreDeleteCB, void *cbArg) { Fl_Text_Predelete_Cb *newPreDeleteProcs = new Fl_Text_Predelete_Cb[mNPredeleteProcs + 1]; void **newCBArgs = new void *[mNPredeleteProcs + 1]; for (int i = 0; i < mNPredeleteProcs; i++) { newPreDeleteProcs[i + 1] = mPredeleteProcs[i]; newCBArgs[i + 1] = mPredeleteCbArgs[i]; } if (mNPredeleteProcs != 0) { delete[]mPredeleteProcs; delete[]mPredeleteCbArgs; } newPreDeleteProcs[0] = bufPreDeleteCB; newCBArgs[0] = cbArg; mNPredeleteProcs++; mPredeleteProcs = newPreDeleteProcs; mPredeleteCbArgs = newCBArgs; } /* Remove a callback. */ void Fl_Text_Buffer_mod::remove_predelete_callback(Fl_Text_Predelete_Cb bufPreDeleteCB, void *cbArg) { int i, toRemove = -1; /* find the matching callback to remove */ for (i = 0; i < mNPredeleteProcs; i++) { if (mPredeleteProcs[i] == bufPreDeleteCB && mPredeleteCbArgs[i] == cbArg) { toRemove = i; break; } } if (toRemove == -1) { Fl::error ("Fl_Text_Buffer_mod::remove_predelete_callback(): Can't find pre-delete CB to remove"); return; } /* Allocate new lists for remaining callback procs and args (if any are left) */ mNPredeleteProcs--; if (mNPredeleteProcs == 0) { mNPredeleteProcs = 0; delete[]mPredeleteProcs; mPredeleteProcs = NULL; delete[]mPredeleteCbArgs; mPredeleteCbArgs = NULL; return; } Fl_Text_Predelete_Cb *newPreDeleteProcs = new Fl_Text_Predelete_Cb[mNPredeleteProcs]; void **newCBArgs = new void *[mNPredeleteProcs]; /* copy out the remaining members and free the old lists */ for (i = 0; i < toRemove; i++) { newPreDeleteProcs[i] = mPredeleteProcs[i]; newCBArgs[i] = mPredeleteCbArgs[i]; } for (; i < mNPredeleteProcs; i++) { newPreDeleteProcs[i] = mPredeleteProcs[i + 1]; newCBArgs[i] = mPredeleteCbArgs[i + 1]; } delete[]mPredeleteProcs; delete[]mPredeleteCbArgs; mPredeleteProcs = newPreDeleteProcs; mPredeleteCbArgs = newCBArgs; } /* Return a copy of the line that contains a given index. Pos must be at a character boundary. */ char *Fl_Text_Buffer_mod::line_text(int pos) const { return text_range(line_start(pos), line_end(pos)); } /* Find the beginning of the line. */ int Fl_Text_Buffer_mod::line_start(int pos) const { if (!findchar_backward(pos, '\n', &pos)) return 0; return pos + 1; } /* Find the end of the line. */ int Fl_Text_Buffer_mod::line_end(int pos) const { if (!findchar_forward(pos, '\n', &pos)) pos = mLength; return pos; } /* Find the beginning of a word. NOT UNICODE SAFE. */ int Fl_Text_Buffer_mod::word_start(int pos) const { // FIXME: character is ucs-4 while (pos>0 && (isalnum(char_at(pos)) || char_at(pos) == '_')) { pos = prev_char(pos); } // FIXME: character is ucs-4 if (!(isalnum(char_at(pos)) || char_at(pos) == '_')) pos = next_char(pos); return pos; } /* ** Search backwards in buffer for characters in "searchChars", starting ** with the character BEFORE "startPos", returning the result in "foundPos" ** returns 1 if found, 0 if not. */ int Fl_Text_Buffer_mod::findchars_backward( int startPos, const char *searchChars, int *foundPos ) { int pos = startPos; const char *c; char ch = 0; if ( startPos == 0 ) { *foundPos = 0; return 0; } while ( pos > 0 ) { ch = char_at(pos); for ( c = searchChars; *c != '\0'; c++ ) { if ( ch == *c ) { *foundPos = pos; return 1; } } pos = prev_char(pos); } *foundPos = 0; return 0; } /* Find the end of a word. NOT UNICODE SAFE. */ int Fl_Text_Buffer_mod::word_end(int pos) const { // FIXME: character is ucs-4 while (pos < length() && (isalnum(char_at(pos)) || char_at(pos) == '_')) { pos = next_char(pos); } return pos; } /* ** Search forwards in buffer for characters in "searchChars", starting ** with the character "startPos", and returning the result in "foundPos" ** returns 1 if found, 0 if not. */ int Fl_Text_Buffer_mod::findchars_forward( int startPos, const char *searchChars, int *foundPos ) { int pos = startPos; const char *c; char ch = 0; while ( pos < length() ) { ch = char_at(pos); for ( c = searchChars; *c != '\0'; c++ ) { if ( ch == *c ) { *foundPos = pos; return 1; } } pos = next_char(pos); } *foundPos = length(); return 0; } /* Count the number of characters between two positions. */ int Fl_Text_Buffer_mod::count_displayed_characters(int lineStartPos, int targetPos) const { IS_UTF8_ALIGNED2(this, (lineStartPos)) IS_UTF8_ALIGNED2(this, (targetPos)) int charCount = 0; int pos = lineStartPos; while (pos < targetPos) { pos = next_char(pos); charCount++; } return charCount; } /* Skip ahead a number of characters from a given index. This function breaks early if it encounters a newline character. */ int Fl_Text_Buffer_mod::skip_displayed_characters(int lineStartPos, int nChars) { IS_UTF8_ALIGNED2(this, (lineStartPos)) int pos = lineStartPos; for (int charCount = 0; charCount < nChars && pos < mLength; charCount++) { unsigned int c = char_at(pos); if (c == '\n') return pos; pos = next_char(pos); } return pos; } /* Count the number of newline characters between start and end. startPos and endPos must be at a character boundary. This function is optimized for speed by not using UTF-8 calls. */ int Fl_Text_Buffer_mod::count_lines(int startPos, int endPos) const { IS_UTF8_ALIGNED2(this, (startPos)) IS_UTF8_ALIGNED2(this, (endPos)) int gapLen = mGapEnd - mGapStart; int lineCount = 0; int pos = startPos; while (pos < mGapStart) { if (pos == endPos) return lineCount; if (mBuf[pos++] == '\n') lineCount++; } while (pos < mLength) { if (pos == endPos) return lineCount; if (mBuf[pos++ + gapLen] == '\n') lineCount++; } return lineCount; } /* Skip to the first character, n lines ahead. StartPos must be at a character boundary. This function is optimized for speed by not using UTF-8 calls. */ int Fl_Text_Buffer_mod::skip_lines(int startPos, int nLines) { IS_UTF8_ALIGNED2(this, (startPos)) if (nLines == 0) return startPos; int gapLen = mGapEnd - mGapStart; int pos = startPos; int lineCount = 0; while (pos < mGapStart) { if (mBuf[pos++] == '\n') { lineCount++; if (lineCount == nLines) { IS_UTF8_ALIGNED2(this, (pos)) return pos; } } } while (pos < mLength) { if (mBuf[pos++ + gapLen] == '\n') { lineCount++; if (lineCount >= nLines) { IS_UTF8_ALIGNED2(this, (pos)) return pos; } } } IS_UTF8_ALIGNED2(this, (pos)) return pos; } /* Skip to the first character, n lines back. StartPos must be at a character boundary. This function is optimized for speed by not using UTF-8 calls. */ int Fl_Text_Buffer_mod::rewind_lines(int startPos, int nLines) { IS_UTF8_ALIGNED2(this, (startPos)) int pos = startPos - 1; if (pos <= 0) return 0; int gapLen = mGapEnd - mGapStart; int lineCount = -1; while (pos >= mGapStart) { if (mBuf[pos + gapLen] == '\n') { if (++lineCount >= nLines) { IS_UTF8_ALIGNED2(this, (pos+1)) return pos + 1; } } pos--; } while (pos >= 0) { if (mBuf[pos] == '\n') { if (++lineCount >= nLines) { IS_UTF8_ALIGNED2(this, (pos+1)) return pos + 1; } } pos--; } return 0; } /* Find a matching string in the buffer. */ int Fl_Text_Buffer_mod::search_forward(int startPos, const char *searchString, int *foundPos, int matchCase) const { IS_UTF8_ALIGNED2(this, (startPos)) IS_UTF8_ALIGNED(searchString) if (!searchString) return 0; int bp; const char *sp; if (matchCase) { while (startPos < length()) { bp = startPos; sp = searchString; for (;;) { char c = *sp; // we reached the end of the "needle", so we found the string! if (!c) { *foundPos = startPos; return 1; } int l = fl_utf8len1(c); if (memcmp(sp, address(bp), l)) break; sp += l; bp += l; } startPos = next_char(startPos); } } else { while (startPos < length()) { bp = startPos; sp = searchString; for (;;) { // we reached the end of the "needle", so we found the string! if (!*sp) { *foundPos = startPos; return 1; } int l; unsigned int b = char_at(bp); unsigned int s = fl_utf8decode(sp, 0, &l); if (fl_tolower(b)!=fl_tolower(s)) break; sp += l; bp = next_char(bp); } startPos = next_char(startPos); } } return 0; } int Fl_Text_Buffer_mod::search_backward(int startPos, const char *searchString, int *foundPos, int matchCase) const { IS_UTF8_ALIGNED2(this, (startPos)) IS_UTF8_ALIGNED(searchString) if (!searchString) return 0; int bp; const char *sp; if (matchCase) { while (startPos >= 0) { bp = startPos; sp = searchString; for (;;) { char c = *sp; // we reached the end of the "needle", so we found the string! if (!c) { *foundPos = startPos; return 1; } int l = fl_utf8len1(c); if (memcmp(sp, address(bp), l)) break; sp += l; bp += l; } startPos = prev_char(startPos); } } else { while (startPos >= 0) { bp = startPos; sp = searchString; for (;;) { // we reached the end of the "needle", so we found the string! if (!*sp) { *foundPos = startPos; return 1; } int l; unsigned int b = char_at(bp); unsigned int s = fl_utf8decode(sp, 0, &l); if (fl_tolower(b)!=fl_tolower(s)) break; sp += l; bp = next_char(bp); } startPos = prev_char(startPos); } } return 0; } /* Insert a string into the buffer. Pos must be at a character boundary. Text must be a correct UTF-8 string. */ int Fl_Text_Buffer_mod::insert_(int pos, const char *text) { if (!text || !*text) return 0; int insertedLength = strlen(text); /* Prepare the buffer to receive the new text. If the new text fits in the current buffer, just move the gap (if necessary) to where the text should be inserted. If the new text is too large, reallocate the buffer with a gap large enough to accomodate the new text and a gap of mPreferredGapSize */ if (insertedLength > mGapEnd - mGapStart) reallocate_with_gap(pos, insertedLength + mPreferredGapSize); else if (pos != mGapStart) move_gap(pos); /* Insert the new text (pos now corresponds to the start of the gap) */ memcpy(&mBuf[pos], text, insertedLength); mGapStart += insertedLength; mLength += insertedLength; update_selections(pos, 0, insertedLength); if (mCanUndo) { if (undowidget == this && undoat == pos && undoinsert) { undoinsert += insertedLength; } else { undoinsert = insertedLength; undoyankcut = (undoat == pos) ? undocut : 0; } undoat = pos + insertedLength; undocut = 0; undowidget = this; } return insertedLength; } /* Remove a string from the buffer. Unicode safe. Start and end must be at a character boundary. */ void Fl_Text_Buffer_mod::remove_(int start, int end) { /* if the gap is not contiguous to the area to remove, move it there */ if (mCanUndo) { if (undowidget == this && undoat == end && undocut) { undobuffersize(undocut + end - start + 1); memmove(undobuffer + end - start, undobuffer, undocut); undocut += end - start; } else { undocut = end - start; undobuffersize(undocut); } undoat = start; undoinsert = 0; undoyankcut = 0; undowidget = this; } if (start > mGapStart) { if (mCanUndo) memcpy(undobuffer, mBuf + (mGapEnd - mGapStart) + start, end - start); move_gap(start); } else if (end < mGapStart) { if (mCanUndo) memcpy(undobuffer, mBuf + start, end - start); move_gap(end); } else { int prelen = mGapStart - start; if (mCanUndo) { memcpy(undobuffer, mBuf + start, prelen); memcpy(undobuffer + prelen, mBuf + mGapEnd, end - start - prelen); } } /* expand the gap to encompass the deleted characters */ mGapEnd += end - mGapStart; mGapStart -= mGapStart - start; /* update the length */ mLength -= end - start; /* fix up any selections which might be affected by the change */ update_selections(start, end - start, 0); } /* simple setter. Unicode safe. Start and end must be at a character boundary. */ void Fl_Text_Selection_mod::set(int startpos, int endpos) { mSelected = startpos != endpos; mStart = min(startpos, endpos); mEnd = max(startpos, endpos); } /* simple getter. Unicode safe. Start and end will be at a character boundary. */ int Fl_Text_Selection_mod::position(int *startpos, int *endpos) const { if (!mSelected) return 0; *startpos = mStart; *endpos = mEnd; return 1; } /* Return if a position is inside the selected area. Unicode safe. Pos must be at a character boundary. */ int Fl_Text_Selection_mod::includes(int pos) const { return (selected() && pos >= start() && pos < end() ); } /* Return a duplicate of the selected text, or an empty string. Unicode safe. */ char *Fl_Text_Buffer_mod::selection_text_(Fl_Text_Selection_mod * sel) const { int start, end; /* If there's no selection, return an allocated empty string */ if (!sel->position(&start, &end)) { char *s = (char *) malloc(1); *s = '\0'; return s; } /* Return the selected range */ return text_range(start, end); } /* Remove the selected text. Unicode safe. */ void Fl_Text_Buffer_mod::remove_selection_(Fl_Text_Selection_mod * sel) { int start, end; if (!sel->position(&start, &end)) return; remove(start, end); //undoyankcut = undocut; } /* Replace selection with text. Unicode safe. */ void Fl_Text_Buffer_mod::replace_selection_(Fl_Text_Selection_mod * sel, const char *text) { Fl_Text_Selection_mod oldSelection = *sel; /* If there's no selection, return */ int start, end; if (!sel->position(&start, &end)) return; /* Do the appropriate type of replace */ replace(start, end, text); /* Unselect (happens automatically in BufReplace, but BufReplaceRect can't detect when the contents of a selection goes away) */ sel->mSelected = 0; redisplay_selection(&oldSelection, sel); } /* Call all callbacks. Unicode safe. */ void Fl_Text_Buffer_mod::call_modify_callbacks(int pos, int nDeleted, int nInserted, int nRestyled, const char *deletedText) const { IS_UTF8_ALIGNED2(this, pos) for (int i = 0; i < mNModifyProcs; i++) (*mModifyProcs[i]) (pos, nInserted, nDeleted, nRestyled, deletedText, mCbArgs[i]); } /* Call all callbacks. Unicode safe. */ void Fl_Text_Buffer_mod::call_predelete_callbacks(int pos, int nDeleted) const { for (int i = 0; i < mNPredeleteProcs; i++) (*mPredeleteProcs[i]) (pos, nDeleted, mPredeleteCbArgs[i]); } /* Redisplay a new selected area. Unicode safe. */ void Fl_Text_Buffer_mod::redisplay_selection(Fl_Text_Selection_mod * oldSelection, Fl_Text_Selection_mod * newSelection) const { int oldStart, oldEnd, newStart, newEnd, ch1Start, ch1End, ch2Start, ch2End; /* If either selection is rectangular, add an additional character to the end of the selection to request the redraw routines to wipe out the parts of the selection beyond the end of the line */ oldStart = oldSelection->mStart; newStart = newSelection->mStart; oldEnd = oldSelection->mEnd; newEnd = newSelection->mEnd; /* If the old or new selection is unselected, just redisplay the single area that is (was) selected and return */ if (!oldSelection->mSelected && !newSelection->mSelected) return; if (!oldSelection->mSelected) { call_modify_callbacks(newStart, 0, 0, newEnd - newStart, NULL); return; } if (!newSelection->mSelected) { call_modify_callbacks(oldStart, 0, 0, oldEnd - oldStart, NULL); return; } /* If the selections are non-contiguous, do two separate updates and return */ if (oldEnd < newStart || newEnd < oldStart) { call_modify_callbacks(oldStart, 0, 0, oldEnd - oldStart, NULL); call_modify_callbacks(newStart, 0, 0, newEnd - newStart, NULL); return; } /* Otherwise, separate into 3 separate regions: ch1, and ch2 (the two changed areas), and the unchanged area of their intersection, and update only the changed area(s) */ ch1Start = min(oldStart, newStart); ch2End = max(oldEnd, newEnd); ch1End = max(oldStart, newStart); ch2Start = min(oldEnd, newEnd); if (ch1Start != ch1End) call_modify_callbacks(ch1Start, 0, 0, ch1End - ch1Start, NULL); if (ch2Start != ch2End) call_modify_callbacks(ch2Start, 0, 0, ch2End - ch2Start, NULL); } /* Move the gap around without changing buffer content. Unicode safe. Pos must be at a character boundary. */ void Fl_Text_Buffer_mod::move_gap(int pos) { int gapLen = mGapEnd - mGapStart; if (pos > mGapStart) memmove(&mBuf[mGapStart], &mBuf[mGapEnd], pos - mGapStart); else memmove(&mBuf[pos + gapLen], &mBuf[pos], mGapStart - pos); mGapEnd += pos - mGapStart; mGapStart += pos - mGapStart; } /* Create a larger gap. Unicode safe. Start must be at a character boundary. */ void Fl_Text_Buffer_mod::reallocate_with_gap(int newGapStart, int newGapLen) { char *newBuf = (char *) malloc(mLength + newGapLen); int newGapEnd = newGapStart + newGapLen; if (newGapStart <= mGapStart) { memcpy(newBuf, mBuf, newGapStart); memcpy(&newBuf[newGapEnd], &mBuf[newGapStart], mGapStart - newGapStart); memcpy(&newBuf[newGapEnd + mGapStart - newGapStart], &mBuf[mGapEnd], mLength - mGapStart); } else { /* newGapStart > mGapStart */ memcpy(newBuf, mBuf, mGapStart); memcpy(&newBuf[mGapStart], &mBuf[mGapEnd], newGapStart - mGapStart); memcpy(&newBuf[newGapEnd], &mBuf[mGapEnd + newGapStart - mGapStart], mLength - newGapStart); } free((void *) mBuf); mBuf = newBuf; mGapStart = newGapStart; mGapEnd = newGapEnd; } /* Update selection range if characters were inserted. Unicode safe. Pos must be at a character boundary. */ void Fl_Text_Buffer_mod::update_selections(int pos, int nDeleted, int nInserted) { mPrimary.update(pos, nDeleted, nInserted); mSecondary.update(pos, nDeleted, nInserted); mHighlight.update(pos, nDeleted, nInserted); } // unicode safe, assuming the arguments are on character boundaries void Fl_Text_Selection_mod::update(int pos, int nDeleted, int nInserted) { if (!mSelected || pos > mEnd) return; if (pos + nDeleted <= mStart) { mStart += nInserted - nDeleted; mEnd += nInserted - nDeleted; } else if (pos <= mStart && pos + nDeleted >= mEnd) { mStart = pos; mEnd = pos; mSelected = 0; } else if (pos <= mStart && pos + nDeleted < mEnd) { mStart = pos; mEnd = nInserted + mEnd - nDeleted; } else if (pos < mEnd) { mEnd += nInserted - nDeleted; if (mEnd <= mStart) mSelected = 0; } } /* Find a UCS-4 character. StartPos must be at a character boundary, searchChar is UCS-4 encoded. */ int Fl_Text_Buffer_mod::findchar_forward(int startPos, unsigned searchChar, int *foundPos) const { if (startPos >= mLength) { *foundPos = mLength; return 0; } if (startPos<0) startPos = 0; for ( ; startPos mLength) startPos = mLength; for (startPos = prev_char(startPos); startPos>=0; startPos = prev_char(startPos)) { if (searchChar == char_at(startPos)) { *foundPos = startPos; return 1; } } *foundPos = 0; return 0; } //#define EXAMPLE_ENCODING // shows how to process any encoding for which a decoding function exists #ifdef EXAMPLE_ENCODING // returns the UCS equivalent of *p in CP1252 and advances p by 1 unsigned cp1252toucs(char* &p) { // Codes 0x80..0x9f from the Microsoft CP1252 character set, translated // to Unicode static unsigned cp1252[32] = { 0x20ac, 0x0081, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021, 0x02c6, 0x2030, 0x0160, 0x2039, 0x0152, 0x008d, 0x017d, 0x008f, 0x0090, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, 0x02dc, 0x2122, 0x0161, 0x203a, 0x0153, 0x009d, 0x017e, 0x0178 }; unsigned char uc = *(unsigned char*)p; p++; return (uc < 0x80 || uc >= 0xa0 ? uc : cp1252[uc - 0x80]); } // returns the UCS equivalent of *p in UTF-16 and advances p by 2 (or more for surrogates) unsigned utf16toucs(char* &p) { union { #if WORDS_BIGENDIAN struct { unsigned char a, b;} chars; #else struct { unsigned char b, a;} chars; #endif U16 short_val; } u; u.chars.a = *(unsigned char*)p++; u.chars.b = *(unsigned char*)p++; return u.short_val; } // filter that produces, from an input stream fed by reading from fp, // a UTF-8-encoded output stream written in buffer. // Input can be any (e.g., 8-bit, UTF-16) encoding. // Output is true UTF-8. // p_trf points to a function that transforms encoded byte(s) into one UCS // and that increases the pointer by the adequate quantity static int general_input_filter(char *buffer, int buflen, char *line, int sline, char* &endline, unsigned (*p_trf)(char* &), FILE *fp) { char *p, *q, multibyte[5]; int lq, r, offset; p = endline = line; q = buffer; while (q < buffer + buflen) { if (p >= endline) { r = fread(line, 1, sline, fp); endline = line + r; if (r == 0) return q - buffer; p = line; } if (q + 4 /*max width of utf-8 char*/ > buffer + buflen) { memmove(line, p, endline - p); endline -= (p - line); return q - buffer; } lq = fl_utf8encode( p_trf(p), multibyte ); memcpy(q, multibyte, lq); q += lq; } memmove(line, p, endline - p); endline -= (p - line); return q - buffer; } #endif // EXAMPLE_ENCODING /* filter that produces, from an input stream fed by reading from fp, a UTF-8-encoded output stream written in buffer. Input can be UTF-8. If it is not, it is decoded with CP1252. Output is UTF-8. *input_was_changed is set to true if the input was not strict UTF-8 so output differs from input. */ static int utf8_input_filter(char *buffer, int buflen, char *line, int sline, char* &endline, FILE *fp, int *input_was_changed) { char *p, *q, multibyte[5]; int l, lp, lq, r; unsigned u; p = endline = line; q = buffer; while (q < buffer + buflen) { if (p >= endline) { r = fread(line, 1, sline, fp); endline = line + r; if (r == 0) return q - buffer; p = line; } l = fl_utf8len1(*p); if (p + l > endline) { memmove(line, p, endline - p); endline -= (p - line); r = fread(endline, 1, sline - (endline - line), fp); endline += r; p = line; if (endline - line < l) break; } while ( l > 0) { u = fl_utf8decode(p, p+l, &lp); lq = fl_utf8encode(u, multibyte); if (lp != l || lq != l) *input_was_changed = true; if (q + lq > buffer + buflen) { memmove(line, p, endline - p); endline -= (p - line); return q - buffer; } memcpy(q, multibyte, lq); q += lq; p += lp; l -= lp; } } memmove(line, p, endline - p); endline -= (p - line); return q - buffer; } const char *Fl_Text_Buffer_mod::file_encoding_warning_message = "Displayed text contains the UTF-8 transcoding\n" "of the input file which was not UTF-8 encoded.\n" "Some changes may have occurred."; /* Insert text from a file. Input file can be of various encodings according to what input fiter is used. utf8_input_filter accepts UTF-8 or CP1252 as input encoding. Output is always UTF-8. */ int Fl_Text_Buffer_mod::insertfile(const char *file, int pos, int buflen) { FILE *fp; if (!(fp = fl_fopen(file, "r"))) return 1; char *buffer = new char[buflen + 1]; char *endline, line[100]; int l; input_file_was_transcoded = false; endline = line; while (true) { #ifdef EXAMPLE_ENCODING // example of 16-bit encoding: UTF-16 l = general_input_filter(buffer, buflen, line, sizeof(line), endline, utf16toucs, // use cp1252toucs to read CP1252-encoded files fp); input_file_was_transcoded = true; #else l = utf8_input_filter(buffer, buflen, line, sizeof(line), endline, fp, &input_file_was_transcoded); #endif if (l == 0) break; buffer[l] = 0; insert(pos, buffer); pos += l; } int e = ferror(fp) ? 2 : 0; fclose(fp); delete[]buffer; if ( (!e) && input_file_was_transcoded && transcoding_warning_action) { transcoding_warning_action(this); } return e; } /* Write text to file. Unicode safe. */ int Fl_Text_Buffer_mod::outputfile(const char *file, int start, int end, int buflen) { FILE *fp; if (!(fp = fl_fopen(file, "w"))) return 1; for (int n; (n = min(end - start, buflen)); start += n) { const char *p = text_range(start, start + n); int r = fwrite(p, 1, n, fp); free((void *) p); if (r != n) break; } int e = ferror(fp) ? 2 : 0; fclose(fp); return e; } /* Return the previous character position. Unicode safe. */ int Fl_Text_Buffer_mod::prev_char_clipped(int pos) const { if (pos<=0) return 0; IS_UTF8_ALIGNED2(this, (pos)) char c; do { pos--; if (pos==0) return 0; c = byte_at(pos); } while ( (c&0xc0) == 0x80); IS_UTF8_ALIGNED2(this, (pos)) return pos; } /* Return the previous character position. Returns -1 if the beginning of the buffer is reached. */ int Fl_Text_Buffer_mod::prev_char(int pos) const { if (pos==0) return -1; return prev_char_clipped(pos); } /* Return the next character position. Returns length() if the end of the buffer is reached. */ int Fl_Text_Buffer_mod::next_char(int pos) const { IS_UTF8_ALIGNED2(this, (pos)) int n = fl_utf8len1(byte_at(pos)); pos += n; if (pos>=mLength) return mLength; IS_UTF8_ALIGNED2(this, (pos)) return pos; } /* Return the next character position. If the end of the buffer is reached, it returns the current position. */ int Fl_Text_Buffer_mod::next_char_clipped(int pos) const { return next_char(pos); } /* Align an index to the current UTF-8 boundary. */ int Fl_Text_Buffer_mod::utf8_align(int pos) const { char c = byte_at(pos); while ( (c&0xc0) == 0x80) { pos--; c = byte_at(pos); } return pos; } // // End of "$Id: Fl_Text_Buffer_mod.cxx 8040 2010-12-15 17:38:39Z manolo $". // flamp-2.2.12/src/widgets/pixmaps.cxx0000644000175000017500000010601014463050062014256 00000000000000#include // This file contains custom icons, icons from gtk, and possibly other sources. // audio-card from gnome icon theme /* XPM */ const char *audio_card_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 102 2", " c #3A3E00", ". c #3A3F00", "X c #3B3F00", "o c #2F3536", "O c #303634", "+ c #303735", "@ c #303637", "# c #363D32", "$ c #323835", "% c #313836", "& c #333936", "* c #323937", "= c #343936", "- c #383E31", "; c #3B4000", ": c #3D4104", "> c #3E4206", ", c #657000", "< c #677300", "1 c #687400", "2 c #687502", "3 c #687505", "4 c #6B7704", "5 c #6B7901", "6 c #6C7900", "7 c #6C7801", "8 c #6D7A00", "9 c #6C7A02", "0 c #6F7D01", "q c #707E02", "w c #707E07", "e c #404630", "r c #3D5B50", "t c #38595E", "y c #38595F", "u c #395A5F", "i c #365761", "p c #405C4F", "a c #545650", "s c #545652", "d c #555753", "f c #565852", "g c #565853", "h c #565854", "j c #575955", "k c #585A56", "l c #5A5C58", "z c #5D5E5B", "x c #5E5F5C", "c c #426050", "v c #426251", "b c #646662", "n c #656663", "m c #666864", "M c #676965", "N c #696A67", "B c #696B67", "V c #6E6F6D", "C c #6E706C", "Z c #6F716D", "A c #758201", "S c #748202", "D c #798708", "F c #7F8839", "G c #A3B31A", "H c #A4B31A", "J c #A4B419", "K c #AABA1A", "L c #858E39", "P c #848D3B", "I c #878F3D", "U c #87903B", "Y c #8A9539", "T c #8C9638", "R c #919C38", "E c #949E39", "W c #959F3A", "Q c #959F3B", "! c #929D3C", "~ c #939E3C", "^ c #959F3D", "/ c #95A03C", "( c #96A03C", ") c #97A03C", "_ c #97A13C", "` c #97A23D", "' c #D8EB31", "] c #DBEF33", "[ c #DFF234", "{ c #E0F338", "} c #E4F839", "| c #E8FB38", " . c #EBFF39", ".. c #EFFF65", "X. c #B7B9B5", "o. c #C4C6C2", "O. c #C6C8C4", "+. c #C7C9C5", "@. c #C8CAC6", "#. c #D0D2CE", "$. c #D4D6D2", "%. c None", /* pixels */ "%.%.%.%.%.%.%.%.%.%.%.%.j k j %.", "%.%.%.%.%.%.%.%.%.%.%.d O.#.X.d ", "X a $.d d %.", " E W W W Q Q ( ( ( ^ f $.d %.%.", " ` e * * % % + # c v f $.d l x ", " ` + V Z Z Z C & y u f $.d o.d ", " ` + Z d d d N = 3 8 f $.d h g ", " _ + B M m n b $ p t f $.d %.%.", " ) - @ o o o o O r i f $.d k z ", " / A q 0 9 5 2 1 < , f $.d @.d ", " ~ K S J 6 H 7 G U I f $.d d h ", " ! { D ' 4 ] w [ P : a $.d %.%.", " T ..R } L | Y .F > s $.d %.%.", "; X X X X X X . . . . s +.d %.%.", "%.%.%.%.%.%.%.%.%.%.%.d d d %.%.", "%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%." }; // help-about from gnome /* XPM */ const char *help_about_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 76 1", " c #C4A001", ". c #C5A101", "X c #C5A102", "o c #C6A202", "O c #C6A203", "+ c #C7A403", "@ c #C7A404", "# c #C7A405", "$ c #C7A406", "% c #C7A407", "& c #C7A507", "* c #C8A508", "= c #C9A70B", "- c #C9A80D", "; c #CAA80C", ": c #C9A810", "> c #CCAC12", ", c #CCAC14", "< c #CDAE1B", "1 c #CFB11C", "2 c #D0B11F", "3 c #CFB021", "4 c #D2B522", "5 c #D3B62C", "6 c #D2B62F", "7 c #F6E132", "8 c #F6E235", "9 c #F5E038", "0 c #F7E23A", "q c #F8E33C", "w c #F8E43E", "e c #D9C04A", "r c #E4CE4C", "t c #E4CE4F", "y c #E7D041", "u c #E7D247", "i c #EBD755", "p c #EBD756", "a c #ECD85A", "s c #F8E441", "d c #F9E644", "f c #F6E349", "g c #FBE74A", "h c #F9E74D", "j c #F7E75F", "k c #F8E75A", "l c #FBE95C", "z c #E9D668", "x c #EAD86C", "c c #F6E664", "v c #F6E667", "b c #F8E864", "n c #F8E865", "m c #F9E96B", "M c #FAEB71", "N c #F9EB73", "B c #F8EA7B", "V c #FAEC7C", "C c #F9EC7F", "Z c #EEDF83", "A c #EEDF85", "S c #F7E981", "D c #F8EC88", "F c #F9ED89", "G c #FAED8B", "H c #F8EB8F", "J c #F9EE9B", "K c #FBF097", "L c #FCF2A6", "P c #FCF3AA", "I c #FDF6BC", "U c #FCF7CF", "Y c #FDF8D1", "T c #FDF9DF", "R c #FEFCEE", "E c None", /* pixels */ "EEEEEEE.EEEEEEEE", "EEEEEE@e@EEEEEEE", "EEEEEE3TEEEEEEE", "EEEEEE&4&EEEEEEE", "EEEEEEE EEEEEEEE", "EEEEEEEEEEEEEEEE" }; // insert link icon from gnome /* XPM */ const char *insert_link_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 97 2", " c #2E3436", ". c #2F3536", "X c #363C3D", "o c #373D3E", "O c #464A48", "+ c #464B4C", "@ c #4F524F", "# c #545652", "$ c #555753", "% c #575955", "& c #585A56", "* c #595B57", "= c #5A5B57", "- c #5A5C58", "; c #5B5D58", ": c #5C5D59", "> c #62645F", ", c #656763", "< c #6B6D69", "1 c #6E6F6B", "2 c #6F716D", "3 c #71726F", "4 c #767773", "5 c #777875", "6 c #7C7E79", "7 c #7C7F79", "8 c #CF5F04", "9 c #D06106", "0 c #D86605", "q c #D86706", "w c #F47A03", "e c #F47A04", "r c #F47D0B", "t c #E97910", "y c #E97911", "u c #7E807D", "i c #EA9D4C", "p c #F4B15E", "a c #F5B364", "s c #FDC97D", "d c #838580", "f c #8A8C87", "g c #979B96", "h c #989B95", "j c #9FA19D", "k c #B3B4B0", "l c #B4B7B0", "z c #B7B7B1", "x c #B5B7B2", "c c #B5B8B2", "v c #BABDB6", "b c #BBBEB7", "n c #BBBEB8", "m c #BDBEBB", "M c #C0C0BC", "N c #C2C3BF", "B c #FBD7AA", "V c #FBD9AE", "C c #C4C6C0", "Z c #C5C7C1", "A c #CBCEC8", "S c #CCCEC9", "D c #D0D1CE", "F c #D1D3CE", "G c #D4D4D0", "H c #D6D7D6", "J c #D9DAD8", "K c #DBDCDB", "L c #DEDEDA", "P c #DFDFDD", "I c #FDE6C4", "U c #FEE9CA", "Y c #FEEACC", "T c #E0E0DC", "R c #E0E0DD", "E c #E2E3E2", "W c #E4E4E1", "Q c #E6E6E4", "! c #E7E8E6", "~ c #E9E9E6", "^ c #E8E9E8", "/ c #EDEDEB", "( c #EDEDEC", ") c #EDEEED", "_ c #EEEEEC", "` c #EFF0EE", "' c #F1F1F0", "] c #F3F3F1", "[ c #F3F3F2", "{ c #F4F5F4", "} c #F5F5F4", "| c #F6F6F5", " . c #F6F6F6", ".. c #F8F8F7", "X. c #F9F9F9", "o. c #FDFDFD", "O. c None", /* pixels */ "O.# # # # ; O.O.O.O.O.O.O.O.; # ", "O. .{ [ ` J u - O.O.O.O.- H ) o.", "O.v v v b C F < # $ $ # 5 / A n ", "O.# * $ * 7 b h 1 m m 1 x Z 6 % ", "O.O.& R Q 2 $ $ $ $ $ $ $ $ 3 K ", "O.O.: z L ] } ...X.| ' ( ^ ! E ", "O.O @ 4 M G T W ~ _ P D N k j f ", "O.S c d , = $ $ $ $ $ $ $ $ & > ", "O.v v v l g + X O.O.O.O.X + g l ", "O. . o O.O.O.O.O.O.O.O.o . ", "O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.", "O.O.O.O.O.w e r r r r r e w O.O.", "O.O.O.O.O.O.y V Y I U B t O.O.O.", "O.O.O.O.O.O.O.q a s p 0 O.O.O.O.", "O.O.O.O.O.O.O.O.9 i 9 O.O.O.O.O.", "O.O.O.O.O.O.O.O.O.8 O.O.O.O.O.O." }; // close icon from default gtk theme /* XPM */ const char *close_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 74 1", " c #5A5C58", ". c #5C5E5B", "X c #5C5F5B", "o c #5D5F5B", "O c #5E5F5B", "+ c #5E5F5C", "@ c #5D605A", "# c #5D605B", "$ c #5C615B", "% c #5F605A", "& c #5E615B", "* c #5E605C", "= c #5F605C", "- c #5E615C", "; c #5F615C", ": c #5E605D", "> c #5E615D", ", c #5F625C", "< c #5F625D", "1 c #5F615E", "2 c #5F625E", "3 c #60615B", "4 c #60625D", "5 c #60615E", "6 c #60625E", "7 c #61625E", "8 c #61645F", "9 c #7D807A", "0 c #7E817B", "q c #80827B", "w c #80837E", "e c #82847D", "r c #82857E", "t c #838680", "y c #848681", "u c #848781", "i c #868983", "p c #878983", "a c #868984", "s c #888A85", "d c #898C86", "f c #898D86", "g c #8A8C86", "h c #8A8D88", "j c #8D9089", "k c #8E908A", "l c #8E918B", "z c #8F928C", "x c #8F928D", "c c #91938E", "v c #92948F", "b c #949590", "n c #949691", "m c #959892", "M c #959992", "N c #969994", "B c #979B95", "V c #B1B4AC", "C c #B4B7AF", "Z c #B8BBB3", "A c #B9BCB4", "S c #BABDB5", "D c #BDC0B8", "F c #BDC1B9", "G c #BFC3BB", "H c #C1C4BC", "J c #C3C6BE", "K c #C3C7BF", "L c #C4C8C0", "P c #C5C9C1", "I c #CACEC6", "U c #CBCEC6", "Y c #CDD1C9", "T c None", /* pixels */ "TTTTTTTTTTTTTTTT", "TTTTTTTTTTTTTTTT", "TT681TTTTTT ,5TT", "TT5Ll2TTTT=wZ:TT", "TT4fUx7TT4aDu;TT", "TTT3jYz<;dHs+TTT", "TTTT>kINmJh=TTTT", "TTTTT>BPKM*TTTTT", "TTTTT-vHGc+TTTTT", "TTTT-uFnbSr.TTTT", "TTT=eAg%#iCq$TTT", "TT:9Cp@TTXyV0;TT", "TT;Vp@TTTTOtVoTT", "TT44&TTTTTT&O4TT", "TTTTTTTTTTTTTTTT", "TTTTTTTTTTTTTTTT" }; // enter key icon from KDE's crystal theme /* XPM */ const char *enter_key_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 91 1", " c #5C5C5C", ". c #626262", "X c #666666", "o c #696969", "O c #6B6B6B", "+ c #6C6C6C", "@ c #6E6E6E", "# c #6F6F6F", "$ c #717171", "% c #737373", "& c #747474", "* c #838383", "= c #8D8D8D", "- c #92928F", "; c #939393", ": c #A3A3A2", "> c #A7A7A5", ", c #A7A7A6", "< c #A7A7A7", "1 c #A9A9A8", "2 c #A9A9A9", "3 c #AEAEAD", "4 c #B0B0AE", "5 c #B1B1AF", "6 c #B2B2B0", "7 c #B4B4B2", "8 c #B5B5B3", "9 c #B7B7B6", "0 c #B7B7B7", "q c #B9B9B7", "w c #BABAB9", "e c #BBBBBB", "r c #BCBCBB", "t c #BEBEBC", "y c #C2C2C1", "u c #C4C4C0", "i c #C4C4C4", "p c #C5C5C5", "a c #C6C6C4", "s c #C7C7C7", "d c #C9C9C6", "f c #CBCBC8", "g c #CACACA", "h c #CFCFCD", "j c #D0D0CE", "k c #D1D1CF", "l c #D0D0D0", "z c #D1D1D1", "x c #D2D2D0", "c c #D3D3D1", "v c #D2D2D2", "b c #D3D3D2", "n c #D3D3D3", "m c #D4D4D3", "M c #D4D4D4", "N c #D5D5D5", "B c #D7D7D6", "V c #D7D7D7", "C c #D8D8D8", "Z c #D9D9D8", "A c #D9D9D9", "S c #DADAD9", "D c #DADADA", "F c #DCDCDC", "G c #DDDDDD", "H c #DEDEDE", "J c #DFDFDF", "K c #E0E0E0", "L c #E2E2E2", "P c #E3E3E3", "I c #E4E4E4", "U c #E5E5E5", "Y c #E7E7E7", "T c #E8E8E8", "R c #E9E9E9", "E c #EBEBEB", "W c #ECECEC", "Q c #EDEDED", "! c #EFEFEF", "~ c #F0F0F0", "^ c #F3F3F3", "/ c #F4F4F4", "( c #F5F5F5", ") c #F6F6F6", "_ c #F7F7F7", "` c #F8F8F8", "' c #F9F9F9", "] c #FAFAFA", "[ c #FCFCFC", "{ c #FDFDFD", "} c None", /* pixels */ "}}}}}}}}}}}}}}}}", "}}}}}}fSFFFFFSd}", "}}}}}}c{[[[[['a}", "}}}}}}x]_`'`_`t}", "}}}}}}x)^(p`^/r}", "}}}}}}k^!!%'!!w}", "}}}}}}j~WQ#`EWq}", "}}}}}}yWTR@(TR9}", "}Z)))_/YIU+~PI8}", "}BLHKH,,,,,,,,,:-}", "}}}}}}}}}}}}}}}}" }; // question icon from default gtk theme /* XPM */ const char *dialog_question_48_icon[] = { "48 48 215 2", " c None", ". c #3768A6", "+ c #3968A7", "@ c #3A6AA7", "# c #386BA6", "$ c #3968A5", "% c #A7BEDA", "& c #F4F7FB", "* c #F4F8FB", "= c #A5BDD9", "- c #3769A6", "; c #3869A6", "> c #BBCEE4", ", c #FFFFFF", "' c #FEFEFF", ") c #BBCDE3", "! c #F9FBFD", "~ c #98B9DC", "{ c #99B9DC", "] c #729FCF", "^ c #97B8DB", "/ c #BACDE3", "( c #719ECE", "_ c #709DCD", ": c #709DCE", "< c #6F9CCD", "[ c #6F9CCC", "} c #95B6DA", "| c #B9CDE3", "1 c #6E9CCC", "2 c #6E9BCC", "3 c #6D9BCC", "4 c #6D9ACB", "5 c #94B5D9", "6 c #B9CCE3", "7 c #78A2D0", "8 c #709CCC", "9 c #6C9ACB", "0 c #6C99CA", "a c #6B99CA", "b c #93B4D8", "c c #B9CCE2", "d c #739FCE", "e c #A1BEDE", "f c #C9DAEC", "g c #EBF1F8", "h c #FAFCFD", "i c #E7EEF6", "j c #B7CDE6", "k c #759FCE", "l c #6B98CA", "m c #6A98C9", "n c #6A97C9", "o c #92B3D8", "p c #B9CBE2", "q c #80A8D3", "r c #E8EFF7", "s c #6997C9", "t c #6996C8", "u c #6896C8", "v c #91B2D7", "w c #B8CBE2", "x c #7FA7D2", "y c #FDFDFE", "z c #E9F0F7", "A c #EFF4F9", "B c #BBD0E7", "C c #6895C8", "D c #6795C7", "E c #6794C7", "F c #8FB1D6", "G c #B8CBE1", "H c #7EA6D1", "I c #F2F6FA", "J c #ADC6E1", "K c #749FCD", "L c #6A98CA", "M c #AFC7E2", "N c #E1EAF4", "O c #6694C7", "P c #6694C6", "Q c #6593C6", "R c #8EAFD5", "S c #B7CBE1", "T c #96B7DA", "U c #6C99CB", "V c #709CCB", "W c #719DCC", "X c #7FA5D0", "Y c #6693C6", "Z c #6592C6", "` c #6492C5", " . c #6391C5", ".. c #8DAFD4", "+. c #B0C7E2", "@. c #CBDBEC", "#. c #6391C4", "$. c #6290C4", "%. c #8CADD3", "&. c #B7CAE1", "*. c #3768A5", "=. c #396AA7", "-. c #A4BCD8", ";. c #96B6D8", ">. c #FDFEFE", ",. c #85A9D2", "'. c #6290C3", "). c #618FC3", "!. c #608EC3", "~. c #8BADD3", "{. c #A0B8D6", "]. c #3768A7", "^. c #FEFFFF", "/. c #99B8DA", "(. c #A4BFDD", "_. c #608EC2", ":. c #5F8DC2", "<. c #5F8DC1", "[. c #8AABD2", "}. c #3868A6", "|. c #396AA6", "1. c #87AAD2", "2. c #FBFCFE", "3. c #A1BDDC", "4. c #5F8EC2", "5. c #5E8DC1", "6. c #5E8CC1", "7. c #89AAD1", "8. c #3767A6", "9. c #3969A6", "0. c #92B4D8", "a. c #D0DEEE", "b. c #B1C8E2", "c. c #5D8CC1", "d. c #5D8BC0", "e. c #87AAD1", "f. c #F9FAFD", "g. c #79A0CC", "h. c #5C8BC0", "i. c #87A9D0", "j. c #F9FAFC", "k. c #B6C9E0", "l. c #3767A5", "m. c #90B2D6", "n. c #6B97C7", "o. c #6C97C8", "p. c #6C97C7", "q. c #6C96C7", "r. c #5C8AC0", "s. c #5B8ABF", "t. c #87A8D0", "u. c #3668A4", "v. c #8FB0D6", "w. c #5C8ABF", "x. c #5B89BF", "y. c #86A8D0", "z. c #B6CAE1", "A. c #8DAFD5", "B. c #ECF1F8", "C. c #5A89BF", "D. c #5A89BE", "E. c #85A7CF", "F. c #F8FAFC", "G. c #B6CAE0", "H. c #BACDE2", "I. c #8BADD4", "J. c #F6F8FB", "K. c #5A88BE", "L. c #5988BE", "M. c #5987BD", "N. c #84A7CE", "O. c #89ABD3", "P. c #EBF1F7", "Q. c #5887BD", "R. c #84A6CE", "S. c #88ABD1", "T. c #5886BD", "U. c #5786BC", "V. c #83A6CE", "W. c #82A5CE", "X. c #3667A4", "Y. c #85A8D0", "Z. c #5785BC", "`. c #5685BC", " + c #82A4CD", ".+ c #B6C8E0", "++ c #3767A3", "@+ c #85A8CF", "#+ c #5685BB", "$+ c #5584BB", "%+ c #3667A3", "&+ c #B8CAE1", "*+ c #5684BB", "=+ c #81A4CC", "-+ c #B5C8E0", ";+ c #3566A2", ">+ c #82A5CD", ",+ c #5483BA", "'+ c #B7C9E0", ")+ c #81A4CD", "!+ c #5382BA", "~+ c #80A3CB", "{+ c #B5C8DF", "]+ c #80A3CC", "^+ c #5382B9", "/+ c #7FA2CB", "(+ c #B4C8DF", "_+ c #9DB5D3", ":+ c #F1F5F9", "<+ c #F0F4F9", "[+ c #9CB4D3", "}+ c #3565A1", "|+ c #305D95", "1+ c #3666A3", "2+ c #305D96", " ", " ", " . + @ # ", " $ % & * = - ", " ; > , ' ' , ) ; ", " ; > , ! ~ { ! , ) ; ", " ; > , ! ~ ] ] ~ ! , ) ; ", " ; > , ! ~ ] ] ] ] ~ ! , ) ; ", " ; > , ! ~ ] ] ] ] ] ] ~ ! , ) ; ", " ; > , ! ~ ] ] ] ] ] ] ] ] ~ ! , ) - ", " ; > , ! ~ ] ] ] ] ] ] ] ] ] ] ^ ! , / - ", " ; > , ! ~ ] ] ] ] ] ] ] ] ] ( ( _ ^ ! , / - ", " ; > , ! ~ ] ] ] ] ] ] ] ( ( : _ < < [ } ! , | - ", " ; > , ! ~ ] ] ] ] ] ] ( ( _ _ < < 1 2 3 4 5 ! , 6 - ", " ; > , ! ~ ] ] ] ] ( ( : _ < 7 8 2 2 4 4 9 0 a b ! , c - ", " ; > , ! ~ ] ] ] ( ( d e f g h , ' i j k a a l m n o ! , p - ", " ; > , ! ~ ] ( ( : _ < q , , , , , , , , r k n n s t u v ! , w - ", " ; > , ! ~ ( ( _ _ < < 1 x , , y z A , , , , B t u u C D E F ! , G - ", " ; > , ! ^ : _ < < [ 2 2 4 H I J K l L M , , , N C D D O P Q Q R ! , S - ", " ; > , ! T _ < < 1 2 3 4 9 U V W l m n s X , , , i E O Y Q Z ` ` ...! , S - ", " $ > , ! } < [ 2 2 4 4 9 0 a l L n n s t u +., , , @.Q Q Z ` ` .#.$.$.%.! , &.*. ", " =.-., ! } 1 2 3 4 9 U 0 a l m n s t u u C ;.>., , >.,.` ` .#.$.$.'.).).!.~.! , {.]. ", " . & ^.} 2 4 4 9 0 a l L n n s t u C D D /.y , , ^.(.` .#.$.$.).).)._._.:.<.[.' I }. ", " |.& ^.5 9 U 0 a l m n s t u u C D E O 1.2., , ^.3.#.$.$.'.).).!._.4.:.5.6.6.7.' I 8. ", " 9.-., ! 0.l L n n s t u C D D O P Q Q a., , , b.$.$.).).)._._.:.<.6.6.c.d.e.f., {.8. ", " *./ , ! v s t u u C D E O Y Q Q ` ` r , , , g.).).!._.4.:.5.6.6.d.d.h.i.j., k.l. ", " - ) , ! m.C D D O P Q Q Z ` ` .#.n.o.p.q.'._._.:.<.6.6.c.d.h.r.s.t.j., k.u. ", " - ) , ! v.O Y Q Q ` ` .#.$.$.'.).).!._.4.:.5.6.6.d.d.h.w.s.x.y.j., z.u. ", " - / , ! A.Z ` ` .#.$.$.'.).).B.& & & 6.6.c.d.h.r.s.x.C.D.E.F., G.u. ", " - H., ! I.#.$.$.'.).).!._.4.J., , , d.d.h.w.s.x.C.D.K.E.F., k.u. ", " - c , ! ~.'.).)._._.:.<.6.J., , , r.s.x.x.D.K.L.M.N.F., k.u. ", " - c , ! O._.4.:.5.6.6.d.P.& & & x.C.D.K.L.M.Q.R.F., k.u. ", " - p , ! S.5.6.c.d.h.r.s.x.x.D.K.L.M.Q.T.U.V.F., k.u. ", " l.w , f.i.d.h.w.s.x.C.D.K.L.M.Q.T.U.U.W.F., k.X. ", " l.G , f.Y.x.x.D.K.L.M.Q.T.U.U.Z.`. +F., .+X. ", " ++G , j.@+K.L.M.Q.T.U.U.`.#+$+ +F., .+%+ ", " %+&+, F.V.T.U.U.Z.`.*+$+$+=+F., -+%+ ", " ;+&., F.>+`.#+$+$+,+,+=+F., -+;+ ", " ;+'+, F.)+$+,+,+!+~+F., {+;+ ", " ;+k., F.]+!+^+/+F., {+;+ ", " ;+k., F./+~+F., (+;+ ", " %+k., ^.^., (+%+ ", " ;+_+:+<+[+}+ ", " |+}+1+2+ ", " ", " ", " ", " " }; /* XPM */ const char *clear_sq_icon[] = { "16 16 1 1", " c None", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " " }; const char *clear_row_icon[] = { "16 1 1 1", " c None", " " }; // The lightning bolt icons are based on gmfsk's rx.xpm and tx.xpm /* XPM */ const char *rx1_icon[] = { "16 16 4 1", " c None", ". c #0F1F01", "+ c #4E9A06", "@ c #888A85", " ", " ......... ", " .++++++.@ ", " .++++++.@ ", " .+++++.@ ", " .+++++.@ ", " .++++..... ", " .++++++++.@ ", " .....+++.@ ", " @@.+++.@ ", " .++.@ ", " .++.@ ", " .+.@ ", " .+.@ ", " ..@ ", " " }; /* XPM */ const char *tx1_icon[] = { "16 16 4 1", " c None", ". c #210000", "+ c #A40000", "@ c #888A85", " ", " ......... ", " .++++++.@ ", " .++++++.@ ", " .+++++.@ ", " .+++++.@ ", " .++++..... ", " .++++++++.@ ", " .....+++.@ ", " @@.+++.@ ", " .++.@ ", " .++.@ ", " .+.@ ", " .+.@ ", " ..@ ", " " }; /* XPM */ const char *rx2_icon[] = { "16 16 3 1", " c None", ". c #0F1F01", "+ c #4E9A06", " ", " ......... ", " .++++++. ", " .++++++. ", " .+++++. ", " .+++++. ", " .++++..... ", " .++++++++. ", " .....+++. ", " .+++. ", " .++. ", " .++. ", " .+. ", " .+. ", " .. ", " " }; /* XPM */ const char *tx2_icon[] = { "16 16 3 1", " c None", ". c #210000", "+ c #A40000", " ", " ......... ", " .++++++. ", " .++++++. ", " .+++++. ", " .+++++. ", " .++++..... ", " .++++++++. ", " .....+++. ", " .+++. ", " .++. ", " .++. ", " .+. ", " .+. ", " .. ", " " }; /* XPM */ const char *rx_icon[] = { "16 16 38 1", " c None", ". c #0F1F01", "+ c #64B517", "@ c #62B315", "# c #61B014", "$ c #5EAE12", "% c #5CAC11", "& c #5AA90F", "* c #68BA1B", "= c #66B719", "- c #65B517", "; c #63B315", "> c #60B014", ", c #5EAD13", "' c #6ABD1C", ") c #69BA1A", "! c #66B718", "~ c #64B418", "{ c #6FC11F", "] c #6CBF1E", "^ c #6ABC1C", "/ c #70C421", "( c #6CBE1E", "_ c #6BBC1C", ": c #75C824", "< c #72C622", "[ c #6EC11F", "} c #6CBE1D", "| c #67B819", "1 c #6DBF1E", "2 c #73C622", "3 c #70C321", "4 c #74C924", "5 c #72C522", "6 c #79CD27", "7 c #76CA26", "8 c #7ACF28", "9 c #7FD42B", " ", " ......... ", " .+@#$%&. ", " .*=-;>,. ", " .')!~@. ", " .{]^)=. ", " ./{(_..... ", " .: c #B90C0B", ", c #C81313", "' c #C10F10", ") c #CC1617", "! c #CA1515", "~ c #C71313", "{ c #CF1818", "] c #CC1616", "^ c #D41A1A", "/ c #D11819", "( c #CF1718", "_ c #C71414", ": c #CA1514", "< c #C81413", "[ c #D21919", "} c #CF1817", "| c #CD1616", "1 c #D11818", "2 c #D81D1D", "3 c #D61B1B", "4 c #DB1E1E", "5 c #E02121", " ", " ......... ", " .+@#$%&. ", " .*=-@;>. ", " .,*='@. ", " .)!~*=. ", " .{]!,..... ", " .^/(]!_*=. ", " .....]:<. ", " .[}|. ", " .^1. ", " .23. ", " .4. ", " .5. ", " .. ", " "}; // pskreporter.info "favicon" /* XPM */ const char *pskr_icon[] = { "16 16 3 1", " c None", ". c #FF0000", "+ c #FFFF00", " .. ", " ... ", " ..... ", " .....+.. ", ". ...++++... ", ".. ..+++++. .. ", "....++++++..+. ", "..+++++++++++.. ", "..+++++++.++++. ", "....+++++..++.. ", ".. ..+++++.... ", ". ..+++++.. ", " ...+... ", " .... ", " .. ", " . "}; /* XPM */ const char * flamp_icon[] = { "64 64 215 2", " c None", ". c #000000", "+ c #C80015", "@ c #C90016", "# c #C90015", "$ c #C80016", "% c #FF6308", "& c #FF6309", "* c #E85A08", "= c #170900", "- c #5D2403", "; c #FA6108", "> c #FF6208", ", c #FF6209", "' c #E75908", ") c #160800", "! c #592303", "~ c #F96108", "{ c #FFB414", "] c #FFB514", "^ c #FFB515", "/ c #FF6107", "( c #FFB415", "_ c #020000", ": c #0A0300", "< c #FEB415", "[ c #FE6309", "} c #FEB414", "| c #FDB315", "1 c #FD6208", "2 c #FEB315", "3 c #FDB415", "4 c #FDB414", "5 c #FCB315", "6 c #FBB215", "7 c #FAB114", "8 c #FA6109", "9 c #FB6208", "0 c #FB6209", "a c #FC6209", "b c #FD6109", "c c #FE6308", "d c #FCB314", "e c #F9B114", "f c #F8B014", "g c #F7AE14", "h c #F5AE14", "i c #F3AC13", "j c #F0AB13", "k c #F15D08", "l c #F35E08", "m c #F45F09", "n c #F66009", "o c #F86009", "p c #F96008", "q c #FC6109", "r c #FD6209", "s c #FE6209", "t c #F6AE14", "u c #F0AA14", "v c #ECA813", "w c #E9A513", "x c #E5A313", "y c #E55908", "z c #EC5B08", "A c #EF5C08", "B c #F25E09", "C c #F65F09", "D c #F96109", "E c #FB6109", "F c #F45E08", "G c #EEA913", "H c #EDA813", "I c #E7A412", "J c #E2A112", "K c #DC9D12", "L c #CA8F10", "M c #BD4906", "N c #C94E07", "O c #D15107", "P c #D95407", "Q c #E05707", "R c #E85907", "S c #EC5C08", "T c #F25E08", "U c #F45F08", "V c #F85F08", "W c #DF9E11", "X c #E8A513", "Y c #E1A012", "Z c #DB9B11", "` c #D59711", " . c #B07D0E", ".. c #FB6108", "+. c #F55F09", "@. c #E4A212", "#. c #E6A313", "$. c #DF9E12", "%. c #D89911", "&. c #D19411", "*. c #B27E0E", "=. c #F76008", "-. c #EBA713", ";. c #DE9E12", ">. c #D79811", ",. c #D09310", "'. c #C68C0F", "). c #9B0010", "!. c #A20012", "~. c #A80012", "{. c #AE0012", "]. c #B40014", "^. c #B80013", "/. c #BC0014", "(. c #C00015", "_. c #C20015", ":. c #C10014", "<. c #FE6208", "[. c #FC6107", "}. c #F0AA13", "|. c #ECA713", "1. c #E6A312", "2. c #E09F12", "3. c #D99A11", "4. c #D29511", "5. c #CB9011", "6. c #B07D0D", "7. c #8D000F", "8. c #9F0011", "9. c #A30011", "0. c #AA0012", "a. c #AF0012", "b. c #B90014", "c. c #BC0015", "d. c #C00014", "e. c #C30015", "f. c #F6AF13", "g. c #F4AD13", "h. c #E5A212", "i. c #D19511", "j. c #CC9010", "k. c #A9770D", "l. c #8D000E", "m. c #A40011", "n. c #AE0013", "o. c #B40013", "p. c #BF0015", "q. c #C20014", "r. c #F7AF13", "s. c #FAB115", "t. c #F7B014", "u. c #F2AB14", "v. c #EEA914", "w. c #E9A613", "x. c #E5A213", "y. c #D99A12", "z. c #D49611", "A. c #BE860F", "B. c #9B0011", "C. c #A50012", "D. c #AA0013", "E. c #B30014", "F. c #B70013", "G. c #BA0014", "H. c #BE0015", "I. c #C40016", "J. c #FCB214", "K. c #FBB315", "L. c #F3AD14", "M. c #E4A213", "N. c #B27D0D", "O. c #94000F", "P. c #AF0013", "Q. c #B20013", "R. c #B60014", "S. c #C50015", "T. c #C60015", "U. c #FDB314", "V. c #FBB214", "W. c #F9B014", "X. c #F7AF14", "Y. c #F1AB13", "Z. c #980010", "`. c #A60012", " + c #B30013", ".+ c #B70014", "++ c #BD0014", "@+ c #C40015", "#+ c #C70016", "$+ c #C70015", "%+ c #FEB314", "&+ c #AB0013", "*+ c #A50011", "=+ c #9E0011", "-+ c #970010", ";+ c #93000F", ">+ c #930010", ",+ c #9E0010", "'+ c #B90013", ")+ c #BD0015", "!+ c #C50016", "~+ c #C60016", "{+ c #B00013", "]+ c #AB0012", "^+ c #AD0013", "/+ c #B50014", "(+ c #BE0014", "_+ c #BB0014", ":+ c #B80014", "<+ c #B50013", "[+ c #B60013", "}+ c #FBB513", "|+ c #FDB515", "1+ c #FEB614", "2+ c #C10015", " . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . ", " . . . . . . . . . . . ", " . . . . . . . . . ", " . . . . . . . ", " . . . . . . ", " . . . . . . ", " . . . . . . ", " . . . . . . ", " . . . . . . ", " . . . . . . + @ @ @ @ @ # ", " . . . . . . @ @ + @ @ @ @ $ @ + ", " . . . . . . # @ @ @ @ @ @ @ @ + @ ", " % % & * = . . . . - ; & + @ # @ @ @ @ @ @ + @ ", " > & , & & & ' ) . . . . ! ~ % , + @ $ # @ $ @ @ @ ", " { { > & > & & ' ) . . . . ! ~ , & & # @ @ @ + + ", " ] ^ ] ] { / & , & ' ) . . . . ! ~ & & % , > ", " ] ^ ^ ] ^ ( ^ ( > % & * = . . . . - ; & > & & & % > > , > > % > > , ", " { ^ ] ^ ^ ^ ^ ^ ( { _ . . . . : & , % , , & & % & & , & & % > ", " ( ] ^ ^ < ^ ^ ^ ^ ] ^ { . . . . . . % & & % , & & & [ & & , % ", " ^ ] ^ ^ ^ ^ < < } < | . . . . . . 1 [ [ [ [ [ & & , % , % ", " } < 2 < < 3 4 5 6 6 7 . . . . . . 8 9 0 a a b [ [ [ c 1 ", " d d 6 e f g h i j . . . . . . k l m n o p 8 q a r ", " > > & , > [ s 1 i t i u v w x . . . . . . y * z A B C o D E ; ", " , & & > & [ r c q E F G H I J K L . . . . . . M N O P Q R S T U V ", " & > & & & [ [ q q ; o W X Y Z ` . . . . . . . ", " > & & & & [ [ r ..; +. @.#.$.%.&.*. . . . . . . ", " , % & s [ [ 1 E =. -.x ;.>.,.'. . . . . . . ).!.~.{.].^./.(._.:. ", " > % <.r [. }.|.1.2.3.4.5.6. . . . . . . 7.8.9.0.a.].b.c.d.e. ", " f f.g.u -.h.$.3.i.j.k. . . . . . . l.8.m.0.n.o.^./.p.q.q. ", " r.s.t.h u.v.w.x.;.y.z.A. . . . . . . B.C.D.a.E.F.G.H.(.q.I. ", " J.K.s.f t L.u v w M.$.3.N. . . . . . . O.0.P.Q.R.G.c.p._.e.S.T. ", " J.U.| 5 V.W.X.g.Y.G w Z.`.n. +.+G.++d.q.@+S.T.#+$+ ", " %+< < U.d 6 W.t {.&+*+=+-+;+>+Z.,+`.D.n.Q.R.'+)+p.:.@+!+~+$+$ $ $+ ", " ( ] < < 3 6 b.R. +{+n.&+]+]+]+^+P.Q./+b./.(+(+++ ", " ( } < d.p.++_+:+F.o.<+<+<+[+:+G./.H.G. }+|+1+ ", " T.!+e._._.2+(.p.H.H.H.(.(.2+_. W.5 3 < } ^ } ^ { ", " $+~+$+#+~+#+~+!+!+!+!+!+!+~+~+S. J.< } < ^ ^ < ^ { ^ ( ", " #+#+ < ^ ^ ^ ^ ^ ^ ^ ^ ^ ] ] ", " { ^ ] ( ^ ^ ^ { ^ ^ { ", " { ( ^ ^ ^ ^ ^ { { ", " "}; flamp-2.2.12/src/include/0000775000175000017500000000000014607053767012131 500000000000000flamp-2.2.12/src/include/script_parsing.h0000664000175000017500000005150414507650001015235 00000000000000//====================================================================== // script_parsing.h (FLAMP) // // Author(s): // // Robert Stiles, KK5VD, Copyright (C) 2014 // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ===================================================================== #ifndef __script_parsing__ #define __script_parsing__ #include #include #define MAX_CMD_PARAMETERS 5 #define MAX_COMMAND_LENGTH 128 #define MAX_PARAMETER_LENGTH FILENAME_MAX #define MAX_READLINE_LENGTH (FILENAME_MAX+FILENAME_MAX) #define MAX_SUB_SCRIPTS 5 #define SCRIPT_FILE_TAG ((char *)"FLAMP_CONFIG") #define CALL_MEMBER_FN(object,ptrToMember) ((object).*(ptrToMember)) #define RESET_ALL 0x01 #define RESET_PARTIAL 0X02 #define CMD_AUTO_LOAD_QUEUE "AUTO LOAD QUEUE" #define CMD_BASE "BASE" #define CMD_BLOCKS "BLOCKS" #define CMD_CALLFROM "CALLFROM" #define CMD_CALLTO "CALLTO" #define CMD_CLEAR_MISSING "CLEAR MISSING" #define CMD_CLEAR_RXQ "CLEAR RXQ" #define CMD_CLEAR_TXQ "CLEAR TXQ" #define CMD_COMP "COMP" #define CMD_EVENT "EVENT" #define CMD_EVENT_FOREVER "EVENT FOREVER" #define CMD_EVENT_TIMES "EVENT TIMES" #define CMD_EVENT_TIMED "EVENT TIMED" #define CMD_EVENT_TYPE "EVENT TYPE" #define CMD_FILE "FILE" #define CMD_HAMCAST "HAMCAST" #define CMD_HAMCAST_MODEM "HAMCAST MODEM" #define CMD_HDR_REPEAT "HDR REPEAT" #define CMD_HEADER "HEADER" #define CMD_HEADER_MODEM "HEADER MODEM" #define CMD_INFO "INFO" #define CMD_INHIBIT_HEADER "INHIBIT HEADER" #define CMD_INTERVAL "INTERVAL" #define CMD_LOAD_QUEUE "LOAD QUEUE" #define CMD_LOAD_TXDIR "LOAD TXDIR" #define CMD_MODEM "MODEM" #define CMD_PATH "PATH" #define CMD_PROTO "PROTO" #define CMD_QUEUE_FILEPATH "QUEUE FILEPATH" #define CMD_RESET "RESET" #define CMD_RX_INTERVAL "RX INTERVAL" #define CMD_SYNC_WITH "SYNC WITH" #define CMD_TX_INTERVAL "TX INTERVAL" #define CMD_TX_REPORT "TX REPORT" #define CMD_UNPROTO_MARKERS "UNPROTO MARKERS" #define CMD_WARN_USER "WARN USER" #define CMD_XMIT_REPEAT "XMIT REPEAT" //! @enum _event_types //! Event types. //! @typedef EVENT_TYPES //! @see _event_types typedef enum _event_types { et_5_min = 0, et_15_min, et_30_min, et_hourly, et_even_hours, et_odd_hours, et_repeat_at, et_one_time_at, et_continious_at, } EVENT_TYPES; //! @enum script_codes //! Error codes. //! @typedef SCRIPT_CODES //! @see script_codes typedef enum script_codes { script_command_not_found = -100, //!< Script command not found. script_file_not_found, //!< Script file not found. script_path_not_found, //!< Script directory path not found. script_non_script_file, //!< Opened file not a Script file. script_max_sub_script_reached, //!< Maximum open subscripts reached. script_subscript_exec_fail, //!< Subscript execution fail (internal). script_incorrectly_assigned_value, //!< Incorrect parameter type. script_invalid_parameter, //!< Parameter is not valid. script_parameter_error, //!< Script parameter invalid. script_function_parameter_error, //!< Function parameter error (internal, non script error). script_mismatched_quotes, //!< Opening or closing quotes missing prior to reaching end if line. script_command_seperator_missing, //!< Command missing ':' script_args_eol, //!< Reached end of args list sooner then expected script_param_check_eol, //!< Reached end of parameter check list sooner then expected script_paramter_exceeds_length, //!< Data length exceeds expectations script_memory_allocation_error, //!< Memory Allocation Error (Non-Script internal Error). script_general_error = -1, //!< General purpose error (undefined erros). script_no_errors, //!< No Errors script_char_match_not_found, //!< Search char not found (Warning) script_end_of_line_reached //!< End of line reached (Warning) } SCRIPT_CODES; class ScriptParsing; typedef SCRIPT_CODES (ScriptParsing::*calling_func)(struct script_cmds *); //! @enum paramter_types //! Parameter type flags. Used to validate the informarion. //! @typedef PARAM_TYPES //! @see paramter_types typedef enum paramter_types { p_null = 0, p_char, p_int, p_unsigned_int, p_long, p_unsigned_long, p_float, p_double, p_string, p_path, p_filename, } PARAM_TYPES; #define QUEUE_COMMAND 0x0001 #define SCRIPT_COMMAND 0x0002 //! @struct script_cmds //! Vector table of script command string and executing function member. //! @typedef SCRIPT_COMMANDS //! @see script_cmds typedef struct script_cmds { char command[MAX_COMMAND_LENGTH]; //!< Command matching string. int flags; //!< General purpose flags size_t command_length; //!< Number of chacters in the command string. int argc; //!< Number of required prarmeters for the command char *args[MAX_CMD_PARAMETERS+1]; //!< String vector table of parameters enum paramter_types param_check[MAX_CMD_PARAMETERS+1]; //!< Flags to determine type of parameter. const char **valid_values; //!< A list of valid paramters. int valid_value_count; //!< The number of valid paramters. calling_func func; //!< The function (member) to execute on positive match. int (*cb)(ScriptParsing *sp, struct script_cmds *sd); //!< Call back function for script command } SCRIPT_COMMANDS; //! @class script_parsing_class class ScriptParsing { public: private: pthread_mutex_t ac; //. // * * Please report all bugs and problems on the following page: * * http://www.fltk.org/str.php */ #ifndef flstring_h # define flstring_h #include // versions of FLTK < 1.3.2 do not contain fl_string #if (FLAMP_FLTK_API_MAJOR == 1 && FLAMP_FLTK_API_MINOR == 3 && FLAMP_FLTK_API_PATCH < 1) # include # include # include # include # include # ifdef HAVE_STRINGS_H # include # endif /* HAVE_STRINGS_H */ # include /* * Apparently Unixware defines "index" to strchr (!) rather than * providing a proper entry point or not providing the (obsolete) * BSD function. Make sure index is not defined... */ # ifdef index # undef index # endif /* index */ # if defined(WIN32) && !defined(__CYGWIN__) # define strcasecmp(s,t) _stricmp((s), (t)) # define strncasecmp(s,t,n) _strnicmp((s), (t), (n)) // Visual C++ 2005 incorrectly displays a warning about the use of POSIX APIs // on Windows, which is supposed to be POSIX compliant... Some of these functions // are also defined in ISO C99... # define strdup _strdup # define unlink _unlink # elif defined(__EMX__) # define strcasecmp(s,t) stricmp((s), (t)) # define strncasecmp(s,t,n) strnicmp((s), (t), (n)) # endif /* WIN32 */ # ifdef __cplusplus extern "C" { # endif /* __cplusplus */ /* * MetroWerks' CodeWarrior put thes "non-standard" functions in * which unfortunatly does not play well otherwise * when included - to be resolved... */ # if defined(__APPLE__) && defined(__MWERKS__) && defined(_MSL_USING_MW_C_HEADERS) int strcasecmp(const char*,const char*); int strncasecmp(const char*,const char*,int); char *strdup(const char*); # endif FL_EXPORT extern int fl_snprintf(char *, size_t, const char *, ...); # if !HAVE_SNPRINTF # define snprintf fl_snprintf # endif /* !HAVE_SNPRINTF */ FL_EXPORT extern int fl_vsnprintf(char *, size_t, const char *, va_list ap); # if !HAVE_VSNPRINTF # define vsnprintf fl_vsnprintf # endif /* !HAVE_VSNPRINTF */ /* * strlcpy() and strlcat() are some really useful BSD string functions * that work the way strncpy() and strncat() *should* have worked. */ FL_EXPORT extern size_t fl_strlcat(char *, const char *, size_t); # if !HAVE_STRLCAT # define strlcat fl_strlcat # endif /* !HAVE_STRLCAT */ FL_EXPORT extern size_t fl_strlcpy(char *, const char *, size_t); # if !HAVE_STRLCPY # define strlcpy fl_strlcpy # endif /* !HAVE_STRLCPY */ # ifdef __cplusplus } # endif /* __cplusplus */ #endif /* < FLTK < 1.3.0 */ #endif /* !flstring_h */ flamp-2.2.12/src/include/timeops.h0000664000175000017500000000412414507650001013662 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flamp // // fldigi is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // fldigi is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef TIMEOPS_H_ #define TIMEOPS_H_ #include #include #include #ifdef __MINGW32__ # include "compat.h" # include //#endif #else # if !HAVE_CLOCK_GETTIME enum clockid_t { CLOCK_REALTIME, CLOCK_MONOTONIC }; int clock_gettime(clockid_t clock_id, struct timespec* tp); # endif #endif struct timespec operator+(const struct timespec &t0, const double &t); struct timespec operator-(const struct timespec &t0, const struct timespec &t1); struct timespec& operator-=(struct timespec &t0, const struct timespec &t1); bool operator>(const struct timespec &t0, const struct timespec &t1); bool operator==(const struct timespec &t0, const struct timespec &t1); struct timeval operator+(const struct timeval &t0, const double &t); struct timeval operator-(const struct timeval &t0, const struct timeval &t1); struct timeval& operator-=(struct timeval &t0, const struct timeval &t1); bool operator>(const struct timeval &t0, const struct timeval &t1); bool operator==(const struct timeval &t0, const struct timeval &t1); #ifndef GMTIME_R extern struct tm *gmtime_r(const time_t *timer, struct tm *tmbuf); extern struct tm *localtime_r(const time_t *_Time,struct tm *_Tm); #endif #endif // TIMEOPS_H_ flamp-2.2.12/src/include/compat-mingw.h0000664000175000017500000000342214507650001014604 00000000000000#ifndef MINGW_H_ #define MINGW_H_ #include #include #include #ifdef __cplusplus extern "C" { #endif // typedef int pid_t; typedef long suseconds_t; #define hstrerror strerror #ifndef SIGUSR2 # define SIGUSR2 100 #endif /* * simple adaptors */ static inline int mingw_mkdir(const char *path, int mode) { return mkdir(path); } #define mkdir mingw_mkdir static inline int mingw_unlink(const char *pathname) { /* read-only files cannot be removed */ chmod(pathname, 0666); return unlink(pathname); } #define unlink mingw_unlink /* * implementations of missing functions */ unsigned int sleep (unsigned int seconds); char *mingw_getcwd(char *pointer, int len); #define getcwd mingw_getcwd char *mingw_getenv(const char *name); #define getenv mingw_getenv int mingw_rename(const char*, const char*); #define rename mingw_rename #ifndef SHUT_WR # define SHUT_WR SD_SEND #endif #ifndef SHUT_RD # define SHUT_RD SD_RECEIVE #endif #ifndef SHUT_RDWR # define SHUT_RDWR SD_BOTH #endif #ifndef EADDRINUSE # define EADDRINUSE WSAEADDRINUSE #endif int nanosleep (const struct timespec *req, struct timespec *rem); int socketpair(int family, int type, int protocol, int *sv); /* uname */ #define UTSNAME_MAX_ 257 struct utsname { char sysname[UTSNAME_MAX_]; char nodename[UTSNAME_MAX_]; char release[UTSNAME_MAX_]; char version[UTSNAME_MAX_]; char machine[UTSNAME_MAX_]; }; int uname(struct utsname *name); /* getrusage */ #define RUSAGE_SELF 0 #define RUSAGE_CHILDREN (-1) struct rusage { struct timeval ru_utime; struct timeval ru_stime; }; int getrusage(int who, struct rusage *usage); /* fsync, fdatasync */ #include #define fsync _commit #define fdatasync fsync #ifdef __cplusplus } #endif #endif flamp-2.2.12/src/include/fl_lock.h0000644000175000017500000000535414463050061013620 00000000000000// ---------------------------------------------------------------------------- // fl_lock.h // // Copyright (C) 2007 // Stelios Bounanos, M0GLD // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ---------------------------------------------------------------------------- #ifndef FL_LOCK_H_ #define FL_LOCK_H_ // disabled calls #define FL_LOCK_D(x) ((void)0) #define FL_UNLOCK_D(x) ((void)0) #define FL_AWAKE_D(x) ((void)0) // enabled calls #define FL_LOCK_E(x) FL_LOCK(x) #define FL_UNLOCK_E(x) FL_UNLOCK(x) #define FL_AWAKE_E(x) FL_AWAKE(x) #if !defined(NDEBUG) && !defined(NO_LOCKS) # include #endif #ifdef NDEBUG # define FL_LOCK(x) Fl::lock(x) # define FL_UNLOCK(x) Fl::unlock(x) # define FL_AWAKE(x) Fl::awake(x) #else // debugging # include # ifndef NO_LOCKS # include "debug.h" # define FL_LOCK(x) \ do { \ switch (GET_THREAD_ID()) { \ case TRX_TID: \ LOG_ERROR("trx lock"); \ break; \ case FLMAIN_TID: \ LOG_WARN("flrun lock"); \ break; \ default: \ LOG_VERBOSE("lock"); \ } \ pstack_maybe(); \ Fl::lock(x); \ } while (0); # define FL_UNLOCK(x) Fl::unlock(x) # define FL_AWAKE(x) Fl::awake(x) # else // no locks # define FL_LOCK(x) ((void)0) # define FL_UNLOCK(x) ((void)0) # define FL_AWAKE(x) ((void)0) # endif // NO_LOCKS #endif // NDEBUG #endif // FL_LOCK_H_ // Local Variables: // mode: c++ // c-file-style: "linux" // End: flamp-2.2.12/src/include/flamp.h0000664000175000017500000001247114605333064013313 00000000000000// ===================================================================== // // flamp.h // // Author(s): // Robert Stiles, KK5VD, Copyright (C) 2013 // Dave Freese, W1HKJ, Copyright (C) 2013 // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ===================================================================== #ifndef flamp_H #define flamp_H #include #include #include #include #include #include #include "crc16.h" #include "threads.h" #include "timeops.h" #include "amp.h" //#define DEBUG 1 #undef DEBUG typedef struct { void *widget; std::string strValue; } STRING_VALUE; typedef struct { void *widget; int intValue; } INT_VALUE; #define ID_TIME_MINUTES (8) //!< @brief Maximum time (in minutes) for IDing. #define ID_TIME_SECONDS (ID_TIME_MINUTES * 60) //!< @brief Maximum time (in seconds) for IDing. #define MIN_INTERAL_TIME 1 #define FLDIGI_OFFLINE 0 #define FLDIGI_STREAM_ONLINE 1 #define FLDIGI_XMLRPC_ONLINE 2 #define FLDIGI_ONLINE (FLDIGI_STREAM_ONLINE|FLDIGI_XMLRPC_ONLINE) extern size_t fldigi_state; void alt_receive_data_stream(void); extern const char *flamp_beg; extern const char *flamp_end; extern Fl_Double_Window *mainwindow; extern Fl_Double_Window *optionswindow; extern Fl_Double_Window *config_files_window; extern Fl_Double_Window *socket_window; extern bool generate_time_table; extern bool transmit_stop; extern bool transmitting; extern const char *options[]; extern int file_io_errno; extern int xmlrpc_errno; extern pthread_mutex_t mutex_file_io; extern pthread_mutex_t mutex_xmlrpc; extern pthread_t *xmlrpc_thread; extern std::string buffer; extern std::string flamp_dir; extern std::string flampHomeDir; extern std::string title; extern bool do_events_flag; extern bool tx_ztimer_flag; extern void save_all_rx_relay_files(void); extern int process_que(void *que); extern int receive_data_stream(void *); extern int valid_block_size(int value); extern void update_rx_missing_blocks(void); extern void abort_and_id(void); extern void abort_request(void); extern void activate_button(void *ptr); extern void addfile(std::string, void *, bool, char *, char *); extern void amp_mark_all_for_update(void); extern void amp_update_all(void); extern void amp_update(cAmp *amp); extern void auto_load_tx_queue(void); extern void cb_exit(void); extern void cb_folders(void); extern void cb_load_tx_queue(void); extern void cb_scripts_default_location(void); extern void cb_scripts(bool flag); extern void clear_tx_panel(void); extern void deactivate_button(void *ptr); extern void drop_file_changed(void); extern void estimate(cAmp *amp, bool visable); extern void get_c_string_value(void *ptr); extern void get_int_value(void *ptr); extern void get_string_value(void *ptr); extern void get_trx_state_in_main_thread(void *ptr); extern void get_trx_state_in_main_thread(void *ptr); extern void preamble_detected(void); extern void process_data_stream(void); extern void process_relay_files(void); extern void process_data_file(std::string file); extern void process_missing_stream(void); extern void readfile(void); extern void receive_remove_from_queue(bool flag); extern void recv_missing_report(void); extern void relay_missing_report(void); extern void send_fldigi_modem(void *ptr); extern void send_missing_report(void); extern void send_relay_data(void); extern void transfer_in_main_thread(void *ptr); extern void set_button_to_cancel(void *); extern void set_button_to_xmit(void *); extern void set_relay_button_label(void *); extern void set_xmit_label(void *data); extern void show_current_selected_file(void *); extern void show_help(void); extern void show_selected_rcv(int); extern void show_selected_xmt(cAmp *amp); extern void show_selected_xmt(int); extern void thread_error_msg(void *data); extern void transfer_time(std::string modem_name, float &cps, int &transfer_size, std::string buffer); extern void transmit_current(void); extern void transmit_queue_main_thread(void *ptr); extern void transmit_queued(bool event_driven, bool shift_key_pressed); extern void transmit_relay(RELAY_DATA *rd); extern void turn_rsid_off(void); extern void turn_rsid_on(void); extern void tx_removefile(bool flag); extern void update_cAmp_changes(cAmp *amp); extern void writefile(int); extern void estimate_relay(void); extern void xml_execute_script(std::string); extern int xml_create_script(std::string script_path_name, std::string text); extern void start_server(int); extern void exit_server(); extern size_t create_script_modem_check_list(void); #define MAX_MODE_POINTERS 1000 extern char * s_modes[]; extern char * s_modems; extern size_t no_of_modems; extern int reading_relay_data; extern void clean_shutdown(); #endif flamp-2.2.12/src/include/amp.h0000664000175000017500000002472014605333064012771 00000000000000//====================================================================== // amp.h // // Author(s): // Dave Freese, W1HKJ, Copyright (C) 2010, 2013 // Robert Stiles, KK5VD, Copyright (C) 2013, 2014, 2015 // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ===================================================================== #ifndef AMP_H #define AMP_H #include #include #include #include #include #include #include #include #include #define FILE_CRC_FLAG 1 #define ID_CRC_FLAG 2 #define SIZE_CRC_FLAG 4 #define PROG_CRC_FLAG 8 #define CMD_FLAG 0x1 #define FLAMP_FLAG 0x2 #define RX_AMP 0x1 #define TX_AMP 0x2 #define TEMP_BUFFER_SIZE 4096 #include "crc16.h" #include "timeops.h" #include "file_io.h" #include "threads.h" extern const char *sz_flamp; extern const char *sz_cmd; extern const char *sz_flamp; extern void preamble_detected(void); //! @struct relay_data //! Used to tranfer information via TX_FLDIGI_THREAD->data pointer //! to process relay_data with interval timer. //! @typedef RELAY_DATA //! @see relay_data typedef struct relay_data { class cAmp *amp; //!< Enable relay fills using interval timer. std::string serial_data; std::vectordata; std::vectorheader; relay_data() { data.clear(); header.clear(); serial_data.clear(); } } RELAY_DATA; class cAmp { public: enum { _FILE = 0, _ID, _DTTM, _SIZE, _DESC, _DATA, _PROG, _CNTL }; // Do not alter typedef std::map AMPmap; cAmp(class cAmp *src_amp); private: // both bool _update_required_vector; bool _update_required; bool _valid_tx_data; bool _valid_tx_vec_data; bool _file_saved; int cAmp_type; int thread_locks; pthread_mutex_t mutex_amp_io; void unlock(void); void lock(void); static const char *ltypes[]; // transmit std::string modem; std::string report_buffer; std::string sz_xfr_size; std::string tosend; // designated blocks if not an ALL transfer std::string xmtbase; std::string xmtbuffer; std::string xmtcall; std::string xmtcallto; std::string xmtdata; std::string xmtdesc; std::string xmtdttm; std::string xmtfilename_fullpath; std::string xmtfilename; std::string xmthash; std::string xmtinfo; std::string xmtstring; std::string xmtunproto; std::vector data_string_array; std::vector header_string_array; std::string data_block(int index); std::string data_eof(void); std::string data_eot(void); std::string desc_header(void); std::string file_header(void); std::string id_header(void); std::string program_header(void); std::string size_header(void); struct stat tx_statbuf; int base_conversion_index; int blocksize; int fsize; int repeat_header; // repeat header; default 1 int xmt_repeat; // repeat n time; default 1 int xmtblocksize; int xmtnumblocks; int _missing_block_count; bool _unproto_markers; bool preamble_detected_flag; bool use_compression; bool use_forced_compression; bool use_unproto; // tx / rx Ccrc16 chksum; char *sz_num(int data) { static char sznum[20]; memset(sznum, 0, sizeof(sznum)); snprintf(sznum, sizeof(sznum)-1, "%d", data); return sznum; } char *sz_len(std::string data) { static char szlen[20]; memset(szlen, 0, sizeof(szlen)); snprintf(szlen, sizeof(szlen)-1, "%d", (int)data.length()); return szlen; } char *sz_size() { static char szsize[40]; int file_size = xmtdata.size(); memset(szsize, 0, sizeof(szsize)); snprintf(szsize, sizeof(szsize)-1, "%d %d %d", file_size, xmtnumblocks, xmtblocksize); return szsize; } std::string _file_hash(); std::string _tx_string(void); std::string reformat_missing_blocks(std::string &missing_blocks); std::string xmt_unproto_string(void); void _time_stamp(time_t *tp); void xmt_calc_numblocks(); void xmt_unproto_string(std::string &str); public: cAmp(std::string str = "", std::string fname = ""); ~cAmp(); void clear_rx(); bool update_required(void); void update_required(bool flag) { _update_required = flag; } bool preamble_detected(void) { return preamble_detected_flag; } void reset_preamble_detection(void) { preamble_detected_flag = false; } int amp_type(void) { return cAmp_type; } void amp_type(int value) { if(value == TX_AMP || value == RX_AMP) cAmp_type = value; } std::string file_hash(void); //transmit void callto(std::string n); std::string callto(void); void unproto(bool n); bool unproto(void); void tx_blocksize(int n); int tx_blocksize(void); int tx_base_conv_index(void); void tx_base_conv_index(int val); std::string tx_base_conv_str(void); void tx_base_conv_str(std::string &str); void tx_base_conv_str(const char *str); std::string xmt_buffer(void); void xmt_buffer(std::string &str); int convert_to_plain_text(std::string &_buffer); int convert_to_plain_text(char *_src, char *_dst, size_t count); void unproto_markers(bool markers); void _xmt_unproto(bool data_repeat_inhibit); // for internal non thread locking. void xmt_data(std::string &str); std::string xmt_data(void); std::string xmt_hash(void); void xmt_fname(std::string fn); bool xmt_stat(struct stat *stat_storage); bool xmt_file_modified(void); std::string xmt_fname(void); std::string xmt_full_path_fname(); void xmt_full_path_fname(std::string fname); std::string xmt_string(bool use_locks); int xmt_vector_string(bool header_modem, bool unproto_markers, bool data_repeat_inhibit); std::vector &xmt_vector_header(void); std::vector &xmt_vector_data(void); void xmt_descrip(std::string desc); std::string xmt_descrip(void); void xmt_tosend_clear(void); void xmt_tosend(std::string str) ; std::string xmt_tosend(void); void xmt_blocksize(int n); int xmt_blocksize(void); std::string xmt_numblocks(); void my_call(std::string call) ; std::string my_call(void); void my_info(std::string info); std::string my_info(); void compress(bool comp); bool compress(void); void forced_compress(bool comp); bool forced_compress(void); void time_stamp(time_t *tm = NULL); void repeat(int n); int repeat(void); void header_repeat(int n); int header_repeat(void); //void tx_parse_report(std::string s); void tx_parse_report(void); int missing_block_count(void) { return _missing_block_count; } void amp_update(void); std::string tx_string(std::string t_string); std::string estimate(void); void _estimate(void); std::string xmt_modem(void); void xmt_modem(std::string _m); // receive private: std::string _rx_raw_cntl; std::string _rx_raw_desc; std::string _rx_raw_file; std::string _rx_raw_id; std::string _rx_raw_prog; std::string _rx_raw_size; std::string relay_blocks; std::string rx_rcvd; std::string rxbuffer; std::string rxcall_info; std::string rxdata; std::string rxdesc; std::string rxdttm; std::string rxfilename; std::string rxhash; std::string rxprogname; std::string rxstring; int rx_crc_flags; int rx_ok_blocks; int rxblocksize; int rxfilesize; int rxnumblocks; char temp_buffer[TEMP_BUFFER_SIZE+1]; AMPmap rxblocks; AMPmap rxDataHeader; void rx_parse_desc(std::string data); void rx_parse_dttm_filename(char *, std::string data); void rx_parse_size(std::string data); public: bool rx_parse_line(int ltype, char *crc, std::string data); bool rx_completed() { return (rx_ok_blocks > 0 ? ((rx_ok_blocks == rxnumblocks) && (rx_crc_flags == 0)) : false); } bool hash(std::string s) { return (s == rxhash); } int rx_blocksize_int(void) { return rxblocksize; } int rx_nblocks(void) { return rxnumblocks; } int rx_size(void) { return rxfilesize; } int tx_relay_vector(std::string callfrom, std::string missing_blocks); std::string get_rx_fname(void) { return rxfilename; } std::string rx_blocks(void) { return rx_rcvd; } std::string rx_blocksize(void) { return sz_num(rxblocksize); } std::string rx_callinfo(void) { return rxcall_info; } std::string rx_desc(void) { return rxdesc; } std::string rx_fsize(void) { return sz_num(rxfilesize); } std::string rx_hash(void) { return rxhash; } std::string rx_hash(std::string s) { rxhash = s; return s; } std::string rx_missing(void); std::string rx_numblocks() { return sz_num(rxnumblocks); } std::string rx_parse_hash_line(std::string data); std::string rx_progname() { return rxprogname; } std::string rx_raw_cntl(void) { return _rx_raw_cntl; } std::string rx_raw_desc(void) { return _rx_raw_desc; } std::string rx_raw_file(void) { return _rx_raw_file; } std::string rx_raw_id(void) { return _rx_raw_id; } std::string rx_raw_prog(void) { return _rx_raw_prog; } std::string rx_raw_size(void) { return _rx_raw_size; } std::string rx_recvd_string(void); std::string rx_relay_blocks(void) { return relay_blocks; } std::string rx_report(void); std::string rx_stats(void); std::string rx_time_stamp() { return rxdttm; } std::string tx_relay_string(std::string callfrom, std::string missig_blocks, bool filesave_flag); void append_report(std::string s); void rx_add_data(std::string data); void rx_append(std::string s) { rxbuffer.append(s); } void rx_fname(std::string fn) { rxfilename.assign(fn); } void rx_parse_buffer(void); void rx_parse_id(std::string data); void rx_relay_blocks(std::string str) { relay_blocks.assign(reformat_missing_blocks(str)); } void rx_time_stamp(std::string ts) { rxdttm.assign(ts); } void rx_to_tx_hash(void) { xmthash.assign(rxhash); } bool file_saved(void) { return _file_saved; } void file_saved(bool flag) { _file_saved = flag; } const char* rx_sz_percent(void) { static const char empty[] = " 0 %"; if (rxnumblocks == 0 || rx_ok_blocks == 0) return empty; static char percent[6]; int nokb = rx_ok_blocks; int nrxb = rxnumblocks + 1; if(!rx_crc_flags) nokb++; snprintf(percent, sizeof(percent), "%3.0f %%", 100.0*nokb/nrxb); return percent; } float rx_percent(void) { int nokb = rx_ok_blocks; int nrxb = rxnumblocks + 1; if(!rx_crc_flags) nokb++; if (rxnumblocks == 0) return 0; return 100.0*nokb/nrxb; } }; #endif flamp-2.2.12/src/include/Fl_Text_Display_mod.H0000644000175000017500000003716414463050061016044 00000000000000// // "$Id: Fl_Text_Display_mod.H 8306 2011-01-24 17:04:22Z matt $" // // Header file for Fl_Text_Display_mod class. // // Copyright 2001-2010 by Bill Spitzak and others. // Original code Copyright Mark Edel. Permission to distribute under // the LGPL for the FLTK library granted by Mark Edel. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public // License as published by the Free Software Foundation; either // version 2 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Library General Public License for more details. // // You should have received a copy of the GNU Library General Public // License along with this library; if not, write to the // // Free Software Foundation, Inc. // 51 Franklin Street, Fifth Floor // Boston, MA 02110-1301 USA. // // Please report all bugs and problems on the following page: // // http://www.fltk.org/str.php // /* \file Fl_Text_Display_mod widget . */ #ifndef Fl_Text_Display_mod_H #define Fl_Text_Display_mod_H #include #include #include #include #include #include "Fl_Text_Buffer_mod.H" #include /** \brief Rich text display widget. This is the FLTK text display widget. It allows the user to view multiple lines of text and supports highlighting and scrolling. The buffer that is displayed in the widget is managed by the Fl_Text_Buffer_mod class. A single Text Buffer can be displayed by multiple Text Displays. */ class FL_EXPORT Fl_Text_Display_mod: public Fl_Group { public: /** text display cursor shapes enumeration */ enum { NORMAL_CURSOR, /**< I-beam */ CARET_CURSOR, /**< caret under the text */ DIM_CURSOR, /**< dim I-beam */ BLOCK_CURSOR, /**< unfille box under the current character */ HEAVY_CURSOR /**< thick I-beam */ }; /** the character position is the left edge of a character, whereas the cursor is thought to be between the centers of two consecutive characters. */ enum { CURSOR_POS, CHARACTER_POS }; /** drag types - they match Fl::event_clicks() so that single clicking to start a collection selects by character, double clicking selects by word and triple clicking selects by line. */ enum { DRAG_NONE = -2, DRAG_START_DND = -1, DRAG_CHAR = 0, DRAG_WORD = 1, DRAG_LINE = 2 }; /** wrap types - used in wrap_mode() */ enum { WRAP_NONE, /**< don't wrap text at all */ WRAP_AT_COLUMN, /**< wrap text at the given text column */ WRAP_AT_PIXEL, /**< wrap text at a pixel position */ WRAP_AT_BOUNDS /**< wrap text so that it fits into the widget width */ }; friend void fl_text_drag_me(int pos, Fl_Text_Display_mod* d); typedef void (*Unfinished_Style_Cb)(int, void *); /** This structure associates the color, font, andsize of a string to draw with an attribute mask matching attr */ struct Style_Table_Entry { Fl_Color color; Fl_Font font; Fl_Fontsize size; unsigned attr; }; Fl_Text_Display_mod(int X, int Y, int W, int H, const char *l = 0); ~Fl_Text_Display_mod(); virtual int handle(int e); void buffer(Fl_Text_Buffer_mod* buf); /** Sets the current text buffer associated with the text widget. Multiple text widgets can be associated with the same text buffer. \param buf new text buffer */ void buffer(Fl_Text_Buffer_mod& buf) { buffer(&buf); } /** Gets the current text buffer associated with the text widget. Multiple text widgets can be associated with the same text buffer. \return current text buffer */ Fl_Text_Buffer_mod* buffer() const { return mBuffer; } void redisplay_range(int start, int end); void scroll(int topLineNum, int horizOffset); void insert(const char* text); void overstrike(const char* text); void insert_position(int newPos); /** Gets the position of the text insertion cursor for text display. \return insert position index into text buffer */ int insert_position() const { return mCursorPos; } int position_to_xy(int pos, int* x, int* y) const; int in_selection(int x, int y) const; void show_insert_position(); int move_right(); int move_left(); int move_up(); int move_down(); int count_lines(int start, int end, bool start_pos_is_line_start) const; int line_start(int pos) const; int line_end(int startPos, bool startPosIsLineStart) const; int skip_lines(int startPos, int nLines, bool startPosIsLineStart); int rewind_lines(int startPos, int nLines); void next_word(void); void previous_word(void); void show_cursor(int b = 1); /** Hides the text cursor. */ void hide_cursor() { show_cursor(0); } void cursor_style(int style); /** Gets the text cursor color. \return cursor color */ Fl_Color cursor_color() const {return mCursor_color;} /** Sets the text cursor color. \param n new cursor color */ void cursor_color(Fl_Color n) {mCursor_color = n;} /** Gets the width/height of the scrollbars. /return width of scrollbars */ int scrollbar_width() const { return scrollbar_width_; } /** Sets the width/height of the scrollbars. \param W width of scrollbars */ void scrollbar_width(int W) { scrollbar_width_ = W; } /** Gets the scrollbar alignment type. \return scrollbar alignment */ Fl_Align scrollbar_align() const { return scrollbar_align_; } /** Sets the scrollbar alignment type. \param a new scrollbar alignment */ void scrollbar_align(Fl_Align a) { scrollbar_align_ = a; } /** Moves the insert position to the beginning of the current word. \param pos start calculation at this index \return beginning of the words */ int word_start(int pos) const { return buffer()->word_start(pos); } /** Moves the insert position to the end of the current word. \param pos start calculation at this index \return index of first character after the end of the word */ int word_end(int pos) const { return buffer()->word_end(pos); } void highlight_data(Fl_Text_Buffer_mod *styleBuffer, const Style_Table_Entry *styleTable, int nStyles, char unfinishedStyle, Unfinished_Style_Cb unfinishedHighlightCB, void *cbArg); int position_style(int lineStartPos, int lineLen, int lineIndex) const; /** \todo FIXME : get set methods pointing on shortcut_ have no effects as shortcut_ is unused in this class and derived! \return the current shortcut key */ int shortcut() const {return shortcut_;} /** \todo FIXME : get set methods pointing on shortcut_ have no effects as shortcut_ is unused in this class and derived! \param s the new shortcut key */ void shortcut(int s) {shortcut_ = s;} /** Gets the default font used when drawing text in the widget. \return current text font face unless overridden by a style */ Fl_Font textfont() const {return textfont_;} /** Sets the default font used when drawing text in the widget. \param s default text font face */ void textfont(Fl_Font s) {textfont_ = s; mColumnScale = 0;} /** Gets the default size of text in the widget. \return current text height unless overridden by a style */ Fl_Fontsize textsize() const {return textsize_;} /** Sets the default size of text in the widget. \param s new text size */ void textsize(Fl_Fontsize s) {textsize_ = s; mColumnScale = 0;} /** Gets the default color of text in the widget. \return text color unless overridden by a style */ Fl_Color textcolor() const {return textcolor_;} /** Sets the default color of text in the widget. \param n new text color */ void textcolor(Fl_Color n) {textcolor_ = n;} int wrapped_column(int row, int column) const; int wrapped_row(int row) const; void wrap_mode(int wrap, int wrap_margin); virtual void resize(int X, int Y, int W, int H); /** Convert an x pixel position into a column number. \param x number of pixels from the left margin \return an approximate column number based on the main font */ double x_to_col(double x) const; /** Convert a column number into an x pixel position. \param col an approximate column number based on the main font \return number of pixels from the left margin to the left of an average sized character */ double col_to_x(double col) const; protected: // Most (all?) of this stuff should only be called from resize() or // draw(). // Anything with "vline" indicates thats it deals with currently // visible lines. virtual void draw(); void draw_text(int X, int Y, int W, int H); void draw_range(int start, int end); void draw_cursor(int, int); void draw_string(int style, int x, int y, int toX, const char *string, int nChars) const; void draw_vline(int visLineNum, int leftClip, int rightClip, int leftCharIndex, int rightCharIndex); int find_x(const char *s, int len, int style, int x) const; enum { DRAW_LINE, FIND_INDEX, FIND_INDEX_FROM_ZERO, GET_WIDTH }; int handle_vline(int mode, int lineStart, int lineLen, int leftChar, int rightChar, int topClip, int bottomClip, int leftClip, int rightClip) const; void draw_line_numbers(bool clearAll); void clear_rect(int style, int x, int y, int width, int height) const; void display_insert(); void offset_line_starts(int newTopLineNum); void calc_line_starts(int startLine, int endLine); void update_line_starts(int pos, int charsInserted, int charsDeleted, int linesInserted, int linesDeleted, int *scrolled); void calc_last_char(); int position_to_line( int pos, int* lineNum ) const; double string_width(const char* string, int length, int style) const; static void scroll_timer_cb(void*); static void buffer_predelete_cb(int pos, int nDeleted, void* cbArg); static void buffer_modified_cb(int pos, int nInserted, int nDeleted, int nRestyled, const char* deletedText, void* cbArg); static void h_scrollbar_cb(Fl_Scrollbar* w, Fl_Text_Display_mod* d); static void v_scrollbar_cb( Fl_Scrollbar* w, Fl_Text_Display_mod* d); void update_v_scrollbar(); void update_h_scrollbar(); int measure_vline(int visLineNum) const; int longest_vline() const; int empty_vlines() const; int vline_length(int visLineNum) const; int xy_to_position(int x, int y, int PosType = CHARACTER_POS) const; void xy_to_rowcol(int x, int y, int* row, int* column, int PosType = CHARACTER_POS) const; void maintain_absolute_top_line_number(int state); int get_absolute_top_line_number() const; void absolute_top_line_number(int oldFirstChar); int maintaining_absolute_top_line_number() const; void reset_absolute_top_line_number(); int position_to_linecol(int pos, int* lineNum, int* column) const; int scroll_(int topLineNum, int horizOffset); void extend_range_for_styles(int* start, int* end); void find_wrap_range(const char *deletedText, int pos, int nInserted, int nDeleted, int *modRangeStart, int *modRangeEnd, int *linesInserted, int *linesDeleted); void measure_deleted_lines(int pos, int nDeleted); void wrapped_line_counter(Fl_Text_Buffer_mod *buf, int startPos, int maxPos, int maxLines, bool startPosIsLineStart, int styleBufOffset, int *retPos, int *retLines, int *retLineStart, int *retLineEnd, bool countLastLineMissingNewLine = true) const; void find_line_end(int pos, bool start_pos_is_text_start, int *lineEnd, int *nextLineStart) const; double measure_proportional_character(const char *s, int colNum, int pos) const; int wrap_uses_character(int lineEndPos) const; static const int DEFAULT_TOP_MARGIN; static const int DEFAULT_BOTTOM_MARGIN; static const int DEFAULT_LEFT_MARGIN; static const int DEFAULT_RIGHT_MARGIN; int TOP_MARGIN, BOTTOM_MARGIN, LEFT_MARGIN, RIGHT_MARGIN; int damage_range1_start, damage_range1_end; int damage_range2_start, damage_range2_end; int mCursorPos; int mCursorOn; int mCursorOldY; /* Y pos. of cursor for blanking */ int mCursorToHint; /* Tells the buffer modified callback where to move the cursor, to reduce the number of redraw calls */ int mCursorStyle; /* One of enum cursorStyles above */ int mCursorPreferredXPos; /* Pixel position for vert. cursor movement */ int mNVisibleLines; /* # of visible (displayed) lines */ int mNBufferLines; /* # of newlines in the buffer */ Fl_Text_Buffer_mod* mBuffer; /* Contains text to be displayed */ Fl_Text_Buffer_mod* mStyleBuffer; /* Optional parallel buffer containing color and font information */ int mFirstChar, mLastChar; /* Buffer positions of first and last displayed character (lastChar points either to a newline or one character beyond the end of the buffer) */ int mContinuousWrap; /* Wrap long lines when displaying */ int mFastDisplay; /* force continuous wrap and insertion of eol characters used in FTextRX */ std::string s_text; /* current contents of line text buffer */ std::string s_style; /* current contents of line stype buffer */ int mWrapMarginPix; /* Margin in # of pixels for wrapping in continuousWrap mode */ int* mLineStarts; int mTopLineNum; /* Line number of top displayed line of file (first line of file is 1) */ int mAbsTopLineNum; /* In continuous wrap mode, the line number of the top line if the text were not wrapped (note that this is only maintained as needed). */ int mNeedAbsTopLineNum; /* Externally settable flag to continue maintaining absTopLineNum even if it isn't needed for line # display */ int mHorizOffset; /* Horizontal scroll pos. in pixels */ int mTopLineNumHint; /* Line number of top displayed line of file (first line of file is 1) */ int mHorizOffsetHint; /* Horizontal scroll pos. in pixels */ int mNStyles; /* Number of entries in styleTable */ const Style_Table_Entry *mStyleTable; /* Table of fonts and colors for coloring/syntax-highlighting */ char mUnfinishedStyle; /* Style buffer entry which triggers on-the-fly reparsing of region */ Unfinished_Style_Cb mUnfinishedHighlightCB; /* Callback to parse "unfinished" */ /* regions */ void* mHighlightCBArg; /* Arg to unfinishedHighlightCB */ int mMaxsize; int mSuppressResync; /* Suppress resynchronization of line starts during buffer updates */ int mNLinesDeleted; /* Number of lines deleted during buffer modification (only used when resynchronization is suppressed) */ int mModifyingTabDistance; /* Whether tab distance is being modified */ mutable double mColumnScale; /* Width in pixels of an average character. This value is calculated as needed (lazy eval); it needs to be mutable so that it can be calculated within a method marked as "const" */ Fl_Color mCursor_color; Fl_Scrollbar* mHScrollBar; Fl_Scrollbar* mVScrollBar; int scrollbar_width_; Fl_Align scrollbar_align_; int dragPos, dragType, dragging; int display_insert_position_hint; struct { int x, y, w, h; } text_area; int shortcut_; Fl_Font textfont_; Fl_Fontsize textsize_; Fl_Color textcolor_; // The following are not presently used from the original NEdit code, // but are being put here so that future versions of Fl_Text_Display_mod // can implement line numbers without breaking binary compatibility. /* Line number margin and width */ int mLineNumLeft, mLineNumWidth; }; #endif // // End of "$Id: Fl_Text_Display_mod.H 8306 2011-01-24 17:04:22Z matt $". // flamp-2.2.12/src/include/date.h0000644000175000017500000000574414463050061013127 00000000000000/* -*-C++-*- "$Id: Fl_Date.H,v 1.4 2000/03/30 04:43:56 davefreese Exp $" Copyright 1999-2000 by the Dave Freese & the Flek development team. // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // Please report all bugs and problems to "flek-devel@sourceforge.net". */ #ifndef DATE_H #define DATE_H #include typedef enum { SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY } weekday_t; typedef enum { JANUARY = 1, FEBRUARY, MARCH, APRIL, MAY, JUNE, JULY, AUGUST, SEPTEMBER, OCTOBER, NOVEMBER, DECEMBER } month_t; class Date { friend std::ostream &operator<<(std::ostream &, Date &); protected: int year; int month; int day; int fmt; static const int mdays[]; static const int jdays[][13]; static const char *month_name[]; void helpIncrement(); public: Date(); Date( int m, int d, int y ); int Day(); int Month(); int Year(); void Day( int ); void Month( int ); void setDate( Date & ); void setDate( int, int, int ); // set the date void setFormat (int); void today(); // set date to the present day void Year( int ); void next_month (); void next_year (); void previous_month (); void previous_year (); bool endOfMonth( int ); bool isleapyear () { return isleapyear (year); } bool isleapyear (int year) { return leapYear (year); } bool leapYear () { return leapYear (year); } bool leapYear (int); int daysinmonth (int, int); int daysinmonth () { return daysinmonth (month, isleapyear (year)); } bool isvalid (int, int, int); bool datevalid (int year, int mon, int day) { return isvalid (mon, day, year); } bool datevalid () { return isvalid (month, day, year); } int dayofyear (int, int, int); int dayofyear () { return dayofyear (year, month, day); } int dayofepoch (int, int, int); int dayofepoch () { return dayofepoch (year, month, day); } int dayofweek (int, int, int); int dayofweek () { return dayofweek (year, month, day); } char *szDate (int); char *szDate (); double dJulian (); bool operator==( const Date & ); bool operator!=( const Date & ); bool operator<( const Date & ); bool operator>( const Date & ); void operator=( const Date & ); const Date &operator+=( int); // add days, modify object Date &operator++(); // pre-increment operator Date operator++( int ); // post-increment operator }; #endif flamp-2.2.12/src/include/flinput2.h0000664000175000017500000000300614507650001013743 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of fldigi // // fldigi is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // fldigi is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef FL_INPUT2_ #define FL_INPUT2_ #include #include "config.h" class Fl_Input2 : public Fl_Input { private: int ascii_cnt; // restart the numeric keypad entries. int ascii_chr; // character value of ASCII > 0x80 int handle_key_ascii(int key); char *utf8text; int utf8cnt; public: Fl_Input2(int x, int y, int w, int h, const char* l = 0); int handle(int event); #if FLAMP_FLTK_API_MINOR > 3 int position() { return Fl_Input::insert_position(); } int position(int p, int m) { return Fl_Input::insert_position(p, m); } int position(int p) { return Fl_Input::insert_position(p, p); } #endif }; #endif // FL_INPUT2_ flamp-2.2.12/src/include/file_io.h0000664000175000017500000000334214563657712013633 00000000000000// ===================================================================== // // file_io.h // // Author: Dave Freese, W1HKJ // Copyright: 2010 // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ===================================================================== #ifndef FILE_IO_H #define FILE_IO_H #include #include #include #include "socket.h" #ifdef WIN32 # include #else # include #endif // enum {NONE, BASE64, BASE128, BASE256}; extern Address *localaddr; extern Socket *tcpip; extern struct timeval start_time; extern int transfer_minutes; extern void compress_maybe(std::string& input, int encode_with, bool try_compress = true); extern void connect_to_fldigi(void *); extern void decompress_maybe(std::string& input); extern void transfer(std::string tosend); extern int rx_fldigi(char *buffer, int limit); extern int rx_fldigi(std::string &); extern void rx_extract_reset(); extern bool binary(std::string &); extern bool c_binary(int c); extern bool isPlainText(char *_buffer, size_t count); extern bool isPlainText(std::string &_buffer); #endif flamp-2.2.12/src/include/util.h0000644000175000017500000001461114463050061013160 00000000000000// ===================================================================== // // util.h // // Author: Dave Freese, W1HKJ // Copyright: 2010 // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ===================================================================== /* This file is included by config.h */ #ifndef UTIL_H #define UTIL_H #include #include "config.h" #ifdef __cplusplus extern "C" { #endif #ifndef __STDC_FORMAT_MACROS # define __STDC_FORMAT_MACROS 1 #endif #include #ifndef powerof2 # define powerof2(n) ((((n) - 1) & (n)) == 0) #endif #ifndef MAX # define MAX(a, b) (((a) > (b)) ? (a) : (b)) #endif #ifndef MIN # define MIN(a, b) (((a) < (b)) ? (a) : (b)) #endif #ifndef CLAMP # define CLAMP(x, low, high) (((x)>(high))?(high):(((x)<(low))?(low):(x))) #endif #define WCLAMP(x, low, high) (((x)>(high))?(low):(((x)<(low))?(high):(x))) #ifdef __GNUC__ # if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) # define full_memory_barrier() __sync_synchronize() # define read_memory_barrier() full_memory_barrier() # define write_memory_barrier() full_memory_barrier() # elif defined(__i386__) || defined(__i486__) || defined(__i586__) || defined(__i686__) || defined(__x86_64__) # define full_memory_barrier() asm volatile ("lock; addl $0,0(%%esp)":::"memory") # define read_memory_barrier() full_memory_barrier() # define write_memory_barrier() full_memory_barrier() /* These would be faster on SSE2-capable processors: # define full_memory_barrier() asm volatile ("mfence":::"memory") # define read_memory_barrier() asm volatile ("lfence":::"memory") # define write_memory_barrier() asm volatile ("sfence":::"memory") */ # elif defined(__ppc__) || defined(__powerpc__) || defined(__PPC__) # define full_memory_barrier() asm volatile("sync":::"memory") # define read_memory_barrier() full_memory_barrier() # define write_memory_barrier() full_memory_barrier() # else # warning Memory barriers not defined on this system # define full_memory_barrier() ((void)0) # define read_memory_barrier() full_memory_barrier() # define write_memory_barrier() full_memory_barrier() # endif #else # warning Memory barriers not defined on this system # define full_memory_barrier() ((void)0) # define read_memory_barrier() full_memory_barrier() # define write_memory_barrier() full_memory_barrier() #endif /* http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html */ #if defined(__GNUC__) && (__GNUC__ >= 3) # define likely(x) __builtin_expect (!!(x), 1) # define unlikely(x) __builtin_expect (!!(x), 0) # define used__ __attribute__ ((__used__)) # define unused__ __attribute__ ((__unused__)) # define must_check__ __attribute__ ((__warn_unused_result__)) # define deprecated__ __attribute__ ((__deprecated__)) # define noreturn__ __attribute__ ((__noreturn__)) # define pure__ __attribute__ ((__pure__)) # define const__ __attribute__ ((__const__)) # define malloc__ __attribute__ ((__malloc__)) # define packed__ __attribute__ ((__packed__)) # define inline__ inline __attribute__ ((__always_inline__)) # define noinline__ __attribute__ ((__noinline__)) # define nonnull__(x) __attribute__ ((__nonnull__(x))) # define format__(type_, index_, first_) __attribute__ ((format(type_, index_, first_))) #else # define likely(x) (x) # define unlikely(x) (x) # define used__ # define unused__ # define must_check__ # define deprecated__ # define noreturn__ # define pure__ # define const__ # define malloc__ # define packed__ # define inline__ # define noinline__ # define nonnull__(x) # define format__(type_, index_, first_) #endif #if defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) # define hot__ __attribute__ ((__hot__)) # define cold__ __attribute__ ((__cold__)) #else # define hot__ # define cold__ #endif #include const__ uint32_t ceil2(uint32_t n); const__ uint32_t floor2(uint32_t n); //#if !HAVE_STRCASESTR //char* strcasestr(const char* haystack, const char* needle); //#endif //#if !HAVE_STRLCPY //size_t strlcpy(char* dest, const char* src, size_t size); //#endif int set_cloexec(int fd, unsigned char v); int set_nonblock(int fd, unsigned char v); int set_nodelay(int fd, unsigned char v); int get_bufsize(int fd, int dir, int* len); int set_bufsize(int fd, int dir, int len); unsigned long ver2int(const char* version); void save_signals(void); void restore_signals(void); void MilliSleep(long msecs); #ifdef __cplusplus } // extern "C" #endif #ifdef __cplusplus uint32_t simple_hash_data(const unsigned char* buf, size_t len, uint32_t code = 0); uint32_t simple_hash_str(const unsigned char* str, uint32_t code = 0); #endif #ifdef __cplusplus const char* str2hex(const unsigned char* str, size_t len); const char* str2hex(const char* str, size_t len = 0); #else const char* str2hex(const unsigned* str, size_t len); #endif const char* uint2bin(unsigned u, size_t len); void MilliSleep(long msecs); #if !defined(NDEBUG) && defined(deprecated__) && defined(__GNUC__) && !defined(__WIN32__) #include #include deprecated__ typeof(sprintf) sprintf; /* there are far too many of these in the qrz code deprecated__ typeof(strcpy) strcpy; deprecated__ typeof(strcat) strcat; */ #endif #ifdef __WIN32__ # define NOMINMAX 1 #endif #ifndef __WIN32__ # define PRIuSZ "zu" # define PRIdSZ "zd" #else # define PRIuSZ "Iu" # define PRIdSZ "Id" #endif # define PATH_SEP "/" # define PATH_CHAR_SEP '/' //====================================================================== extern void ucase(std::string &); extern void strip_spaces(std::string &); extern void strip_leading_zeros(std::string &); extern void strip_lfs(std::string &); extern std::string wordwrap(std::string &s, int cnt); #ifndef HAVE_STRNLEN extern int strnlen (const char *c, int limit); #endif #endif /* UTIL_H */ /* Local Variables: mode: c++ c-file-style: "linux" End: */ flamp-2.2.12/src/include/time_table.h0000664000175000017500000000317014507650001014307 00000000000000// ===================================================================== // // time_table.h // // Author(s): // Robert Stiles, KK5VD, Copyright (C) 2013 // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ===================================================================== #ifndef __TIME_TABLE_H #define __TIME_TABLE_H #include #include #include extern int mode_table_count(void); extern char * modem_at_index(int index); extern bool modem_available(std::string modem); extern bool modem_available(char *modem, int search_limit); extern float seconds_from_c_string(const char *mode, const char *string, int length, float *overhead); extern float minutes_from_c_string(const char *mode, const char *string, int length, float *overhead); extern float seconds_from_string(std::string mode, std::string& str, float *overhead); extern float minutes_from_string(std::string mode, std::string& str, float *overhead); extern float rsid_duration(std::string mode); #endif // __TIME_TABLE_H flamp-2.2.12/src/include/dialogs.h0000664000175000017500000002124014605333064013630 00000000000000// generated by Fast Light User Interface Designer (fluid) version 1.0308 #ifndef dialogs_h #define dialogs_h #include #include #include "config.h" #include "gettext.h" #include "flamp_dialog.h" #include "status.h" #include "flamp.h" #include "fileselect.h" #include "debug.h" #include "icons.h" #include "xml_io.h" #include "file_io.h" #include "amp.h" #include "ztimer.h" #include "time_table.h" #include "hamcast_group.h" #include extern Fl_Double_Window *dialog_flamp; #include extern Fl_Menu_Bar *mnubar; extern void cb_mnu_folders(Fl_Menu_*, void*); extern void cb_mnu_load_relay(Fl_Menu_*, void*); extern void cb_mnu_save_relay(Fl_Menu_*, void*); extern void cb_mnuExit(Fl_Menu_*, void*); extern void cb_mnu_scripts(Fl_Menu_*, void*); extern void cb_mnuEventLog(Fl_Menu_*, void*); extern void cb_mnuOnLineHelp(Fl_Menu_*, void*); extern void cb_mnuCmdLineParams(Fl_Menu_*, void*); extern void cb_mnuAbout(Fl_Menu_*, void*); #include extern void cb_tab(Fl_Tabs*, void*); extern Fl_Tabs *tabs; #include extern Fl_Group *Rx_tab; #include extern Fl_Output *txt_rx_filename; extern Fl_Output *txt_rx_datetime; #include extern void cb_btn_save_file(Fl_Button*, void*); extern Fl_Button *btn_save_file; extern Fl_Output *txt_rx_descrip; extern void cb_btn_rx_remove(Fl_Button*, void*); extern Fl_Button *btn_rx_remove; extern Fl_Output *txt_rx_callinfo; extern Fl_Output *txt_rx_filesize; extern Fl_Output *txt_rx_numblocks; extern Fl_Output *txt_rx_blocksize; extern void cb_btn_transfer_file_txQ(Fl_Button*, void*); extern Fl_Button *btn_rxq_to_txq; extern void cb_btn_copy_missing(Fl_Button*, void*); extern Fl_Button *btn_copy_missing; extern Fl_Output *txt_rx_missing_blocks; extern Fl_BlockMap *rx_progress; extern FTextView *txt_rx_output; extern void cb_btn_send_relay(Fl_Button*, void*); extern Fl_Button *btn_send_relay; extern void cb_btn_parse_relay_blocks(Fl_Button*, void*); extern Fl_Button *btn_parse_relay_blocks; extern void cb_txt_relay_selected_blocks(Fl_Input2*, void*); extern Fl_Input2 *txt_relay_selected_blocks; #include extern void cb_rx_queue(Fl_Browser*, void*); extern Fl_Browser *rx_queue; extern void cb_cnt_repeat_relay_data(Fl_Counter*, void*); extern Fl_Counter *cnt_repeat_relay_data; extern void cb_cnt_repeat_relay_header(Fl_Counter*, void*); extern Fl_Counter *cnt_repeat_relay_header; extern Fl_Output *txt_transfer_relay_size_time; extern Fl_Group *Tx_tab; extern void cb_tx_send_to(Fl_Input2*, void*); extern Fl_Input2 *txt_tx_send_to; extern Fl_Output *txt_tx_filename; extern void cb_tx_descrip(Fl_Input2*, void*); extern Fl_Input2 *txt_tx_descrip; extern void cb_cnt_blocksize(Fl_Counter*, void*); extern Fl_Counter *cnt_blocksize; extern void cb_cnt_repeat_nbr(Fl_Counter*, void*); extern Fl_Counter *cnt_repeat_nbr; extern void cb_repeat_header(Fl_Counter*, void*); extern Fl_Counter *cnt_repeat_header; extern Fl_Output *txt_tx_numblocks; extern void cb_use_encoder(Fl_ComboBox*, void*); extern Fl_ComboBox *encoders; extern void cb_cbo_modes(Fl_ComboBox*, void*); extern Fl_ComboBox *cbo_modes; extern Fl_Output *txt_transfer_size_time; #include extern void cb_use_compression(Fl_Check_Button*, void*); extern Fl_Check_Button *btn_use_compression; extern void cb_enable_tx_unproto(Fl_Check_Button*, void*); extern Fl_Check_Button *btn_enable_tx_unproto; extern void cb_selected_blocks(Fl_Input2*, void*); extern Fl_Input2 *txt_tx_selected_blocks; extern void cb_btn_send_file(Fl_Button*, void*); extern Fl_Button *btn_send_file; extern void cb_btn_send_queue(Fl_Button*, void*); extern Fl_Button *btn_send_queue; extern void cb_btn_tx_remove_file(Fl_Button*, void*); extern Fl_Button *btn_remove_file; extern void cb_btn_open_file(Fl_Button*, void*); extern Fl_Button *btn_open_file; #include extern void cb_drop_file(Fl_Input*, void*); extern Fl_Input *drop_file; extern void cb_btn_parse_blocks(Fl_Button*, void*); extern Fl_Button *btn_parse_blocks; extern void cb_tx_queue(Fl_Browser*, void*); extern Fl_Browser *tx_queue; extern Fl_Group *Events_tab; extern Fl_Tabs *event_tabs; extern Fl_Group *Timed_Events_tab; extern void cb_repeat_at_times(Fl_Check_Button*, void*); extern Fl_Check_Button *btn_repeat_at_times; extern void cb_repeat_every(Fl_ComboBox*, void*); extern Fl_ComboBox *cbo_repeat_every; extern void cb_repeat_times(Fl_Input2*, void*); extern Fl_Input2 *txt_repeat_times; extern Fl_Check_Button *btn_auto_load_queue; extern void cb_load_from_tx_folder(Fl_Check_Button*, void*); extern Fl_Check_Button *btn_load_from_tx_folder; extern void cb_manual_load_que(Fl_Button*, void*); extern Fl_Button *btn_manual_load_queue; extern void cb_auto_load_queue_path(Fl_Input2*, void*); extern Fl_Input2 *txt_auto_load_queue_path; extern void cb_repeat_forever(Fl_Check_Button*, void*); extern Fl_Check_Button *btn_repeat_forever; extern Fl_Output *outTimeValue; #include extern void cb_do_events(Fl_Light_Button*, void*); extern Fl_Light_Button *do_events; extern Fl_Group *Hamcast_Events_tab; extern void cb_hamcast_mode_cycle(Fl_Check_Button*, void*); extern Fl_Check_Button *btn_hamcast_mode_cycle; extern Fl_Output *txt_hamcast_select_total_time; extern void cb_hamcast_mode_enable_1(Fl_Check_Button*, void*); extern Fl_Check_Button *btn_hamcast_mode_enable_1; extern Fl_Output *txt_hamcast_select_1_time; extern void cb_hamcast_mode_selection_1(Fl_ComboBox*, void*); extern Fl_ComboBox *cbo_hamcast_mode_selection_1; extern void cb_hamcast_mode_enable_2(Fl_Check_Button*, void*); extern Fl_Check_Button *btn_hamcast_mode_enable_2; extern Fl_Output *txt_hamcast_select_2_time; extern void cb_hamcast_mode_selection_2(Fl_ComboBox*, void*); extern Fl_ComboBox *cbo_hamcast_mode_selection_2; extern void cb_hamcast_mode_enable_3(Fl_Check_Button*, void*); extern Fl_Check_Button *btn_hamcast_mode_enable_3; extern Fl_Output *txt_hamcast_select_3_time; extern void cb_hamcast_mode_selection_3(Fl_ComboBox*, void*); extern Fl_ComboBox *cbo_hamcast_mode_selection_3; extern void cb_hamcast_mode_enable_4(Fl_Check_Button*, void*); extern Fl_Check_Button *btn_hamcast_mode_enable_4; extern Fl_Output *txt_hamcast_select_4_time; extern void cb_hamcast_mode_selection_4(Fl_ComboBox*, void*); extern Fl_ComboBox *cbo_hamcast_mode_selection_4; extern Fl_Group *Config_tab; extern void cb_tx_mycall(Fl_Input2*, void*); extern Fl_Input2 *txt_tx_mycall; extern void cb_tx_myinfo(Fl_Input2*, void*); extern Fl_Input2 *txt_tx_myinfo; extern void cb_sync_mode_flamp_fldigi(Fl_Check_Button*, void*); extern Fl_Check_Button *btn_sync_mode_flamp_fldigi; extern void cb_sync_mode_fldigi_flamp(Fl_Check_Button*, void*); extern Fl_Check_Button *btn_sync_mode_fldigi_flamp; extern void cb_fldigi_xmt_mode_change(Fl_Check_Button*, void*); extern Fl_Check_Button *btn_fldigi_xmt_mode_change; extern void cb_enable_tx_on_report(Fl_Check_Button*, void*); extern Fl_Check_Button *btn_enable_tx_on_report; extern void cb_enable_delete_warning(Fl_Check_Button*, void*); extern Fl_Check_Button *btn_enable_delete_warning; extern void cb_clear_tosend_on_tx_blocks(Fl_Check_Button*, void*); extern Fl_Check_Button *btn_clear_tosend_on_tx_blocks; extern void cb_disable_header_modem_on_block_fills(Fl_Check_Button*, void*); extern Fl_Check_Button *btn_disable_header_modem_on_block_fills; extern void cb_enable_unproto_markers(Fl_Check_Button*, void*); extern Fl_Check_Button *btn_enable_unproto_markers; extern void cb_auto_rx_save_local_time(Fl_Check_Button*, void*); extern Fl_Check_Button *btn_auto_rx_save_local_time; extern void cb_enable_header_modem(Fl_Check_Button*, void*); extern Fl_Check_Button *btn_enable_header_modem; extern void cb_header_modes(Fl_ComboBox*, void*); extern Fl_ComboBox *cbo_header_modes; extern void cb_enable_txrx_interval(Fl_Check_Button*, void*); extern Fl_Check_Button *btn_enable_txrx_interval; extern void cb_tx_interval_mins(Fl_Counter*, void*); extern Fl_Counter *cnt_tx_interval_mins; extern void cb_rx_interval_secs(Fl_Counter*, void*); extern Fl_Counter *cnt_rx_interval_secs; extern Fl_Output *txt_tx_interval; extern Fl_Check_Button *btn_relay_retain_data; extern Fl_Check_Button *btn_auto_rx_save; extern Fl_Group *box_not_connected; extern Fl_Group *box_connected; Fl_Double_Window* flamp_dialog(); extern Fl_Menu_Item menu_mnubar[]; #define mnu_files (menu_mnubar+0) #define mnu_folders (menu_mnubar+1) #define mnu_load_relay (menu_mnubar+2) #define mnu_save_relay (menu_mnubar+3) #define mnu_exit (menu_mnubar+4) #define mnu_script (menu_mnubar+6) #define mnu_scripts (menu_mnubar+7) #define mnu_help (menu_mnubar+9) #define mnu_debug_log (menu_mnubar+10) #define mnu_on_line_help (menu_mnubar+11) #define mnu_command_line (menu_mnubar+12) #define mnu_about (menu_mnubar+13) #endif flamp-2.2.12/src/include/mingw.h0000664000175000017500000000574014507650001013330 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of fldigi // // fldigi is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // fldigi is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef MINGW_H_ #define MINGW_H_ #include "config.h" #include #include #include #undef EADDRINUSE #define EADDRINUSE WSAEADDRINUSE #undef EISCONN #define EISCONN WSAEISCONN #undef EWOULDBLOCK #define EWOULDBLOCK WSAEWOULDBLOCK #undef EINPROGRESS #define EINPROGRESS WSAEINPROGRESS #undef EALREADY #define EALREADY WSAEALREADY //====================================================================== #ifdef __cplusplus extern "C" { #endif typedef int pid_t; typedef long suseconds_t; #define hstrerror strerror #ifndef SIGUSR2 # define SIGUSR2 100 #endif extern void was_init(void); extern int was_init_state(void); extern WSADATA * was_data(void); /* * simple adaptors */ static inline int mingw_mkdir(const char *path, int mode) { return mkdir(path); } #define mkdir mingw_mkdir static inline int mingw_unlink(const char *pathname) { /* read-only files cannot be removed */ chmod(pathname, 0666); return unlink(pathname); } #define unlink mingw_unlink /* * implementations of missing functions */ unsigned int sleep (unsigned int seconds); char *mingw_getcwd(char *pointer, int len); #define getcwd mingw_getcwd char *mingw_getenv(const char *name); #define getenv mingw_getenv int mingw_rename(const char*, const char*); #define rename mingw_rename #ifndef SHUT_WR # define SHUT_WR SD_SEND #endif #ifndef SHUT_RD # define SHUT_RD SD_RECEIVE #endif #ifndef SHUT_RDWR # define SHUT_RDWR SD_BOTH #endif int nanosleep (const struct timespec *req, struct timespec *rem); int socketpair(int family, int type, int protocol, int *sv); /* uname */ #define UTSNAME_MAX_ 257 struct utsname { char sysname[UTSNAME_MAX_]; char nodename[UTSNAME_MAX_]; char release[UTSNAME_MAX_]; char version[UTSNAME_MAX_]; char machine[UTSNAME_MAX_]; }; int uname(struct utsname *name); /* getrusage */ #define RUSAGE_SELF 0 #define RUSAGE_CHILDREN (-1) struct rusage { struct timeval ru_utime; struct timeval ru_stime; }; int getrusage(int who, struct rusage *usage); /* fsync, fdatasync */ #include #define fsync _commit #define fdatasync fsync #ifdef __cplusplus } #endif #endif flamp-2.2.12/src/include/hamcast_group.h0000644000175000017500000000251014463050061015032 00000000000000/***************************************************************** hamcast_group.h (FLAMP) Author(s): Robert Stiles, KK5VD, Copyright (C) 2014 This is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . *******************************************************************/ #ifndef __flamp_hamcast_group__ #define __flamp_hamcast_group__ #include #include #include #include #include #include #include #include #include #include class Hamcast_Group : public Fl_Group { public: Hamcast_Group(int x, int y, int w, int h, const char *label); private: void draw(void); }; #endif /* defined(__flamp_hamcast_group__) */ flamp-2.2.12/src/include/dirent-check.h0000644000175000017500000000214314463050061014540 00000000000000// ===================================================================== // // dirent-check.h // // Author: Dave Freese, W1HKJ // Copyright: 2010 // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ===================================================================== // // required for successfull compile using either Fltk-1.1.10 or 1.3.0 // // ===================================================================== #ifndef DIRENT_CHECK_H #define DIRENT_CHECK_H #include #endif flamp-2.2.12/src/include/flmisc.h0000644000175000017500000000530714463050061013462 00000000000000// ---------------------------------------------------------------------------- // flmisc.h // // Copyright (C) 2009-2010 // Stelios Bounanos, M0GLD // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ---------------------------------------------------------------------------- #ifndef fl_misc_h_ #define fl_misc_h_ #include #include #include #include #include #include #include #include #include "flinput2.h" unsigned quick_choice_menu(const char* title, unsigned sel, const Fl_Menu_Item* menu); unsigned quick_choice(const char* title, unsigned sel, ...); Fl_Color adjust_color(Fl_Color fg, Fl_Color bg); void adjust_color_inv(unsigned char& bg1r, unsigned char& bg1g, unsigned char& bg1b, Fl_Color bg2, Fl_Color def); #if !defined(__APPLE__) && !defined(__WOE32__) # include void make_pixmap(Pixmap *xpm, const char **data, int argc, char** argv); #endif class notify_dialog : public Fl_Window { Fl_Box icon; Fl_Input2 message; Fl_Dial dial; Fl_Return_Button button; Fl_Box resize_box; bool delete_on_hide; public: notify_dialog(int X = 410, int Y = 103, const char* l = 0); ~notify_dialog(); int handle(int event); Fl_Button* make_button(int W, int H = 23); void notify(const char* msg, double timeout, bool delete_on_hide_ = false); private: static void button_cb(Fl_Widget* w, void*); static void dial_timer(void* arg); int newx; }; #ifdef BUILD_FLDIGI #include #include #include #include "globals.h" class Mode_Browser : public Fl_Double_Window { public: Mode_Browser(void); ~Mode_Browser(void); void show(mode_set_t* b); void callback(Fl_Callback* cb, void* args = 0); private: Fl_Button *close_button, *all_button, *none_button; Fl_Check_Browser* modes; mode_set_t* store; Fl_Callback* changed_cb; void* changed_args; static void modes_cb(Fl_Widget* w, void* arg); static void button_cb(Fl_Widget* w, void* arg); }; #endif // BUILD_FLDIGI #endif // fl_misc_h_ flamp-2.2.12/src/include/fileselect.h0000664000175000017500000000272114563657712014344 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of fldigi // // fldigi is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // fldigi is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef FILESELECT_H #define FILESELECT_H #include #include namespace FSEL { void create(void); void destroy(void); const char* select(const char* title, const char* filter, const char* def = 0, int *fsel = NULL); const int select_multiple(const char* title, const char* filter, std::vector &filename_array, const char* def = 0, int* fsel = NULL); const char* saveas(const char* title, const char* filter, const char* def = 0, int *fsel = NULL); const char* dir_select(const char* title, const char* filter, const char* def = 0); } #endif // FILESELECT_H flamp-2.2.12/src/include/Fl_BlockMap.h0000644000175000017500000000376214463050061014321 00000000000000// ===================================================================== // Mapped values to x coordinate viewer // // Copyright 2012 - Dave Freese, // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // Contents: // // Fl_BlockMap::draw() - Draw the block mapping widget // Fl_BlockMap::Fl_BlockMap() - Construct a Fl_BlockMap widget // //====================================================================== #ifndef _Fl_BlockMap_H_ # define _Fl_BlockMap_H_ #include #include // // BlockMap class... // /** Displays a BlockMap bar for the user. */ class Fl_BlockMap : public Fl_Widget { int nblocks_; std::string blocks; protected: virtual void draw(); public: Fl_BlockMap(int x, int y, int w, int h, const char *l = 0); /** Sets the maximum value in the BlockMap widget. */ void nblocks(int v) { if (v < 0) v = 0; nblocks_ = v; redraw(); } /** Gets the maximum value in the BlockMap widget. */ int nblocks() const { return (nblocks_); } /** Sets the current value in the BlockMap widget. */ void value(std::string v) { blocks = v; redraw(); } /** Gets the current value in the BlockMap widget. */ std::string value() const { return (blocks); } void set(std::string v, int blks) { blocks = v; nblocks_ = blks; redraw(); } void clear() { blocks.clear(); nblocks_ = 0; redraw(); } }; #endif // !_Fl_BlockMap_H_ flamp-2.2.12/src/include/gettext.h0000644000175000017500000002242114463050061013665 00000000000000/* Convenience header for conditional use of GNU . Copyright (C) 1995-1998, 2000-2002, 2004-2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _LIBGETTEXT_H #define _LIBGETTEXT_H 1 /* NLS can be disabled through the configure --disable-nls option. */ #if ENABLE_NLS /* Get declarations of GNU message catalog functions. */ # include /* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by the gettext() and ngettext() macros. This is an alternative to calling textdomain(), and is useful for libraries. */ # ifdef DEFAULT_TEXT_DOMAIN # undef gettext # define gettext(Msgid) \ dgettext (DEFAULT_TEXT_DOMAIN, Msgid) # undef ngettext # define ngettext(Msgid1, Msgid2, N) \ dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N) # endif #else /* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which chokes if dcgettext is defined as a macro. So include it now, to make later inclusions of a NOP. We don't include as well because people using "gettext.h" will not include , and also including would fail on SunOS 4, whereas is OK. */ #if defined(__sun) # include #endif /* Many header files from the libstdc++ coming with g++ 3.3 or newer include , which chokes if dcgettext is defined as a macro. So include it now, to make later inclusions of a NOP. */ #if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3) # include # if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H # include # endif #endif /* Disabled NLS. The casts to 'const char *' serve the purpose of producing warnings for invalid uses of the value returned from these functions. On pre-ANSI systems without 'const', the config.h file is supposed to contain "#define const". */ # define gettext(Msgid) ((const char *) (Msgid)) # define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid)) # define dcgettext(Domainname, Msgid, Category) \ ((void) (Category), dgettext (Domainname, Msgid)) # define ngettext(Msgid1, Msgid2, N) \ ((N) == 1 \ ? ((void) (Msgid2), (const char *) (Msgid1)) \ : ((void) (Msgid1), (const char *) (Msgid2))) # define dngettext(Domainname, Msgid1, Msgid2, N) \ ((void) (Domainname), ngettext (Msgid1, Msgid2, N)) # define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ ((void) (Category), dngettext(Domainname, Msgid1, Msgid2, N)) # define textdomain(Domainname) ((const char *) (Domainname)) # define bindtextdomain(Domainname, Dirname) \ ((void) (Domainname), (const char *) (Dirname)) # define bind_textdomain_codeset(Domainname, Codeset) \ ((void) (Domainname), (const char *) (Codeset)) #endif /* A pseudo function call that serves as a marker for the automated extraction of messages, but does not call gettext(). The run-time translation is done at a different place in the code. The argument, String, should be a literal string. Concatenated strings and other string expressions won't work. The macro's expansion is not parenthesized, so that it is suitable as initializer for static 'char[]' or 'const char[]' variables. */ #define gettext_noop(String) String /* The separator between msgctxt and msgid in a .mo file. */ #define GETTEXT_CONTEXT_GLUE "\004" /* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be short and rarely need to change. The letter 'p' stands for 'particular' or 'special'. */ #ifdef DEFAULT_TEXT_DOMAIN # define pgettext(Msgctxt, Msgid) \ pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #else # define pgettext(Msgctxt, Msgid) \ pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #endif #define dpgettext(Domainname, Msgctxt, Msgid) \ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #define dcpgettext(Domainname, Msgctxt, Msgid, Category) \ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category) #ifdef DEFAULT_TEXT_DOMAIN # define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #else # define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #endif #define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * pgettext_aux (const char *domain, const char *msg_ctxt_id, const char *msgid, int category) { const char *translation = dcgettext (domain, msg_ctxt_id, category); if (translation == msg_ctxt_id) return msgid; else return translation; } #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * npgettext_aux (const char *domain, const char *msg_ctxt_id, const char *msgid, const char *msgid_plural, unsigned long int n, int category) { const char *translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); if (translation == msg_ctxt_id || translation == msgid_plural) return (n == 1 ? msgid : msgid_plural); else return translation; } /* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID can be arbitrary expressions. But for string literals these macros are less efficient than those above. */ #include #define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \ (((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) \ /* || __STDC_VERSION__ >= 199901L */ ) #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS #include #endif #define pgettext_expr(Msgctxt, Msgid) \ dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES) #define dpgettext_expr(Domainname, Msgctxt, Msgid) \ dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * dcpgettext_expr (const char *domain, const char *msgctxt, const char *msgid, int category) { size_t msgctxt_len = strlen (msgctxt) + 1; size_t msgid_len = strlen (msgid) + 1; const char *translation; #if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS char msg_ctxt_id[msgctxt_len + msgid_len]; #else char buf[1024]; char *msg_ctxt_id = (msgctxt_len + msgid_len <= sizeof (buf) ? buf : (char *) malloc (msgctxt_len + msgid_len)); if (msg_ctxt_id != NULL) #endif { memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); msg_ctxt_id[msgctxt_len - 1] = '\004'; memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); translation = dcgettext (domain, msg_ctxt_id, category); #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS if (msg_ctxt_id != buf) free (msg_ctxt_id); #endif if (translation != msg_ctxt_id) return translation; } return msgid; } #define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \ dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) #define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * dcnpgettext_expr (const char *domain, const char *msgctxt, const char *msgid, const char *msgid_plural, unsigned long int n, int category) { size_t msgctxt_len = strlen (msgctxt) + 1; size_t msgid_len = strlen (msgid) + 1; const char *translation; #if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS char msg_ctxt_id[msgctxt_len + msgid_len]; #else char buf[1024]; char *msg_ctxt_id = (msgctxt_len + msgid_len <= sizeof (buf) ? buf : (char *) malloc (msgctxt_len + msgid_len)); if (msg_ctxt_id != NULL) #endif { memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); msg_ctxt_id[msgctxt_len - 1] = '\004'; memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS if (msg_ctxt_id != buf) free (msg_ctxt_id); #endif if (!(translation == msg_ctxt_id || translation == msgid_plural)) return translation; } return (n == 1 ? msgid : msgid_plural); } #if ENABLE_NLS #define _(String) gettext (String) #define N_(String) gettext_noop (String) #else #define _(String) (String) #define N_(String) String #endif #if ENABLE_NLS int setup_nls(void); unused__ static const int nls_init_ = setup_nls(); #endif #endif /* _LIBGETTEXT_H */ flamp-2.2.12/src/include/icons.h0000644000175000017500000000235714463050061013322 00000000000000#ifndef ICONS_H_ #define ICONS_H_ #define USE_IMAGE_LABELS 1 #include #include #include #include "pixmaps.h" namespace icons { const char* make_icon_label(const char* text, const char** pixmap = 0); void set_icon_label(Fl_Menu_Item* item); void set_icon_label(Fl_Widget* w); void toggle_icon_labels(void); const char* get_icon_label_text(Fl_Menu_Item* item); const char* get_icon_label_text(Fl_Widget* w); void free_icon_label(Fl_Menu_Item* item); void free_icon_label(Fl_Widget* w); void set_active(Fl_Menu_Item* item, bool v); void set_active(Fl_Widget* w, bool v); // fltk message dialogs with nicer icons void set_message_icon(const char** pixmap); } #define fl_input2(...) ({ icons::set_message_icon(dialog_question_48_icon); fl_input(__VA_ARGS__); }) #define fl_choice2(...) ({ icons::set_message_icon(dialog_question_48_icon); fl_choice(__VA_ARGS__); }) #define fl_message2(...) ({ icons::set_message_icon(dialog_information_48_icon); fl_message(__VA_ARGS__); }) #define fl_alert2(...) ({ icons::set_message_icon(dialog_warning_48_icon); fl_alert(__VA_ARGS__); }) #define fl_warn_choice2(...) ({ icons::set_message_icon(dialog_warning_48_icon); fl_choice(__VA_ARGS__); }) #endif // ICONS_H_ flamp-2.2.12/src/include/base128.h0000664000175000017500000000256214507650001013353 00000000000000// ===================================================================== // // base128.h // // Author: Dave Freese, W1HKJ // Copyright: 2012 // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ===================================================================== #include #include #include #include typedef unsigned char t_byte; class base128 { #define LINELEN 64 private: bool ateof; int linelength; size_t iocp; size_t iolen; std::string output; void addlf(std::string &); void escape(std::string &, bool encode = true); void init(); void remlf(std::string &); public: base128() { init(); }; ~base128() {}; std::string encode(std::string &in); std::string decode(std::string &in, bool &decode_error); }; flamp-2.2.12/src/include/base64.h0000664000175000017500000000252214507650001013266 00000000000000 // ===================================================================== // // base64.h // // Author: Dave Freese, W1HKJ // Copyright: 2010 // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ===================================================================== #include #include #include #include typedef unsigned char t_byte; class base64 { #define LINELEN 64 private: bool ateof; bool crlf; t_byte dtable[256]; t_byte etable[256]; int linelength; size_t iocp; size_t iolen; std::string output; void init(void); public: base64(bool t = false) {crlf = t; init(); }; ~base64(){}; std::string encode(std::string in); std::string decode(std::string in, bool &decode_error); }; flamp-2.2.12/src/include/flamp_config.h0000644000175000017500000000007114463050061014622 00000000000000#ifndef FLAMP_CONFIG_H_ #define FLAMP_CONFIG_H_ #endif flamp-2.2.12/src/include/flslider2.h0000644000175000017500000000373114463050061014072 00000000000000// ---------------------------------------------------------------------------- // flslider2.h // // Copyright (C) 2010 // Stelios Bounanos, M0GLD // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ---------------------------------------------------------------------------- #ifndef FL_SLIDER2_ #define FL_SLIDER2_ #include #include #include #include #include class Fl_Slider2 : public Fl_Slider { public: Fl_Slider2(int x, int y, int w, int h, const char* l = 0) : Fl_Slider(x, y, w, h, l) { } int handle(int event); }; class Fl_Value_Slider2 : public Fl_Value_Slider { public: Fl_Value_Slider2(int x, int y, int w, int h, const char* l = 0) : Fl_Value_Slider(x, y, w, h, l) { } int handle(int event); }; class Fl_Counter2 : public Fl_Counter { public: Fl_Counter2(int x, int y, int w, int h, const char* l = 0) : Fl_Counter(x, y, w, h, l) { } int handle(int event); }; class Fl_Value_Input2 : public Fl_Value_Input { public: Fl_Value_Input2(int x, int y, int w, int h, const char* l = 0) : Fl_Value_Input(x, y, w, h, l) { } int handle(int event); }; class Fl_Spinner2 : public Fl_Spinner { public: Fl_Spinner2(int x, int y, int w, int h, const char* l = 0) : Fl_Spinner(x, y, w, h, l) { } int handle(int event); }; #endif // FL_SLIDER2_ flamp-2.2.12/src/include/xml_io.h0000664000175000017500000000356714517740574013523 00000000000000// ===================================================================== // // xml_io.h // // Author: Dave Freese, W1HKJ // Copyright: 2010 to 2014 // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // #ifndef XML_IO_H #define XML_IO_H #define DEFAULT_XMLRPC_TIMEOUT 15.0 #define INIT_XMLRPC_TIMEOUT 5.0 extern std::string get_char_rates(void); extern std::string get_char_timing(int character); extern std::string get_io_mode(void); extern std::string get_rsid_state(void); extern std::string get_rx_data(); extern std::string get_trx_state(); extern std::string get_tx_char_n_timing(int character, int count); extern std::string get_tx_duration(); extern std::string get_tx_timing(std::string data); extern void * xmlrpc_loop(void *d); extern void close_xmlrpc(); extern void enable_arq(void); extern void enable_kiss(void); extern void open_xmlrpc(); extern void send_abort(void); extern void send_clear_rx(void); extern void send_clear_tx(void); extern void send_new_modem(std::string modem); extern void send_report(std::string report); extern void send_rsid(void); extern void send_rx(void); extern void send_tune(void); extern void send_tx(void); extern void set_rsid(void); extern void set_xmlrpc_timeout_default(void); extern void set_xmlrpc_timeout(double value); #endif flamp-2.2.12/src/include/calendar.h0000644000175000017500000000623514463050061013757 00000000000000/* -*-C++-*- "$Id: Fl_Calendar.H,v 1.4 2000/02/13 04:43:56 jamespalmer Exp $" Copyright 1999-2010 by the Flek development team. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor Boston, MA 02110-1301 USA. Please report all bugs and problems to "flek-devel@sourceforge.net". */ #ifndef _FL_CALENDAR_H #define _FL_CALENDAR_H #include #include #include #include #include "flinput2.h" #include "date.h" class Fl_Calendar_Base : public Fl_Group , public Date { private: protected: int cal_x; int cal_y; int cal_w; int cal_h; Fl_Button * days[6*7]; public: Fl_Widget *target; int calfmt; /** * The constructor for an empty Fl_Calendar_Base. */ Fl_Calendar_Base (int x, int y, int w = (7*20), int h = (6*20), const char *l = 0); Fl_Button * day_button (int i); void update (); void csize (int cx, int cy, int cw, int ch); void setTarget (Fl_Widget *tgt); }; class Fl_Calendar : public Fl_Calendar_Base { public: /** * The constructor for an empty Fl_Calendar. */ Fl_Calendar (int x, int y, int w = (7*20), int h = (8*20), const char *l = 0); void next_month (); void next_year (); void previous_month (); void previous_year (); void setDate (int, int, int); void today (); void update (); void csize (int cx, int cy, int cw, int ch); int handle (int); protected: // Fl_Button * weekdays[7]; // Fl_Button * caption; Fl_Box * caption; Fl_Box * weekdays[7]; Fl_Button * nxt_month; Fl_Button * nxt_year; Fl_Button * prv_month; Fl_Button * prv_year; }; class Fl_PopCal : public Fl_Window { friend void popcal_cb(Fl_Widget *, long); protected: int popcalfmt_; // Fl_Window popcal_form; Fl_Calendar *popcal; Fl_Input2 *target; public: Fl_PopCal (int x, int y, int w, int h, Fl_Input2 *inp = 0); ~Fl_PopCal (); int handle (int); int popcalfmt (); void popcal_cb_i (Fl_Widget *, long); void popcalfmt (int); void pophide (); void popposition (int, int); void popshow (); void setDate (int, int, int); }; class Fl_DateInput : public Fl_Group { protected: Fl_Button *Btn; Fl_Input2 *Input; Fl_PopCal *Cal; Fl_Window *popcal_form; Fl_Calendar *popcal; int popcalfmt_; void makepopcal(); public: Fl_DateInput (int x, int y, int w, int h, const char * = 0); const char *value (); void align (Fl_Align); void fl_popcal(); void format (int); void labelcolor (int); void labelfont (int); void labelsize (int); void take_focus(); void textfont (int); void textsize (int); void value (const char *); }; #endif flamp-2.2.12/src/include/threads.h0000664000175000017500000000563114507650001013640 00000000000000#ifndef THREADS_H_ #define THREADS_H_ #include #include #include #include #if !HAVE_SEM_TIMEDWAIT # include int sem_timedwait(sem_t* sem, const struct timespec* abs_timeout); #endif int sem_timedwait_rel(sem_t* sem, double rel_timeout); int pthread_cond_timedwait_rel(pthread_cond_t* cond, pthread_mutex_t* mutex, double rel_timeout); enum { INVALID_TID = -1, TRX_TID, QRZ_TID, RIGCTL_TID, NORIGCTL_TID, #if USE_XMLRPC XMLRPC_TID, #endif ARQ_TID, ARQSOCKET_TID, FLMAIN_TID, NUM_THREADS, NUM_QRUNNER_THREADS = NUM_THREADS - 1 }; #ifdef __linux__ void linux_log_tid(void); # define LOG_THREAD_ID() linux_log_tid() #else # define LOG_THREAD_ID() /* nothing */ #endif #if USE_TLS # define THREAD_ID_TYPE __thread intptr_t # define CREATE_THREAD_ID() thread_id_ = INVALID_TID # define SET_THREAD_ID(x) do { thread_id_ = (x); LOG_THREAD_ID(); } while (0) # define GET_THREAD_ID() thread_id_ #else # define THREAD_ID_TYPE pthread_key_t # define CREATE_THREAD_ID() pthread_key_create(&thread_id_, NULL) # define SET_THREAD_ID(x) do { pthread_setspecific(thread_id_, (const void *)(x + 1)); LOG_THREAD_ID(); } while (0) # define GET_THREAD_ID() ((intptr_t)pthread_getspecific(thread_id_) - 1) #endif // USE_TLS extern THREAD_ID_TYPE thread_id_; #ifndef NDEBUG # include "debug.h" bool thread_in_list(int id, const int* list); # define ENSURE_THREAD(...) \ do { \ int id_ = GET_THREAD_ID(); \ int t_[] = { __VA_ARGS__, INVALID_TID }; \ if (!thread_in_list(id_, t_)) \ LOG_ERROR("bad thread context: %d", id_); \ } while (0) # define ENSURE_NOT_THREAD(...) \ do { \ int id_ = GET_THREAD_ID(); \ int t_[] = { __VA_ARGS__, INVALID_TID }; \ if (thread_in_list(id_, t_)) \ LOG_ERROR("bad thread context: %d", id_); \ } while (0) #else # define ENSURE_THREAD(...) ((void)0) # define ENSURE_NOT_THREAD(...) ((void)0) #endif // ! NDEBUG // On POSIX systems we cancel threads by sending them SIGUSR2, // which will also interrupt blocking calls. On woe32 we use // pthread_cancel and there is no good/sane way to interrupt. #ifndef __WOE32__ # define SET_THREAD_CANCEL() \ do { \ sigset_t usr2; \ sigemptyset(&usr2); \ sigaddset(&usr2, SIGUSR2); \ pthread_sigmask(SIG_UNBLOCK, &usr2, NULL); \ } while (0) # define TEST_THREAD_CANCEL() /* nothing */ # define CANCEL_THREAD(t__) pthread_kill(t__, SIGUSR2) #else // threads have PTHREAD_CANCEL_ENABLE, PTHREAD_CANCEL_DEFERRED when created # define SET_THREAD_CANCEL() /* nothing */ # define TEST_THREAD_CANCEL() pthread_testcancel() # define CANCEL_THREAD(t__) pthread_cancel(t__); #endif #include "fl_lock.h" /// This ensures that a mutex is always unlocked when leaving a function or block. class guard_lock { public: guard_lock(pthread_mutex_t* m); ~guard_lock(void); private: pthread_mutex_t* mutex; }; #endif // !THREADS_H_ flamp-2.2.12/src/include/font_browser.h0000664000175000017500000000626014605333207014723 00000000000000// ---------------------------------------------------------------------------- // Font_Browser.h v 0.0.1 2005-10-17 // // for the Fast Light Tool Kit (FLTK) 1.1.x . // // David Freese, w1hkj@w1hkj.com // based on similar widget by Mariwan Jalal // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ---------------------------------------------------------------------------- #ifndef FONTBROWSER_H #define FONTBROWSER_H #include #include #include #include #include #include #include #include #include #include "flslider2.h" // Preview box for showing font class Preview_Box : public Fl_Widget { private: int fontName; int fontSize; Fl_Color fontColor; void draw(); public: Preview_Box(int x, int y, int w, int h, const char* l); void SetFont( int fontname, int fontsize, Fl_Color c); }; // Font browser widget struct font_pair { int nbr; std::string name; font_pair() { nbr = 0; name.clear(); } ~font_pair() { } }; class Font_Browser : public Fl_Window { public: friend void *find_fixed_fonts(void *); enum filter_t { FIXED_WIDTH, VARIABLE_WIDTH, ALL_TYPES }; // these are shared by all instances of Font_Browser // created for instance 1 and deleted for instance 0 static int *fixed; static std::list font_list; font_pair nufont; static int instance; static int numfonts; private: Fl_Font fontnbr; int fontsize; Fl_Color fontcolor; filter_t filter; void *data_; Fl_Browser *lst_Font; Fl_Browser *lst_Size; Fl_Value_Input2 *txt_Size; Fl_Return_Button *btn_OK; Fl_Button *btn_Cancel; Fl_Button *btn_Color; Fl_Check_Button *btn_fixed; Preview_Box *box_Example; Fl_Callback* callback_; public: Font_Browser(int x = 100, int y = 100, int w = 430, int h = 225, const char *lbl = "Font Browser"); ~Font_Browser(); void callback(Fl_Callback* cb, void *d = 0) { callback_ = cb; data_ = d; } static void fb_callback(Fl_Widget* w, void* arg); void FontNameSelect(); void ColorSelect(); int numFonts() { return numfonts; } void fontNumber(Fl_Font n); Fl_Font fontNumber() { return fontnbr; } void fontSize(int s); int fontSize() { return fontsize; } void fontColor(Fl_Color c); Fl_Color fontColor() { return fontcolor; }; const char *fontName() { return lst_Font->text(lst_Font->value()); } void fontName(const char* n); static bool fixed_width(Fl_Font f); void fontFilter(filter_t filter); }; extern Font_Browser* font_browser; #endif flamp-2.2.12/src/include/debug.h0000644000175000017500000000707314463050061013275 00000000000000// ---------------------------------------------------------------------------- // debug.h // // Copyright (C) 2008, 2012 // Stelios Bounanos, M0GLD; Dave Freese, W1HKJ // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ---------------------------------------------------------------------------- #ifndef _DEBUG_H_ #define _DEBUG_H_ #include "util.h" class debug { public: enum level_e { QUIET_LEVEL, ERROR_LEVEL, WARN_LEVEL, INFO_LEVEL, DEBUG_LEVEL, LOG_NLEVELS }; enum source_e { LOG_RIGCONTROL = 1 << 0, LOG_RPC = 1 << 1, LOG_OTHER = 1 << 2 }; static void start(const char* filename); static void stop(void); static void log(level_e level, const char* func, const char* srcf, int line, const char* format, ...) format__(printf, 5, 6); static void slog(level_e level, const char* func, const char* srcf, int line, const char* format, ...) format__(printf, 5, 6); static void elog(const char* func, const char* srcf, int line, const char* text); static void show(void); static level_e level; static uint32_t mask; private: static void sync_text(void *); static void append_dbg_buffer(char * message); debug(const char* filename); debug(const debug&); debug& operator=(const debug&); ~debug(); static debug* inst; }; #define LOG(level__, source__, ...) \ do { \ if (level__ <= debug::level && source__ & debug::mask) \ debug::log(level__, __func__, __FILE__, __LINE__, __VA_ARGS__); \ } while (0) #define LOG_DEBUG(...) LOG(debug::DEBUG_LEVEL, log_source_, __VA_ARGS__) #define LOG_INFO(...) LOG(debug::INFO_LEVEL, log_source_, __VA_ARGS__) #define LOG_WARN(...) LOG(debug::WARN_LEVEL, log_source_, __VA_ARGS__) #define LOG_ERROR(...) LOG(debug::ERROR_LEVEL, log_source_, __VA_ARGS__) #define LOG_QUIET(...) LOG(debug::QUIET_LEVEL, log_source_, __VA_ARGS__) #define SLOG(level__, source__, ...) \ do { \ if (level__ <= debug::level && source__ & debug::mask) \ debug::slog(level__, __func__, __FILE__, __LINE__, __VA_ARGS__); \ } while (0) #define SLOG_DEBUG(...) SLOG(debug::DEBUG_LEVEL, log_source_, __VA_ARGS__) #define SLOG_INFO(...) SLOG(debug::INFO_LEVEL, log_source_, __VA_ARGS__) #define SLOG_WARN(...) SLOG(debug::WARN_LEVEL, log_source_, __VA_ARGS__) #define SLOG_ERROR(...) SLOG(debug::ERROR_LEVEL, log_source_, __VA_ARGS__) #define SLOG_QUIET(...) SLOG(debug::QUIET_LEVEL, log_source_, __VA_ARGS__) #define LOG_PERROR(msg__) \ do { \ if (debug::ERROR_LEVEL <= debug::level && log_source_ & debug::mask) \ debug::elog(__func__, __FILE__, __LINE__, msg__); \ } while (0) unused__ static uint32_t log_source_ = debug::LOG_OTHER; #if defined(__GNUC__) && (__GNUC__ >= 3) # define LOG_FILE_SOURCE(source__) \ __attribute__((constructor)) \ static void log_set_source_(void) { log_source_ = source__; } #else # define LOG_FILE_SOURCE(source__) #endif #define LOG_SET_SOURCE(source__) log_source_ = source__ #endif // _DEBUG_H_ // Local Variables: // mode: c++ // c-file-style: "linux" // End: flamp-2.2.12/src/include/flamp_dialog.h0000664000175000017500000000306614605333064014632 00000000000000#ifndef FLAMP_DIALOG_H #define FLAMP_DIALOG_H #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "FTextView.h" #include "flinput2.h" #include "combo.h" #include "calendar.h" #include "Fl_BlockMap.h" #define CNT_BLOCK_SIZE_STEP_RATE 16 #define CNT_BLOCK_SIZE_MINIMUM 16 #define CNT_BLOCK_SIZE_MAXIMUM 2048 #define XMT_LABEL "Xmit" #define CANX_LABEL "Cancel" #define RELAY_LABEL "Relay" extern Fl_Double_Window *main_window; extern bool valid_mode_check(std::string &md); extern void update_cbo_modes(std::string &fldigi_modes); extern void unproto_widgets(class cAmp *amp); extern void set_txt_tx_interval(); extern bool assign_bc_modem_list(void); extern void estimate_bc(void); extern std::string g_header_modem; extern std::string g_modem; extern std::string selected_encoder_string; enum tab_number { rx_tab_idx = 0, tx_tab_idx = 1, events_tab_idx = 2, config_tab_idx = 3, tab_count }; extern Fl_Group *tab_pointers[tab_count]; #endif flamp-2.2.12/src/include/circular_queue.h0000644000175000017500000000626614463050061015222 00000000000000// // circularQueue.h // // Author(s): // Robert Stiles, KK5VD, Copyright (C) 2013, 2015 // Dave Freese, W1HKJ, Copyright (C) 2013 // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // #ifndef flamp_circular_queue_h #define flamp_circular_queue_h #include #include #include #include #include #include "util.h" #include "crc16.h" #define CQUE_HOLD 1 #define CQUE_RESUME 0 #define CQUE_SLEEP_TIME 10 #define TIME_SET 1 #define TIME_COUNT 2 class CircQueException : public std::exception { public: CircQueException(int err_ = 0) : err(err_), msg(err_to_str(err_)) { } CircQueException(const char* msg_) : err(1), msg(msg_) { } CircQueException(int err_, const std::string& prefix) : err(err_), msg(std::string(prefix).append(": ").append(err_to_str(err_))) { } virtual ~CircQueException() throw() { } const char* what(void) const throw() { return msg.c_str(); } int error(void) const { return err; } protected: const char* err_to_str(int e) { return strerror(e); } int err; std::string msg; }; class Circular_queue { private: pthread_t thread; pthread_mutex_t mutex; pthread_cond_t condition; char *buffer; int buffer_size; int bufferCount; int exit_thread; int index_mask; int read_index; int stalled; int write_index; Ccrc16 crcValidate; public: int inhibitDataOut; int thread_running; int (* matchFound)(void *); int (* readData)(void *); void * (* queueParser)(void *); public: Circular_queue(void); Circular_queue(int po2, int (*_matchFound)(void *), \ int (*_readDataFrom)(void *), void * (*_queueParser)(void *)); ~Circular_queue(); public: bool timeOut(time_t &timeValue, time_t seconds, int attribute); int adjustReadQueIndex(int count); int lookAhead(char *_buffer, int _size); int lookAheadCRC(char *_buffer, int _size, unsigned int *crcVal, int *reset); int lookAheadForCharacter(char character, int *found); int lookAheadToTerminator(char *_buffer, char terminator, int maxLen); int queueStalled() { return stalled; } int readQueData(int buffer_count); int thread_exit() { return exit_thread; } void addToQueue(char *_buffer, int _size); void addToQueueNullFiltered(char *_buffer, int _size); void resumeQueue(); void signal(void); void sleep(int seconds, int milliseconds); void startDataOut(); void stopDataOut(); void stopQueue(); void milliSleep(int milliseconds) { sleep(0, milliseconds); } void setUp(int po2, int (*_matchFound)(void *), \ int (*_readDataFrom)(void *), void * (*_queueParser)(void *)); }; #endif // flamp_circular_queue_h flamp-2.2.12/src/include/tagSearch.h0000644000175000017500000000425614463050061014110 00000000000000// // tagSearch.h // // Author(s): // Robert Stiles, KK5VD, Copyright (C) 2013 // Dave Freese, W1HKJ, Copyright (C) 2013 // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // #ifndef flamp_tag_search_h #define flamp_tag_search_h #include "circular_queue.h" #include "util.h" #define MATCH_FOUND 1 #define MATCH_NOT_FOUND 0 #define STRING_MATCH_SIZE_LIMIT 16 struct MATCH_STRING { char string[STRING_MATCH_SIZE_LIMIT+1]; int string_size; int tag_number; uint32_t match; MATCH_STRING() { memset (string, 0, STRING_MATCH_SIZE_LIMIT+1); string_size = 0; tag_number = 0; match = 0; } }; class TagSearchException : public std::exception { public: TagSearchException(int err_ = 0) : err(err_), msg(err_to_str(err_)) { } TagSearchException(const char* msg_) : err(1), msg(msg_) { } TagSearchException(int err_, const std::string& prefix) : err(err_), msg(std::string(prefix).append(": ").append(err_to_str(err_))) { } virtual ~TagSearchException() throw() { } const char* what(void) const throw() { return msg.c_str(); } int error(void) const { return err; } protected: const char* err_to_str(int e) { return strerror(e); } int err; std::string msg; }; class TagSearch : public Circular_queue { private: MATCH_STRING *patternMatchList; int matchMaxLen; int search_tag_count; int listCount; public: TagSearch(void); TagSearch(int (*_readDataFrom)(void *), int (*_matchFound)(void *)); ~TagSearch(); void stringMatchingList(const char *mList[], int mlCount); friend void * tag_search_parser(void *ptr); }; #endif // flamp_tag_search_h flamp-2.2.12/src/include/flamprc.h0000644000175000017500000000007714463050061013630 00000000000000// MS include file for application icon #define IDI_ICON 101 flamp-2.2.12/src/include/socket.h0000664000175000017500000000757514507650001013507 00000000000000// ---------------------------------------------------------------------------- // socket.h // // Copyright (C) 2008-2009 // Stelios Bounanos, M0GLD // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ---------------------------------------------------------------------------- #ifndef SOCKET_H_ #define SOCKET_H_ #include #include #ifndef __MINGW32__ # include # include # include #else # include #endif #include #include #include #define S_BUFSIZ 16384 class SocketException : public std::exception { public: SocketException(int err_ = 0) : err(err_), msg(err_to_str(err_)) { } SocketException(const char* msg_) : err(1), msg(msg_) { } SocketException(int err_, const std::string& prefix) : err(err_), msg(std::string(prefix).append(": ").append(err_to_str(err_))) { } virtual ~SocketException() throw() { } const char* what(void) const throw() { return msg.c_str(); } int error(void) const { return err; } protected: const char* err_to_str(int e) { #if HAVE_GETADDRINFO if (e < 0) return gai_strerror(e); else #endif return strerror(e); } int err; std::string msg; }; #if HAVE_GETADDRINFO typedef struct addrinfo addr_info_t; #else struct addr_info_t { int ai_family; int ai_socktype; int ai_protocol; int ai_addrlen; struct sockaddr* ai_addr; }; #endif class Address { public: Address(const char* host = "", int port = 0, const char* proto_name = "tcp"); Address(const char* host, const char* port_name, const char* proto_name = "tcp"); Address(const Address& addr); ~Address(); Address& operator=(const Address& rhs); size_t size(void) const; const addr_info_t* get(size_t n = 0) const; static std::string get_str(const addr_info_t* addr); private: void lookup(const char* proto_name); std::string node; std::string service; //int port; #if HAVE_GETADDRINFO struct addrinfo* info; #else struct hostent host_entry; struct servent service_entry; mutable addr_info_t addr; mutable struct sockaddr_in saddr; #endif bool copied; }; class Socket { public: Socket(const Address& addr); Socket(int fd = -1); Socket(const Socket& s); ~Socket(); Socket& operator=(const Socket& rhs); void open(const Address& addr); void close(void); bool wait(int dir); // Server void bind(void); void listen(int backlog = SOMAXCONN); Socket accept(void); Socket accept1(void); // Client void connect(const Address& addr); void connect(void); // Data Transimission size_t send(const void* buf, size_t len); size_t send(const std::string& buf); size_t recv(void* buf, size_t len); size_t recv(std::string& buf); // Options int get_bufsize(int dir); void set_bufsize(int dir, int len); void set_nonblocking(bool v = true); void set_nodelay(bool v = true); void set_timeout(const struct timeval& t); void set_timeout(double t); void set_autoclose(bool v) const; void set_close_on_exec(bool v, int fd = -1); int fd(void); private: int sockfd; Address address; size_t anum; const addr_info_t* ainfo; char* buffer; struct timeval timeout; bool nonblocking; mutable bool autoclose; }; #endif // SOCKET_H_ // Local Variables: // mode: c++ // c-file-style: "linux" // End: flamp-2.2.12/src/include/ascii.h0000644000175000017500000000233014463050061013266 00000000000000// ---------------------------------------------------------------------------- // ascii.h -- ASCII table // // Copyright (C) 2006 // Dave Freese, W1HKJ // // Adapted from code contained in gmfsk source code // distribution. // gmfsk Copyright (C) 2001, 2002, 2003 // Tomi Manninen (oh2bns@sral.fi) // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef ASCII_H #define ASCII_H extern const char *ascii[]; extern const char *ascii2[]; #define SOH 0x01 // SOH ascii character #define EOT 0x04 // EOT ascii character #endif flamp-2.2.12/src/include/Fl_Text_Editor_mod.H0000644000175000017500000001255414463050061015661 00000000000000// // "$Id: Fl_Text_Editor_mod.H 7903 2010-11-28 21:06:39Z matt $" // // Header file for Fl_Text_Editor_mod class. // // Copyright 2001-2010 by Bill Spitzak and others. // Original code Copyright Mark Edel. Permission to distribute under // the LGPL for the FLTK library granted by Mark Edel. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public // License as published by the Free Software Foundation; either // version 2 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Library General Public License for more details. // // You should have received a copy of the GNU Library General Public // License along with this library; if not, write to the // // Free Software Foundation, Inc. // 51 Franklin Street, Fifth Floor // Boston, MA 02110-1301 USA. // // Please report all bugs and problems on the following page: // // http://www.fltk.org/str.php // /* \file Fl_Text_Editor_mod widget . */ #ifndef Fl_Text_Editor_mod_H #define Fl_Text_Editor_mod_H #include "Fl_Text_Display_mod.H" #include // key will match in any state #define Fl_Text_Editor_mod_ANY_STATE (-1L) /** This is the FLTK text editor widget. It allows the user to edit multiple lines of text and supports highlighting and scrolling. The buffer that is displayed in the widget is managed by the Fl_Text_Buffer_mod class. */ class FL_EXPORT Fl_Text_Editor_mod : public Fl_Text_Display_mod { public: /** Key function binding callback type */ typedef int (*Key_Func)(int key, Fl_Text_Editor_mod* editor); /** Simple linked list associating a key/state to a function */ struct Key_Binding { int key; ///< the key pressed int state; ///< the state of key modifiers Key_Func function; ///< associated function Key_Binding* next; ///< next key binding in the list }; Fl_Text_Editor_mod(int X, int Y, int W, int H, const char* l = 0); ~Fl_Text_Editor_mod() { remove_all_key_bindings(); } virtual int handle(int e); /** Sets the current insert mode; if non-zero, new text is inserted before the current cursor position. Otherwise, new text replaces text at the current cursor position. */ void insert_mode(int b) { insert_mode_ = b; } /** Gets the current insert mode; if non-zero, new text is inserted before the current cursor position. Otherwise, new text replaces text at the current cursor position. */ int insert_mode() { return insert_mode_; } void add_key_binding(int key, int state, Key_Func f, Key_Binding** list); /** Adds a key of state "state" with the function "function" */ void add_key_binding(int key, int state, Key_Func f) { add_key_binding(key, state, f, &key_bindings); } void remove_key_binding(int key, int state, Key_Binding** list); /** Removes the key binding associated with the key "key" of state "state". */ void remove_key_binding(int key, int state) { remove_key_binding(key, state, &key_bindings); } void remove_all_key_bindings(Key_Binding** list); /** Removes all of the key bindings associated with the text editor or list. */ void remove_all_key_bindings() { remove_all_key_bindings(&key_bindings); } void add_default_key_bindings(Key_Binding** list); Key_Func bound_key_function(int key, int state, Key_Binding* list); /** Returns the function associated with a key binding. */ Key_Func bound_key_function(int key, int state) { return bound_key_function(key, state, key_bindings); } /** Sets the default key function for unassigned keys. */ void default_key_function(Key_Func f) { default_key_function_ = f; } // functions for the built in default bindings static int kf_default(int c, Fl_Text_Editor_mod* e); static int kf_ignore(int c, Fl_Text_Editor_mod* e); static int kf_backspace(int c, Fl_Text_Editor_mod* e); static int kf_enter(int c, Fl_Text_Editor_mod* e); static int kf_move(int c, Fl_Text_Editor_mod* e); static int kf_shift_move(int c, Fl_Text_Editor_mod* e); static int kf_ctrl_move(int c, Fl_Text_Editor_mod* e); static int kf_c_s_move(int c, Fl_Text_Editor_mod* e); static int kf_meta_move(int c, Fl_Text_Editor_mod* e); static int kf_m_s_move(int c, Fl_Text_Editor_mod* e); static int kf_home(int, Fl_Text_Editor_mod* e); static int kf_end(int c, Fl_Text_Editor_mod* e); static int kf_left(int c, Fl_Text_Editor_mod* e); static int kf_up(int c, Fl_Text_Editor_mod* e); static int kf_right(int c, Fl_Text_Editor_mod* e); static int kf_down(int c, Fl_Text_Editor_mod* e); static int kf_page_up(int c, Fl_Text_Editor_mod* e); static int kf_page_down(int c, Fl_Text_Editor_mod* e); static int kf_insert(int c, Fl_Text_Editor_mod* e); static int kf_delete(int c, Fl_Text_Editor_mod* e); static int kf_copy(int c, Fl_Text_Editor_mod* e); static int kf_cut(int c, Fl_Text_Editor_mod* e); static int kf_paste(int c, Fl_Text_Editor_mod* e); static int kf_select_all(int c, Fl_Text_Editor_mod* e); static int kf_undo(int c, Fl_Text_Editor_mod* e); protected: int handle_key(); void maybe_do_callback(); #ifndef FL_DOXYGEN int insert_mode_; Key_Binding* key_bindings; static Key_Binding* global_key_bindings; Key_Func default_key_function_; #endif }; #endif // // End of "$Id: Fl_Text_Editor_mod.H 7903 2010-11-28 21:06:39Z matt $". // flamp-2.2.12/src/include/transmit_camp.h0000664000175000017500000001253114507650001015044 00000000000000//====================================================================== // transmit_camp.cxx // // Author(s): // Dave Freese, W1HKJ, Copyright (C) 2010, 2011, 2012, 2013 // Robert Stiles, KK5VD, Copyright (C) 2013 // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ===================================================================== #ifndef __flamp_transmit_camp__ #define __flamp_transmit_camp__ #define TX_CONTINIOUS 0x01 //!< @brief No breaks in the transmitted data. #define TX_MODEM_SAME 0x02 //!< @brief Header modem not used. #define TX_MULTI_MODEM 0x04 //!< @brief Create a time table for all modems. #define TX_SEGMENTED 0x08 //!< @brief Interval Timer #define TX_SINGLE_MODEM 0x10 //!< @brief Create a time table for a single modem. #define TX_ALL_BUTTON 1 //!< @brief Flag indicating transmit all queued file. #define TX_BUTTON 2 //!< @brief Flag indicating transmit a single file. #define DATA_MODEM 1 //!< @brief Indicate this data is for data modem. #define HEADER_MODEM 2 //!< @brief Indicate this data is for header modem. #define CALLSIGN_PREAMBLE 0x01 #define CALLSIGN_POSTAMBLE 0x02 #define BROADCAST_MAX_MODEMS 4 //!< @brief Maximum number of modems (hamcast). #define THREAD_ERR_MSG_SIZE 256 //! @struct _tx_fldigi_thread //! Structure information used to transmit cAmp data (threaded) and the creation of a character time table. //! @typedef TX_FLDIGI_THREAD //! @see _tx_fldigi_thread typedef struct _tx_fldigi_thread { pthread_attr_t attr; //!< Flag for indicating thread is to be detached. pthread_execute() pthread_cond_t condition; //!< Condition used to signal exit when process is asleep. pthread_mutex_t mutex; //!< Mutex for transit thread. pthread_t thread; //!< Thread bool err_flag; //!< @brief Indicating an error occured bool event_driven; //!< @brief Indicate the tx thread is event_driven char err_msg[THREAD_ERR_MSG_SIZE]; //!< @brief Error message storage. int amp_type; //!< @brief What type of instance in this? RX_AMP or TX_AMP. int exit_thread; //!< @brief Setting to true causes thread to exit. int mode; //!< @brief Mode (modem index) used in time table generation int que; //!< @brief Flag to determine if a single file or multiple files to be sent. int rx_interval_time; //!< @brief Delay period between transmits int tx_interval_time; //!< @brief Transmit period in seconds int thread_running; //!< @brief Flag indicating thread is running. std::string header_modem; //!< @brief Local storage for current selected header modem std::string modem; //!< @brief Local storage for current selected modem std::vector bc_modems; //!< @brief Local storage for hamcast modems. void *data; //!< For future use _tx_fldigi_thread() { //!< @brief Clear struct _tx_fldigi_thread memory on allocation. bc_modems.clear(); data = (void *)0; event_driven = false; exit_thread = 0; header_modem.clear(); memset(&attr, 0, sizeof(attr)); memset(&condition, 0, sizeof(condition)); memset(&err_msg, 0, sizeof(err_msg)); memset(&mutex, 0, sizeof(mutex)); memset(&thread, 0, sizeof(thread)); mode = 0; modem.clear(); que = 0; thread_running = 0; } } TX_FLDIGI_THREAD; extern std::string g_header_modem; extern std::string g_modem; extern unsigned int modem_rotation_index; extern std::vector bc_modems; extern class cAmpGlobal rx_amp; extern class cAmpGlobal tx_amp; extern bool active_data_io; extern bool event_bail_flag; extern bool transmit_queue; extern int g_event_driven; extern int last_selected_tx_file; extern int tx_thread_running_count; extern bool check_block_tx_time(std::vector &header, std::vector &data, TX_FLDIGI_THREAD *thread_ptr); extern bool send_vector_to_fldigi(TX_FLDIGI_THREAD *thread, std::string modem, std::string &tail, std::vector vector_data, int mode, cAmp *tx); extern TX_FLDIGI_THREAD * run_in_thread(void *(*func)(void *), int mode, bool queued, bool event_driven, RELAY_DATA *relay_data); extern void * run_in_thread_destroy(TX_FLDIGI_THREAD *tx_thread, int level, bool *in_use_flag); extern void * transmit_header_current(void *); extern void * transmit_header(void * ptr); extern void * transmit_interval(void *); extern void * transmit_relay_interval(void *ptr); extern void * transmit_serial_current(void *); extern void * transmit_serial_queued(void *); extern void * transmit_serial_relay(void *ptr); extern void clear_missing(void *ptr); extern void abort_tx_from_main(void *ptr); extern bool wait_for_rx(int max_wait_seconds, float factpr = 1.0); #endif /* defined(__flamp_transmit_camp__) */ flamp-2.2.12/src/include/ztimer.h0000664000175000017500000000265014517740617013534 00000000000000// ===================================================================== // // ztimer.h // // Author(s): // Copyright (C) 2014 Robert Stiles, KK5VD // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ===================================================================== extern bool continuous_exception; extern bool event_timer_on; extern bool exit_watch_dog; extern float tx_time_g; extern time_t watch_dog_seconds; extern time_t ztime_current; extern time_t ztime_end; extern pthread_t * watch_dog_thread; extern void * watch_dog_loop(void *p); extern void TOD_init(); extern void TOD_close(); extern bool TOD_enabled; extern time_t time_check(void); extern void stop_events(void); extern void ztimer(); //void* first_call); extern bool parse_repeat_times(bool delete_flag, unsigned int zt, int mode); flamp-2.2.12/src/include/FTextView.h0000644000175000017500000001231314463050061014065 00000000000000// ---------------------------------------------------------------------------- // FTextView.h // // Copyright (C) 2007-2009 // Stelios Bounanos, M0GLD // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ---------------------------------------------------------------------------- #ifndef FTextView_H_ #define FTextView_H_ #include #include #include #include #include #include "Fl_Text_Editor_mod.H" /// /// The text widgets base class. /// This class implements a basic text editing widget based on Fl_Text_Editor_mod. /// class FTextBase : public Fl_Text_Editor_mod { public: // CLICK_START: same as first clickable style // NATTR: number of styles (last style + 1) enum TEXT_ATTR { RECV, XMIT, CTRL, SKIP, ALTR, CLICK_START, QSY = CLICK_START, /* FOO, BAR, ..., */ NATTR }; FTextBase(int x, int y, int w, int h, const char *l = 0); virtual ~FTextBase() { delete tbuf; delete sbuf; } virtual void add(const char *text, int attr = RECV); virtual void add(unsigned char c, int attr = RECV); void addstr(const char *text, int attr = RECV) { add(text, attr); } void addchr(unsigned char c, int attr = RECV) { add(c, attr); } virtual int handle(int event); virtual void handle_context_menu(void) { } virtual void clear(void);//{ tbuf->text(""); sbuf->text(""); } void set_word_wrap(bool b); bool get_word_wrap(void) { return wrap; } virtual void setFont(Fl_Font f, int attr = NATTR); void setFontSize(int s, int attr = NATTR); void setFontColor(Fl_Color c, int attr = NATTR); // Override Fl_Text_Display, which stores the font number in an unsigned // character and therefore cannot represent all fonts Fl_Font textfont(void) { return styles[0].font; } void textfont(Fl_Font f) { setFont(f); } void textfont(uchar s) { textfont((Fl_Font)s); } void cursorON(void) { show_cursor(); } virtual void resize(int X, int Y, int W, int H); static bool wheight_mult_tsize(void *arg, int xd, int yd); protected: void set_style(int attr, Fl_Font f, int s, Fl_Color c, int set = SET_FONT | SET_SIZE | SET_COLOR); int readFile(const char* fn = 0); void saveFile(void); char* get_word(int x, int y, const char* nwchars = "", bool ontext = true); void init_context_menu(void); void show_context_menu(void); virtual void menu_cb(size_t item) { } int reset_wrap_col(void); void reset_styles(int set); void (*read_cb)(const char *); public: void set_read_cb(void (func(const char*))) { read_cb = func;} private: FTextBase(); FTextBase(const FTextBase &t); protected: enum { FTEXT_DEF = 'A' }; enum set_style_op_e { SET_FONT = 1 << 0, SET_SIZE = 1 << 1, SET_COLOR = 1 << 2 }; Fl_Text_Buffer_mod *tbuf; ///< text buffer Fl_Text_Buffer_mod *sbuf; ///< style buffer Fl_Text_Display_mod::Style_Table_Entry styles[NATTR]; Fl_Menu_Item *context_menu; int popx, popy; int wrap; int wrap_col; int max_lines; bool scroll_hint; bool restore_wrap; // bool wrap_restore; private: int oldw, oldh, olds; Fl_Font oldf; }; /// /// A TextBase subclass to display received & transmitted text /// class FTextView : public FTextBase { public: FTextView(int x, int y, int w, int h, const char *l = 0); ~FTextView() { } virtual int handle(int event); protected: enum { VIEW_MENU_COPY, VIEW_MENU_CLEAR, VIEW_MENU_SELECT_ALL, VIEW_MENU_SAVE, VIEW_MENU_WRAP }; virtual void handle_context_menu(void); virtual void menu_cb(size_t item); static void changed_cb(int pos, int nins, int ndel, int nsty, const char *dtext, void *arg); void change_keybindings(void); private: FTextView(); FTextView(const FTextView &t); protected: static Fl_Menu_Item menu[]; bool quick_entry; }; /// /// A FTextBase subclass to display and edit text to be transmitted /// class FTextEdit : public FTextBase { public: FTextEdit(int x, int y, int w, int h, const char *l = 0); virtual int handle(int event); protected: enum { EDIT_MENU_CUT, EDIT_MENU_COPY, EDIT_MENU_PASTE, EDIT_MENU_CLEAR, EDIT_MENU_READ, EDIT_MENU_WRAP }; virtual int handle_key(int key); int handle_key_ascii(int key); virtual int handle_dnd_drag(int pos); int handle_dnd_drop(void); virtual void handle_context_menu(void); virtual void menu_cb(size_t item); static void changed_cb(int pos, int nins, int ndel, int nsty, const char *dtext, void *arg); private: FTextEdit(); FTextEdit(const FTextEdit &t); protected: static Fl_Menu_Item menu[]; char ascii_cnt; unsigned ascii_chr; bool dnd_paste; }; #endif // FTextView_H_ // Local Variables: // mode: c++ // c-file-style: "linux" // End: flamp-2.2.12/src/include/combo.h0000644000175000017500000000531014463050061013276 00000000000000/* -*-C++-*- "$Id: Fl_Combobox.H,v 1.4 2000/02/13 04:43:56 dhfreese Exp $" Copyright 1999-2010 by the Dave Freese. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor Boston, MA 02110-1301 USA. Please report all bugs and problems to "flek-devel@sourceforge.net". */ #ifndef _FL_COMBOBOX_H #define _FL_COMBOBOX_H #include #include #include #include #include #define FL_COMBO_UNIQUE 1 #define FL_COMBO_UNIQUE_NOCASE 2 #define FL_COMBO_LIST_INCR 100 class Fl_ComboBox; struct datambr { char *s; void *d; }; struct retvals { Fl_Input *Inp; void * retval; int * idx;}; class Fl_PopBrowser : public Fl_Window { friend void popbrwsr_cb(Fl_Widget *, long); protected: Fl_Select_Browser *popbrwsr; retvals Rvals; int hRow; int wRow; public: Fl_PopBrowser (int x, int y, int w, int h, retvals R); ~Fl_PopBrowser (); void popshow (int, int); void pophide (); void popbrwsr_cb_i (Fl_Widget *, long); void add (char *s, void *d = 0); void clear (); void sort (); int handle (int); Fl_ComboBox *parent; }; class Fl_ComboBox : public Fl_Group { friend int DataCompare (const void *, const void *); friend class Fl_PopBrowser; protected: datambr **datalist; Fl_Button *Btn; Fl_Input *Output; Fl_PopBrowser *Brwsr; int listsize; int listtype; int maxsize; int numrows_; private: Fl_Color _color; int height; int idx; int width; retvals R; void *retdata; public: Fl_ComboBox (int x, int y, int w, int h, const char * = 0); ~Fl_ComboBox(); const char *value (); void fl_popbrwsr(Fl_Widget *); void put_value( const char *); void value (const char *); int index (); int lsize() { return listsize; } int numrows() { return numrows_; } void *data (); void add (const char *s, void *d = 0); void clear (); void color (Fl_Color c); void index (int i); void numrows(int n) { numrows_ = n; } void readonly(); void sort (); void textcolor (Fl_Color c); void textfont (int); void textsize (uchar); void type (int = 0); }; #endif flamp-2.2.12/src/include/pixmaps.h0000644000175000017500000000650214463050061013664 00000000000000// ===================================================================== // // pixmaps.h // // Author: Dave Freese, W1HKJ // Copyright: 2010 // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ===================================================================== #ifndef PIXMAPS_H_ #define PIXMAPS_H_ extern const char *address_book_icon[]; extern const char *edit_undo_icon[]; extern const char *edit_select_all_icon[]; extern const char *edit_clear_icon[]; extern const char *edit_copy_icon[]; extern const char *edit_cut_icon[]; extern const char *edit_paste_icon[]; extern const char *file_open_icon[]; extern const char *format_indent_more_icon[]; extern const char *left_arrow_icon[]; extern const char *log_out_icon[]; extern const char *minus_icon[]; extern const char *net_icon[]; extern const char *plus_icon[]; extern const char *process_stop_icon[]; extern const char *right_arrow_icon[]; extern const char *save_as_icon[]; extern const char *save_icon[]; extern const char *time_icon[]; extern const char *trash_icon[]; extern const char *image_icon[]; extern const char *weather_clear_icon[]; extern const char *start_here_icon[]; extern const char *help_browser_icon[]; extern const char *system_search_icon[]; extern const char *system_software_update_icon[]; extern const char *utilities_terminal_icon[]; extern const char *emblem_symbolic_link_icon[]; extern const char *emblems_system_icon[]; extern const char *dialog_information_icon[]; extern const char *executable_icon[]; extern const char *other_icon[]; extern const char *folder_open_icon[]; extern const char *preferences_system_icon[]; extern const char *preferences_desktop_font_icon[]; extern const char *system_users_icon[]; extern const char *utilities_system_monitor_icon[]; extern const char *multimedia_player_icon[]; extern const char *chat_icon[]; extern const char *dialog_information_48_icon[]; extern const char *dialog_warning_48_icon[]; extern const char *refresh_icon[]; extern const char *text_editor_icon[]; extern const char *text_icon[]; extern const char *shutdown_icon[]; extern const char *applications_system_icon[]; extern const char *audio_card_icon[]; extern const char *help_about_icon[]; extern const char *insert_link_icon[]; extern const char *close_icon[]; extern const char *enter_key_icon[]; extern const char *dialog_question_48_icon[]; extern const char *clear_sq_icon[]; extern const char *clear_row_icon[]; extern const char *rx1_icon[]; extern const char *tx1_icon[]; extern const char *rx2_icon[]; extern const char *tx2_icon[]; extern const char *rx_icon[]; extern const char *tx_icon[]; extern const char *waterfall_icon[]; extern const char *dice_icon[]; extern const char *pskr_icon[]; extern const char *flamp_icon[]; #endif // PIXMAPS_H_ flamp-2.2.12/src/include/status.h0000664000175000017500000000503714605333064013537 00000000000000// ===================================================================== // // status.h // // Author(s): // Dave Freese, W1HKJ Copyright (C) 2010 // Robert Stiles, KK5VD Copyright (C) 2013, 2023 // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ===================================================================== #ifndef _status_H #define _status_H #include struct status { int mainX; int mainY; std::string my_call; std::string my_info; std::string socket_addr; std::string socket_port; std::string xmlrpc_addr; std::string xmlrpc_port; std::string user_socket_addr; std::string user_socket_port; std::string user_xmlrpc_addr; std::string user_xmlrpc_port; bool use_compression; int encoder; std::string encoder_string; int selected_mode; int blocksize; int repeatNN; int repeat_header; bool sync_mode_flamp_fldigi; bool sync_mode_fldigi_flamp; bool fldigi_xmt_mode_change; int repeat_every; bool repeat_at_times; std::string repeat_times; bool repeat_forever; bool use_txrx_interval; float tx_interval_minutes; int rx_interval_seconds; bool use_header_modem; int header_selected_mode; bool disable_header_modem_on_block_fills; int use_tx_on_report; bool clear_tosend_on_tx_blocks; bool enable_delete_warning; bool enable_tx_unproto; bool enable_unproto_markers; bool queue_fills_only; bool auto_load_queue; bool load_from_tx_folder; std::string auto_load_queue_path; bool hamcast_mode_cycle; bool hamcast_mode_enable_1; int hamcast_mode_selection_1; bool hamcast_mode_enable_2; int hamcast_mode_selection_2; bool hamcast_mode_enable_3; int hamcast_mode_selection_3; bool hamcast_mode_enable_4; int hamcast_mode_selection_4; bool auto_rx_save; bool auto_rx_save_local_time; bool relay_retain_data; int tab_saved_state; int repeat_relay_data; int repeat_relay_header; void saveLastState(); void loadLastState(); }; extern status progStatus; #endif flamp-2.2.12/src/include/base256.h0000644000175000017500000000252014463050061013346 00000000000000// ===================================================================== // // base256.h // // Author: Dave Freese, W1HKJ // Copyright: 2012 // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ===================================================================== #include #include #include #include class base256 { #define LINELEN 64 private: bool ateof; int linelength; size_t iocp; size_t iolen; std::string output; void addlf(std::string &); void escape(std::string &, bool encode = true); void init(); void remlf(std::string &); public: base256() { init(); }; ~base256() {}; std::string encode(std::string &in); std::string decode(std::string &in, bool &decode_error); }; flamp-2.2.12/src/include/global_amp.h0000664000175000017500000000452614563657712014327 00000000000000//====================================================================== // global_amp.cxx // // Author(s): // Robert Stiles, KK5VD, Copyright (C) 2014 // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ===================================================================== #ifndef __flamp_global_amp__ #define __flamp_global_amp__ //! Use to sync class cAmp global variables via a threaded mutex lock access. class cAmpGlobal { protected: cAmp *amp; //!< @brief Current selected receive cAmp pointer std::vector amp_array; pthread_mutex_t mutex_amp; //!< @brief Mutex locks for pointer cAmp pointer access int locked; public: cAmpGlobal(); ~cAmpGlobal(); bool is_locked(void) { if(locked) return true; return false; } int lock_count(void) { return locked; } //! Access method for transmit cAmp pointer //! @param none (void) //! @return cAmp class pointer for current selected tx queue item. cAmp *get_amp(void); int get_index(void); int amp2index(cAmp *amp); cAmp *index2amp(int pos); //! Access method for transmit cAmp pointer. //! @param Set current selected TX cAmp ponter for global access. //! @return bool false if cAmp pointer NULL. bool set(cAmp *amp); bool set(int pos); void relay_write_save(cAmp *amp); //! Free allocaled cAmp memory. //! @param The cAmp pointer to be freed. //! @return none (void) void free(cAmp *amp); void free_all(void); void save_all_relay(void); bool add(cAmp *amp); bool remove(cAmp *amp); bool remove(int pos); size_t size(void); size_t count(void) { return size(); } void lock() { locked++; pthread_mutex_lock(&mutex_amp); } void unlock() { locked--; pthread_mutex_unlock(&mutex_amp); } }; #endif /* defined(__flamp_global_amp__) */ flamp-2.2.12/src/include/crc16.h0000664000175000017500000000374414507650001013127 00000000000000// ===================================================================== // // crc16.h ... crc16 checksum // // Author: Dave Freese, W1HKJ // Copyright: 2010 // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ===================================================================== #ifndef _CCRC16_ #define _CCRC16_ #include #include #include "debug.h" class Ccrc16 { private: unsigned int crcval; char ss[8]; public: Ccrc16() { crcval = 0xFFFF; } ~Ccrc16() {}; void reset() { crcval = 0xFFFF;} unsigned int val() {return (crcval & 0xFFFF);} std::string sval() { snprintf((char *) ss, sizeof(ss), "%04X", val()); return std::string(ss); } void update(unsigned int c) { crcval ^= (c & 0xFF); for (int i = 0; i < 8; ++i) { if (crcval & 1) crcval = (crcval >> 1) ^ 0xA001; else crcval = (crcval >> 1); } } unsigned int crc16(char c) { update((unsigned int) c); return val(); } unsigned int crc16(char *s, size_t count) { reset(); for (size_t i = 0; i < count; i++) update((unsigned int)(s[i] & 0xFF)); // only use lower half of unicode return val(); } unsigned int crc16(std::string s) { reset(); for (size_t i = 0; i < s.length(); i++) update((unsigned int)(s[i] & 0xFF)); // only use lower half of unicode return val(); } std::string scrc16(std::string s) { crc16(s); return sval(); } }; #endif flamp-2.2.12/src/include/compat.h0000664000175000017500000000275114507650001013471 00000000000000#ifndef COMPAT_H #define COMPAT_H /* adapted from compat.h in git-1.6.1.2 */ #if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__USLC__) && !defined(_M_UNIX) # define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */ # define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */ #endif #define _ALL_SOURCE 1 #define _GNU_SOURCE 1 #define _BSD_SOURCE 1 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifndef __WIN32__ # include # include # include # include #endif #include "compat-mingw.h" #ifdef __MINGW32__ # if FLDIGI_FLTK_API_MAJOR == 1 && FLDIGI_FLTK_API_MINOR < 3 # undef dirent # include # else # include # endif #define WSA_MAJOR 2 #define WSA_MINOR 0 #else # include #endif #ifdef __cplusplus extern "C" { #endif #if SNPRINTF_RETURNS_BOGUS #define snprintf git_snprintf extern int git_snprintf(char *str, size_t maxsize, const char *format, ...); #define vsnprintf git_vsnprintf extern int git_vsnprintf(char *str, size_t maxsize, const char *format, va_list ap); #endif #ifdef __cplusplus } #endif #endif // MINGW32_H flamp-2.2.12/src/include/Fl_Text_Buffer_mod.H0000644000175000017500000006327714463050061015654 00000000000000 // // "$Id: Fl_Text_Buffer_mod.H 8148 2010-12-31 22:38:03Z matt $" // // Header file for Fl_Text_Buffer_mod class. // // Copyright 2001-2010 by Bill Spitzak and others. // Original code Copyright Mark Edel. Permission to distribute under // the LGPL for the FLTK library granted by Mark Edel. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public // License as published by the Free Software Foundation; either // version 2 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Library General Public License for more details. // // You should have received a copy of the GNU Library General Public // License along with this library; if not, write to the // // Free Software Foundation, Inc. // 51 Franklin Street, Fifth Floor // Boston, MA 02110-1301 USA. // // Please report all bugs and problems on the following page: // // http://www.fltk.org/str.php // /* \file Fl_Text_Buffer_mod, Fl_Text_Selection_mod widget . */ #ifndef Fl_Text_Buffer_mod_H #define Fl_Text_Buffer_mod_H #include #undef ASSERT_UTF8 #ifdef ASSERT_UTF8 # include # define IS_UTF8_ALIGNED(a) if (a && *a) assert(fl_utf8len(*(a))>0); # define IS_UTF8_ALIGNED2(a, b) if (b>=0 && blength()) assert(fl_utf8len(a->byte_at(b))>0); #else # define IS_UTF8_ALIGNED(a) # define IS_UTF8_ALIGNED2(a, b) #endif /* "character size" is the size of a UTF-8 character in bytes "character width" is the width of a Unicode character in pixels "column" was orginally defined as a character offset from the left margin. It was identical to the byte offset. In UTF-8, we have neither a byte offset nor truly fixed width fonts (*). Column could be a pixel value multiplied with an average character width (which is a bearable approximation). * in Unicode, there are no fixed width fonts! Even if the ASCII characters may happen to be all the same width in pixels, chinese charcaters surely are not. There are plenty of exceptions, like ligatures, that make special handling of "fixed" character widths a nightmare. I decided to remove all references to fixed fonts and see "columns" as a multiple of the average width of a character in the main font. - Matthias */ /* Maximum length in characters of a tab or control character expansion of a single buffer character */ #define FL_TEXT_MAX_EXP_CHAR_LEN 20 #include /** \class Fl_Text_Selection_mod \brief This is an internal class for Fl_Text_Buffer_mod to manage text selections. This class works correctly with utf-8 strings assuming that the parameters for all calls are on character boundaries. */ class FL_EXPORT Fl_Text_Selection_mod { friend class Fl_Text_Buffer_mod; public: /** \brief Set the selection range. \param start byte offset to first selected character \param end byte offset pointing after last selected character */ void set(int start, int end); /** \brief Updates a selection afer text was modified. Updates an individual selection for changes in the corresponding text \param pos byte offset into text buffer at which the change occured \param nDeleted number of bytes deleted from the buffer \param nInserted number of bytes inserted into the buffer */ void update(int pos, int nDeleted, int nInserted); /** \brief Return the byte offset to the first selected character. \return byte offset */ int start() const { return mStart; } /** \brief Return the byte ofsset to the character after the last selected character. \return byte offset */ int end() const { return mEnd; } /** \brief Returns true if any text is selected. \return a non-zero number if any text has been selected, or 0 if no text is selected. */ bool selected() const { return mSelected; } /** \brief Modify the 'selected' flag. \param b new flag */ void selected(bool b) { mSelected = b; } /** Return true if position \p pos with indentation \p dispIndex is in the Fl_Text_Selection_mod. */ int includes(int pos) const; /** \brief Return the positions of this selection. \param start retrun byte offset to first selected character \param end retrun byte offset pointing after last selected character \return true if selected */ int position(int* start, int* end) const; protected: int mStart; ///< byte offset to the first selected character int mEnd; ///< byte offset to the character after the last selected character bool mSelected; ///< this flag is set if any text is selected }; typedef void (*Fl_Text_Modify_Cb)(int pos, int nInserted, int nDeleted, int nRestyled, const char* deletedText, void* cbArg); typedef void (*Fl_Text_Predelete_Cb)(int pos, int nDeleted, void* cbArg); /** \brief This class manages unicode displayed in one or more Fl_Text_Display_mod widgets. All text in Fl_Text_Buffer_modmust be encoded in UTF-8. All indices used in the function calls must be aligned to the start of a UTF-8 sequence. All indices and pointers returned will be aligned. All functions that return a single character will return that in an unsiged int in UCS-4 encoding. The Fl_Text_Buffer_mod class is used by the Fl_Text_Display_mod and Fl_Text_Editor_mod to manage complex text data and is based upon the excellent NEdit text editor engine - see http://www.nedit.org/. */ class FL_EXPORT Fl_Text_Buffer_mod { public: /** Create an empty text buffer of a pre-determined size. \param requestedSize use this to avoid unnecessary re-allocation if you know exactly how much the buffer will need to hold \param preferredGapSize Initial size for the buffer gap (empty space in the buffer where text might be inserted if the user is typing sequential chars) */ Fl_Text_Buffer_mod(int requestedSize = 0, int preferredGapSize = 1024); /** Frees a text buffer */ ~Fl_Text_Buffer_mod(); /** \brief Returns the number of bytes in the buffer. \return size of text in bytes */ int length() const { return mLength; } /** \brief Get a copy of the entire contents of the text buffer. Memory is allocated to contain the returned string, which the caller must free. \return newly allocated text buffer - must be free'd, text is utf8 */ char* text() const; /** Replaces the entire contents of the text buffer. \param text Text must be valid utf8. */ void text(const char* text); /** \brief Get a copy of a part of the text buffer. Return a copy of the text between \p start and \p end character positions from text buffer \p buf. Positions start at 0, and the range does not include the character pointed to by \p end. When you are done with the text, free it using the free() function. \param start byte offset to first character \param end byte offset after last character in range \return newly allocated text buffer - must be free'd, text is utf8 */ char* text_range(int start, int end) const; /** Returns the character at the specified position pos in the buffer. Positions start at 0 \param pos byte offset into buffer, pos must be at acharacter boundary \return Unicode UCS-4 encoded character */ unsigned int char_at(int pos) const; /** Returns the raw byte at the specified position pos in the buffer. Positions start at 0 \param pos byte offset into buffer \return unencoded raw byte */ char byte_at(int pos) const; /** Convert a byte offset in buffer into a memory address. \param pos byte offset into buffer \return byte offset converted to a memory address */ const char *address(int pos) const { return (pos < mGapStart) ? mBuf+pos : mBuf+pos+mGapEnd-mGapStart; } /** Convert a byte offset in buffer into a memory address. \param pos byte offset into buffer \return byte offset converted to a memory address */ char *address(int pos) { return (pos < mGapStart) ? mBuf+pos : mBuf+pos+mGapEnd-mGapStart; } /** Inserts null-terminated string \p text at position \p pos. \param pos insertion position as byte offset (must be utf-8 character aligned) \param text utf-8 encoded and nul terminated text */ void insert(int pos, const char* text); /** Appends the text string to the end of the buffer. \param t utf-8 encoded and nul terminated text */ void append(const char* t) { insert(length(), t); } /** Deletes a range of characters in the buffer. \param start byte offset to first character to be removed \param end byte offset to charcatre after last character to be removed */ void remove(int start, int end); /** Deletes the characters between \p start and \p end, and inserts the null-terminated string \p text in their place in the buffer. \param start byte offset to first character to be removed and new insert position \param end byte offset to charcatre after last character to be removed \param text utf-8 encoded and nul terminated text */ void replace(int start, int end, const char *text); /** Copies text from one buffer to this one. \param fromBuf source text buffer may be the same as this \param fromStart byte offset into buffer \param fromEnd byte offset into buffer \param toPos destination byte offset into buffer */ void copy(Fl_Text_Buffer_mod* fromBuf, int fromStart, int fromEnd, int toPos); /** Undo text modification according to the undo variables or insert text from the undo buffer */ int undo(int *cp=0); /** Lets the undo system know if we can undo changes */ void canUndo(char flag=1); /** Inserts a file at the specified position. Returns 0 on success, non-zero on error (strerror() contains reason). 1 indicates open for read failed (no data loaded). 2 indicates error occurred while reading data (data was partially loaded). File can be UTF-8 or CP1252-encoded. If the input file is not UTF-8-encoded, the Fl_Text_Buffer_mod widget will contain UTF-8-transcoded data. By default, the message Fl_Text_Buffer_mod::file_encoding_warning_message will warn the user about this. \see input_file_was_transcoded and transcoding_warning_action. */ int insertfile(const char *file, int pos, int buflen = 128*1024); /** Appends the named file to the end of the buffer. See also insertfile(). */ int appendfile(const char *file, int buflen = 128*1024) { return insertfile(file, length(), buflen); } /** Loads a text file into the buffer. See also insertfile(). */ int loadfile(const char *file, int buflen = 128*1024) { select(0, length()); remove_selection(); return appendfile(file, buflen); } /** Writes the specified portions of the file to a file. Returns 0 on success, non-zero on error (strerror() contains reason). 1 indicates open for write failed (no data saved). 2 indicates error occurred while writing data (data was partially saved). */ int outputfile(const char *file, int start, int end, int buflen = 128*1024); /** Saves a text file from the current buffer */ int savefile(const char *file, int buflen = 128*1024) { return outputfile(file, 0, length(), buflen); } /** Gets the tab width. */ int tab_distance() const { return mTabDist; } /** Set the hardware tab distance (width) used by all displays for this buffer, and used in computing offsets for rectangular selection operations. */ void tab_distance(int tabDist); /** Selects a range of characters in the buffer. */ void select(int start, int end); /** Returns a non 0 value if text has been selected, 0 otherwise */ int selected() const { return mPrimary.selected(); } /** Cancels any previous selection on the primary text selection object */ void unselect(); /** Gets the selection position */ int selection_position(int* start, int* end); /** Returns the currently selected text. When you are done with the text, free it using the free() function. */ char* selection_text(); /** Removes the text in the primary selection. */ void remove_selection(); /** Replaces the text in the primary selection. */ void replace_selection(const char* text); /** Selects a range of characters in the secondary selection. */ void secondary_select(int start, int end); /** Returns a non 0 value if text has been selected in the secondary text selection, 0 otherwise */ int secondary_selected() { return mSecondary.selected(); } /** Clears any selection in the secondary text selection object. */ void secondary_unselect(); /** Returns the current selection in the secondary text selection object. */ int secondary_selection_position(int* start, int* end); /** Returns the text in the secondary selection. When you are done with the text, free it using the free() function. */ char* secondary_selection_text(); /** Removes the text from the buffer corresponding to the secondary text selection object. */ void remove_secondary_selection(); /** Replaces the text from the buffer corresponding to the secondary text selection object with the new string \p text. */ void replace_secondary_selection(const char* text); /** Highlights the specified text within the buffer. */ void highlight(int start, int end); /** Returns the highlighted text. When you are done with the text, free it using the free() function. */ int highlight() { return mHighlight.selected(); } /** Unhighlights text in the buffer. */ void unhighlight(); /** Highlights the specified text between \p start and \p end within the buffer. */ int highlight_position(int* start, int* end); /** Returns the highlighted text. When you are done with the text, free it using the free() function. */ char* highlight_text(); /** Adds a callback function that is called whenever the text buffer is modified. The callback function is declared as follows: \code typedef void (*Fl_Text_Modify_Cb)(int pos, int nInserted, int nDeleted, int nRestyled, const char* deletedText, void* cbArg); \endcode */ void add_modify_callback(Fl_Text_Modify_Cb bufModifiedCB, void* cbArg); /** Removes a modify callback. */ void remove_modify_callback(Fl_Text_Modify_Cb bufModifiedCB, void* cbArg); /** Calls all modify callbacks that have been registered using the add_modify_callback() method. */ void call_modify_callbacks() { call_modify_callbacks(0, 0, 0, 0, 0); } /** Adds a callback routine to be called before text is deleted from the buffer. */ void add_predelete_callback(Fl_Text_Predelete_Cb bufPredelCB, void* cbArg); /** Removes a callback routine \p bufPreDeleteCB associated with argument \p cbArg to be called before text is deleted from the buffer. */ void remove_predelete_callback(Fl_Text_Predelete_Cb predelCB, void* cbArg); /** Calls the stored pre-delete callback procedure(s) for this buffer to update the changed area(s) on the screen and any other listeners. */ void call_predelete_callbacks() { call_predelete_callbacks(0, 0); } /** Returns the text from the entire line containing the specified character position. When you are done with the text, free it using the free() function. \param pos byte index into buffer \return copy of utf8 text, must be free'd */ char* line_text(int pos) const; /** Returns the position of the start of the line containing position \p pos. \param pos byte index into buffer \return byte offset to line start */ int line_start(int pos) const; /** Finds and returns the position of the end of the line containing position \p pos (which is either a pointer to the newline character ending the line, or a pointer to one character beyond the end of the buffer) \param pos byte index into buffer \return byte offset to line end */ int line_end(int pos) const; /** Returns the position corresponding to the start of the word \param pos byte index into buffer \return byte offset to word start */ int word_start(int pos) const; /** Returns the position corresponding to the end of the word. \param pos byte index into buffer \return byte offset to word end */ int word_end(int pos) const; /** Count the number of displayed characters between buffer position \p lineStartPos and \p targetPos. (displayed characters are the characters shown on the screen to represent characters in the buffer, where tabs and control characters are expanded) */ int count_displayed_characters(int lineStartPos, int targetPos) const; /** Count forward from buffer position \p startPos in displayed characters (displayed characters are the characters shown on the screen to represent characters in the buffer, where tabs and control characters are expanded) \param lineStartPos byte offset into buffer \param nChars number of bytes that are sent to the display \return byte offset in input after all output bytes are sent */ int skip_displayed_characters(int lineStartPos, int nChars); /** Counts the number of newlines between \p startPos and \p endPos in buffer. The character at position \p endPos is not counted. */ int count_lines(int startPos, int endPos) const; /** Finds the first character of the line \p nLines forward from \p startPos in the buffer and returns its position */ int skip_lines(int startPos, int nLines); /** Finds and returns the position of the first character of the line \p nLines backwards from \p startPos (not counting the character pointed to by \p startpos if that is a newline) in the buffer. \p nLines == 0 means find the beginning of the line */ int rewind_lines(int startPos, int nLines); /** Finds the next occurrence of the specified character. Search forwards in buffer for character \p searchChar, starting with the character \p startPos, and returning the result in \p foundPos returns 1 if found, 0 if not. (The difference between this and BufSearchForward is that it's optimized for single characters. The overall performance of the text widget is dependent on its ability to count lines quickly, hence searching for a single character: newline) \param startPos byte offset to start position \param searchChar UCS-4 character that we want to find \param foundPos byte offset where the character was found \return 1 if found, 0 if not */ int findchar_forward(int startPos, unsigned searchChar, int* foundPos) const; /** Search backwards in buffer \p buf for character \p searchChar, starting with the character BEFORE \p startPos, returning the result in \p foundPos returns 1 if found, 0 if not. (The difference between this and BufSearchBackward is that it's optimized for single characters. The overall performance of the text widget is dependent on its ability to count lines quickly, hence searching for a single character: newline) \param startPos byte offset to start position \param searchChar UCS-4 character that we want to find \param foundPos byte offset where the character was found \return 1 if found, 0 if not */ int findchar_backward(int startPos, unsigned int searchChar, int* foundPos) const; /** Search forwards in buffer for string \p searchString, starting with the character \p startPos, and returning the result in \p foundPos returns 1 if found, 0 if not. \param startPos byte offset to start position \param searchString utf8 string that we want to find \param foundPos byte offset where the string was found \param matchCase if set, match character case \return 1 if found, 0 if not */ int search_forward(int startPos, const char* searchString, int* foundPos, int matchCase = 0) const; /** Search backwards in buffer for string searchCharssearchString, starting with the character BEFORE \p startPos, returning the result in \p foundPos returns 1 if found, 0 if not. \param startPos byte offset to start position \param searchString utf8 string that we want to find \param foundPos byte offset where the string was found \param matchCase if set, match character case \return 1 if found, 0 if not */ int search_backward(int startPos, const char* searchString, int* foundPos, int matchCase = 0) const; int findchars_forward(int startPos, const char* searchChars, int* foundPos); int findchars_backward(int startPos, const char* searchChars, int* foundPos); /** Returns the primary selection. */ const Fl_Text_Selection_mod* primary_selection() const { return &mPrimary; } /** Returns the primary selection. */ Fl_Text_Selection_mod* primary_selection() { return &mPrimary; } /** Returns the secondary selection. */ const Fl_Text_Selection_mod* secondary_selection() const { return &mSecondary; } /** Returns the current highlight selection. */ const Fl_Text_Selection_mod* highlight_selection() const { return &mHighlight; } /** Returns the index of the previous character. \param ix index to the current char */ int prev_char(int ix) const; int prev_char_clipped(int ix) const; /** Returns the index of the next character. \param ix index to the current char */ int next_char(int ix) const; int next_char_clipped(int ix) const; /** Align an index into the buffer to the current or previous utf8 boundary. */ int utf8_align(int) const; /** \brief true iff the loaded file has been transcoded to UTF-8 */ int input_file_was_transcoded; /** This message may be displayed using the fl_alert() function when a file which was not UTF-8 encoded is input. */ static const char* file_encoding_warning_message; /** \brief Pointer to a function called after reading a non UTF-8 encoded file. This function is called after reading a file if the file content was transcoded to UTF-8. Its default implementation calls fl_alert() with the text of \ref file_encoding_warning_message. No warning message is displayed if this pointer is set to NULL. Use \ref input_file_was_transcoded to be informed if file input required transcoding to UTF-8. */ void (*transcoding_warning_action)(Fl_Text_Buffer_mod*); protected: /** Calls the stored modify callback procedure(s) for this buffer to update the changed area(s) on the screen and any other listeners. */ void call_modify_callbacks(int pos, int nDeleted, int nInserted, int nRestyled, const char* deletedText) const; /** Calls the stored pre-delete callback procedure(s) for this buffer to update the changed area(s) on the screen and any other listeners. */ void call_predelete_callbacks(int pos, int nDeleted) const; /** Internal (non-redisplaying) version of BufInsert. Returns the length of text inserted (this is just strlen(\p text), however this calculation can be expensive and the length will be required by any caller who will continue on to call redisplay). \p pos must be contiguous with the existing text in the buffer (i.e. not past the end). \return the number of bytes inserted */ int insert_(int pos, const char* text); /** Internal (non-redisplaying) version of BufRemove. Removes the contents of the buffer between start and end (and moves the gap to the site of the delete). */ void remove_(int start, int end); /** Calls the stored redisplay procedure(s) for this buffer to update the screen for a change in a selection. */ void redisplay_selection(Fl_Text_Selection_mod* oldSelection, Fl_Text_Selection_mod* newSelection) const; /** Move the gap to start at a new position. */ void move_gap(int pos); /** Reallocates the text storage in the buffer to have a gap starting at \p newGapStart and a gap size of \p newGapLen, preserving the buffer's current contents. */ void reallocate_with_gap(int newGapStart, int newGapLen); char* selection_text_(Fl_Text_Selection_mod* sel) const; /** Removes the text from the buffer corresponding to \p sel. */ void remove_selection_(Fl_Text_Selection_mod* sel); /** Replaces the \p text in selection \p sel. */ void replace_selection_(Fl_Text_Selection_mod* sel, const char* text); /** Updates all of the selections in the buffer for changes in the buffer's text */ void update_selections(int pos, int nDeleted, int nInserted); Fl_Text_Selection_mod mPrimary; /**< highlighted areas */ Fl_Text_Selection_mod mSecondary; /**< highlighted areas */ Fl_Text_Selection_mod mHighlight; /**< highlighted areas */ int mLength; /**< length of the text in the buffer (the length of the buffer itself must be calculated: gapEnd - gapStart + length) */ char* mBuf; /**< allocated memory where the text is stored */ int mGapStart; /**< points to the first character of the gap */ int mGapEnd; /**< points to the first char after the gap */ // The hardware tab distance used by all displays for this buffer, // and used in computing offsets for rectangular selection operations. int mTabDist; /**< equiv. number of characters in a tab */ int mNModifyProcs; /**< number of modify-redisplay procs attached */ Fl_Text_Modify_Cb *mModifyProcs;/**< procedures to call when buffer is modified to redisplay contents */ void** mCbArgs; /**< caller arguments for modifyProcs above */ int mNPredeleteProcs; /**< number of pre-delete procs attached */ Fl_Text_Predelete_Cb *mPredeleteProcs; /**< procedure to call before text is deleted from the buffer; at most one is supported. */ void **mPredeleteCbArgs; /**< caller argument for pre-delete proc above */ int mCursorPosHint; /**< hint for reasonable cursor position after a buffer modification operation */ char mCanUndo; /**< if this buffer is used for attributes, it must not do any undo calls */ int mPreferredGapSize; /**< the default allocation for the text gap is 1024 bytes and should only be increased if frequent and large changes in buffer size are expected */ }; #endif // // End of "$Id: Fl_Text_Buffer_mod.H 8148 2010-12-31 22:38:03Z matt $". // flamp-2.2.12/src/Makefile.in0000664000175000017500000052230214607053732012467 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (c) 2008 Dave Freese, W1HKJ (w1hkj AT w1hkj DOT com) VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ bin_PROGRAMS = flamp$(EXEEXT) @ENABLE_FLXMLRPC_FALSE@am__append_1 = $(XMLRPCPP_SRC) @HAVE_WINDRES_TRUE@@MINGW32_TRUE@am__append_2 = $(MINGW32_SRC) @HAVE_NSIS_TRUE@am__append_3 = $(INSTALLER_FILE) @DARWIN_TRUE@am__append_4 = $(APPBUNDLE_NOLIBS) $(APPBUNDLE) $(APPBUNDLE)*.dmg subdir = src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/build.m4 \ $(top_srcdir)/m4/debug.m4 $(top_srcdir)/m4/fltk.m4 \ $(top_srcdir)/m4/funcs.m4 $(top_srcdir)/m4/macosx.m4 \ $(top_srcdir)/m4/np-compat.m4 $(top_srcdir)/m4/opt.m4 \ $(top_srcdir)/m4/pkg-config.m4 $(top_srcdir)/m4/static.m4 \ $(top_srcdir)/m4/win32.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am__flamp_SOURCES_DIST = xmlrpcpp/XmlRpcBase64.h \ xmlrpcpp/XmlRpcClient.cpp xmlrpcpp/XmlRpcClient.h \ xmlrpcpp/XmlRpcDispatch.cpp xmlrpcpp/XmlRpcDispatch.h \ xmlrpcpp/XmlRpcException.h xmlrpcpp/XmlRpc.h \ xmlrpcpp/XmlRpcMutex.cpp xmlrpcpp/XmlRpcMutex.h \ xmlrpcpp/XmlRpcServerConnection.cpp \ xmlrpcpp/XmlRpcServerConnection.h xmlrpcpp/XmlRpcServer.cpp \ xmlrpcpp/XmlRpcServer.h xmlrpcpp/XmlRpcServerMethod.cpp \ xmlrpcpp/XmlRpcServerMethod.h xmlrpcpp/XmlRpcSocket.cpp \ xmlrpcpp/XmlRpcSocket.h xmlrpcpp/XmlRpcSource.cpp \ xmlrpcpp/XmlRpcSource.h xmlrpcpp/XmlRpcUtil.cpp \ xmlrpcpp/XmlRpcUtil.h xmlrpcpp/XmlRpcValue.cpp \ xmlrpcpp/XmlRpcValue.h flamp-rc.rc include/flamprc.h \ utils/mingw.c include/mingw.h include/compat.h \ utils/getsysinfo.c flamp.cxx flamp_dialog.cxx ui/dialogs.cxx \ lzma/Alloc.h lzma/Alloc.c lzma/LzFind.c lzma/LzFind.h \ lzma/LzHash.h lzma/LzmaDec.c lzma/LzmaDec.h lzma/LzmaEnc.c \ lzma/LzmaEnc.h lzma/LzmaLib.c lzma/LzmaLib.h lzma/Types.h \ server/xml_server.cxx utils/amp.cxx utils/base64.cxx \ utils/base128.cxx utils/base256.cxx utils/debug.cxx \ utils/socket.cxx utils/status.cxx utils/timeops.cxx \ utils/util.cxx utils/file_io.cxx utils/xml_io.cxx \ utils/global_amp.cxx utils/circular_queue.cxx \ utils/tagSearch.cxx utils/time_table.cxx \ utils/transmit_camp.cxx utils/ztimer.cxx \ utils/script_parsing.cxx utils/run_scripts.cxx \ widgets/calendar.cxx widgets/combo.cxx widgets/date.cxx \ widgets/fileselect.cxx widgets/flinput2.cxx \ widgets/flslider2.cxx widgets/Fl_BlockMap.cxx \ widgets/Fl_Text_Buffer_mod.cxx widgets/Fl_Text_Editor_mod.cxx \ widgets/Fl_Text_Display_mod.cxx widgets/FTextView.cxx \ widgets/icons.cxx widgets/missing_strings.c \ widgets/pixmaps.cxx widgets/pixmaps_tango.cxx \ widgets/font_browser.cxx widgets/hamcast_group.cxx \ include/hamcast_group.h am__dirstamp = $(am__leading_dot)dirstamp am__objects_1 = xmlrpcpp/flamp-XmlRpcClient.$(OBJEXT) \ xmlrpcpp/flamp-XmlRpcDispatch.$(OBJEXT) \ xmlrpcpp/flamp-XmlRpcMutex.$(OBJEXT) \ xmlrpcpp/flamp-XmlRpcServerConnection.$(OBJEXT) \ xmlrpcpp/flamp-XmlRpcServer.$(OBJEXT) \ xmlrpcpp/flamp-XmlRpcServerMethod.$(OBJEXT) \ xmlrpcpp/flamp-XmlRpcSocket.$(OBJEXT) \ xmlrpcpp/flamp-XmlRpcSource.$(OBJEXT) \ xmlrpcpp/flamp-XmlRpcUtil.$(OBJEXT) \ xmlrpcpp/flamp-XmlRpcValue.$(OBJEXT) @ENABLE_FLXMLRPC_FALSE@am__objects_2 = $(am__objects_1) am__objects_3 = flamp-rc.$(OBJEXT) utils/flamp-mingw.$(OBJEXT) \ utils/flamp-getsysinfo.$(OBJEXT) @HAVE_WINDRES_TRUE@@MINGW32_TRUE@am__objects_4 = $(am__objects_3) am_flamp_OBJECTS = $(am__objects_2) $(am__objects_4) \ flamp-flamp.$(OBJEXT) flamp-flamp_dialog.$(OBJEXT) \ ui/flamp-dialogs.$(OBJEXT) lzma/flamp-Alloc.$(OBJEXT) \ lzma/flamp-LzFind.$(OBJEXT) lzma/flamp-LzmaDec.$(OBJEXT) \ lzma/flamp-LzmaEnc.$(OBJEXT) lzma/flamp-LzmaLib.$(OBJEXT) \ server/flamp-xml_server.$(OBJEXT) utils/flamp-amp.$(OBJEXT) \ utils/flamp-base64.$(OBJEXT) utils/flamp-base128.$(OBJEXT) \ utils/flamp-base256.$(OBJEXT) utils/flamp-debug.$(OBJEXT) \ utils/flamp-socket.$(OBJEXT) utils/flamp-status.$(OBJEXT) \ utils/flamp-timeops.$(OBJEXT) utils/flamp-util.$(OBJEXT) \ utils/flamp-file_io.$(OBJEXT) utils/flamp-xml_io.$(OBJEXT) \ utils/flamp-global_amp.$(OBJEXT) \ utils/flamp-circular_queue.$(OBJEXT) \ utils/flamp-tagSearch.$(OBJEXT) \ utils/flamp-time_table.$(OBJEXT) \ utils/flamp-transmit_camp.$(OBJEXT) \ utils/flamp-ztimer.$(OBJEXT) \ utils/flamp-script_parsing.$(OBJEXT) \ utils/flamp-run_scripts.$(OBJEXT) \ widgets/flamp-calendar.$(OBJEXT) widgets/flamp-combo.$(OBJEXT) \ widgets/flamp-date.$(OBJEXT) \ widgets/flamp-fileselect.$(OBJEXT) \ widgets/flamp-flinput2.$(OBJEXT) \ widgets/flamp-flslider2.$(OBJEXT) \ widgets/flamp-Fl_BlockMap.$(OBJEXT) \ widgets/flamp-Fl_Text_Buffer_mod.$(OBJEXT) \ widgets/flamp-Fl_Text_Editor_mod.$(OBJEXT) \ widgets/flamp-Fl_Text_Display_mod.$(OBJEXT) \ widgets/flamp-FTextView.$(OBJEXT) \ widgets/flamp-icons.$(OBJEXT) \ widgets/flamp-missing_strings.$(OBJEXT) \ widgets/flamp-pixmaps.$(OBJEXT) \ widgets/flamp-pixmaps_tango.$(OBJEXT) \ widgets/flamp-font_browser.$(OBJEXT) \ widgets/flamp-hamcast_group.$(OBJEXT) am__objects_5 = nodist_flamp_OBJECTS = $(am__objects_5) flamp_OBJECTS = $(am_flamp_OBJECTS) $(nodist_flamp_OBJECTS) flamp_DEPENDENCIES = flamp_LINK = $(CXXLD) $(flamp_CXXFLAGS) $(CXXFLAGS) $(flamp_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/flamp-flamp.Po \ ./$(DEPDIR)/flamp-flamp_dialog.Po \ lzma/$(DEPDIR)/flamp-Alloc.Po lzma/$(DEPDIR)/flamp-LzFind.Po \ lzma/$(DEPDIR)/flamp-LzmaDec.Po \ lzma/$(DEPDIR)/flamp-LzmaEnc.Po \ lzma/$(DEPDIR)/flamp-LzmaLib.Po \ server/$(DEPDIR)/flamp-xml_server.Po \ ui/$(DEPDIR)/flamp-dialogs.Po utils/$(DEPDIR)/flamp-amp.Po \ utils/$(DEPDIR)/flamp-base128.Po \ utils/$(DEPDIR)/flamp-base256.Po \ utils/$(DEPDIR)/flamp-base64.Po \ utils/$(DEPDIR)/flamp-circular_queue.Po \ utils/$(DEPDIR)/flamp-debug.Po \ utils/$(DEPDIR)/flamp-file_io.Po \ utils/$(DEPDIR)/flamp-getsysinfo.Po \ utils/$(DEPDIR)/flamp-global_amp.Po \ utils/$(DEPDIR)/flamp-mingw.Po \ utils/$(DEPDIR)/flamp-run_scripts.Po \ utils/$(DEPDIR)/flamp-script_parsing.Po \ utils/$(DEPDIR)/flamp-socket.Po \ utils/$(DEPDIR)/flamp-status.Po \ utils/$(DEPDIR)/flamp-tagSearch.Po \ utils/$(DEPDIR)/flamp-time_table.Po \ utils/$(DEPDIR)/flamp-timeops.Po \ utils/$(DEPDIR)/flamp-transmit_camp.Po \ utils/$(DEPDIR)/flamp-util.Po utils/$(DEPDIR)/flamp-xml_io.Po \ utils/$(DEPDIR)/flamp-ztimer.Po \ widgets/$(DEPDIR)/flamp-FTextView.Po \ widgets/$(DEPDIR)/flamp-Fl_BlockMap.Po \ widgets/$(DEPDIR)/flamp-Fl_Text_Buffer_mod.Po \ widgets/$(DEPDIR)/flamp-Fl_Text_Display_mod.Po \ widgets/$(DEPDIR)/flamp-Fl_Text_Editor_mod.Po \ widgets/$(DEPDIR)/flamp-calendar.Po \ widgets/$(DEPDIR)/flamp-combo.Po \ widgets/$(DEPDIR)/flamp-date.Po \ widgets/$(DEPDIR)/flamp-fileselect.Po \ widgets/$(DEPDIR)/flamp-flinput2.Po \ widgets/$(DEPDIR)/flamp-flslider2.Po \ widgets/$(DEPDIR)/flamp-font_browser.Po \ widgets/$(DEPDIR)/flamp-hamcast_group.Po \ widgets/$(DEPDIR)/flamp-icons.Po \ widgets/$(DEPDIR)/flamp-missing_strings.Po \ widgets/$(DEPDIR)/flamp-pixmaps.Po \ widgets/$(DEPDIR)/flamp-pixmaps_tango.Po \ xmlrpcpp/$(DEPDIR)/flamp-XmlRpcClient.Po \ xmlrpcpp/$(DEPDIR)/flamp-XmlRpcDispatch.Po \ xmlrpcpp/$(DEPDIR)/flamp-XmlRpcMutex.Po \ xmlrpcpp/$(DEPDIR)/flamp-XmlRpcServer.Po \ xmlrpcpp/$(DEPDIR)/flamp-XmlRpcServerConnection.Po \ xmlrpcpp/$(DEPDIR)/flamp-XmlRpcServerMethod.Po \ xmlrpcpp/$(DEPDIR)/flamp-XmlRpcSocket.Po \ xmlrpcpp/$(DEPDIR)/flamp-XmlRpcSource.Po \ xmlrpcpp/$(DEPDIR)/flamp-XmlRpcUtil.Po \ xmlrpcpp/$(DEPDIR)/flamp-XmlRpcValue.Po am__mv = mv -f AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(flamp_SOURCES) $(EXTRA_flamp_SOURCES) \ $(nodist_flamp_SOURCES) DIST_SOURCES = $(am__flamp_SOURCES_DIST) $(EXTRA_flamp_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/build-aux/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AC_CONFIG_ARGS = @AC_CONFIG_ARGS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BFD_CFLAGS = @BFD_CFLAGS@ BFD_LIBS = @BFD_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ EXTRA_LIBS = @EXTRA_LIBS@ FLAMP_BUILD_CPPFLAGS = @FLAMP_BUILD_CPPFLAGS@ FLAMP_BUILD_CXXFLAGS = @FLAMP_BUILD_CXXFLAGS@ FLAMP_BUILD_LDADD = @FLAMP_BUILD_LDADD@ FLAMP_BUILD_LDFLAGS = @FLAMP_BUILD_LDFLAGS@ FLAMP_VERSION = @FLAMP_VERSION@ FLAMP_VERSION_MAJOR = @FLAMP_VERSION_MAJOR@ FLAMP_VERSION_MINOR = @FLAMP_VERSION_MINOR@ FLAMP_VERSION_PATCH = @FLAMP_VERSION_PATCH@ FLTK_CFLAGS = @FLTK_CFLAGS@ FLTK_CONFIG = @FLTK_CONFIG@ FLTK_LIBS = @FLTK_LIBS@ FLUID = @FLUID@ FLXMLRPC_CFLAGS = @FLXMLRPC_CFLAGS@ FLXMLRPC_LIBS = @FLXMLRPC_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAC_UNIVERSAL_CFLAGS = @MAC_UNIVERSAL_CFLAGS@ MAC_UNIVERSAL_LDFLAGS = @MAC_UNIVERSAL_LDFLAGS@ MAKEINFO = @MAKEINFO@ MAKENSIS = @MAKENSIS@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ OPT_CFLAGS = @OPT_CFLAGS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTW32_CFLAGS = @PTW32_CFLAGS@ PTW32_LIBS = @PTW32_LIBS@ RDYNAMIC = @RDYNAMIC@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ X_CFLAGS = @X_CFLAGS@ X_LIBS = @X_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ MINGW32_SRC = flamp-rc.rc include/flamprc.h \ utils/mingw.c include/mingw.h include/compat.h \ utils/getsysinfo.c # Build the xmlrpcpp source if libflxmlrpc is not found XMLRPCPP_SRC = \ xmlrpcpp/XmlRpcBase64.h \ xmlrpcpp/XmlRpcClient.cpp \ xmlrpcpp/XmlRpcClient.h \ xmlrpcpp/XmlRpcDispatch.cpp \ xmlrpcpp/XmlRpcDispatch.h \ xmlrpcpp/XmlRpcException.h \ xmlrpcpp/XmlRpc.h \ xmlrpcpp/XmlRpcMutex.cpp \ xmlrpcpp/XmlRpcMutex.h \ xmlrpcpp/XmlRpcServerConnection.cpp \ xmlrpcpp/XmlRpcServerConnection.h \ xmlrpcpp/XmlRpcServer.cpp \ xmlrpcpp/XmlRpcServer.h \ xmlrpcpp/XmlRpcServerMethod.cpp \ xmlrpcpp/XmlRpcServerMethod.h \ xmlrpcpp/XmlRpcSocket.cpp \ xmlrpcpp/XmlRpcSocket.h \ xmlrpcpp/XmlRpcSource.cpp \ xmlrpcpp/XmlRpcSource.h \ xmlrpcpp/XmlRpcUtil.cpp \ xmlrpcpp/XmlRpcUtil.h \ xmlrpcpp/XmlRpcValue.cpp \ xmlrpcpp/XmlRpcValue.h # We distribute these but do not always compile them EXTRA_flamp_SOURCES = $(FLRIG_WIN32_RES_SRC) $(MINGW32_SRC) $(XMLRPCPP_SRC) # Sources that we build. It is OK to have headers here. flamp_SOURCES = $(am__append_1) $(am__append_2) flamp.cxx \ flamp_dialog.cxx ui/dialogs.cxx lzma/Alloc.h lzma/Alloc.c \ lzma/LzFind.c lzma/LzFind.h lzma/LzHash.h lzma/LzmaDec.c \ lzma/LzmaDec.h lzma/LzmaEnc.c lzma/LzmaEnc.h lzma/LzmaLib.c \ lzma/LzmaLib.h lzma/Types.h server/xml_server.cxx \ utils/amp.cxx utils/base64.cxx utils/base128.cxx \ utils/base256.cxx utils/debug.cxx utils/socket.cxx \ utils/status.cxx utils/timeops.cxx utils/util.cxx \ utils/file_io.cxx utils/xml_io.cxx utils/global_amp.cxx \ utils/circular_queue.cxx utils/tagSearch.cxx \ utils/time_table.cxx utils/transmit_camp.cxx utils/ztimer.cxx \ utils/script_parsing.cxx utils/run_scripts.cxx \ widgets/calendar.cxx widgets/combo.cxx widgets/date.cxx \ widgets/fileselect.cxx widgets/flinput2.cxx \ widgets/flslider2.cxx widgets/Fl_BlockMap.cxx \ widgets/Fl_Text_Buffer_mod.cxx widgets/Fl_Text_Editor_mod.cxx \ widgets/Fl_Text_Display_mod.cxx widgets/FTextView.cxx \ widgets/icons.cxx widgets/missing_strings.c \ widgets/pixmaps.cxx widgets/pixmaps_tango.cxx \ widgets/font_browser.cxx widgets/hamcast_group.cxx \ include/hamcast_group.h @ENABLE_FLXMLRPC_FALSE@flamp_CPPFLAGS = @FLAMP_BUILD_CPPFLAGS@ @ENABLE_FLXMLRPC_TRUE@flamp_CPPFLAGS = @FLAMP_BUILD_CPPFLAGS@ @FLXMLRPC_CFLAGS@ @ENABLE_FLXMLRPC_FALSE@flamp_CXXFLAGS = @FLAMP_BUILD_CXXFLAGS@ @ENABLE_FLXMLRPC_TRUE@flamp_CXXFLAGS = @FLAMP_BUILD_CXXFLAGS@ @FLXMLRPC_CFLAGS@ @ENABLE_FLXMLRPC_FALSE@flamp_CFLAGS = $(flamp_CXXFLAGS) @ENABLE_FLXMLRPC_TRUE@flamp_CFLAGS = $(flamp_CXXFLAGS) @ENABLE_FLXMLRPC_FALSE@flamp_LDFLAGS = @FLAMP_BUILD_LDFLAGS@ @ENABLE_FLXMLRPC_TRUE@flamp_LDFLAGS = @FLAMP_BUILD_LDFLAGS@ @FLXMLRPC_LIBS@ @ENABLE_FLXMLRPC_FALSE@flamp_LDADD = @FLAMP_BUILD_LDADD@ @ENABLE_FLXMLRPC_TRUE@flamp_LDADD = @FLAMP_BUILD_LDADD@ ######################################################################## flamp_VERSION_MAJOR = @FLAMP_VERSION_MAJOR@ flamp_VERSION_MINOR = @FLAMP_VERSION_MINOR@ flamp_VERSION_PATCH = @FLAMP_VERSION_PATCH@ flamp_VERSION = @FLAMP_VERSION@ # Sources that are generated, BUILT_SOURCES = # not distributed, nodist_flamp_SOURCES = $(BUILT_SOURCES) # and deleted by the clean targets CLEANFILES = $(BUILT_SOURCES) $(am__append_3) CLEAN_LOCAL = $(am__append_4) FL_SRC = ui/dialogs.fl INSTALLER_FILE = flamp-$(flamp_VERSION)_setup.exe APPBUNDLE = flamp-$(flamp_VERSION) APPBUNDLE_NOLIBS = $(APPBUNDLE)-nolibs # Additional source files that are distributed # Additional non-source files that are distributed #EXTRA_DIST += \ # ../data/template.rtf # ../flamp-doc/flamp-quick-guide.html # Additional source files that support non-Linux cross compilation EXTRA_DIST = config.h utils/mingw.c utils/time_table_dat.cxx \ widgets/flnfc_common.cxx include/amp.h include/ascii.h \ include/base64.h include/base128.h include/base256.h \ include/calendar.h include/combo.h include/compat.h \ include/compat-mingw.h include/crc16.h include/date.h \ include/debug.h include/dirent-check.h include/fileselect.h \ include/fl_lock.h include/flmisc.h include/flamp_config.h \ include/flamprc.h include/flinput2.h include/flslider2.h \ include/font_browser.h include/gettext.h include/icons.h \ include/flamp.h include/flamp_dialog.h include/dialogs.h \ include/missing_strings.h include/socket.h include/mingw.h \ include/pixmaps.h include/status.h include/threads.h \ include/timeops.h include/util.h include/file_io.h \ include/xml_io.h include/global_amp.h include/circular_queue.h \ include/tagSearch.h include/time_table.h \ include/transmit_camp.h include/ztimer.h \ include/script_parsing.h widgets/Fl_Text_Buffer_mod.cxx \ widgets/Fl_Text_Display_mod.cxx widgets/Fl_Text_Editor_mod.cxx \ include/Fl_BlockMap.h include/Fl_Text_Buffer_mod.H \ include/Fl_Text_Display_mod.H include/Fl_Text_Editor_mod.H \ include/FTextView.h ../ChangeLog ../data/flamp.desktop \ ../data/flamp.xpm ../data/flamp.png ../data/win32/fl_app.nsi \ ../data/win32/flamp.ico ../scripts/buildmxe.sh \ ../scripts/builddist.sh ../scripts/mkappbundle.sh \ ../scripts/mknsisinst.sh ../data/mac/Info.plist.in \ ../data/mac/flamp.icns $(flamp_WIN32_SRC) $(flamp_FL_SRC) all: $(BUILT_SOURCES) config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .cpp .cxx .o .obj .rc $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): config.h: stamp-h1 @test -f $@ || rm -f stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status src/config.h $(srcdir)/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) installcheck-binPROGRAMS: $(bin_PROGRAMS) bad=0; pid=$$$$; list="$(bin_PROGRAMS)"; for p in $$list; do \ case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \ *" $$p "* | *" $(srcdir)/$$p "*) continue;; \ esac; \ f=`echo "$$p" | \ sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ for opt in --help --version; do \ if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \ 2>c$${pid}_.err &2; bad=1; fi; \ done; \ done; rm -f c$${pid}_.???; exit $$bad xmlrpcpp/$(am__dirstamp): @$(MKDIR_P) xmlrpcpp @: > xmlrpcpp/$(am__dirstamp) xmlrpcpp/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) xmlrpcpp/$(DEPDIR) @: > xmlrpcpp/$(DEPDIR)/$(am__dirstamp) xmlrpcpp/flamp-XmlRpcClient.$(OBJEXT): xmlrpcpp/$(am__dirstamp) \ xmlrpcpp/$(DEPDIR)/$(am__dirstamp) xmlrpcpp/flamp-XmlRpcDispatch.$(OBJEXT): xmlrpcpp/$(am__dirstamp) \ xmlrpcpp/$(DEPDIR)/$(am__dirstamp) xmlrpcpp/flamp-XmlRpcMutex.$(OBJEXT): xmlrpcpp/$(am__dirstamp) \ xmlrpcpp/$(DEPDIR)/$(am__dirstamp) xmlrpcpp/flamp-XmlRpcServerConnection.$(OBJEXT): \ xmlrpcpp/$(am__dirstamp) xmlrpcpp/$(DEPDIR)/$(am__dirstamp) xmlrpcpp/flamp-XmlRpcServer.$(OBJEXT): xmlrpcpp/$(am__dirstamp) \ xmlrpcpp/$(DEPDIR)/$(am__dirstamp) xmlrpcpp/flamp-XmlRpcServerMethod.$(OBJEXT): xmlrpcpp/$(am__dirstamp) \ xmlrpcpp/$(DEPDIR)/$(am__dirstamp) xmlrpcpp/flamp-XmlRpcSocket.$(OBJEXT): xmlrpcpp/$(am__dirstamp) \ xmlrpcpp/$(DEPDIR)/$(am__dirstamp) xmlrpcpp/flamp-XmlRpcSource.$(OBJEXT): xmlrpcpp/$(am__dirstamp) \ xmlrpcpp/$(DEPDIR)/$(am__dirstamp) xmlrpcpp/flamp-XmlRpcUtil.$(OBJEXT): xmlrpcpp/$(am__dirstamp) \ xmlrpcpp/$(DEPDIR)/$(am__dirstamp) xmlrpcpp/flamp-XmlRpcValue.$(OBJEXT): xmlrpcpp/$(am__dirstamp) \ xmlrpcpp/$(DEPDIR)/$(am__dirstamp) utils/$(am__dirstamp): @$(MKDIR_P) utils @: > utils/$(am__dirstamp) utils/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) utils/$(DEPDIR) @: > utils/$(DEPDIR)/$(am__dirstamp) utils/flamp-mingw.$(OBJEXT): utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/flamp-getsysinfo.$(OBJEXT): utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) ui/$(am__dirstamp): @$(MKDIR_P) ui @: > ui/$(am__dirstamp) ui/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ui/$(DEPDIR) @: > ui/$(DEPDIR)/$(am__dirstamp) ui/flamp-dialogs.$(OBJEXT): ui/$(am__dirstamp) \ ui/$(DEPDIR)/$(am__dirstamp) lzma/$(am__dirstamp): @$(MKDIR_P) lzma @: > lzma/$(am__dirstamp) lzma/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) lzma/$(DEPDIR) @: > lzma/$(DEPDIR)/$(am__dirstamp) lzma/flamp-Alloc.$(OBJEXT): lzma/$(am__dirstamp) \ lzma/$(DEPDIR)/$(am__dirstamp) lzma/flamp-LzFind.$(OBJEXT): lzma/$(am__dirstamp) \ lzma/$(DEPDIR)/$(am__dirstamp) lzma/flamp-LzmaDec.$(OBJEXT): lzma/$(am__dirstamp) \ lzma/$(DEPDIR)/$(am__dirstamp) lzma/flamp-LzmaEnc.$(OBJEXT): lzma/$(am__dirstamp) \ lzma/$(DEPDIR)/$(am__dirstamp) lzma/flamp-LzmaLib.$(OBJEXT): lzma/$(am__dirstamp) \ lzma/$(DEPDIR)/$(am__dirstamp) server/$(am__dirstamp): @$(MKDIR_P) server @: > server/$(am__dirstamp) server/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) server/$(DEPDIR) @: > server/$(DEPDIR)/$(am__dirstamp) server/flamp-xml_server.$(OBJEXT): server/$(am__dirstamp) \ server/$(DEPDIR)/$(am__dirstamp) utils/flamp-amp.$(OBJEXT): utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/flamp-base64.$(OBJEXT): utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/flamp-base128.$(OBJEXT): utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/flamp-base256.$(OBJEXT): utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/flamp-debug.$(OBJEXT): utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/flamp-socket.$(OBJEXT): utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/flamp-status.$(OBJEXT): utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/flamp-timeops.$(OBJEXT): utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/flamp-util.$(OBJEXT): utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/flamp-file_io.$(OBJEXT): utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/flamp-xml_io.$(OBJEXT): utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/flamp-global_amp.$(OBJEXT): utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/flamp-circular_queue.$(OBJEXT): utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/flamp-tagSearch.$(OBJEXT): utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/flamp-time_table.$(OBJEXT): utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/flamp-transmit_camp.$(OBJEXT): utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/flamp-ztimer.$(OBJEXT): utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/flamp-script_parsing.$(OBJEXT): utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/flamp-run_scripts.$(OBJEXT): utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) widgets/$(am__dirstamp): @$(MKDIR_P) widgets @: > widgets/$(am__dirstamp) widgets/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) widgets/$(DEPDIR) @: > widgets/$(DEPDIR)/$(am__dirstamp) widgets/flamp-calendar.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/flamp-combo.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/flamp-date.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/flamp-fileselect.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/flamp-flinput2.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/flamp-flslider2.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/flamp-Fl_BlockMap.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/flamp-Fl_Text_Buffer_mod.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/flamp-Fl_Text_Editor_mod.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/flamp-Fl_Text_Display_mod.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/flamp-FTextView.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/flamp-icons.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/flamp-missing_strings.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/flamp-pixmaps.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/flamp-pixmaps_tango.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/flamp-font_browser.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/flamp-hamcast_group.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) flamp$(EXEEXT): $(flamp_OBJECTS) $(flamp_DEPENDENCIES) $(EXTRA_flamp_DEPENDENCIES) @rm -f flamp$(EXEEXT) $(AM_V_CXXLD)$(flamp_LINK) $(flamp_OBJECTS) $(flamp_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f lzma/*.$(OBJEXT) -rm -f server/*.$(OBJEXT) -rm -f ui/*.$(OBJEXT) -rm -f utils/*.$(OBJEXT) -rm -f widgets/*.$(OBJEXT) -rm -f xmlrpcpp/*.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flamp-flamp.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flamp-flamp_dialog.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@lzma/$(DEPDIR)/flamp-Alloc.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@lzma/$(DEPDIR)/flamp-LzFind.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@lzma/$(DEPDIR)/flamp-LzmaDec.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@lzma/$(DEPDIR)/flamp-LzmaEnc.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@lzma/$(DEPDIR)/flamp-LzmaLib.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@server/$(DEPDIR)/flamp-xml_server.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@ui/$(DEPDIR)/flamp-dialogs.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/flamp-amp.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/flamp-base128.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/flamp-base256.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/flamp-base64.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/flamp-circular_queue.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/flamp-debug.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/flamp-file_io.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/flamp-getsysinfo.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/flamp-global_amp.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/flamp-mingw.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/flamp-run_scripts.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/flamp-script_parsing.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/flamp-socket.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/flamp-status.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/flamp-tagSearch.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/flamp-time_table.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/flamp-timeops.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/flamp-transmit_camp.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/flamp-util.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/flamp-xml_io.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/flamp-ztimer.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flamp-FTextView.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flamp-Fl_BlockMap.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flamp-Fl_Text_Buffer_mod.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flamp-Fl_Text_Display_mod.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flamp-Fl_Text_Editor_mod.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flamp-calendar.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flamp-combo.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flamp-date.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flamp-fileselect.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flamp-flinput2.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flamp-flslider2.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flamp-font_browser.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flamp-hamcast_group.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flamp-icons.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flamp-missing_strings.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flamp-pixmaps.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flamp-pixmaps_tango.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@xmlrpcpp/$(DEPDIR)/flamp-XmlRpcClient.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@xmlrpcpp/$(DEPDIR)/flamp-XmlRpcDispatch.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@xmlrpcpp/$(DEPDIR)/flamp-XmlRpcMutex.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@xmlrpcpp/$(DEPDIR)/flamp-XmlRpcServer.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@xmlrpcpp/$(DEPDIR)/flamp-XmlRpcServerConnection.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@xmlrpcpp/$(DEPDIR)/flamp-XmlRpcServerMethod.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@xmlrpcpp/$(DEPDIR)/flamp-XmlRpcSocket.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@xmlrpcpp/$(DEPDIR)/flamp-XmlRpcSource.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@xmlrpcpp/$(DEPDIR)/flamp-XmlRpcUtil.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@xmlrpcpp/$(DEPDIR)/flamp-XmlRpcValue.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` utils/flamp-mingw.o: utils/mingw.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CFLAGS) $(CFLAGS) -MT utils/flamp-mingw.o -MD -MP -MF utils/$(DEPDIR)/flamp-mingw.Tpo -c -o utils/flamp-mingw.o `test -f 'utils/mingw.c' || echo '$(srcdir)/'`utils/mingw.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-mingw.Tpo utils/$(DEPDIR)/flamp-mingw.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utils/mingw.c' object='utils/flamp-mingw.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CFLAGS) $(CFLAGS) -c -o utils/flamp-mingw.o `test -f 'utils/mingw.c' || echo '$(srcdir)/'`utils/mingw.c utils/flamp-mingw.obj: utils/mingw.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CFLAGS) $(CFLAGS) -MT utils/flamp-mingw.obj -MD -MP -MF utils/$(DEPDIR)/flamp-mingw.Tpo -c -o utils/flamp-mingw.obj `if test -f 'utils/mingw.c'; then $(CYGPATH_W) 'utils/mingw.c'; else $(CYGPATH_W) '$(srcdir)/utils/mingw.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-mingw.Tpo utils/$(DEPDIR)/flamp-mingw.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utils/mingw.c' object='utils/flamp-mingw.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CFLAGS) $(CFLAGS) -c -o utils/flamp-mingw.obj `if test -f 'utils/mingw.c'; then $(CYGPATH_W) 'utils/mingw.c'; else $(CYGPATH_W) '$(srcdir)/utils/mingw.c'; fi` utils/flamp-getsysinfo.o: utils/getsysinfo.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CFLAGS) $(CFLAGS) -MT utils/flamp-getsysinfo.o -MD -MP -MF utils/$(DEPDIR)/flamp-getsysinfo.Tpo -c -o utils/flamp-getsysinfo.o `test -f 'utils/getsysinfo.c' || echo '$(srcdir)/'`utils/getsysinfo.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-getsysinfo.Tpo utils/$(DEPDIR)/flamp-getsysinfo.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utils/getsysinfo.c' object='utils/flamp-getsysinfo.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CFLAGS) $(CFLAGS) -c -o utils/flamp-getsysinfo.o `test -f 'utils/getsysinfo.c' || echo '$(srcdir)/'`utils/getsysinfo.c utils/flamp-getsysinfo.obj: utils/getsysinfo.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CFLAGS) $(CFLAGS) -MT utils/flamp-getsysinfo.obj -MD -MP -MF utils/$(DEPDIR)/flamp-getsysinfo.Tpo -c -o utils/flamp-getsysinfo.obj `if test -f 'utils/getsysinfo.c'; then $(CYGPATH_W) 'utils/getsysinfo.c'; else $(CYGPATH_W) '$(srcdir)/utils/getsysinfo.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-getsysinfo.Tpo utils/$(DEPDIR)/flamp-getsysinfo.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utils/getsysinfo.c' object='utils/flamp-getsysinfo.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CFLAGS) $(CFLAGS) -c -o utils/flamp-getsysinfo.obj `if test -f 'utils/getsysinfo.c'; then $(CYGPATH_W) 'utils/getsysinfo.c'; else $(CYGPATH_W) '$(srcdir)/utils/getsysinfo.c'; fi` lzma/flamp-Alloc.o: lzma/Alloc.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CFLAGS) $(CFLAGS) -MT lzma/flamp-Alloc.o -MD -MP -MF lzma/$(DEPDIR)/flamp-Alloc.Tpo -c -o lzma/flamp-Alloc.o `test -f 'lzma/Alloc.c' || echo '$(srcdir)/'`lzma/Alloc.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) lzma/$(DEPDIR)/flamp-Alloc.Tpo lzma/$(DEPDIR)/flamp-Alloc.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lzma/Alloc.c' object='lzma/flamp-Alloc.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CFLAGS) $(CFLAGS) -c -o lzma/flamp-Alloc.o `test -f 'lzma/Alloc.c' || echo '$(srcdir)/'`lzma/Alloc.c lzma/flamp-Alloc.obj: lzma/Alloc.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CFLAGS) $(CFLAGS) -MT lzma/flamp-Alloc.obj -MD -MP -MF lzma/$(DEPDIR)/flamp-Alloc.Tpo -c -o lzma/flamp-Alloc.obj `if test -f 'lzma/Alloc.c'; then $(CYGPATH_W) 'lzma/Alloc.c'; else $(CYGPATH_W) '$(srcdir)/lzma/Alloc.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) lzma/$(DEPDIR)/flamp-Alloc.Tpo lzma/$(DEPDIR)/flamp-Alloc.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lzma/Alloc.c' object='lzma/flamp-Alloc.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CFLAGS) $(CFLAGS) -c -o lzma/flamp-Alloc.obj `if test -f 'lzma/Alloc.c'; then $(CYGPATH_W) 'lzma/Alloc.c'; else $(CYGPATH_W) '$(srcdir)/lzma/Alloc.c'; fi` lzma/flamp-LzFind.o: lzma/LzFind.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CFLAGS) $(CFLAGS) -MT lzma/flamp-LzFind.o -MD -MP -MF lzma/$(DEPDIR)/flamp-LzFind.Tpo -c -o lzma/flamp-LzFind.o `test -f 'lzma/LzFind.c' || echo '$(srcdir)/'`lzma/LzFind.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) lzma/$(DEPDIR)/flamp-LzFind.Tpo lzma/$(DEPDIR)/flamp-LzFind.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lzma/LzFind.c' object='lzma/flamp-LzFind.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CFLAGS) $(CFLAGS) -c -o lzma/flamp-LzFind.o `test -f 'lzma/LzFind.c' || echo '$(srcdir)/'`lzma/LzFind.c lzma/flamp-LzFind.obj: lzma/LzFind.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CFLAGS) $(CFLAGS) -MT lzma/flamp-LzFind.obj -MD -MP -MF lzma/$(DEPDIR)/flamp-LzFind.Tpo -c -o lzma/flamp-LzFind.obj `if test -f 'lzma/LzFind.c'; then $(CYGPATH_W) 'lzma/LzFind.c'; else $(CYGPATH_W) '$(srcdir)/lzma/LzFind.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) lzma/$(DEPDIR)/flamp-LzFind.Tpo lzma/$(DEPDIR)/flamp-LzFind.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lzma/LzFind.c' object='lzma/flamp-LzFind.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CFLAGS) $(CFLAGS) -c -o lzma/flamp-LzFind.obj `if test -f 'lzma/LzFind.c'; then $(CYGPATH_W) 'lzma/LzFind.c'; else $(CYGPATH_W) '$(srcdir)/lzma/LzFind.c'; fi` lzma/flamp-LzmaDec.o: lzma/LzmaDec.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CFLAGS) $(CFLAGS) -MT lzma/flamp-LzmaDec.o -MD -MP -MF lzma/$(DEPDIR)/flamp-LzmaDec.Tpo -c -o lzma/flamp-LzmaDec.o `test -f 'lzma/LzmaDec.c' || echo '$(srcdir)/'`lzma/LzmaDec.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) lzma/$(DEPDIR)/flamp-LzmaDec.Tpo lzma/$(DEPDIR)/flamp-LzmaDec.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lzma/LzmaDec.c' object='lzma/flamp-LzmaDec.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CFLAGS) $(CFLAGS) -c -o lzma/flamp-LzmaDec.o `test -f 'lzma/LzmaDec.c' || echo '$(srcdir)/'`lzma/LzmaDec.c lzma/flamp-LzmaDec.obj: lzma/LzmaDec.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CFLAGS) $(CFLAGS) -MT lzma/flamp-LzmaDec.obj -MD -MP -MF lzma/$(DEPDIR)/flamp-LzmaDec.Tpo -c -o lzma/flamp-LzmaDec.obj `if test -f 'lzma/LzmaDec.c'; then $(CYGPATH_W) 'lzma/LzmaDec.c'; else $(CYGPATH_W) '$(srcdir)/lzma/LzmaDec.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) lzma/$(DEPDIR)/flamp-LzmaDec.Tpo lzma/$(DEPDIR)/flamp-LzmaDec.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lzma/LzmaDec.c' object='lzma/flamp-LzmaDec.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CFLAGS) $(CFLAGS) -c -o lzma/flamp-LzmaDec.obj `if test -f 'lzma/LzmaDec.c'; then $(CYGPATH_W) 'lzma/LzmaDec.c'; else $(CYGPATH_W) '$(srcdir)/lzma/LzmaDec.c'; fi` lzma/flamp-LzmaEnc.o: lzma/LzmaEnc.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CFLAGS) $(CFLAGS) -MT lzma/flamp-LzmaEnc.o -MD -MP -MF lzma/$(DEPDIR)/flamp-LzmaEnc.Tpo -c -o lzma/flamp-LzmaEnc.o `test -f 'lzma/LzmaEnc.c' || echo '$(srcdir)/'`lzma/LzmaEnc.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) lzma/$(DEPDIR)/flamp-LzmaEnc.Tpo lzma/$(DEPDIR)/flamp-LzmaEnc.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lzma/LzmaEnc.c' object='lzma/flamp-LzmaEnc.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CFLAGS) $(CFLAGS) -c -o lzma/flamp-LzmaEnc.o `test -f 'lzma/LzmaEnc.c' || echo '$(srcdir)/'`lzma/LzmaEnc.c lzma/flamp-LzmaEnc.obj: lzma/LzmaEnc.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CFLAGS) $(CFLAGS) -MT lzma/flamp-LzmaEnc.obj -MD -MP -MF lzma/$(DEPDIR)/flamp-LzmaEnc.Tpo -c -o lzma/flamp-LzmaEnc.obj `if test -f 'lzma/LzmaEnc.c'; then $(CYGPATH_W) 'lzma/LzmaEnc.c'; else $(CYGPATH_W) '$(srcdir)/lzma/LzmaEnc.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) lzma/$(DEPDIR)/flamp-LzmaEnc.Tpo lzma/$(DEPDIR)/flamp-LzmaEnc.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lzma/LzmaEnc.c' object='lzma/flamp-LzmaEnc.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CFLAGS) $(CFLAGS) -c -o lzma/flamp-LzmaEnc.obj `if test -f 'lzma/LzmaEnc.c'; then $(CYGPATH_W) 'lzma/LzmaEnc.c'; else $(CYGPATH_W) '$(srcdir)/lzma/LzmaEnc.c'; fi` lzma/flamp-LzmaLib.o: lzma/LzmaLib.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CFLAGS) $(CFLAGS) -MT lzma/flamp-LzmaLib.o -MD -MP -MF lzma/$(DEPDIR)/flamp-LzmaLib.Tpo -c -o lzma/flamp-LzmaLib.o `test -f 'lzma/LzmaLib.c' || echo '$(srcdir)/'`lzma/LzmaLib.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) lzma/$(DEPDIR)/flamp-LzmaLib.Tpo lzma/$(DEPDIR)/flamp-LzmaLib.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lzma/LzmaLib.c' object='lzma/flamp-LzmaLib.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CFLAGS) $(CFLAGS) -c -o lzma/flamp-LzmaLib.o `test -f 'lzma/LzmaLib.c' || echo '$(srcdir)/'`lzma/LzmaLib.c lzma/flamp-LzmaLib.obj: lzma/LzmaLib.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CFLAGS) $(CFLAGS) -MT lzma/flamp-LzmaLib.obj -MD -MP -MF lzma/$(DEPDIR)/flamp-LzmaLib.Tpo -c -o lzma/flamp-LzmaLib.obj `if test -f 'lzma/LzmaLib.c'; then $(CYGPATH_W) 'lzma/LzmaLib.c'; else $(CYGPATH_W) '$(srcdir)/lzma/LzmaLib.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) lzma/$(DEPDIR)/flamp-LzmaLib.Tpo lzma/$(DEPDIR)/flamp-LzmaLib.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lzma/LzmaLib.c' object='lzma/flamp-LzmaLib.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CFLAGS) $(CFLAGS) -c -o lzma/flamp-LzmaLib.obj `if test -f 'lzma/LzmaLib.c'; then $(CYGPATH_W) 'lzma/LzmaLib.c'; else $(CYGPATH_W) '$(srcdir)/lzma/LzmaLib.c'; fi` widgets/flamp-missing_strings.o: widgets/missing_strings.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CFLAGS) $(CFLAGS) -MT widgets/flamp-missing_strings.o -MD -MP -MF widgets/$(DEPDIR)/flamp-missing_strings.Tpo -c -o widgets/flamp-missing_strings.o `test -f 'widgets/missing_strings.c' || echo '$(srcdir)/'`widgets/missing_strings.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flamp-missing_strings.Tpo widgets/$(DEPDIR)/flamp-missing_strings.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='widgets/missing_strings.c' object='widgets/flamp-missing_strings.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CFLAGS) $(CFLAGS) -c -o widgets/flamp-missing_strings.o `test -f 'widgets/missing_strings.c' || echo '$(srcdir)/'`widgets/missing_strings.c widgets/flamp-missing_strings.obj: widgets/missing_strings.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CFLAGS) $(CFLAGS) -MT widgets/flamp-missing_strings.obj -MD -MP -MF widgets/$(DEPDIR)/flamp-missing_strings.Tpo -c -o widgets/flamp-missing_strings.obj `if test -f 'widgets/missing_strings.c'; then $(CYGPATH_W) 'widgets/missing_strings.c'; else $(CYGPATH_W) '$(srcdir)/widgets/missing_strings.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flamp-missing_strings.Tpo widgets/$(DEPDIR)/flamp-missing_strings.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='widgets/missing_strings.c' object='widgets/flamp-missing_strings.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CFLAGS) $(CFLAGS) -c -o widgets/flamp-missing_strings.obj `if test -f 'widgets/missing_strings.c'; then $(CYGPATH_W) 'widgets/missing_strings.c'; else $(CYGPATH_W) '$(srcdir)/widgets/missing_strings.c'; fi` .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` xmlrpcpp/flamp-XmlRpcClient.o: xmlrpcpp/XmlRpcClient.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flamp-XmlRpcClient.o -MD -MP -MF xmlrpcpp/$(DEPDIR)/flamp-XmlRpcClient.Tpo -c -o xmlrpcpp/flamp-XmlRpcClient.o `test -f 'xmlrpcpp/XmlRpcClient.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcClient.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flamp-XmlRpcClient.Tpo xmlrpcpp/$(DEPDIR)/flamp-XmlRpcClient.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcClient.cpp' object='xmlrpcpp/flamp-XmlRpcClient.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flamp-XmlRpcClient.o `test -f 'xmlrpcpp/XmlRpcClient.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcClient.cpp xmlrpcpp/flamp-XmlRpcClient.obj: xmlrpcpp/XmlRpcClient.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flamp-XmlRpcClient.obj -MD -MP -MF xmlrpcpp/$(DEPDIR)/flamp-XmlRpcClient.Tpo -c -o xmlrpcpp/flamp-XmlRpcClient.obj `if test -f 'xmlrpcpp/XmlRpcClient.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcClient.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcClient.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flamp-XmlRpcClient.Tpo xmlrpcpp/$(DEPDIR)/flamp-XmlRpcClient.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcClient.cpp' object='xmlrpcpp/flamp-XmlRpcClient.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flamp-XmlRpcClient.obj `if test -f 'xmlrpcpp/XmlRpcClient.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcClient.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcClient.cpp'; fi` xmlrpcpp/flamp-XmlRpcDispatch.o: xmlrpcpp/XmlRpcDispatch.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flamp-XmlRpcDispatch.o -MD -MP -MF xmlrpcpp/$(DEPDIR)/flamp-XmlRpcDispatch.Tpo -c -o xmlrpcpp/flamp-XmlRpcDispatch.o `test -f 'xmlrpcpp/XmlRpcDispatch.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcDispatch.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flamp-XmlRpcDispatch.Tpo xmlrpcpp/$(DEPDIR)/flamp-XmlRpcDispatch.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcDispatch.cpp' object='xmlrpcpp/flamp-XmlRpcDispatch.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flamp-XmlRpcDispatch.o `test -f 'xmlrpcpp/XmlRpcDispatch.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcDispatch.cpp xmlrpcpp/flamp-XmlRpcDispatch.obj: xmlrpcpp/XmlRpcDispatch.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flamp-XmlRpcDispatch.obj -MD -MP -MF xmlrpcpp/$(DEPDIR)/flamp-XmlRpcDispatch.Tpo -c -o xmlrpcpp/flamp-XmlRpcDispatch.obj `if test -f 'xmlrpcpp/XmlRpcDispatch.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcDispatch.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcDispatch.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flamp-XmlRpcDispatch.Tpo xmlrpcpp/$(DEPDIR)/flamp-XmlRpcDispatch.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcDispatch.cpp' object='xmlrpcpp/flamp-XmlRpcDispatch.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flamp-XmlRpcDispatch.obj `if test -f 'xmlrpcpp/XmlRpcDispatch.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcDispatch.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcDispatch.cpp'; fi` xmlrpcpp/flamp-XmlRpcMutex.o: xmlrpcpp/XmlRpcMutex.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flamp-XmlRpcMutex.o -MD -MP -MF xmlrpcpp/$(DEPDIR)/flamp-XmlRpcMutex.Tpo -c -o xmlrpcpp/flamp-XmlRpcMutex.o `test -f 'xmlrpcpp/XmlRpcMutex.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcMutex.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flamp-XmlRpcMutex.Tpo xmlrpcpp/$(DEPDIR)/flamp-XmlRpcMutex.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcMutex.cpp' object='xmlrpcpp/flamp-XmlRpcMutex.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flamp-XmlRpcMutex.o `test -f 'xmlrpcpp/XmlRpcMutex.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcMutex.cpp xmlrpcpp/flamp-XmlRpcMutex.obj: xmlrpcpp/XmlRpcMutex.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flamp-XmlRpcMutex.obj -MD -MP -MF xmlrpcpp/$(DEPDIR)/flamp-XmlRpcMutex.Tpo -c -o xmlrpcpp/flamp-XmlRpcMutex.obj `if test -f 'xmlrpcpp/XmlRpcMutex.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcMutex.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcMutex.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flamp-XmlRpcMutex.Tpo xmlrpcpp/$(DEPDIR)/flamp-XmlRpcMutex.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcMutex.cpp' object='xmlrpcpp/flamp-XmlRpcMutex.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flamp-XmlRpcMutex.obj `if test -f 'xmlrpcpp/XmlRpcMutex.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcMutex.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcMutex.cpp'; fi` xmlrpcpp/flamp-XmlRpcServerConnection.o: xmlrpcpp/XmlRpcServerConnection.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flamp-XmlRpcServerConnection.o -MD -MP -MF xmlrpcpp/$(DEPDIR)/flamp-XmlRpcServerConnection.Tpo -c -o xmlrpcpp/flamp-XmlRpcServerConnection.o `test -f 'xmlrpcpp/XmlRpcServerConnection.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcServerConnection.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flamp-XmlRpcServerConnection.Tpo xmlrpcpp/$(DEPDIR)/flamp-XmlRpcServerConnection.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcServerConnection.cpp' object='xmlrpcpp/flamp-XmlRpcServerConnection.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flamp-XmlRpcServerConnection.o `test -f 'xmlrpcpp/XmlRpcServerConnection.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcServerConnection.cpp xmlrpcpp/flamp-XmlRpcServerConnection.obj: xmlrpcpp/XmlRpcServerConnection.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flamp-XmlRpcServerConnection.obj -MD -MP -MF xmlrpcpp/$(DEPDIR)/flamp-XmlRpcServerConnection.Tpo -c -o xmlrpcpp/flamp-XmlRpcServerConnection.obj `if test -f 'xmlrpcpp/XmlRpcServerConnection.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcServerConnection.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcServerConnection.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flamp-XmlRpcServerConnection.Tpo xmlrpcpp/$(DEPDIR)/flamp-XmlRpcServerConnection.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcServerConnection.cpp' object='xmlrpcpp/flamp-XmlRpcServerConnection.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flamp-XmlRpcServerConnection.obj `if test -f 'xmlrpcpp/XmlRpcServerConnection.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcServerConnection.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcServerConnection.cpp'; fi` xmlrpcpp/flamp-XmlRpcServer.o: xmlrpcpp/XmlRpcServer.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flamp-XmlRpcServer.o -MD -MP -MF xmlrpcpp/$(DEPDIR)/flamp-XmlRpcServer.Tpo -c -o xmlrpcpp/flamp-XmlRpcServer.o `test -f 'xmlrpcpp/XmlRpcServer.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcServer.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flamp-XmlRpcServer.Tpo xmlrpcpp/$(DEPDIR)/flamp-XmlRpcServer.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcServer.cpp' object='xmlrpcpp/flamp-XmlRpcServer.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flamp-XmlRpcServer.o `test -f 'xmlrpcpp/XmlRpcServer.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcServer.cpp xmlrpcpp/flamp-XmlRpcServer.obj: xmlrpcpp/XmlRpcServer.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flamp-XmlRpcServer.obj -MD -MP -MF xmlrpcpp/$(DEPDIR)/flamp-XmlRpcServer.Tpo -c -o xmlrpcpp/flamp-XmlRpcServer.obj `if test -f 'xmlrpcpp/XmlRpcServer.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcServer.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcServer.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flamp-XmlRpcServer.Tpo xmlrpcpp/$(DEPDIR)/flamp-XmlRpcServer.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcServer.cpp' object='xmlrpcpp/flamp-XmlRpcServer.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flamp-XmlRpcServer.obj `if test -f 'xmlrpcpp/XmlRpcServer.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcServer.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcServer.cpp'; fi` xmlrpcpp/flamp-XmlRpcServerMethod.o: xmlrpcpp/XmlRpcServerMethod.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flamp-XmlRpcServerMethod.o -MD -MP -MF xmlrpcpp/$(DEPDIR)/flamp-XmlRpcServerMethod.Tpo -c -o xmlrpcpp/flamp-XmlRpcServerMethod.o `test -f 'xmlrpcpp/XmlRpcServerMethod.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcServerMethod.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flamp-XmlRpcServerMethod.Tpo xmlrpcpp/$(DEPDIR)/flamp-XmlRpcServerMethod.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcServerMethod.cpp' object='xmlrpcpp/flamp-XmlRpcServerMethod.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flamp-XmlRpcServerMethod.o `test -f 'xmlrpcpp/XmlRpcServerMethod.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcServerMethod.cpp xmlrpcpp/flamp-XmlRpcServerMethod.obj: xmlrpcpp/XmlRpcServerMethod.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flamp-XmlRpcServerMethod.obj -MD -MP -MF xmlrpcpp/$(DEPDIR)/flamp-XmlRpcServerMethod.Tpo -c -o xmlrpcpp/flamp-XmlRpcServerMethod.obj `if test -f 'xmlrpcpp/XmlRpcServerMethod.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcServerMethod.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcServerMethod.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flamp-XmlRpcServerMethod.Tpo xmlrpcpp/$(DEPDIR)/flamp-XmlRpcServerMethod.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcServerMethod.cpp' object='xmlrpcpp/flamp-XmlRpcServerMethod.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flamp-XmlRpcServerMethod.obj `if test -f 'xmlrpcpp/XmlRpcServerMethod.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcServerMethod.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcServerMethod.cpp'; fi` xmlrpcpp/flamp-XmlRpcSocket.o: xmlrpcpp/XmlRpcSocket.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flamp-XmlRpcSocket.o -MD -MP -MF xmlrpcpp/$(DEPDIR)/flamp-XmlRpcSocket.Tpo -c -o xmlrpcpp/flamp-XmlRpcSocket.o `test -f 'xmlrpcpp/XmlRpcSocket.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcSocket.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flamp-XmlRpcSocket.Tpo xmlrpcpp/$(DEPDIR)/flamp-XmlRpcSocket.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcSocket.cpp' object='xmlrpcpp/flamp-XmlRpcSocket.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flamp-XmlRpcSocket.o `test -f 'xmlrpcpp/XmlRpcSocket.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcSocket.cpp xmlrpcpp/flamp-XmlRpcSocket.obj: xmlrpcpp/XmlRpcSocket.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flamp-XmlRpcSocket.obj -MD -MP -MF xmlrpcpp/$(DEPDIR)/flamp-XmlRpcSocket.Tpo -c -o xmlrpcpp/flamp-XmlRpcSocket.obj `if test -f 'xmlrpcpp/XmlRpcSocket.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcSocket.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcSocket.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flamp-XmlRpcSocket.Tpo xmlrpcpp/$(DEPDIR)/flamp-XmlRpcSocket.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcSocket.cpp' object='xmlrpcpp/flamp-XmlRpcSocket.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flamp-XmlRpcSocket.obj `if test -f 'xmlrpcpp/XmlRpcSocket.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcSocket.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcSocket.cpp'; fi` xmlrpcpp/flamp-XmlRpcSource.o: xmlrpcpp/XmlRpcSource.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flamp-XmlRpcSource.o -MD -MP -MF xmlrpcpp/$(DEPDIR)/flamp-XmlRpcSource.Tpo -c -o xmlrpcpp/flamp-XmlRpcSource.o `test -f 'xmlrpcpp/XmlRpcSource.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcSource.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flamp-XmlRpcSource.Tpo xmlrpcpp/$(DEPDIR)/flamp-XmlRpcSource.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcSource.cpp' object='xmlrpcpp/flamp-XmlRpcSource.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flamp-XmlRpcSource.o `test -f 'xmlrpcpp/XmlRpcSource.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcSource.cpp xmlrpcpp/flamp-XmlRpcSource.obj: xmlrpcpp/XmlRpcSource.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flamp-XmlRpcSource.obj -MD -MP -MF xmlrpcpp/$(DEPDIR)/flamp-XmlRpcSource.Tpo -c -o xmlrpcpp/flamp-XmlRpcSource.obj `if test -f 'xmlrpcpp/XmlRpcSource.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcSource.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcSource.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flamp-XmlRpcSource.Tpo xmlrpcpp/$(DEPDIR)/flamp-XmlRpcSource.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcSource.cpp' object='xmlrpcpp/flamp-XmlRpcSource.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flamp-XmlRpcSource.obj `if test -f 'xmlrpcpp/XmlRpcSource.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcSource.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcSource.cpp'; fi` xmlrpcpp/flamp-XmlRpcUtil.o: xmlrpcpp/XmlRpcUtil.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flamp-XmlRpcUtil.o -MD -MP -MF xmlrpcpp/$(DEPDIR)/flamp-XmlRpcUtil.Tpo -c -o xmlrpcpp/flamp-XmlRpcUtil.o `test -f 'xmlrpcpp/XmlRpcUtil.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcUtil.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flamp-XmlRpcUtil.Tpo xmlrpcpp/$(DEPDIR)/flamp-XmlRpcUtil.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcUtil.cpp' object='xmlrpcpp/flamp-XmlRpcUtil.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flamp-XmlRpcUtil.o `test -f 'xmlrpcpp/XmlRpcUtil.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcUtil.cpp xmlrpcpp/flamp-XmlRpcUtil.obj: xmlrpcpp/XmlRpcUtil.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flamp-XmlRpcUtil.obj -MD -MP -MF xmlrpcpp/$(DEPDIR)/flamp-XmlRpcUtil.Tpo -c -o xmlrpcpp/flamp-XmlRpcUtil.obj `if test -f 'xmlrpcpp/XmlRpcUtil.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcUtil.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcUtil.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flamp-XmlRpcUtil.Tpo xmlrpcpp/$(DEPDIR)/flamp-XmlRpcUtil.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcUtil.cpp' object='xmlrpcpp/flamp-XmlRpcUtil.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flamp-XmlRpcUtil.obj `if test -f 'xmlrpcpp/XmlRpcUtil.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcUtil.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcUtil.cpp'; fi` xmlrpcpp/flamp-XmlRpcValue.o: xmlrpcpp/XmlRpcValue.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flamp-XmlRpcValue.o -MD -MP -MF xmlrpcpp/$(DEPDIR)/flamp-XmlRpcValue.Tpo -c -o xmlrpcpp/flamp-XmlRpcValue.o `test -f 'xmlrpcpp/XmlRpcValue.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcValue.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flamp-XmlRpcValue.Tpo xmlrpcpp/$(DEPDIR)/flamp-XmlRpcValue.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcValue.cpp' object='xmlrpcpp/flamp-XmlRpcValue.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flamp-XmlRpcValue.o `test -f 'xmlrpcpp/XmlRpcValue.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcValue.cpp xmlrpcpp/flamp-XmlRpcValue.obj: xmlrpcpp/XmlRpcValue.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flamp-XmlRpcValue.obj -MD -MP -MF xmlrpcpp/$(DEPDIR)/flamp-XmlRpcValue.Tpo -c -o xmlrpcpp/flamp-XmlRpcValue.obj `if test -f 'xmlrpcpp/XmlRpcValue.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcValue.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcValue.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flamp-XmlRpcValue.Tpo xmlrpcpp/$(DEPDIR)/flamp-XmlRpcValue.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcValue.cpp' object='xmlrpcpp/flamp-XmlRpcValue.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flamp-XmlRpcValue.obj `if test -f 'xmlrpcpp/XmlRpcValue.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcValue.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcValue.cpp'; fi` flamp-flamp.o: flamp.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT flamp-flamp.o -MD -MP -MF $(DEPDIR)/flamp-flamp.Tpo -c -o flamp-flamp.o `test -f 'flamp.cxx' || echo '$(srcdir)/'`flamp.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/flamp-flamp.Tpo $(DEPDIR)/flamp-flamp.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='flamp.cxx' object='flamp-flamp.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o flamp-flamp.o `test -f 'flamp.cxx' || echo '$(srcdir)/'`flamp.cxx flamp-flamp.obj: flamp.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT flamp-flamp.obj -MD -MP -MF $(DEPDIR)/flamp-flamp.Tpo -c -o flamp-flamp.obj `if test -f 'flamp.cxx'; then $(CYGPATH_W) 'flamp.cxx'; else $(CYGPATH_W) '$(srcdir)/flamp.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/flamp-flamp.Tpo $(DEPDIR)/flamp-flamp.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='flamp.cxx' object='flamp-flamp.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o flamp-flamp.obj `if test -f 'flamp.cxx'; then $(CYGPATH_W) 'flamp.cxx'; else $(CYGPATH_W) '$(srcdir)/flamp.cxx'; fi` flamp-flamp_dialog.o: flamp_dialog.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT flamp-flamp_dialog.o -MD -MP -MF $(DEPDIR)/flamp-flamp_dialog.Tpo -c -o flamp-flamp_dialog.o `test -f 'flamp_dialog.cxx' || echo '$(srcdir)/'`flamp_dialog.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/flamp-flamp_dialog.Tpo $(DEPDIR)/flamp-flamp_dialog.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='flamp_dialog.cxx' object='flamp-flamp_dialog.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o flamp-flamp_dialog.o `test -f 'flamp_dialog.cxx' || echo '$(srcdir)/'`flamp_dialog.cxx flamp-flamp_dialog.obj: flamp_dialog.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT flamp-flamp_dialog.obj -MD -MP -MF $(DEPDIR)/flamp-flamp_dialog.Tpo -c -o flamp-flamp_dialog.obj `if test -f 'flamp_dialog.cxx'; then $(CYGPATH_W) 'flamp_dialog.cxx'; else $(CYGPATH_W) '$(srcdir)/flamp_dialog.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/flamp-flamp_dialog.Tpo $(DEPDIR)/flamp-flamp_dialog.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='flamp_dialog.cxx' object='flamp-flamp_dialog.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o flamp-flamp_dialog.obj `if test -f 'flamp_dialog.cxx'; then $(CYGPATH_W) 'flamp_dialog.cxx'; else $(CYGPATH_W) '$(srcdir)/flamp_dialog.cxx'; fi` ui/flamp-dialogs.o: ui/dialogs.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT ui/flamp-dialogs.o -MD -MP -MF ui/$(DEPDIR)/flamp-dialogs.Tpo -c -o ui/flamp-dialogs.o `test -f 'ui/dialogs.cxx' || echo '$(srcdir)/'`ui/dialogs.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ui/$(DEPDIR)/flamp-dialogs.Tpo ui/$(DEPDIR)/flamp-dialogs.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ui/dialogs.cxx' object='ui/flamp-dialogs.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o ui/flamp-dialogs.o `test -f 'ui/dialogs.cxx' || echo '$(srcdir)/'`ui/dialogs.cxx ui/flamp-dialogs.obj: ui/dialogs.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT ui/flamp-dialogs.obj -MD -MP -MF ui/$(DEPDIR)/flamp-dialogs.Tpo -c -o ui/flamp-dialogs.obj `if test -f 'ui/dialogs.cxx'; then $(CYGPATH_W) 'ui/dialogs.cxx'; else $(CYGPATH_W) '$(srcdir)/ui/dialogs.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ui/$(DEPDIR)/flamp-dialogs.Tpo ui/$(DEPDIR)/flamp-dialogs.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ui/dialogs.cxx' object='ui/flamp-dialogs.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o ui/flamp-dialogs.obj `if test -f 'ui/dialogs.cxx'; then $(CYGPATH_W) 'ui/dialogs.cxx'; else $(CYGPATH_W) '$(srcdir)/ui/dialogs.cxx'; fi` server/flamp-xml_server.o: server/xml_server.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT server/flamp-xml_server.o -MD -MP -MF server/$(DEPDIR)/flamp-xml_server.Tpo -c -o server/flamp-xml_server.o `test -f 'server/xml_server.cxx' || echo '$(srcdir)/'`server/xml_server.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) server/$(DEPDIR)/flamp-xml_server.Tpo server/$(DEPDIR)/flamp-xml_server.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='server/xml_server.cxx' object='server/flamp-xml_server.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o server/flamp-xml_server.o `test -f 'server/xml_server.cxx' || echo '$(srcdir)/'`server/xml_server.cxx server/flamp-xml_server.obj: server/xml_server.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT server/flamp-xml_server.obj -MD -MP -MF server/$(DEPDIR)/flamp-xml_server.Tpo -c -o server/flamp-xml_server.obj `if test -f 'server/xml_server.cxx'; then $(CYGPATH_W) 'server/xml_server.cxx'; else $(CYGPATH_W) '$(srcdir)/server/xml_server.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) server/$(DEPDIR)/flamp-xml_server.Tpo server/$(DEPDIR)/flamp-xml_server.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='server/xml_server.cxx' object='server/flamp-xml_server.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o server/flamp-xml_server.obj `if test -f 'server/xml_server.cxx'; then $(CYGPATH_W) 'server/xml_server.cxx'; else $(CYGPATH_W) '$(srcdir)/server/xml_server.cxx'; fi` utils/flamp-amp.o: utils/amp.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT utils/flamp-amp.o -MD -MP -MF utils/$(DEPDIR)/flamp-amp.Tpo -c -o utils/flamp-amp.o `test -f 'utils/amp.cxx' || echo '$(srcdir)/'`utils/amp.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-amp.Tpo utils/$(DEPDIR)/flamp-amp.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/amp.cxx' object='utils/flamp-amp.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o utils/flamp-amp.o `test -f 'utils/amp.cxx' || echo '$(srcdir)/'`utils/amp.cxx utils/flamp-amp.obj: utils/amp.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT utils/flamp-amp.obj -MD -MP -MF utils/$(DEPDIR)/flamp-amp.Tpo -c -o utils/flamp-amp.obj `if test -f 'utils/amp.cxx'; then $(CYGPATH_W) 'utils/amp.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/amp.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-amp.Tpo utils/$(DEPDIR)/flamp-amp.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/amp.cxx' object='utils/flamp-amp.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o utils/flamp-amp.obj `if test -f 'utils/amp.cxx'; then $(CYGPATH_W) 'utils/amp.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/amp.cxx'; fi` utils/flamp-base64.o: utils/base64.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT utils/flamp-base64.o -MD -MP -MF utils/$(DEPDIR)/flamp-base64.Tpo -c -o utils/flamp-base64.o `test -f 'utils/base64.cxx' || echo '$(srcdir)/'`utils/base64.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-base64.Tpo utils/$(DEPDIR)/flamp-base64.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/base64.cxx' object='utils/flamp-base64.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o utils/flamp-base64.o `test -f 'utils/base64.cxx' || echo '$(srcdir)/'`utils/base64.cxx utils/flamp-base64.obj: utils/base64.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT utils/flamp-base64.obj -MD -MP -MF utils/$(DEPDIR)/flamp-base64.Tpo -c -o utils/flamp-base64.obj `if test -f 'utils/base64.cxx'; then $(CYGPATH_W) 'utils/base64.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/base64.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-base64.Tpo utils/$(DEPDIR)/flamp-base64.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/base64.cxx' object='utils/flamp-base64.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o utils/flamp-base64.obj `if test -f 'utils/base64.cxx'; then $(CYGPATH_W) 'utils/base64.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/base64.cxx'; fi` utils/flamp-base128.o: utils/base128.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT utils/flamp-base128.o -MD -MP -MF utils/$(DEPDIR)/flamp-base128.Tpo -c -o utils/flamp-base128.o `test -f 'utils/base128.cxx' || echo '$(srcdir)/'`utils/base128.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-base128.Tpo utils/$(DEPDIR)/flamp-base128.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/base128.cxx' object='utils/flamp-base128.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o utils/flamp-base128.o `test -f 'utils/base128.cxx' || echo '$(srcdir)/'`utils/base128.cxx utils/flamp-base128.obj: utils/base128.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT utils/flamp-base128.obj -MD -MP -MF utils/$(DEPDIR)/flamp-base128.Tpo -c -o utils/flamp-base128.obj `if test -f 'utils/base128.cxx'; then $(CYGPATH_W) 'utils/base128.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/base128.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-base128.Tpo utils/$(DEPDIR)/flamp-base128.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/base128.cxx' object='utils/flamp-base128.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o utils/flamp-base128.obj `if test -f 'utils/base128.cxx'; then $(CYGPATH_W) 'utils/base128.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/base128.cxx'; fi` utils/flamp-base256.o: utils/base256.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT utils/flamp-base256.o -MD -MP -MF utils/$(DEPDIR)/flamp-base256.Tpo -c -o utils/flamp-base256.o `test -f 'utils/base256.cxx' || echo '$(srcdir)/'`utils/base256.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-base256.Tpo utils/$(DEPDIR)/flamp-base256.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/base256.cxx' object='utils/flamp-base256.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o utils/flamp-base256.o `test -f 'utils/base256.cxx' || echo '$(srcdir)/'`utils/base256.cxx utils/flamp-base256.obj: utils/base256.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT utils/flamp-base256.obj -MD -MP -MF utils/$(DEPDIR)/flamp-base256.Tpo -c -o utils/flamp-base256.obj `if test -f 'utils/base256.cxx'; then $(CYGPATH_W) 'utils/base256.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/base256.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-base256.Tpo utils/$(DEPDIR)/flamp-base256.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/base256.cxx' object='utils/flamp-base256.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o utils/flamp-base256.obj `if test -f 'utils/base256.cxx'; then $(CYGPATH_W) 'utils/base256.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/base256.cxx'; fi` utils/flamp-debug.o: utils/debug.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT utils/flamp-debug.o -MD -MP -MF utils/$(DEPDIR)/flamp-debug.Tpo -c -o utils/flamp-debug.o `test -f 'utils/debug.cxx' || echo '$(srcdir)/'`utils/debug.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-debug.Tpo utils/$(DEPDIR)/flamp-debug.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/debug.cxx' object='utils/flamp-debug.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o utils/flamp-debug.o `test -f 'utils/debug.cxx' || echo '$(srcdir)/'`utils/debug.cxx utils/flamp-debug.obj: utils/debug.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT utils/flamp-debug.obj -MD -MP -MF utils/$(DEPDIR)/flamp-debug.Tpo -c -o utils/flamp-debug.obj `if test -f 'utils/debug.cxx'; then $(CYGPATH_W) 'utils/debug.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/debug.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-debug.Tpo utils/$(DEPDIR)/flamp-debug.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/debug.cxx' object='utils/flamp-debug.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o utils/flamp-debug.obj `if test -f 'utils/debug.cxx'; then $(CYGPATH_W) 'utils/debug.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/debug.cxx'; fi` utils/flamp-socket.o: utils/socket.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT utils/flamp-socket.o -MD -MP -MF utils/$(DEPDIR)/flamp-socket.Tpo -c -o utils/flamp-socket.o `test -f 'utils/socket.cxx' || echo '$(srcdir)/'`utils/socket.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-socket.Tpo utils/$(DEPDIR)/flamp-socket.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/socket.cxx' object='utils/flamp-socket.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o utils/flamp-socket.o `test -f 'utils/socket.cxx' || echo '$(srcdir)/'`utils/socket.cxx utils/flamp-socket.obj: utils/socket.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT utils/flamp-socket.obj -MD -MP -MF utils/$(DEPDIR)/flamp-socket.Tpo -c -o utils/flamp-socket.obj `if test -f 'utils/socket.cxx'; then $(CYGPATH_W) 'utils/socket.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/socket.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-socket.Tpo utils/$(DEPDIR)/flamp-socket.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/socket.cxx' object='utils/flamp-socket.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o utils/flamp-socket.obj `if test -f 'utils/socket.cxx'; then $(CYGPATH_W) 'utils/socket.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/socket.cxx'; fi` utils/flamp-status.o: utils/status.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT utils/flamp-status.o -MD -MP -MF utils/$(DEPDIR)/flamp-status.Tpo -c -o utils/flamp-status.o `test -f 'utils/status.cxx' || echo '$(srcdir)/'`utils/status.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-status.Tpo utils/$(DEPDIR)/flamp-status.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/status.cxx' object='utils/flamp-status.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o utils/flamp-status.o `test -f 'utils/status.cxx' || echo '$(srcdir)/'`utils/status.cxx utils/flamp-status.obj: utils/status.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT utils/flamp-status.obj -MD -MP -MF utils/$(DEPDIR)/flamp-status.Tpo -c -o utils/flamp-status.obj `if test -f 'utils/status.cxx'; then $(CYGPATH_W) 'utils/status.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/status.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-status.Tpo utils/$(DEPDIR)/flamp-status.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/status.cxx' object='utils/flamp-status.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o utils/flamp-status.obj `if test -f 'utils/status.cxx'; then $(CYGPATH_W) 'utils/status.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/status.cxx'; fi` utils/flamp-timeops.o: utils/timeops.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT utils/flamp-timeops.o -MD -MP -MF utils/$(DEPDIR)/flamp-timeops.Tpo -c -o utils/flamp-timeops.o `test -f 'utils/timeops.cxx' || echo '$(srcdir)/'`utils/timeops.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-timeops.Tpo utils/$(DEPDIR)/flamp-timeops.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/timeops.cxx' object='utils/flamp-timeops.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o utils/flamp-timeops.o `test -f 'utils/timeops.cxx' || echo '$(srcdir)/'`utils/timeops.cxx utils/flamp-timeops.obj: utils/timeops.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT utils/flamp-timeops.obj -MD -MP -MF utils/$(DEPDIR)/flamp-timeops.Tpo -c -o utils/flamp-timeops.obj `if test -f 'utils/timeops.cxx'; then $(CYGPATH_W) 'utils/timeops.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/timeops.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-timeops.Tpo utils/$(DEPDIR)/flamp-timeops.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/timeops.cxx' object='utils/flamp-timeops.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o utils/flamp-timeops.obj `if test -f 'utils/timeops.cxx'; then $(CYGPATH_W) 'utils/timeops.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/timeops.cxx'; fi` utils/flamp-util.o: utils/util.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT utils/flamp-util.o -MD -MP -MF utils/$(DEPDIR)/flamp-util.Tpo -c -o utils/flamp-util.o `test -f 'utils/util.cxx' || echo '$(srcdir)/'`utils/util.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-util.Tpo utils/$(DEPDIR)/flamp-util.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/util.cxx' object='utils/flamp-util.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o utils/flamp-util.o `test -f 'utils/util.cxx' || echo '$(srcdir)/'`utils/util.cxx utils/flamp-util.obj: utils/util.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT utils/flamp-util.obj -MD -MP -MF utils/$(DEPDIR)/flamp-util.Tpo -c -o utils/flamp-util.obj `if test -f 'utils/util.cxx'; then $(CYGPATH_W) 'utils/util.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/util.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-util.Tpo utils/$(DEPDIR)/flamp-util.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/util.cxx' object='utils/flamp-util.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o utils/flamp-util.obj `if test -f 'utils/util.cxx'; then $(CYGPATH_W) 'utils/util.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/util.cxx'; fi` utils/flamp-file_io.o: utils/file_io.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT utils/flamp-file_io.o -MD -MP -MF utils/$(DEPDIR)/flamp-file_io.Tpo -c -o utils/flamp-file_io.o `test -f 'utils/file_io.cxx' || echo '$(srcdir)/'`utils/file_io.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-file_io.Tpo utils/$(DEPDIR)/flamp-file_io.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/file_io.cxx' object='utils/flamp-file_io.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o utils/flamp-file_io.o `test -f 'utils/file_io.cxx' || echo '$(srcdir)/'`utils/file_io.cxx utils/flamp-file_io.obj: utils/file_io.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT utils/flamp-file_io.obj -MD -MP -MF utils/$(DEPDIR)/flamp-file_io.Tpo -c -o utils/flamp-file_io.obj `if test -f 'utils/file_io.cxx'; then $(CYGPATH_W) 'utils/file_io.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/file_io.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-file_io.Tpo utils/$(DEPDIR)/flamp-file_io.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/file_io.cxx' object='utils/flamp-file_io.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o utils/flamp-file_io.obj `if test -f 'utils/file_io.cxx'; then $(CYGPATH_W) 'utils/file_io.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/file_io.cxx'; fi` utils/flamp-xml_io.o: utils/xml_io.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT utils/flamp-xml_io.o -MD -MP -MF utils/$(DEPDIR)/flamp-xml_io.Tpo -c -o utils/flamp-xml_io.o `test -f 'utils/xml_io.cxx' || echo '$(srcdir)/'`utils/xml_io.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-xml_io.Tpo utils/$(DEPDIR)/flamp-xml_io.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/xml_io.cxx' object='utils/flamp-xml_io.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o utils/flamp-xml_io.o `test -f 'utils/xml_io.cxx' || echo '$(srcdir)/'`utils/xml_io.cxx utils/flamp-xml_io.obj: utils/xml_io.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT utils/flamp-xml_io.obj -MD -MP -MF utils/$(DEPDIR)/flamp-xml_io.Tpo -c -o utils/flamp-xml_io.obj `if test -f 'utils/xml_io.cxx'; then $(CYGPATH_W) 'utils/xml_io.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/xml_io.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-xml_io.Tpo utils/$(DEPDIR)/flamp-xml_io.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/xml_io.cxx' object='utils/flamp-xml_io.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o utils/flamp-xml_io.obj `if test -f 'utils/xml_io.cxx'; then $(CYGPATH_W) 'utils/xml_io.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/xml_io.cxx'; fi` utils/flamp-global_amp.o: utils/global_amp.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT utils/flamp-global_amp.o -MD -MP -MF utils/$(DEPDIR)/flamp-global_amp.Tpo -c -o utils/flamp-global_amp.o `test -f 'utils/global_amp.cxx' || echo '$(srcdir)/'`utils/global_amp.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-global_amp.Tpo utils/$(DEPDIR)/flamp-global_amp.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/global_amp.cxx' object='utils/flamp-global_amp.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o utils/flamp-global_amp.o `test -f 'utils/global_amp.cxx' || echo '$(srcdir)/'`utils/global_amp.cxx utils/flamp-global_amp.obj: utils/global_amp.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT utils/flamp-global_amp.obj -MD -MP -MF utils/$(DEPDIR)/flamp-global_amp.Tpo -c -o utils/flamp-global_amp.obj `if test -f 'utils/global_amp.cxx'; then $(CYGPATH_W) 'utils/global_amp.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/global_amp.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-global_amp.Tpo utils/$(DEPDIR)/flamp-global_amp.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/global_amp.cxx' object='utils/flamp-global_amp.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o utils/flamp-global_amp.obj `if test -f 'utils/global_amp.cxx'; then $(CYGPATH_W) 'utils/global_amp.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/global_amp.cxx'; fi` utils/flamp-circular_queue.o: utils/circular_queue.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT utils/flamp-circular_queue.o -MD -MP -MF utils/$(DEPDIR)/flamp-circular_queue.Tpo -c -o utils/flamp-circular_queue.o `test -f 'utils/circular_queue.cxx' || echo '$(srcdir)/'`utils/circular_queue.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-circular_queue.Tpo utils/$(DEPDIR)/flamp-circular_queue.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/circular_queue.cxx' object='utils/flamp-circular_queue.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o utils/flamp-circular_queue.o `test -f 'utils/circular_queue.cxx' || echo '$(srcdir)/'`utils/circular_queue.cxx utils/flamp-circular_queue.obj: utils/circular_queue.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT utils/flamp-circular_queue.obj -MD -MP -MF utils/$(DEPDIR)/flamp-circular_queue.Tpo -c -o utils/flamp-circular_queue.obj `if test -f 'utils/circular_queue.cxx'; then $(CYGPATH_W) 'utils/circular_queue.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/circular_queue.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-circular_queue.Tpo utils/$(DEPDIR)/flamp-circular_queue.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/circular_queue.cxx' object='utils/flamp-circular_queue.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o utils/flamp-circular_queue.obj `if test -f 'utils/circular_queue.cxx'; then $(CYGPATH_W) 'utils/circular_queue.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/circular_queue.cxx'; fi` utils/flamp-tagSearch.o: utils/tagSearch.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT utils/flamp-tagSearch.o -MD -MP -MF utils/$(DEPDIR)/flamp-tagSearch.Tpo -c -o utils/flamp-tagSearch.o `test -f 'utils/tagSearch.cxx' || echo '$(srcdir)/'`utils/tagSearch.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-tagSearch.Tpo utils/$(DEPDIR)/flamp-tagSearch.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/tagSearch.cxx' object='utils/flamp-tagSearch.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o utils/flamp-tagSearch.o `test -f 'utils/tagSearch.cxx' || echo '$(srcdir)/'`utils/tagSearch.cxx utils/flamp-tagSearch.obj: utils/tagSearch.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT utils/flamp-tagSearch.obj -MD -MP -MF utils/$(DEPDIR)/flamp-tagSearch.Tpo -c -o utils/flamp-tagSearch.obj `if test -f 'utils/tagSearch.cxx'; then $(CYGPATH_W) 'utils/tagSearch.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/tagSearch.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-tagSearch.Tpo utils/$(DEPDIR)/flamp-tagSearch.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/tagSearch.cxx' object='utils/flamp-tagSearch.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o utils/flamp-tagSearch.obj `if test -f 'utils/tagSearch.cxx'; then $(CYGPATH_W) 'utils/tagSearch.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/tagSearch.cxx'; fi` utils/flamp-time_table.o: utils/time_table.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT utils/flamp-time_table.o -MD -MP -MF utils/$(DEPDIR)/flamp-time_table.Tpo -c -o utils/flamp-time_table.o `test -f 'utils/time_table.cxx' || echo '$(srcdir)/'`utils/time_table.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-time_table.Tpo utils/$(DEPDIR)/flamp-time_table.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/time_table.cxx' object='utils/flamp-time_table.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o utils/flamp-time_table.o `test -f 'utils/time_table.cxx' || echo '$(srcdir)/'`utils/time_table.cxx utils/flamp-time_table.obj: utils/time_table.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT utils/flamp-time_table.obj -MD -MP -MF utils/$(DEPDIR)/flamp-time_table.Tpo -c -o utils/flamp-time_table.obj `if test -f 'utils/time_table.cxx'; then $(CYGPATH_W) 'utils/time_table.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/time_table.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-time_table.Tpo utils/$(DEPDIR)/flamp-time_table.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/time_table.cxx' object='utils/flamp-time_table.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o utils/flamp-time_table.obj `if test -f 'utils/time_table.cxx'; then $(CYGPATH_W) 'utils/time_table.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/time_table.cxx'; fi` utils/flamp-transmit_camp.o: utils/transmit_camp.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT utils/flamp-transmit_camp.o -MD -MP -MF utils/$(DEPDIR)/flamp-transmit_camp.Tpo -c -o utils/flamp-transmit_camp.o `test -f 'utils/transmit_camp.cxx' || echo '$(srcdir)/'`utils/transmit_camp.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-transmit_camp.Tpo utils/$(DEPDIR)/flamp-transmit_camp.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/transmit_camp.cxx' object='utils/flamp-transmit_camp.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o utils/flamp-transmit_camp.o `test -f 'utils/transmit_camp.cxx' || echo '$(srcdir)/'`utils/transmit_camp.cxx utils/flamp-transmit_camp.obj: utils/transmit_camp.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT utils/flamp-transmit_camp.obj -MD -MP -MF utils/$(DEPDIR)/flamp-transmit_camp.Tpo -c -o utils/flamp-transmit_camp.obj `if test -f 'utils/transmit_camp.cxx'; then $(CYGPATH_W) 'utils/transmit_camp.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/transmit_camp.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-transmit_camp.Tpo utils/$(DEPDIR)/flamp-transmit_camp.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/transmit_camp.cxx' object='utils/flamp-transmit_camp.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o utils/flamp-transmit_camp.obj `if test -f 'utils/transmit_camp.cxx'; then $(CYGPATH_W) 'utils/transmit_camp.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/transmit_camp.cxx'; fi` utils/flamp-ztimer.o: utils/ztimer.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT utils/flamp-ztimer.o -MD -MP -MF utils/$(DEPDIR)/flamp-ztimer.Tpo -c -o utils/flamp-ztimer.o `test -f 'utils/ztimer.cxx' || echo '$(srcdir)/'`utils/ztimer.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-ztimer.Tpo utils/$(DEPDIR)/flamp-ztimer.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/ztimer.cxx' object='utils/flamp-ztimer.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o utils/flamp-ztimer.o `test -f 'utils/ztimer.cxx' || echo '$(srcdir)/'`utils/ztimer.cxx utils/flamp-ztimer.obj: utils/ztimer.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT utils/flamp-ztimer.obj -MD -MP -MF utils/$(DEPDIR)/flamp-ztimer.Tpo -c -o utils/flamp-ztimer.obj `if test -f 'utils/ztimer.cxx'; then $(CYGPATH_W) 'utils/ztimer.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/ztimer.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-ztimer.Tpo utils/$(DEPDIR)/flamp-ztimer.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/ztimer.cxx' object='utils/flamp-ztimer.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o utils/flamp-ztimer.obj `if test -f 'utils/ztimer.cxx'; then $(CYGPATH_W) 'utils/ztimer.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/ztimer.cxx'; fi` utils/flamp-script_parsing.o: utils/script_parsing.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT utils/flamp-script_parsing.o -MD -MP -MF utils/$(DEPDIR)/flamp-script_parsing.Tpo -c -o utils/flamp-script_parsing.o `test -f 'utils/script_parsing.cxx' || echo '$(srcdir)/'`utils/script_parsing.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-script_parsing.Tpo utils/$(DEPDIR)/flamp-script_parsing.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/script_parsing.cxx' object='utils/flamp-script_parsing.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o utils/flamp-script_parsing.o `test -f 'utils/script_parsing.cxx' || echo '$(srcdir)/'`utils/script_parsing.cxx utils/flamp-script_parsing.obj: utils/script_parsing.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT utils/flamp-script_parsing.obj -MD -MP -MF utils/$(DEPDIR)/flamp-script_parsing.Tpo -c -o utils/flamp-script_parsing.obj `if test -f 'utils/script_parsing.cxx'; then $(CYGPATH_W) 'utils/script_parsing.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/script_parsing.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-script_parsing.Tpo utils/$(DEPDIR)/flamp-script_parsing.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/script_parsing.cxx' object='utils/flamp-script_parsing.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o utils/flamp-script_parsing.obj `if test -f 'utils/script_parsing.cxx'; then $(CYGPATH_W) 'utils/script_parsing.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/script_parsing.cxx'; fi` utils/flamp-run_scripts.o: utils/run_scripts.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT utils/flamp-run_scripts.o -MD -MP -MF utils/$(DEPDIR)/flamp-run_scripts.Tpo -c -o utils/flamp-run_scripts.o `test -f 'utils/run_scripts.cxx' || echo '$(srcdir)/'`utils/run_scripts.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-run_scripts.Tpo utils/$(DEPDIR)/flamp-run_scripts.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/run_scripts.cxx' object='utils/flamp-run_scripts.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o utils/flamp-run_scripts.o `test -f 'utils/run_scripts.cxx' || echo '$(srcdir)/'`utils/run_scripts.cxx utils/flamp-run_scripts.obj: utils/run_scripts.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT utils/flamp-run_scripts.obj -MD -MP -MF utils/$(DEPDIR)/flamp-run_scripts.Tpo -c -o utils/flamp-run_scripts.obj `if test -f 'utils/run_scripts.cxx'; then $(CYGPATH_W) 'utils/run_scripts.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/run_scripts.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/flamp-run_scripts.Tpo utils/$(DEPDIR)/flamp-run_scripts.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/run_scripts.cxx' object='utils/flamp-run_scripts.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o utils/flamp-run_scripts.obj `if test -f 'utils/run_scripts.cxx'; then $(CYGPATH_W) 'utils/run_scripts.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/run_scripts.cxx'; fi` widgets/flamp-calendar.o: widgets/calendar.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT widgets/flamp-calendar.o -MD -MP -MF widgets/$(DEPDIR)/flamp-calendar.Tpo -c -o widgets/flamp-calendar.o `test -f 'widgets/calendar.cxx' || echo '$(srcdir)/'`widgets/calendar.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flamp-calendar.Tpo widgets/$(DEPDIR)/flamp-calendar.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/calendar.cxx' object='widgets/flamp-calendar.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flamp-calendar.o `test -f 'widgets/calendar.cxx' || echo '$(srcdir)/'`widgets/calendar.cxx widgets/flamp-calendar.obj: widgets/calendar.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT widgets/flamp-calendar.obj -MD -MP -MF widgets/$(DEPDIR)/flamp-calendar.Tpo -c -o widgets/flamp-calendar.obj `if test -f 'widgets/calendar.cxx'; then $(CYGPATH_W) 'widgets/calendar.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/calendar.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flamp-calendar.Tpo widgets/$(DEPDIR)/flamp-calendar.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/calendar.cxx' object='widgets/flamp-calendar.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flamp-calendar.obj `if test -f 'widgets/calendar.cxx'; then $(CYGPATH_W) 'widgets/calendar.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/calendar.cxx'; fi` widgets/flamp-combo.o: widgets/combo.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT widgets/flamp-combo.o -MD -MP -MF widgets/$(DEPDIR)/flamp-combo.Tpo -c -o widgets/flamp-combo.o `test -f 'widgets/combo.cxx' || echo '$(srcdir)/'`widgets/combo.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flamp-combo.Tpo widgets/$(DEPDIR)/flamp-combo.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/combo.cxx' object='widgets/flamp-combo.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flamp-combo.o `test -f 'widgets/combo.cxx' || echo '$(srcdir)/'`widgets/combo.cxx widgets/flamp-combo.obj: widgets/combo.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT widgets/flamp-combo.obj -MD -MP -MF widgets/$(DEPDIR)/flamp-combo.Tpo -c -o widgets/flamp-combo.obj `if test -f 'widgets/combo.cxx'; then $(CYGPATH_W) 'widgets/combo.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/combo.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flamp-combo.Tpo widgets/$(DEPDIR)/flamp-combo.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/combo.cxx' object='widgets/flamp-combo.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flamp-combo.obj `if test -f 'widgets/combo.cxx'; then $(CYGPATH_W) 'widgets/combo.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/combo.cxx'; fi` widgets/flamp-date.o: widgets/date.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT widgets/flamp-date.o -MD -MP -MF widgets/$(DEPDIR)/flamp-date.Tpo -c -o widgets/flamp-date.o `test -f 'widgets/date.cxx' || echo '$(srcdir)/'`widgets/date.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flamp-date.Tpo widgets/$(DEPDIR)/flamp-date.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/date.cxx' object='widgets/flamp-date.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flamp-date.o `test -f 'widgets/date.cxx' || echo '$(srcdir)/'`widgets/date.cxx widgets/flamp-date.obj: widgets/date.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT widgets/flamp-date.obj -MD -MP -MF widgets/$(DEPDIR)/flamp-date.Tpo -c -o widgets/flamp-date.obj `if test -f 'widgets/date.cxx'; then $(CYGPATH_W) 'widgets/date.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/date.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flamp-date.Tpo widgets/$(DEPDIR)/flamp-date.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/date.cxx' object='widgets/flamp-date.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flamp-date.obj `if test -f 'widgets/date.cxx'; then $(CYGPATH_W) 'widgets/date.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/date.cxx'; fi` widgets/flamp-fileselect.o: widgets/fileselect.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT widgets/flamp-fileselect.o -MD -MP -MF widgets/$(DEPDIR)/flamp-fileselect.Tpo -c -o widgets/flamp-fileselect.o `test -f 'widgets/fileselect.cxx' || echo '$(srcdir)/'`widgets/fileselect.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flamp-fileselect.Tpo widgets/$(DEPDIR)/flamp-fileselect.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/fileselect.cxx' object='widgets/flamp-fileselect.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flamp-fileselect.o `test -f 'widgets/fileselect.cxx' || echo '$(srcdir)/'`widgets/fileselect.cxx widgets/flamp-fileselect.obj: widgets/fileselect.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT widgets/flamp-fileselect.obj -MD -MP -MF widgets/$(DEPDIR)/flamp-fileselect.Tpo -c -o widgets/flamp-fileselect.obj `if test -f 'widgets/fileselect.cxx'; then $(CYGPATH_W) 'widgets/fileselect.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/fileselect.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flamp-fileselect.Tpo widgets/$(DEPDIR)/flamp-fileselect.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/fileselect.cxx' object='widgets/flamp-fileselect.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flamp-fileselect.obj `if test -f 'widgets/fileselect.cxx'; then $(CYGPATH_W) 'widgets/fileselect.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/fileselect.cxx'; fi` widgets/flamp-flinput2.o: widgets/flinput2.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT widgets/flamp-flinput2.o -MD -MP -MF widgets/$(DEPDIR)/flamp-flinput2.Tpo -c -o widgets/flamp-flinput2.o `test -f 'widgets/flinput2.cxx' || echo '$(srcdir)/'`widgets/flinput2.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flamp-flinput2.Tpo widgets/$(DEPDIR)/flamp-flinput2.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/flinput2.cxx' object='widgets/flamp-flinput2.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flamp-flinput2.o `test -f 'widgets/flinput2.cxx' || echo '$(srcdir)/'`widgets/flinput2.cxx widgets/flamp-flinput2.obj: widgets/flinput2.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT widgets/flamp-flinput2.obj -MD -MP -MF widgets/$(DEPDIR)/flamp-flinput2.Tpo -c -o widgets/flamp-flinput2.obj `if test -f 'widgets/flinput2.cxx'; then $(CYGPATH_W) 'widgets/flinput2.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/flinput2.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flamp-flinput2.Tpo widgets/$(DEPDIR)/flamp-flinput2.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/flinput2.cxx' object='widgets/flamp-flinput2.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flamp-flinput2.obj `if test -f 'widgets/flinput2.cxx'; then $(CYGPATH_W) 'widgets/flinput2.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/flinput2.cxx'; fi` widgets/flamp-flslider2.o: widgets/flslider2.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT widgets/flamp-flslider2.o -MD -MP -MF widgets/$(DEPDIR)/flamp-flslider2.Tpo -c -o widgets/flamp-flslider2.o `test -f 'widgets/flslider2.cxx' || echo '$(srcdir)/'`widgets/flslider2.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flamp-flslider2.Tpo widgets/$(DEPDIR)/flamp-flslider2.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/flslider2.cxx' object='widgets/flamp-flslider2.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flamp-flslider2.o `test -f 'widgets/flslider2.cxx' || echo '$(srcdir)/'`widgets/flslider2.cxx widgets/flamp-flslider2.obj: widgets/flslider2.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT widgets/flamp-flslider2.obj -MD -MP -MF widgets/$(DEPDIR)/flamp-flslider2.Tpo -c -o widgets/flamp-flslider2.obj `if test -f 'widgets/flslider2.cxx'; then $(CYGPATH_W) 'widgets/flslider2.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/flslider2.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flamp-flslider2.Tpo widgets/$(DEPDIR)/flamp-flslider2.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/flslider2.cxx' object='widgets/flamp-flslider2.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flamp-flslider2.obj `if test -f 'widgets/flslider2.cxx'; then $(CYGPATH_W) 'widgets/flslider2.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/flslider2.cxx'; fi` widgets/flamp-Fl_BlockMap.o: widgets/Fl_BlockMap.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT widgets/flamp-Fl_BlockMap.o -MD -MP -MF widgets/$(DEPDIR)/flamp-Fl_BlockMap.Tpo -c -o widgets/flamp-Fl_BlockMap.o `test -f 'widgets/Fl_BlockMap.cxx' || echo '$(srcdir)/'`widgets/Fl_BlockMap.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flamp-Fl_BlockMap.Tpo widgets/$(DEPDIR)/flamp-Fl_BlockMap.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/Fl_BlockMap.cxx' object='widgets/flamp-Fl_BlockMap.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flamp-Fl_BlockMap.o `test -f 'widgets/Fl_BlockMap.cxx' || echo '$(srcdir)/'`widgets/Fl_BlockMap.cxx widgets/flamp-Fl_BlockMap.obj: widgets/Fl_BlockMap.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT widgets/flamp-Fl_BlockMap.obj -MD -MP -MF widgets/$(DEPDIR)/flamp-Fl_BlockMap.Tpo -c -o widgets/flamp-Fl_BlockMap.obj `if test -f 'widgets/Fl_BlockMap.cxx'; then $(CYGPATH_W) 'widgets/Fl_BlockMap.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/Fl_BlockMap.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flamp-Fl_BlockMap.Tpo widgets/$(DEPDIR)/flamp-Fl_BlockMap.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/Fl_BlockMap.cxx' object='widgets/flamp-Fl_BlockMap.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flamp-Fl_BlockMap.obj `if test -f 'widgets/Fl_BlockMap.cxx'; then $(CYGPATH_W) 'widgets/Fl_BlockMap.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/Fl_BlockMap.cxx'; fi` widgets/flamp-Fl_Text_Buffer_mod.o: widgets/Fl_Text_Buffer_mod.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT widgets/flamp-Fl_Text_Buffer_mod.o -MD -MP -MF widgets/$(DEPDIR)/flamp-Fl_Text_Buffer_mod.Tpo -c -o widgets/flamp-Fl_Text_Buffer_mod.o `test -f 'widgets/Fl_Text_Buffer_mod.cxx' || echo '$(srcdir)/'`widgets/Fl_Text_Buffer_mod.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flamp-Fl_Text_Buffer_mod.Tpo widgets/$(DEPDIR)/flamp-Fl_Text_Buffer_mod.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/Fl_Text_Buffer_mod.cxx' object='widgets/flamp-Fl_Text_Buffer_mod.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flamp-Fl_Text_Buffer_mod.o `test -f 'widgets/Fl_Text_Buffer_mod.cxx' || echo '$(srcdir)/'`widgets/Fl_Text_Buffer_mod.cxx widgets/flamp-Fl_Text_Buffer_mod.obj: widgets/Fl_Text_Buffer_mod.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT widgets/flamp-Fl_Text_Buffer_mod.obj -MD -MP -MF widgets/$(DEPDIR)/flamp-Fl_Text_Buffer_mod.Tpo -c -o widgets/flamp-Fl_Text_Buffer_mod.obj `if test -f 'widgets/Fl_Text_Buffer_mod.cxx'; then $(CYGPATH_W) 'widgets/Fl_Text_Buffer_mod.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/Fl_Text_Buffer_mod.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flamp-Fl_Text_Buffer_mod.Tpo widgets/$(DEPDIR)/flamp-Fl_Text_Buffer_mod.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/Fl_Text_Buffer_mod.cxx' object='widgets/flamp-Fl_Text_Buffer_mod.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flamp-Fl_Text_Buffer_mod.obj `if test -f 'widgets/Fl_Text_Buffer_mod.cxx'; then $(CYGPATH_W) 'widgets/Fl_Text_Buffer_mod.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/Fl_Text_Buffer_mod.cxx'; fi` widgets/flamp-Fl_Text_Editor_mod.o: widgets/Fl_Text_Editor_mod.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT widgets/flamp-Fl_Text_Editor_mod.o -MD -MP -MF widgets/$(DEPDIR)/flamp-Fl_Text_Editor_mod.Tpo -c -o widgets/flamp-Fl_Text_Editor_mod.o `test -f 'widgets/Fl_Text_Editor_mod.cxx' || echo '$(srcdir)/'`widgets/Fl_Text_Editor_mod.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flamp-Fl_Text_Editor_mod.Tpo widgets/$(DEPDIR)/flamp-Fl_Text_Editor_mod.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/Fl_Text_Editor_mod.cxx' object='widgets/flamp-Fl_Text_Editor_mod.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flamp-Fl_Text_Editor_mod.o `test -f 'widgets/Fl_Text_Editor_mod.cxx' || echo '$(srcdir)/'`widgets/Fl_Text_Editor_mod.cxx widgets/flamp-Fl_Text_Editor_mod.obj: widgets/Fl_Text_Editor_mod.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT widgets/flamp-Fl_Text_Editor_mod.obj -MD -MP -MF widgets/$(DEPDIR)/flamp-Fl_Text_Editor_mod.Tpo -c -o widgets/flamp-Fl_Text_Editor_mod.obj `if test -f 'widgets/Fl_Text_Editor_mod.cxx'; then $(CYGPATH_W) 'widgets/Fl_Text_Editor_mod.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/Fl_Text_Editor_mod.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flamp-Fl_Text_Editor_mod.Tpo widgets/$(DEPDIR)/flamp-Fl_Text_Editor_mod.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/Fl_Text_Editor_mod.cxx' object='widgets/flamp-Fl_Text_Editor_mod.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flamp-Fl_Text_Editor_mod.obj `if test -f 'widgets/Fl_Text_Editor_mod.cxx'; then $(CYGPATH_W) 'widgets/Fl_Text_Editor_mod.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/Fl_Text_Editor_mod.cxx'; fi` widgets/flamp-Fl_Text_Display_mod.o: widgets/Fl_Text_Display_mod.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT widgets/flamp-Fl_Text_Display_mod.o -MD -MP -MF widgets/$(DEPDIR)/flamp-Fl_Text_Display_mod.Tpo -c -o widgets/flamp-Fl_Text_Display_mod.o `test -f 'widgets/Fl_Text_Display_mod.cxx' || echo '$(srcdir)/'`widgets/Fl_Text_Display_mod.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flamp-Fl_Text_Display_mod.Tpo widgets/$(DEPDIR)/flamp-Fl_Text_Display_mod.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/Fl_Text_Display_mod.cxx' object='widgets/flamp-Fl_Text_Display_mod.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flamp-Fl_Text_Display_mod.o `test -f 'widgets/Fl_Text_Display_mod.cxx' || echo '$(srcdir)/'`widgets/Fl_Text_Display_mod.cxx widgets/flamp-Fl_Text_Display_mod.obj: widgets/Fl_Text_Display_mod.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT widgets/flamp-Fl_Text_Display_mod.obj -MD -MP -MF widgets/$(DEPDIR)/flamp-Fl_Text_Display_mod.Tpo -c -o widgets/flamp-Fl_Text_Display_mod.obj `if test -f 'widgets/Fl_Text_Display_mod.cxx'; then $(CYGPATH_W) 'widgets/Fl_Text_Display_mod.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/Fl_Text_Display_mod.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flamp-Fl_Text_Display_mod.Tpo widgets/$(DEPDIR)/flamp-Fl_Text_Display_mod.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/Fl_Text_Display_mod.cxx' object='widgets/flamp-Fl_Text_Display_mod.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flamp-Fl_Text_Display_mod.obj `if test -f 'widgets/Fl_Text_Display_mod.cxx'; then $(CYGPATH_W) 'widgets/Fl_Text_Display_mod.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/Fl_Text_Display_mod.cxx'; fi` widgets/flamp-FTextView.o: widgets/FTextView.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT widgets/flamp-FTextView.o -MD -MP -MF widgets/$(DEPDIR)/flamp-FTextView.Tpo -c -o widgets/flamp-FTextView.o `test -f 'widgets/FTextView.cxx' || echo '$(srcdir)/'`widgets/FTextView.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flamp-FTextView.Tpo widgets/$(DEPDIR)/flamp-FTextView.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/FTextView.cxx' object='widgets/flamp-FTextView.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flamp-FTextView.o `test -f 'widgets/FTextView.cxx' || echo '$(srcdir)/'`widgets/FTextView.cxx widgets/flamp-FTextView.obj: widgets/FTextView.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT widgets/flamp-FTextView.obj -MD -MP -MF widgets/$(DEPDIR)/flamp-FTextView.Tpo -c -o widgets/flamp-FTextView.obj `if test -f 'widgets/FTextView.cxx'; then $(CYGPATH_W) 'widgets/FTextView.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/FTextView.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flamp-FTextView.Tpo widgets/$(DEPDIR)/flamp-FTextView.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/FTextView.cxx' object='widgets/flamp-FTextView.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flamp-FTextView.obj `if test -f 'widgets/FTextView.cxx'; then $(CYGPATH_W) 'widgets/FTextView.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/FTextView.cxx'; fi` widgets/flamp-icons.o: widgets/icons.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT widgets/flamp-icons.o -MD -MP -MF widgets/$(DEPDIR)/flamp-icons.Tpo -c -o widgets/flamp-icons.o `test -f 'widgets/icons.cxx' || echo '$(srcdir)/'`widgets/icons.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flamp-icons.Tpo widgets/$(DEPDIR)/flamp-icons.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/icons.cxx' object='widgets/flamp-icons.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flamp-icons.o `test -f 'widgets/icons.cxx' || echo '$(srcdir)/'`widgets/icons.cxx widgets/flamp-icons.obj: widgets/icons.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT widgets/flamp-icons.obj -MD -MP -MF widgets/$(DEPDIR)/flamp-icons.Tpo -c -o widgets/flamp-icons.obj `if test -f 'widgets/icons.cxx'; then $(CYGPATH_W) 'widgets/icons.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/icons.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flamp-icons.Tpo widgets/$(DEPDIR)/flamp-icons.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/icons.cxx' object='widgets/flamp-icons.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flamp-icons.obj `if test -f 'widgets/icons.cxx'; then $(CYGPATH_W) 'widgets/icons.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/icons.cxx'; fi` widgets/flamp-pixmaps.o: widgets/pixmaps.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT widgets/flamp-pixmaps.o -MD -MP -MF widgets/$(DEPDIR)/flamp-pixmaps.Tpo -c -o widgets/flamp-pixmaps.o `test -f 'widgets/pixmaps.cxx' || echo '$(srcdir)/'`widgets/pixmaps.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flamp-pixmaps.Tpo widgets/$(DEPDIR)/flamp-pixmaps.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/pixmaps.cxx' object='widgets/flamp-pixmaps.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flamp-pixmaps.o `test -f 'widgets/pixmaps.cxx' || echo '$(srcdir)/'`widgets/pixmaps.cxx widgets/flamp-pixmaps.obj: widgets/pixmaps.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT widgets/flamp-pixmaps.obj -MD -MP -MF widgets/$(DEPDIR)/flamp-pixmaps.Tpo -c -o widgets/flamp-pixmaps.obj `if test -f 'widgets/pixmaps.cxx'; then $(CYGPATH_W) 'widgets/pixmaps.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/pixmaps.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flamp-pixmaps.Tpo widgets/$(DEPDIR)/flamp-pixmaps.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/pixmaps.cxx' object='widgets/flamp-pixmaps.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flamp-pixmaps.obj `if test -f 'widgets/pixmaps.cxx'; then $(CYGPATH_W) 'widgets/pixmaps.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/pixmaps.cxx'; fi` widgets/flamp-pixmaps_tango.o: widgets/pixmaps_tango.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT widgets/flamp-pixmaps_tango.o -MD -MP -MF widgets/$(DEPDIR)/flamp-pixmaps_tango.Tpo -c -o widgets/flamp-pixmaps_tango.o `test -f 'widgets/pixmaps_tango.cxx' || echo '$(srcdir)/'`widgets/pixmaps_tango.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flamp-pixmaps_tango.Tpo widgets/$(DEPDIR)/flamp-pixmaps_tango.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/pixmaps_tango.cxx' object='widgets/flamp-pixmaps_tango.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flamp-pixmaps_tango.o `test -f 'widgets/pixmaps_tango.cxx' || echo '$(srcdir)/'`widgets/pixmaps_tango.cxx widgets/flamp-pixmaps_tango.obj: widgets/pixmaps_tango.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT widgets/flamp-pixmaps_tango.obj -MD -MP -MF widgets/$(DEPDIR)/flamp-pixmaps_tango.Tpo -c -o widgets/flamp-pixmaps_tango.obj `if test -f 'widgets/pixmaps_tango.cxx'; then $(CYGPATH_W) 'widgets/pixmaps_tango.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/pixmaps_tango.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flamp-pixmaps_tango.Tpo widgets/$(DEPDIR)/flamp-pixmaps_tango.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/pixmaps_tango.cxx' object='widgets/flamp-pixmaps_tango.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flamp-pixmaps_tango.obj `if test -f 'widgets/pixmaps_tango.cxx'; then $(CYGPATH_W) 'widgets/pixmaps_tango.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/pixmaps_tango.cxx'; fi` widgets/flamp-font_browser.o: widgets/font_browser.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT widgets/flamp-font_browser.o -MD -MP -MF widgets/$(DEPDIR)/flamp-font_browser.Tpo -c -o widgets/flamp-font_browser.o `test -f 'widgets/font_browser.cxx' || echo '$(srcdir)/'`widgets/font_browser.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flamp-font_browser.Tpo widgets/$(DEPDIR)/flamp-font_browser.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/font_browser.cxx' object='widgets/flamp-font_browser.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flamp-font_browser.o `test -f 'widgets/font_browser.cxx' || echo '$(srcdir)/'`widgets/font_browser.cxx widgets/flamp-font_browser.obj: widgets/font_browser.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT widgets/flamp-font_browser.obj -MD -MP -MF widgets/$(DEPDIR)/flamp-font_browser.Tpo -c -o widgets/flamp-font_browser.obj `if test -f 'widgets/font_browser.cxx'; then $(CYGPATH_W) 'widgets/font_browser.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/font_browser.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flamp-font_browser.Tpo widgets/$(DEPDIR)/flamp-font_browser.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/font_browser.cxx' object='widgets/flamp-font_browser.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flamp-font_browser.obj `if test -f 'widgets/font_browser.cxx'; then $(CYGPATH_W) 'widgets/font_browser.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/font_browser.cxx'; fi` widgets/flamp-hamcast_group.o: widgets/hamcast_group.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT widgets/flamp-hamcast_group.o -MD -MP -MF widgets/$(DEPDIR)/flamp-hamcast_group.Tpo -c -o widgets/flamp-hamcast_group.o `test -f 'widgets/hamcast_group.cxx' || echo '$(srcdir)/'`widgets/hamcast_group.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flamp-hamcast_group.Tpo widgets/$(DEPDIR)/flamp-hamcast_group.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/hamcast_group.cxx' object='widgets/flamp-hamcast_group.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flamp-hamcast_group.o `test -f 'widgets/hamcast_group.cxx' || echo '$(srcdir)/'`widgets/hamcast_group.cxx widgets/flamp-hamcast_group.obj: widgets/hamcast_group.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -MT widgets/flamp-hamcast_group.obj -MD -MP -MF widgets/$(DEPDIR)/flamp-hamcast_group.Tpo -c -o widgets/flamp-hamcast_group.obj `if test -f 'widgets/hamcast_group.cxx'; then $(CYGPATH_W) 'widgets/hamcast_group.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/hamcast_group.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flamp-hamcast_group.Tpo widgets/$(DEPDIR)/flamp-hamcast_group.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/hamcast_group.cxx' object='widgets/flamp-hamcast_group.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flamp_CPPFLAGS) $(CPPFLAGS) $(flamp_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flamp-hamcast_group.obj `if test -f 'widgets/hamcast_group.cxx'; then $(CYGPATH_W) 'widgets/hamcast_group.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/hamcast_group.cxx'; fi` .cxx.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cxx.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(PROGRAMS) config.h installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -rm -f lzma/$(DEPDIR)/$(am__dirstamp) -rm -f lzma/$(am__dirstamp) -rm -f server/$(DEPDIR)/$(am__dirstamp) -rm -f server/$(am__dirstamp) -rm -f ui/$(DEPDIR)/$(am__dirstamp) -rm -f ui/$(am__dirstamp) -rm -f utils/$(DEPDIR)/$(am__dirstamp) -rm -f utils/$(am__dirstamp) -rm -f widgets/$(DEPDIR)/$(am__dirstamp) -rm -f widgets/$(am__dirstamp) -rm -f xmlrpcpp/$(DEPDIR)/$(am__dirstamp) -rm -f xmlrpcpp/$(am__dirstamp) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-local mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/flamp-flamp.Po -rm -f ./$(DEPDIR)/flamp-flamp_dialog.Po -rm -f lzma/$(DEPDIR)/flamp-Alloc.Po -rm -f lzma/$(DEPDIR)/flamp-LzFind.Po -rm -f lzma/$(DEPDIR)/flamp-LzmaDec.Po -rm -f lzma/$(DEPDIR)/flamp-LzmaEnc.Po -rm -f lzma/$(DEPDIR)/flamp-LzmaLib.Po -rm -f server/$(DEPDIR)/flamp-xml_server.Po -rm -f ui/$(DEPDIR)/flamp-dialogs.Po -rm -f utils/$(DEPDIR)/flamp-amp.Po -rm -f utils/$(DEPDIR)/flamp-base128.Po -rm -f utils/$(DEPDIR)/flamp-base256.Po -rm -f utils/$(DEPDIR)/flamp-base64.Po -rm -f utils/$(DEPDIR)/flamp-circular_queue.Po -rm -f utils/$(DEPDIR)/flamp-debug.Po -rm -f utils/$(DEPDIR)/flamp-file_io.Po -rm -f utils/$(DEPDIR)/flamp-getsysinfo.Po -rm -f utils/$(DEPDIR)/flamp-global_amp.Po -rm -f utils/$(DEPDIR)/flamp-mingw.Po -rm -f utils/$(DEPDIR)/flamp-run_scripts.Po -rm -f utils/$(DEPDIR)/flamp-script_parsing.Po -rm -f utils/$(DEPDIR)/flamp-socket.Po -rm -f utils/$(DEPDIR)/flamp-status.Po -rm -f utils/$(DEPDIR)/flamp-tagSearch.Po -rm -f utils/$(DEPDIR)/flamp-time_table.Po -rm -f utils/$(DEPDIR)/flamp-timeops.Po -rm -f utils/$(DEPDIR)/flamp-transmit_camp.Po -rm -f utils/$(DEPDIR)/flamp-util.Po -rm -f utils/$(DEPDIR)/flamp-xml_io.Po -rm -f utils/$(DEPDIR)/flamp-ztimer.Po -rm -f widgets/$(DEPDIR)/flamp-FTextView.Po -rm -f widgets/$(DEPDIR)/flamp-Fl_BlockMap.Po -rm -f widgets/$(DEPDIR)/flamp-Fl_Text_Buffer_mod.Po -rm -f widgets/$(DEPDIR)/flamp-Fl_Text_Display_mod.Po -rm -f widgets/$(DEPDIR)/flamp-Fl_Text_Editor_mod.Po -rm -f widgets/$(DEPDIR)/flamp-calendar.Po -rm -f widgets/$(DEPDIR)/flamp-combo.Po -rm -f widgets/$(DEPDIR)/flamp-date.Po -rm -f widgets/$(DEPDIR)/flamp-fileselect.Po -rm -f widgets/$(DEPDIR)/flamp-flinput2.Po -rm -f widgets/$(DEPDIR)/flamp-flslider2.Po -rm -f widgets/$(DEPDIR)/flamp-font_browser.Po -rm -f widgets/$(DEPDIR)/flamp-hamcast_group.Po -rm -f widgets/$(DEPDIR)/flamp-icons.Po -rm -f widgets/$(DEPDIR)/flamp-missing_strings.Po -rm -f widgets/$(DEPDIR)/flamp-pixmaps.Po -rm -f widgets/$(DEPDIR)/flamp-pixmaps_tango.Po -rm -f xmlrpcpp/$(DEPDIR)/flamp-XmlRpcClient.Po -rm -f xmlrpcpp/$(DEPDIR)/flamp-XmlRpcDispatch.Po -rm -f xmlrpcpp/$(DEPDIR)/flamp-XmlRpcMutex.Po -rm -f xmlrpcpp/$(DEPDIR)/flamp-XmlRpcServer.Po -rm -f xmlrpcpp/$(DEPDIR)/flamp-XmlRpcServerConnection.Po -rm -f xmlrpcpp/$(DEPDIR)/flamp-XmlRpcServerMethod.Po -rm -f xmlrpcpp/$(DEPDIR)/flamp-XmlRpcSocket.Po -rm -f xmlrpcpp/$(DEPDIR)/flamp-XmlRpcSource.Po -rm -f xmlrpcpp/$(DEPDIR)/flamp-XmlRpcUtil.Po -rm -f xmlrpcpp/$(DEPDIR)/flamp-XmlRpcValue.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-data-local install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: installcheck-binPROGRAMS maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/flamp-flamp.Po -rm -f ./$(DEPDIR)/flamp-flamp_dialog.Po -rm -f lzma/$(DEPDIR)/flamp-Alloc.Po -rm -f lzma/$(DEPDIR)/flamp-LzFind.Po -rm -f lzma/$(DEPDIR)/flamp-LzmaDec.Po -rm -f lzma/$(DEPDIR)/flamp-LzmaEnc.Po -rm -f lzma/$(DEPDIR)/flamp-LzmaLib.Po -rm -f server/$(DEPDIR)/flamp-xml_server.Po -rm -f ui/$(DEPDIR)/flamp-dialogs.Po -rm -f utils/$(DEPDIR)/flamp-amp.Po -rm -f utils/$(DEPDIR)/flamp-base128.Po -rm -f utils/$(DEPDIR)/flamp-base256.Po -rm -f utils/$(DEPDIR)/flamp-base64.Po -rm -f utils/$(DEPDIR)/flamp-circular_queue.Po -rm -f utils/$(DEPDIR)/flamp-debug.Po -rm -f utils/$(DEPDIR)/flamp-file_io.Po -rm -f utils/$(DEPDIR)/flamp-getsysinfo.Po -rm -f utils/$(DEPDIR)/flamp-global_amp.Po -rm -f utils/$(DEPDIR)/flamp-mingw.Po -rm -f utils/$(DEPDIR)/flamp-run_scripts.Po -rm -f utils/$(DEPDIR)/flamp-script_parsing.Po -rm -f utils/$(DEPDIR)/flamp-socket.Po -rm -f utils/$(DEPDIR)/flamp-status.Po -rm -f utils/$(DEPDIR)/flamp-tagSearch.Po -rm -f utils/$(DEPDIR)/flamp-time_table.Po -rm -f utils/$(DEPDIR)/flamp-timeops.Po -rm -f utils/$(DEPDIR)/flamp-transmit_camp.Po -rm -f utils/$(DEPDIR)/flamp-util.Po -rm -f utils/$(DEPDIR)/flamp-xml_io.Po -rm -f utils/$(DEPDIR)/flamp-ztimer.Po -rm -f widgets/$(DEPDIR)/flamp-FTextView.Po -rm -f widgets/$(DEPDIR)/flamp-Fl_BlockMap.Po -rm -f widgets/$(DEPDIR)/flamp-Fl_Text_Buffer_mod.Po -rm -f widgets/$(DEPDIR)/flamp-Fl_Text_Display_mod.Po -rm -f widgets/$(DEPDIR)/flamp-Fl_Text_Editor_mod.Po -rm -f widgets/$(DEPDIR)/flamp-calendar.Po -rm -f widgets/$(DEPDIR)/flamp-combo.Po -rm -f widgets/$(DEPDIR)/flamp-date.Po -rm -f widgets/$(DEPDIR)/flamp-fileselect.Po -rm -f widgets/$(DEPDIR)/flamp-flinput2.Po -rm -f widgets/$(DEPDIR)/flamp-flslider2.Po -rm -f widgets/$(DEPDIR)/flamp-font_browser.Po -rm -f widgets/$(DEPDIR)/flamp-hamcast_group.Po -rm -f widgets/$(DEPDIR)/flamp-icons.Po -rm -f widgets/$(DEPDIR)/flamp-missing_strings.Po -rm -f widgets/$(DEPDIR)/flamp-pixmaps.Po -rm -f widgets/$(DEPDIR)/flamp-pixmaps_tango.Po -rm -f xmlrpcpp/$(DEPDIR)/flamp-XmlRpcClient.Po -rm -f xmlrpcpp/$(DEPDIR)/flamp-XmlRpcDispatch.Po -rm -f xmlrpcpp/$(DEPDIR)/flamp-XmlRpcMutex.Po -rm -f xmlrpcpp/$(DEPDIR)/flamp-XmlRpcServer.Po -rm -f xmlrpcpp/$(DEPDIR)/flamp-XmlRpcServerConnection.Po -rm -f xmlrpcpp/$(DEPDIR)/flamp-XmlRpcServerMethod.Po -rm -f xmlrpcpp/$(DEPDIR)/flamp-XmlRpcSocket.Po -rm -f xmlrpcpp/$(DEPDIR)/flamp-XmlRpcSource.Po -rm -f xmlrpcpp/$(DEPDIR)/flamp-XmlRpcUtil.Po -rm -f xmlrpcpp/$(DEPDIR)/flamp-XmlRpcValue.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-local .MAKE: all check install install-am install-exec install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-binPROGRAMS clean-generic clean-local cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ distclean-hdr distclean-tags distdir dvi dvi-am html html-am \ info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-data-local install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am \ installcheck-binPROGRAMS installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-local .PRECIOUS: Makefile .EXPORT_ALL_VARIABLES: nsisinst appbundle @HAVE_WINDRES_TRUE@@MINGW32_TRUE@.rc.o: @HAVE_WINDRES_TRUE@@MINGW32_TRUE@ $(WINDRES) -Iinclude -I../data/win32 $< -O coff $@ install-data-local: if test -f ../data/flamp.xpm; then \ $(mkinstalldirs) $(DESTDIR)/$(datadir)/pixmaps; \ $(INSTALL_DATA) ../data/flamp.xpm $(DESTDIR)/$(datadir)/pixmaps; \ fi if test -f ../data/flamp.desktop; then \ $(mkinstalldirs) $(DESTDIR)/$(datadir)/applications; \ $(INSTALL_DATA) ../data/flamp.desktop $(DESTDIR)/$(datadir)/applications; \ fi uninstall-local: rm -f $(DESTDIR)/$(datadir)/pixmaps/flamp.xpm rm -f $(DESTDIR)/$(datadir)/applications/flamp.desktop @HAVE_FLUID_TRUE@flgen: $(FL_SRC) @HAVE_FLUID_TRUE@ (cd include; \ @HAVE_FLUID_TRUE@ for f in $(FL_SRC); do \ @HAVE_FLUID_TRUE@ c=$${f%.fl}.cxx; \ @HAVE_FLUID_TRUE@ h=$${f%.fl}.h; \ @HAVE_FLUID_TRUE@ h=$${h##*/}; \ @HAVE_FLUID_TRUE@ $(FLUID) -c -o ../$$c -h $$h ../$$f; \ @HAVE_FLUID_TRUE@ done) @HAVE_NSIS_TRUE@nsisinst: $(bin_PROGRAMS) @HAVE_NSIS_TRUE@ sh ../scripts/mknsisinst.sh "../data" . @DARWIN_TRUE@appbundle: $(bin_PROGRAMS) @DARWIN_TRUE@ sh ../scripts/mkappbundle.sh "../data" . clean-local: -rm -rf $(CLEAN_LOCAL) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: flamp-2.2.12/src/config.h.in0000664000175000017500000002017214607050321012432 00000000000000/* src/config.h.in. Generated from configure.ac by autoheader. */ /* Build platform */ #undef BUILD_BUILD_PLATFORM /* Compiler */ #undef BUILD_COMPILER /* Configure arguments */ #undef BUILD_CONFIGURE_ARGS /* Build date */ #undef BUILD_DATE /* Build host */ #undef BUILD_HOST /* Host platform */ #undef BUILD_HOST_PLATFORM /* Target platform */ #undef BUILD_TARGET_PLATFORM /* Build user */ #undef BUILD_USER /* FLAMP compiler flags */ #undef FLAMP_BUILD_CXXFLAGS /* FLAMP linker flags */ #undef FLAMP_BUILD_LDFLAGS /* FLTK API major version */ #undef FLAMP_FLTK_API_MAJOR /* FLTK API minor version */ #undef FLAMP_FLTK_API_MINOR /* FLTK API patch */ #undef FLAMP_FLTK_API_PATCH /* version string */ #undef FLAMP_VERSION /* major version number */ #undef FLAMP_VERSION_MAJOR /* minor version number */ #undef FLAMP_VERSION_MINOR /* patch/alpha version string */ #undef FLAMP_VERSION_PATCH /* FLTK version */ #undef FLTK_BUILD_VERSION /* flxmlrpc version */ #undef FLXMLRPC_BUILD_VERSION /* Define to 1 if we have clock_gettime */ #undef HAVE_CLOCK_GETTIME /* Define to 0 if not using dbg::stack */ #undef HAVE_DBG_STACK /* Define to 1 if we have dlopen */ #undef HAVE_DLOPEN /* Define to 1 if you have the `getaddrinfo' function. */ #undef HAVE_GETADDRINFO /* Define to 1 if you have the `gethostbyname' function. */ #undef HAVE_GETHOSTBYNAME /* Define to 1 if we have gmtime_r */ #undef HAVE_GMTIME_R /* Define to 1 if you have the `hstrerror' function. */ #undef HAVE_HSTRERROR /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `memmove' function. */ #undef HAVE_MEMMOVE /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the header file. */ #undef HAVE_MINIX_CONFIG_H /* Define to 1 if you have the `mkdir' function. */ #undef HAVE_MKDIR /* Define to 1 if you have the `select' function. */ #undef HAVE_SELECT /* Define to 1 if we have sem_timedwait */ #undef HAVE_SEM_TIMEDWAIT /* Define to 1 if we have sem_unlink */ #undef HAVE_SEM_UNLINK /* Define to 1 if you have the `setenv' function. */ #undef HAVE_SETENV /* Define to 1 if you have the `snprintf' function. */ #undef HAVE_SNPRINTF /* Define to 1 if you have the `socket' function. */ #undef HAVE_SOCKET /* Define to 1 if you have the `socketpair' function. */ #undef HAVE_SOCKETPAIR /* Define to 1 if stdbool.h conforms to C99. */ #undef HAVE_STDBOOL_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDIO_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strcasecmp' function. */ #undef HAVE_STRCASECMP /* Define to 1 if you have the `strcasestr' function. */ #undef HAVE_STRCASESTR /* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the `strerror' function. */ #undef HAVE_STRERROR /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strlcpy' function. */ #undef HAVE_STRLCPY /* Define to 1 if you have the `strncasecmp' function. */ #undef HAVE_STRNCASECMP /* Define to 1 if you have the `strnlen' function. */ #undef HAVE_STRNLEN /* Define to 1 if you have the `strrchr' function. */ #undef HAVE_STRRCHR /* Define to 1 if you have the `strstr' function. */ #undef HAVE_STRSTR /* Define to 1 if you have the `strtol' function. */ #undef HAVE_STRTOL /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the `uname' function. */ #undef HAVE_UNAME /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the `unsetenv' function. */ #undef HAVE_UNSETENV /* Define to 1 if you have the `vsnprintf' function. */ #undef HAVE_VSNPRINTF /* Define to 1 if you have the header file. */ #undef HAVE_WCHAR_H /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if all of the C90 standard headers exist (not just the ones required in a freestanding environment). This macro is provided for backward compatibility; new code need not use it. */ #undef STDC_HEADERS /* Define to 1 if we are using flxmlrpc */ #undef USE_FLXMLRPC /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable general extensions on macOS. */ #ifndef _DARWIN_C_SOURCE # undef _DARWIN_C_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable X/Open compliant socket functions that do not require linking with -lxnet on HP-UX 11.11. */ #ifndef _HPUX_ALT_XOPEN_SOCKET_API # undef _HPUX_ALT_XOPEN_SOCKET_API #endif /* Identify the host operating system as Minix. This macro does not affect the system headers' behavior. A future release of Autoconf may stop defining this macro. */ #ifndef _MINIX # undef _MINIX #endif /* Enable general extensions on NetBSD. Enable NetBSD compatibility extensions on Minix. */ #ifndef _NETBSD_SOURCE # undef _NETBSD_SOURCE #endif /* Enable OpenBSD compatibility extensions on NetBSD. Oddly enough, this does nothing on OpenBSD. */ #ifndef _OPENBSD_SOURCE # undef _OPENBSD_SOURCE #endif /* Define to 1 if needed for POSIX-compatible behavior. */ #ifndef _POSIX_SOURCE # undef _POSIX_SOURCE #endif /* Define to 2 if needed for POSIX-compatible behavior. */ #ifndef _POSIX_1_SOURCE # undef _POSIX_1_SOURCE #endif /* Enable POSIX-compatible threading on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ #ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ # undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ #endif /* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ #ifndef __STDC_WANT_IEC_60559_BFP_EXT__ # undef __STDC_WANT_IEC_60559_BFP_EXT__ #endif /* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ #ifndef __STDC_WANT_IEC_60559_DFP_EXT__ # undef __STDC_WANT_IEC_60559_DFP_EXT__ #endif /* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ #ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ # undef __STDC_WANT_IEC_60559_FUNCS_EXT__ #endif /* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ #ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ # undef __STDC_WANT_IEC_60559_TYPES_EXT__ #endif /* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ #ifndef __STDC_WANT_LIB_EXT2__ # undef __STDC_WANT_LIB_EXT2__ #endif /* Enable extensions specified by ISO/IEC 24747:2009. */ #ifndef __STDC_WANT_MATH_SPEC_FUNCS__ # undef __STDC_WANT_MATH_SPEC_FUNCS__ #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable X/Open extensions. Define to 500 only if necessary to make mbstate_t available. */ #ifndef _XOPEN_SOURCE # undef _XOPEN_SOURCE #endif /* Define to 1 if we are using x */ #undef USE_X /* Version number of package */ #undef VERSION /* x version */ #undef X_BUILD_VERSION /* Define to 1 if we are building on cygwin or mingw */ #undef _WINDOWS /* Define to 1 if we are building on cygwin or mingw */ #undef __MINGW32__ /* Define to 1 if we are building on mingw */ #undef __WOE32__ /* Define to `unsigned int' if does not define. */ #undef size_t flamp-2.2.12/src/config.h0000664000175000017500000002233214607053767012046 00000000000000/* src/config.h. Generated from config.h.in by configure. */ /* src/config.h.in. Generated from configure.ac by autoheader. */ /* Build platform */ #define BUILD_BUILD_PLATFORM "x86_64-pc-linux-gnu" /* Compiler */ #define BUILD_COMPILER "gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04) " /* Configure arguments */ #define BUILD_CONFIGURE_ARGS "" /* Build date */ #define BUILD_DATE "Sun Apr 14 17:25:59 CDT 2024" /* Build host */ #define BUILD_HOST "tk7" /* Host platform */ #define BUILD_HOST_PLATFORM "x86_64-pc-linux-gnu" /* Target platform */ #define BUILD_TARGET_PLATFORM "x86_64-pc-linux-gnu" /* Build user */ #define BUILD_USER "dave" /* FLAMP compiler flags */ #define FLAMP_BUILD_CXXFLAGS "-I$(srcdir) -I$(srcdir)/include -I$(srcdir)/xmlrpcpp -I$(srcdir)/xmlrpcpp -I/usr/local/include -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_THREAD_SAFE -D_REENTRANT -I$(srcdir) -I$(srcdir)/include -pipe -Wall -fexceptions -O2 -ffast-math -fomit-frame-pointer -DNDEBUG" /* FLAMP linker flags */ #define FLAMP_BUILD_LDFLAGS "-L/usr/local/lib -lfltk_images -lpng -lz -ljpeg -lfltk -lXrender -lXcursor -lXfixes -lXext -lXft -lfontconfig -lXinerama -lpthread -lm -lX11 -lX11" /* FLTK API major version */ #define FLAMP_FLTK_API_MAJOR 1 /* FLTK API minor version */ #define FLAMP_FLTK_API_MINOR 3 /* FLTK API patch */ #define FLAMP_FLTK_API_PATCH 9 /* version string */ #define FLAMP_VERSION "2.2.12" /* major version number */ #define FLAMP_VERSION_MAJOR 2 /* minor version number */ #define FLAMP_VERSION_MINOR 2 /* patch/alpha version string */ #define FLAMP_VERSION_PATCH ".12" /* FLTK version */ #define FLTK_BUILD_VERSION "1.3.9" /* flxmlrpc version */ #define FLXMLRPC_BUILD_VERSION "" /* Define to 1 if we have clock_gettime */ #define HAVE_CLOCK_GETTIME 1 /* Define to 0 if not using dbg::stack */ /* #undef HAVE_DBG_STACK */ /* Define to 1 if we have dlopen */ #define HAVE_DLOPEN 1 /* Define to 1 if you have the `getaddrinfo' function. */ #define HAVE_GETADDRINFO 1 /* Define to 1 if you have the `gethostbyname' function. */ #define HAVE_GETHOSTBYNAME 1 /* Define to 1 if we have gmtime_r */ #define HAVE_GMTIME_R 1 /* Define to 1 if you have the `hstrerror' function. */ #define HAVE_HSTRERROR 1 /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 /* Define to 1 if you have the `memmove' function. */ #define HAVE_MEMMOVE 1 /* Define to 1 if you have the `memset' function. */ #define HAVE_MEMSET 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_MINIX_CONFIG_H */ /* Define to 1 if you have the `mkdir' function. */ #define HAVE_MKDIR 1 /* Define to 1 if you have the `select' function. */ #define HAVE_SELECT 1 /* Define to 1 if we have sem_timedwait */ #define HAVE_SEM_TIMEDWAIT 1 /* Define to 1 if we have sem_unlink */ #define HAVE_SEM_UNLINK 1 /* Define to 1 if you have the `setenv' function. */ #define HAVE_SETENV 1 /* Define to 1 if you have the `snprintf' function. */ #define HAVE_SNPRINTF 1 /* Define to 1 if you have the `socket' function. */ #define HAVE_SOCKET 1 /* Define to 1 if you have the `socketpair' function. */ #define HAVE_SOCKETPAIR 1 /* Define to 1 if stdbool.h conforms to C99. */ #define HAVE_STDBOOL_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDIO_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 /* Define to 1 if you have the `strcasecmp' function. */ #define HAVE_STRCASECMP 1 /* Define to 1 if you have the `strcasestr' function. */ #define HAVE_STRCASESTR 1 /* Define to 1 if you have the `strchr' function. */ #define HAVE_STRCHR 1 /* Define to 1 if you have the `strdup' function. */ #define HAVE_STRDUP 1 /* Define to 1 if you have the `strerror' function. */ #define HAVE_STRERROR 1 /* Define to 1 if you have the header file. */ #define HAVE_STRINGS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 /* Define to 1 if you have the `strlcpy' function. */ /* #undef HAVE_STRLCPY */ /* Define to 1 if you have the `strncasecmp' function. */ #define HAVE_STRNCASECMP 1 /* Define to 1 if you have the `strnlen' function. */ #define HAVE_STRNLEN 1 /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 /* Define to 1 if you have the `strstr' function. */ #define HAVE_STRSTR 1 /* Define to 1 if you have the `strtol' function. */ #define HAVE_STRTOL 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_TYPES_H 1 /* Define to 1 if you have the `uname' function. */ #define HAVE_UNAME 1 /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 /* Define to 1 if you have the `unsetenv' function. */ #define HAVE_UNSETENV 1 /* Define to 1 if you have the `vsnprintf' function. */ #define HAVE_VSNPRINTF 1 /* Define to 1 if you have the header file. */ #define HAVE_WCHAR_H 1 /* Define to 1 if the system has the type `_Bool'. */ #define HAVE__BOOL 1 /* Name of package */ #define PACKAGE "flamp" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "w1hkj AT w1hkj DOT com" /* Define to the full name of this package. */ #define PACKAGE_NAME "FLAMP" /* Define to the full name and version of this package. */ #define PACKAGE_STRING "FLAMP 2.2.12" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "flamp" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ #define PACKAGE_VERSION "2.2.12" /* Define to 1 if all of the C90 standard headers exist (not just the ones required in a freestanding environment). This macro is provided for backward compatibility; new code need not use it. */ #define STDC_HEADERS 1 /* Define to 1 if we are using flxmlrpc */ #define USE_FLXMLRPC 0 /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # define _ALL_SOURCE 1 #endif /* Enable general extensions on macOS. */ #ifndef _DARWIN_C_SOURCE # define _DARWIN_C_SOURCE 1 #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # define __EXTENSIONS__ 1 #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif /* Enable X/Open compliant socket functions that do not require linking with -lxnet on HP-UX 11.11. */ #ifndef _HPUX_ALT_XOPEN_SOCKET_API # define _HPUX_ALT_XOPEN_SOCKET_API 1 #endif /* Identify the host operating system as Minix. This macro does not affect the system headers' behavior. A future release of Autoconf may stop defining this macro. */ #ifndef _MINIX /* # undef _MINIX */ #endif /* Enable general extensions on NetBSD. Enable NetBSD compatibility extensions on Minix. */ #ifndef _NETBSD_SOURCE # define _NETBSD_SOURCE 1 #endif /* Enable OpenBSD compatibility extensions on NetBSD. Oddly enough, this does nothing on OpenBSD. */ #ifndef _OPENBSD_SOURCE # define _OPENBSD_SOURCE 1 #endif /* Define to 1 if needed for POSIX-compatible behavior. */ #ifndef _POSIX_SOURCE /* # undef _POSIX_SOURCE */ #endif /* Define to 2 if needed for POSIX-compatible behavior. */ #ifndef _POSIX_1_SOURCE /* # undef _POSIX_1_SOURCE */ #endif /* Enable POSIX-compatible threading on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # define _POSIX_PTHREAD_SEMANTICS 1 #endif /* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ #ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ # define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 #endif /* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ #ifndef __STDC_WANT_IEC_60559_BFP_EXT__ # define __STDC_WANT_IEC_60559_BFP_EXT__ 1 #endif /* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ #ifndef __STDC_WANT_IEC_60559_DFP_EXT__ # define __STDC_WANT_IEC_60559_DFP_EXT__ 1 #endif /* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ #ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ # define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 #endif /* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ #ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ # define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 #endif /* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ #ifndef __STDC_WANT_LIB_EXT2__ # define __STDC_WANT_LIB_EXT2__ 1 #endif /* Enable extensions specified by ISO/IEC 24747:2009. */ #ifndef __STDC_WANT_MATH_SPEC_FUNCS__ # define __STDC_WANT_MATH_SPEC_FUNCS__ 1 #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # define _TANDEM_SOURCE 1 #endif /* Enable X/Open extensions. Define to 500 only if necessary to make mbstate_t available. */ #ifndef _XOPEN_SOURCE /* # undef _XOPEN_SOURCE */ #endif /* Define to 1 if we are using x */ #define USE_X 1 /* Version number of package */ #define VERSION "2.2.12" /* x version */ #define X_BUILD_VERSION "1.7.5" /* Define to 1 if we are building on cygwin or mingw */ /* #undef _WINDOWS */ /* Define to 1 if we are building on cygwin or mingw */ /* #undef __MINGW32__ */ /* Define to 1 if we are building on mingw */ /* #undef __WOE32__ */ /* Define to `unsigned int' if does not define. */ /* #undef size_t */ flamp-2.2.12/src/flamp.cxx0000664000175000017500000022351514605333064012246 00000000000000/** ******************************************************** * ***********************************************************/ #include "config.h" static const char *copyright[] = { " =====================================================================", "", " FLAMP " VERSION, // flamp.cxx "", " Author(s):", " Robert Stiles, KK5VD, Copyright (C) 2013, 2014, 2015", " Dave Freese, W1HKJ, Copyright (C) 2012-2015, 2023", "", " This is free software; you can redistribute it and/or modify", " it under the terms of the GNU General Public License as published by", " the Free Software Foundation; either version 3 of the License, or", " (at your option) any later version.", "", " This software is distributed in the hope that it will be useful,", " but WITHOUT ANY WARRANTY; without even the implied warranty of", " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the", " GNU General Public License for more details.", "", " You should have received a copy of the GNU General Public License", " along with this program. If not, see .", "", " =====================================================================", 0 }; #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "flamp.h" #include "amp.h" #include "flamp_dialog.h" #include "dialogs.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "flinput2.h" #include "date.h" #include "calendar.h" #include "icons.h" #include "fileselect.h" #include "file_io.h" #include "status.h" #include "pixmaps.h" #include "threads.h" #include "xml_io.h" #include "tagSearch.h" #include "time_table.h" #include "ztimer.h" #include "script_parsing.h" #include "global_amp.h" #include "transmit_camp.h" #ifdef WIN32 # include "flamprc.h" # include "compat.h" #endif #include #include #include #include #include "XmlRpcClient.h" std::string rx_buffer; std::string tx_buffer; std::string tmp_buffer; const char *sz_flmsg = ""; const char *sz_cmd = ""; const char *sz_flamp = "}FLAMP"; TagSearch *cQue; std::string testfname = "Bulletin1.txt"; bool testing = true; bool transmitting = false; bool transmit_stop = false; bool generate_time_table = false; bool event_bail_flag = false; bool do_events_flag = false; void auto_load_tx_queue(void); int blocksize = 64; int repeatNN = 1; unsigned int modem_rotation_index = 0; std::vector bc_modems; std::string g_modem; std::string g_header_modem; int g_event_driven = 0; //! @brief Command line help std::string initialization const char *options[] = { "Flamp Unique Options", "", " --help", " --version", " --time-table", " Used to generate timing tables for the various modes. Disabling ", " requires program restart.", " --confg-dir folder-path-name (including drive letter on Windows)", " Windows: C:/Documents and Settings//folder-name", " C:/Users//folder-name", " OS X: /home//folder-name", "", " Note: Enclosing \"'s must be used when the path or file name", " contains spaces.", "", " Unless the empty file NBEMS.DIR is found in the same folder as the", " flamp executable. The existence of an empty file NBEMS.DIR forces", " the flamp-dir to be a placed in the same folder as the executable", " folder and named flamp.files (.flamp on Linux / OS X)", "", " NBEMS.DIR may contain a single line specifying the absolute", " path-name of the flamp-dir. If NBEMS.DIR is not empty then", " the specified path-name takes precedence over the --flamp-dir", " command line parameter. The specified path-name must be a valid", " one for the operating system! Enclosing \"'s are not required.", "", "=======================================================================", "", " Interprocess Network/Port Commands", "", " --arq-server-address HOSTNAME", " Set the ARQ TCP server address", " The default is: 127.0.0.1", "", " --arq-server-port PORT", " Set the ARQ TCP server port", " The default is: 7322", "", " --xmlrpc-server-address HOSTNAME", " Set the XML-RPC server address", " The default is: 127.0.0.1", "", " --xmlrpc-server-port PORT", " Set the XML-RPC server port", " The default is: 7362", "", "=======================================================================", "", "Fltk User Interface options", "", " -bg\t-background [COLOR]", " -bg2\t-background2 [COLOR]", " -di\t-display [host:n.n]", " -dn\t-dnd : enable drag and drop", " -nodn\t-nodnd : disable drag and drop", " -fg\t-foreground [COLOR]", " -g\t-geometry [WxH+X+Y]", " -i\t-iconic", " -k\t-kbd : enable keyboard focus:", " -nok\t-nokbd : en/disable keyboard focus", " -na\t-name [CLASSNAME]", " -s\t-scheme [none | gtk+ | plastic]", " default = gtk+", " -ti\t-title [WINDOWTITLE]", " -to\t-tooltips : enable tooltips", " -not\t-notooltips : disable tooltips\n", 0 }; //! @brief Thread management global variables. pthread_t *xmlrpc_thread = 0; pthread_mutex_t mutex_xmlrpc = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t mutex_file_io = PTHREAD_MUTEX_INITIALIZER; int xmlrpc_errno = 0; int file_io_errno = 0; int reading_relay_data = 0; std::string NBEMS_dir = ""; std::string title = ""; std::string BaseDir = ""; std::string flampHomeDir = ""; std::string flamp_rcv_dir = ""; std::string flamp_xmt_dir = ""; std::string flamp_script_dir = ""; std::string flamp_script_default_dir = ""; std::string flamp_relay_dir = ""; std::string buffer = ""; std::string cmd_fname = ""; std::string xmt_fname = ""; std::string rx_fname = ""; void * create_tx_table(void *); double measure_tx_time(char character_to_send, unsigned int no_of_characters, double time_out_duration); char *copyTo(char *src, char *dest, int *limit, int stop_character); void * transmit_serial_relay(void *ptr); void * transmit_relay_interval(void *ptr); void check_io_mode(void *); void check_call_and_id(void *v); double time_f(void); class cAmpGlobal tx_amp; class cAmpGlobal rx_amp; // utility functions bool rx_complete = false; /** ******************************************************** * ***********************************************************/ bool isbinary(std::string s) { for (size_t n = 0; n < s.length(); n++) if ((s[n] & 0x80) == 0x80) return true; return false; } #if !defined(__APPLE__) && !defined(__WOE32__) && USE_X Pixmap flamp_icon_pixmap; #define KNAME "flamp" /** ******************************************************** * ***********************************************************/ void make_pixmap(Pixmap *xpm, const char **data) { Fl_Window w(0,0, KNAME); w.xclass(KNAME); w.show(); w.make_current(); Fl_Pixmap icon(data); int maxd = (icon.w() > icon.h()) ? icon.w() : icon.h(); *xpm = fl_create_offscreen(maxd, maxd); fl_begin_offscreen(*xpm); fl_color(FL_BACKGROUND_COLOR); fl_rectf(0, 0, maxd, maxd); icon.draw(maxd - icon.w(), maxd - icon.h()); fl_end_offscreen(); } #endif /** ******************************************************** * ***********************************************************/ void update_cAmp_changes(cAmp *amp) { if(!amp) { int n = tx_queue->value(); if(n < 1) return; amp = tx_amp.index2amp(n); if(!amp) return; } bool compression = progStatus.use_compression; bool unproto = progStatus.enable_tx_unproto; int block_size = progStatus.blocksize; int encoder_index = progStatus.encoder; int repeat = progStatus.repeat_header; int repeat_header = progStatus.repeatNN; std::string callto; std::string blocks; std::string descrip; std::string encoder_string; std::string my_call; std::string my_info; std::string tosend; callto.assign(txt_tx_send_to->value()); blocks.assign(txt_tx_selected_blocks->value()); descrip.assign(txt_tx_descrip->value()); encoder_string.assign(progStatus.encoder_string); my_call.assign(progStatus.my_call); my_info.assign(progStatus.my_info); amp->callto(callto); amp->compress(compression); amp->my_call(my_call); amp->my_info(my_info); amp->tx_base_conv_index(encoder_index); amp->tx_base_conv_str(encoder_string); amp->unproto(unproto); amp->unproto_markers(progStatus.enable_unproto_markers); amp->xmt_blocksize(block_size); amp->xmt_descrip(descrip); amp->xmt_tosend(blocks); amp->repeat(repeat); amp->header_repeat(repeat_header); amp->xmt_modem(g_modem); amp->update_required(true); amp->amp_update(); amp->file_hash(); } /** ******************************************************** * ***********************************************************/ void amp_mark_all_for_update(void) { int index = 0; int count = 0; cAmp *amp = (cAmp *)0; count = tx_amp.size(); for(index = 0; index < count; index++) { amp = tx_amp.index2amp(index + 1); if(amp) amp->update_required(true); } } /** ******************************************************** * ***********************************************************/ void amp_update_all(void) { int index = 0; int count = 0; cAmp *amp = (cAmp *)0; int block_size = progStatus.blocksize; int repeat_header = progStatus.repeat_header; int repeatNN = progStatus.repeatNN; std::string my_call; std::string my_info; my_call.assign(progStatus.my_call); my_info.assign(progStatus.my_info); count = tx_amp.size(); for(index = 0; index < count; index++) { amp = tx_amp.index2amp(index + 1); if(amp) { amp->my_call(my_call); amp->my_info(my_info); amp->xmt_blocksize(block_size); amp->repeat(repeatNN); amp->header_repeat(repeat_header); amp->xmt_modem(g_modem); amp->update_required(true); amp->amp_update(); } else break; } } #if 0 /** ******************************************************** * ***********************************************************/ void amp_update(cAmp *amp) { std::string temp; if(amp->update_required()) { temp.clear(); temp.assign(amp->xmt_buffer()); if(!amp->unproto()) { compress_maybe(temp, amp->tx_base_conv_index(), (amp->compress() | amp->forced_compress())); amp->xmt_data(temp); } tx_buffer = amp->xmt_data(); amp->file_hash(); estimate(amp, true); amp->update_required(false); } } #endif // 0 /** ******************************************************** * ***********************************************************/ void clear_tx_panel(void) { txt_tx_send_to->value("QST"); txt_tx_filename->value(""); txt_tx_filename->value(""); txt_tx_descrip->value(""); txt_tx_selected_blocks->value(""); txt_tx_numblocks->value(""); txt_transfer_size_time->value(""); btn_enable_tx_unproto->value(false); unproto_widgets(0); } #if 0 /** ******************************************************** * ***********************************************************/ void update_tx_panel(cAmp *amp) { if(!amp) { int n = tx_queue->value(); if(n < 1) return; amp = tx_amp.index2amp(n); if(!amp) return; } amp->my_call(progStatus.my_call); amp->my_info(progStatus.my_info); amp->xmt_blocksize(progStatus.blocksize); std::string fn = amp->xmt_fname(); std::string ds = amp->xmt_descrip(); std::string ns = amp->xmt_numblocks(); std::string ts = amp->xmt_tosend(); std::string ct = amp->callto(); txt_tx_filename->value(fn.c_str()); txt_tx_descrip->value(ds.c_str()); txt_tx_selected_blocks->value(ts.c_str()); txt_tx_send_to->value(ct.c_str()); progStatus.enable_tx_unproto = amp->unproto(); btn_enable_tx_unproto->value(progStatus.enable_tx_unproto); progStatus.use_compression = amp->compress(); btn_use_compression->value(progStatus.use_compression); progStatus.encoder = amp->tx_base_conv_index(); encoders->index(progStatus.encoder - 1); std::string temp; if(amp->update_required()) { temp.clear(); temp.assign(amp->xmt_buffer()); if(progStatus.enable_tx_unproto == false) { compress_maybe(temp, amp->tx_base_conv_index(), (amp->compress() | amp->forced_compress())); amp->xmt_data(temp); } else { amp->unproto_markers(progStatus.enable_unproto_markers); } tx_buffer = amp->xmt_data(); amp->file_hash(); } estimate(amp, true); unproto_widgets(amp); if(progStatus.enable_tx_unproto == true) { txt_tx_numblocks->value("1"); } else { txt_tx_numblocks->value(amp->xmt_numblocks().c_str()); } } #endif // 0 void update_tx_panel(cAmp *amp) { if(!amp) { int n = tx_queue->value(); if(n < 1) return; amp = tx_amp.index2amp(n); if(!amp) return; } amp->my_call(progStatus.my_call); amp->my_info(progStatus.my_info); amp->xmt_blocksize(progStatus.blocksize); amp->repeat(progStatus.repeatNN); amp->header_repeat(progStatus.repeat_header); amp->xmt_modem(g_modem); progStatus.enable_tx_unproto = amp->unproto(); btn_enable_tx_unproto->value(progStatus.enable_tx_unproto); progStatus.use_compression = amp->compress(); btn_use_compression->value(progStatus.use_compression); progStatus.encoder = amp->tx_base_conv_index(); encoders->index(progStatus.encoder - 1); amp->amp_update(); estimate(amp, true); std::string fn = amp->xmt_fname(); std::string ds = amp->xmt_descrip(); std::string ns = amp->xmt_numblocks(); std::string ts = amp->xmt_tosend(); std::string ct = amp->callto(); txt_tx_filename->value(fn.c_str()); txt_tx_descrip->value(ds.c_str()); txt_tx_selected_blocks->value(ts.c_str()); txt_tx_send_to->value(ct.c_str()); if(progStatus.enable_tx_unproto == true) { txt_tx_numblocks->value("1"); } else { txt_tx_numblocks->value(amp->xmt_numblocks().c_str()); } unproto_widgets(amp); } /** ******************************************************** * ***********************************************************/ void show_selected_xmt(cAmp *amp) { int index = 0; int count = tx_queue->size(); cAmp *tmp = (cAmp *)0; for(index = 0; index < count; index++) { tmp = tx_amp.index2amp(index + 1); if(tmp == amp) { show_selected_xmt(index); break; } } } /** ******************************************************** * ***********************************************************/ void show_selected_xmt(int n) { cAmp * amp = (cAmp *)0; if (!n) { n = tx_queue->value(); if(n == 0) n = tx_queue->size(); } if(n > tx_queue->size()) return; if(n < 1) { amp = (cAmp *)0; clear_tx_panel(); } else { amp = tx_amp.index2amp(n); tx_queue->select(n); update_tx_panel(amp); tx_amp.set(amp); } } /** ******************************************************** * ***********************************************************/ void show_current_selected_file(void *ptr) { int index = 0; if(ptr) { index = *(int *)ptr; index++; } if(index < 1) return ; if(index > tx_queue->size()) return ; show_selected_xmt(index); } /** ******************************************************** * ***********************************************************/ bool assign_bc_modem_list(void) { int count = 0; bc_modems.clear(); if(progStatus.hamcast_mode_enable_1) { bc_modems.push_back(cbo_hamcast_mode_selection_1->value()); count++; } if(progStatus.hamcast_mode_enable_2) { bc_modems.push_back(cbo_hamcast_mode_selection_2->value()); count++; } if(progStatus.hamcast_mode_enable_3) { bc_modems.push_back(cbo_hamcast_mode_selection_3->value()); count++; } if(progStatus.hamcast_mode_enable_4) { bc_modems.push_back(cbo_hamcast_mode_selection_4->value()); count++; } if(count) { return true; } return false; } /** ******************************************************** * ***********************************************************/ int default_handler(int event) { if (event != FL_SHORTCUT) return 0; else if (Fl::event_ctrl()) { Fl_Widget* w = Fl::focus(); return w->handle(FL_KEYBOARD); } return 0; } /** ******************************************************** * ***********************************************************/ void checkdirectories(void) { struct DIRS { std::string& dir; const char* suffix; void (*new_dir_func)(void); }; DIRS NBEMS_dirs[] = { { NBEMS_dir, 0, 0 }, { flampHomeDir, "FLAMP", 0 }, { flamp_rcv_dir, "FLAMP/rx", 0 }, { flamp_xmt_dir, "FLAMP/tx", 0 }, { flamp_script_dir, "FLAMP/scripts", 0 }, { flamp_relay_dir, "FLAMP/relay", 0 } }; int r; for (size_t i = 0; i < sizeof(NBEMS_dirs)/sizeof(*NBEMS_dirs); i++) { if (NBEMS_dirs[i].suffix) NBEMS_dirs[i].dir.assign(NBEMS_dir).append(NBEMS_dirs[i].suffix).append("/"); if ((r = mkdir(NBEMS_dirs[i].dir.c_str(), 0777)) == -1 && errno != EEXIST) { std::cerr << _("Could not make directory") << ' ' << NBEMS_dirs[i].dir << ": " << strerror(errno) << '\n'; clean_shutdown(); } else if (r == 0 && NBEMS_dirs[i].new_dir_func) NBEMS_dirs[i].new_dir_func(); } flamp_script_default_dir.assign(flamp_script_dir); } /** ******************************************************** * ***********************************************************/ void addfile(ScriptParsing *sp, SCRIPT_COMMANDS *sc) { std::string xmtfname; bool useCompression = sp->comp(); bool proto = sp->proto(); std::string desc; xmtfname.assign(sp->file()); xmt_fname = xmtfname; std::string xmt_fname2 = xmtfname; desc.assign(sp->desc()); int use_comp_on_file = 0; int use_forced_comp_on_file = 0; FILE *dfile = fopen(xmt_fname.c_str(), "rb"); if (!dfile) { LOG_ERROR("could not open read/binary %s", xmt_fname.c_str()); exit (1); } fseek(dfile, 0, SEEK_END); size_t fsize = ftell(dfile); if (fsize <= 0) { LOG_ERROR("%s", "fsize error"); return; } fseek(dfile, 0, SEEK_SET); tx_buffer.resize(fsize); size_t r = fread((void *)tx_buffer.c_str(), 1, fsize, dfile); if (r != fsize) { LOG_ERROR("%s", "read error"); return; } fclose(dfile); if(proto) { if(useCompression) use_comp_on_file = 1; else use_comp_on_file = 0; if (isbinary(tx_buffer) && !useCompression) { use_comp_on_file = 1; } // Looking for command/control std::strings. Force compression if found. if(tx_buffer.find(sz_flmsg) != std::string::npos) { use_forced_comp_on_file = 1; } if(tx_buffer.find(sz_cmd) != std::string::npos) { use_forced_comp_on_file = 1; } if(tx_buffer.find(sz_flamp) != std::string::npos) { use_forced_comp_on_file = 1; } } cAmp *nu = new cAmp(tx_buffer, fl_filename_name(xmt_fname.c_str())); nu->xmt_full_path_fname(xmt_fname2); nu->amp_type(TX_AMP); if(sp->call_to().empty()) nu->callto("QST"); else nu->callto(sp->call_to().c_str()); if(desc.size()) nu->xmt_descrip(desc); else nu->xmt_descrip(""); if(proto) nu->unproto(false); else nu->unproto(true); if(use_comp_on_file) { nu->compress(true); } if(use_forced_comp_on_file) { nu->forced_compress(true); } switch(sp->base()) { default: case 64: nu->tx_base_conv_index(BASE64); nu->tx_base_conv_str("base64"); break; case 128: nu->tx_base_conv_index(BASE128); nu->tx_base_conv_str("base128"); break; case 256: nu->tx_base_conv_index(BASE256); nu->tx_base_conv_str("base256"); break; } nu->unproto_markers(progStatus.enable_unproto_markers); nu->xmt_blocksize(progStatus.blocksize); nu->repeat(progStatus.repeatNN); nu->header_repeat(progStatus.repeat_header); nu->my_call(progStatus.my_call); nu->my_info(progStatus.my_info); nu->update_required(true); nu->xmt_modem(g_modem); nu->amp_update(); estimate(nu, false); tx_amp.add(nu); tx_queue->add(xmt_fname.c_str()); LOG_INFO("File added to transmit queue: %s", xmtfname.c_str()); } /** ******************************************************** * ***********************************************************/ void addfile(std::string xmtfname, void *rx, bool useCompression, \ char *desc = (char *)0, char *callto = (char *)0) { xmt_fname = xmtfname; std::string xmt_fname2 = xmtfname; cAmp *rAmp = (cAmp *) rx; int use_comp_on_file = 0; int use_forced_comp_on_file = 0; if(rx != NULL && !rAmp->rx_completed()) { fl_alert2("Only completed files can be transfered"); return; } FILE *dfile = fopen(xmt_fname.c_str(), "rb"); if (!dfile) { LOG_ERROR("could not open read/binary %s", xmt_fname.c_str()); exit (1); } fseek(dfile, 0, SEEK_END); size_t fsize = ftell(dfile); if (fsize <= 0) { LOG_ERROR("%s", "fsize error"); return; } fseek(dfile, 0, SEEK_SET); tx_buffer.resize(fsize); size_t r = fread((void *)tx_buffer.c_str(), 1, fsize, dfile); if (r != fsize) { LOG_ERROR("%s", "read error"); return; } fclose(dfile); if(useCompression) use_comp_on_file = 1; else use_comp_on_file = 0; txt_tx_filename->value(xmt_fname.c_str()); if (isbinary(tx_buffer) && !progStatus.use_compression) { use_comp_on_file = 1; } // Looking for command/control std::strings. Force compression if found. if(tx_buffer.find(sz_flmsg) != std::string::npos) { use_forced_comp_on_file = 1; } if(tx_buffer.find(sz_cmd) != std::string::npos) { use_forced_comp_on_file = 1; } if(tx_buffer.find(sz_flamp) != std::string::npos) { use_forced_comp_on_file = 1; } if(use_comp_on_file) fl_alert2("Suggest using compression on this file"); cAmp *nu = new cAmp(tx_buffer, fl_filename_name(xmt_fname.c_str())); nu->amp_type(TX_AMP); nu->xmt_full_path_fname(xmt_fname2); if(callto) { nu->callto(callto); } else { nu->callto("QST"); } if(desc) { nu->xmt_descrip(desc); } else { nu->xmt_descrip(""); } if(use_comp_on_file) { nu->compress(true); encoders->index(BASE64 - 1); } if(use_forced_comp_on_file) { nu->forced_compress(true); encoders->index(BASE64 - 1); } nu->tx_base_conv_index(encoders->index() + 1); nu->tx_base_conv_str(encoders->value()); nu->xmt_blocksize(progStatus.blocksize); nu->unproto_markers(progStatus.enable_unproto_markers); nu->my_call(progStatus.my_call); nu->my_info(progStatus.my_info); nu->repeat(progStatus.repeatNN); nu->header_repeat(progStatus.repeat_header); nu->xmt_modem(g_modem); nu->update_required(true); nu->amp_update(); nu->file_hash(); LOG_INFO("File added to transmit queue: %s", xmtfname.c_str()); if(rx != NULL) { cAmp *rAmp = (cAmp *) rx; int xfrBlockSize = rAmp->rx_blocksize_int(); xfrBlockSize = valid_block_size(xfrBlockSize); cnt_blocksize->value(xfrBlockSize); txt_tx_descrip->value(txt_rx_descrip->value()); nu->xmt_descrip(txt_rx_descrip->value()); nu->tx_blocksize(xfrBlockSize); progStatus.blocksize = xfrBlockSize; txt_tx_selected_blocks->value(""); } nu->update_required(true); estimate(nu, false); tx_amp.add(nu); tx_amp.set(nu); tx_queue->add(xmt_fname.c_str()); show_selected_xmt(tx_amp.amp2index(nu)); } /** ******************************************************** * ***********************************************************/ int valid_block_size(int value) { value = ((value / CNT_BLOCK_SIZE_STEP_RATE) * CNT_BLOCK_SIZE_STEP_RATE); if(value < CNT_BLOCK_SIZE_MINIMUM) value = CNT_BLOCK_SIZE_MINIMUM; if(value > CNT_BLOCK_SIZE_MAXIMUM) value = CNT_BLOCK_SIZE_MAXIMUM; return value; } /** ******************************************************** * ***********************************************************/ void replace_add_queue_item(char *filename, bool compFlag, char *desc = (char *)0, char *callto = (char *)0) { int count = 0; int i = 0; cAmp *tx = (cAmp *)0; char *cPtr = (char *)0; bool compress = false; std::string fn; std::string _callto; std::string _desc; if(!filename) { LOG_DEBUG("filename parameter null"); return; } count = strnlen(filename, FILENAME_MAX); if(count < 1) { LOG_DEBUG("No file name in variable."); return; } FILE *fd = fopen(filename, "r"); if(!fd) { LOG_INFO("File %s not Found", filename); return; } fseek(fd, 0, SEEK_END); size_t fsize = ftell(fd); fclose(fd); if (fsize < 1) { LOG_INFO("File %s contains not data", filename); return; } fn.clear(); _callto.clear(); _desc.clear(); count = tx_amp.size(); for(i = 1; i <= count; i++) { tx = tx_amp.index2amp(i); if(tx) { cPtr = (char *) tx->xmt_full_path_fname().c_str(); if(strncmp(filename, cPtr, FILENAME_MAX) == 0) { if(!tx->xmt_file_modified()) return; compress = tx->compress(); _desc.assign(tx->xmt_descrip()); _callto.assign(tx->callto()); LOG_INFO("File removed from transmit queue: %s", cPtr); tx_amp.set(tx); tx_removefile(false); break; } } } if(compFlag) compress = true; fn.assign(filename); if(!_desc.empty()) desc = (char *) _desc.c_str(); if(!_callto.empty()) callto = (char *) _callto.c_str(); addfile(fn, 0, compress, desc, callto); } /** ******************************************************** * ***********************************************************/ void auto_load_tx_queue_from_tx_directory(void) { char *eMsg = (char *) "TX Queue access in progress, Auto load aborted"; char *filepath = (char *)0; struct dirent **list = 0; int count = 0; int index = 0; if(active_data_io == true) { LOG_INFO("%s", eMsg); return; } if(flamp_xmt_dir.size() < 1) return; count = fl_filename_list(flamp_xmt_dir.c_str(), &list); if (!count) { LOG_INFO("%s directoy not found or empty", flamp_xmt_dir.c_str()); fl_filename_free_list(&list, count); return; } filepath = new char[FILENAME_MAX+1]; if(!filepath) { LOG_ERROR("Internal memory allocation Error"); fl_filename_free_list(&list, count); return; } struct stat stat_buf; for(index = 0; index < count; index++) { memset(filepath, 0, FILENAME_MAX + 1); strncpy(filepath, flamp_xmt_dir.c_str(), FILENAME_MAX); strncat(filepath, list[index]->d_name, FILENAME_MAX); if(stat((const char *) filepath, &stat_buf)) continue; if(stat_buf.st_mode & S_IFREG) replace_add_queue_item(filepath, 0, 0); } delete[] filepath; fl_filename_free_list(&list, count); } /** ******************************************************** * ***********************************************************/ char *copyTo(char *src, char *dest, int *limit, int stop_character) { int count = 0; int index = 0; int noOfCharsCopied = 0; char *cPtr = (char *)0; char *dPtr = (char *)0; if(!src || !dest || !limit) return (char *)0; cPtr = src; dPtr = dest; count = *limit; for(index = 0; index < count; index++) { if(*cPtr == '\0') break; if(*cPtr == '\r') break; if(*cPtr == '\n') break; if(*cPtr == stop_character) break; *dPtr++ = *cPtr++; noOfCharsCopied++; } if(noOfCharsCopied) { if(count >= noOfCharsCopied) count -= noOfCharsCopied; else count = 0; } if(count > 0) cPtr = &src[noOfCharsCopied + 1]; else cPtr = (char *)0; dest[noOfCharsCopied] = 0; *limit = count; return cPtr; } /** ******************************************************** * ***********************************************************/ void auto_load_tx_queue_from_list(void) { char *line = (char *) 0; char *bname = (char *) 0; char *path = (char *) 0; char *srcpath = (char *) 0; char *filepath = (char *) 0; char *desc = (char *) 0; char *comp = (char *) 0; char *cPtr = (char *) 0; char *eMsg = (char *) "Memory Allocation Error"; char *eMsg2 = (char *) "First line in Queue List must be "; char *eMsg3 = (char *) "TX Queue access in progress, Auto load aborted"; char *QueueTag = (char *) "FLAMPTXQUEUE"; int size = 0; int i = 0; int qTagSize = 0; FILE *fd = (FILE *)0; if(active_data_io == true) { LOG_INFO("%s", eMsg3); return; } if(progStatus.auto_load_queue_path.size() < 1) { LOG_INFO("Auto Queue file name/path not set"); return; } srcpath = new char[FILENAME_MAX]; if(!srcpath) { LOG_ERROR("%s", eMsg); goto EXIT_AUTO_LOAD; } memset(srcpath, 0, FILENAME_MAX); strncpy(srcpath, progStatus.auto_load_queue_path.c_str(), FILENAME_MAX - 1); size = strnlen(srcpath, FILENAME_MAX); for(i = 0; i < size; i++) if(srcpath[i] == '\\') srcpath[i] = '/'; fd = fopen(srcpath, "r"); if(!fd) { LOG_INFO("Auto Queue file name/path not found (%s)", srcpath); goto EXIT_AUTO_LOAD; } bname = new char[FILENAME_MAX]; if(!bname) { LOG_ERROR("%s", eMsg); goto EXIT_AUTO_LOAD; } path = new char[FILENAME_MAX]; if(!path) { LOG_ERROR("%s", eMsg); goto EXIT_AUTO_LOAD; } filepath = new char[FILENAME_MAX]; if(!filepath) { LOG_ERROR("%s", eMsg); goto EXIT_AUTO_LOAD; } line = new char[FILENAME_MAX]; if(!line) { LOG_ERROR("%s", eMsg); goto EXIT_AUTO_LOAD; } comp = new char[FILENAME_MAX]; if(!comp) { LOG_ERROR("%s", eMsg); goto EXIT_AUTO_LOAD; } desc = new char[FILENAME_MAX]; if(!desc) { LOG_ERROR("%s", eMsg); goto EXIT_AUTO_LOAD; } memset(bname, 0, FILENAME_MAX); memset(path, 0, FILENAME_MAX); memset(filepath, 0, FILENAME_MAX); memset(comp, 0, FILENAME_MAX); memset(line, 0, FILENAME_MAX); memset(desc, 0, FILENAME_MAX); if (fgets(bname, FILENAME_MAX - 1, fd)) size = strnlen(bname, FILENAME_MAX); else size = 0; qTagSize = strnlen(QueueTag, 16); if(size < qTagSize) { LOG_INFO("%s %s", eMsg2, QueueTag); goto EXIT_AUTO_LOAD; } i = memcmp(bname, QueueTag, qTagSize - 1); if(i != 0) { LOG_INFO("%s %s", eMsg2, QueueTag); goto EXIT_AUTO_LOAD; } cPtr = (char *) dirname((char *) srcpath); strncpy(path, cPtr, FILENAME_MAX - 1); if(size < 1) strcpy(path, "./"); else if(path[size - 1] != '/') strcat(path, "/"); while(1) { if(ferror(fd)) { LOG_INFO("Error in reading file %s", bname); } if(feof(fd)) break; memset(bname, 0, FILENAME_MAX); memset(desc, 0, FILENAME_MAX); memset(comp, 0, FILENAME_MAX); memset(line, 0, FILENAME_MAX); if (fgets(line, FILENAME_MAX - 1, fd)) size = FILENAME_MAX; else size = 0; size = FILENAME_MAX; cPtr = line; cPtr = copyTo(cPtr, bname, &size, ','); cPtr = copyTo(cPtr, comp, &size, ','); copyTo(cPtr, desc, &size, '\n'); size = strnlen(bname, FILENAME_MAX); if(size < 1) { LOG_INFO("Empty Line Found in Queue List (end of list reached)"); break; } memset(filepath, 0, FILENAME_MAX); strncpy(filepath, path, FILENAME_MAX - 1); strncat(filepath, bname, FILENAME_MAX - 1); if(*comp == '1') i = 1; else i = 0; replace_add_queue_item(filepath, i, desc); } EXIT_AUTO_LOAD:; if(line) delete[] line; if(bname) delete[] bname; if(path) delete[] path; if(srcpath) delete[] srcpath; if(filepath) delete[] filepath; if(desc) delete[] desc; if(comp) delete[] comp; if(fd) fclose(fd); } /** ******************************************************** * ***********************************************************/ void auto_load_tx_queue(void) { if(progStatus.auto_load_queue == false) return; if(progStatus.load_from_tx_folder) auto_load_tx_queue_from_tx_directory(); else cb_load_tx_queue(); } /** ******************************************************** * ***********************************************************/ void readfile(void) { std::string xmtfname; xmtfname.clear(); xmtfname = flampHomeDir; const char *p = FSEL::select(_("Open file"), "*.*", xmtfname.c_str()); if (!p) return; if (strlen(p) == 0) return; xmtfname = p; addfile(xmtfname, 0, false, 0, 0); } /** ******************************************************** * ***********************************************************/ void update_rx_missing_blocks(void) { cAmp * amp = rx_amp.get_amp(); if (!amp) return; std::string tmp; tmp.assign(txt_relay_selected_blocks->value()); amp->rx_relay_blocks(tmp); } extern void redraw_rx_panel(void *); /** ******************************************************** * ***********************************************************/ void show_rx_amp(void) { cAmp * amp = rx_amp.get_amp(); if (!amp) return; std::string time_size_info; txt_rx_filename->value(amp->get_rx_fname().c_str()); txt_rx_datetime->value(amp->rx_time_stamp().c_str()); txt_rx_descrip->value(amp->rx_desc().c_str()); txt_rx_callinfo->value(amp->rx_callinfo().c_str()); txt_rx_filesize->value(amp->rx_fsize().c_str()); txt_rx_numblocks->value(amp->rx_numblocks().c_str()); txt_rx_blocksize->value(amp->rx_blocksize().c_str()); txt_rx_missing_blocks->value(amp->rx_missing().c_str()); txt_relay_selected_blocks->value(amp->rx_relay_blocks().c_str()); rx_progress->set(amp->rx_blocks(), amp->rx_nblocks()); cnt_repeat_relay_data->value(progStatus.repeat_relay_data); cnt_repeat_relay_header->value(progStatus.repeat_relay_header); estimate_relay(); if (amp->rx_completed() && txt_rx_output->buffer()->length() == 0) { std::string data = amp->rx_recvd_string(); decompress_maybe(data); if (isbinary(data)) txt_rx_output->addstr("Data appears to be binary\n\nSave and view with appropriate software"); else txt_rx_output->addstr(data.c_str()); } Fl::awake(redraw_rx_panel, (void *)0); } /** ******************************************************** * ***********************************************************/ void clear_rx_amp(void) { txt_rx_filename->value(""); txt_rx_datetime->value(""); txt_rx_descrip->value(""); txt_rx_callinfo->value(""); txt_rx_filesize->value(""); txt_rx_numblocks->value(""); txt_rx_blocksize->value(""); txt_rx_missing_blocks->value(""); txt_tx_selected_blocks->value(""); txt_rx_output->clear(); } /** ******************************************************** * ***********************************************************/ void clear_missing(void *ptr) { cAmp *amp = 0; int index = 0; int count = 0; if (transmit_stop == true) return; if(progStatus.clear_tosend_on_tx_blocks) { if(transmit_queue) { count = tx_amp.count(); for(index = 0; index < count; index++) { amp = tx_amp.index2amp(index + 1); if(!amp) continue; amp->reset_preamble_detection(); amp->xmt_tosend_clear(); } } else { amp = tx_amp.get_amp(); if(!amp) return; amp->xmt_tosend_clear(); amp->reset_preamble_detection(); } txt_tx_selected_blocks->value(""); } } /** ******************************************************** * ***********************************************************/ void show_selected_rcv(int n) { if (!n) return; rx_amp.set(n); txt_rx_output->clear(); show_rx_amp(); } /** ******************************************************** * ***********************************************************/ static const char *cancel = "Cancel"; static const char *yes = "Yes"; static const char *cont = "You are about to transmit! Continue?"; void send_missing_report(void) { if (fldigi_state != FLDIGI_ONLINE) return; std::string fname = txt_rx_filename->value(); if (fname.empty()) return; cAmp * amp = rx_amp.get_amp(); if(!amp) return; std::string report("\nDE "); report.append(txt_tx_mycall->value()); report.append("\nFile : ").append(fname).append("\n"); report.append(amp->rx_report()); report.append("DE ").append(txt_tx_mycall->value()).append(" K \n"); if (progStatus.fldigi_xmt_mode_change) { send_new_modem(cbo_modes->value()); } if(progStatus.use_tx_on_report) { int results = fl_choice("%s", cancel, yes, (const char *)0, cont); if(results < 1) return; transfer(report); } else { report.append("\n\n^r"); send_report(report); } } /** ******************************************************** * ***********************************************************/ void recv_missing_report(void) { cAmp *amp = 0; size_t count = (size_t) tx_amp.size(); for (size_t num = 0; num < count; num++) { amp = (cAmp *) tx_amp.index2amp(num + 1); if(!amp) continue; amp->tx_parse_report(); } amp = tx_amp.get_amp(); if (!amp) return; txt_tx_selected_blocks->value(amp->xmt_tosend().c_str()); } /** ******************************************************** * ***********************************************************/ void relay_missing_report(void) { cAmp *camp = 0; size_t count = (size_t) rx_amp.size(); for (size_t num = 0; num < count; num++) { camp = (cAmp *) rx_amp.index2amp(num + 1); if(!camp) continue; camp->tx_parse_report(); } camp = rx_amp.get_amp(); if (!camp) return; std::string tmp; tmp.clear(); tmp.assign(camp->rx_relay_blocks()).append(" "); tmp.append(camp->xmt_tosend()); camp->rx_relay_blocks(tmp); txt_relay_selected_blocks->value(camp->rx_relay_blocks().c_str()); } /** ******************************************************** * ***********************************************************/ void send_relay_data(void) { if (fldigi_state != FLDIGI_ONLINE) return; if(transmitting) return; cAmp *amp = rx_amp.get_amp(); if (!amp) return; if(rx_queue->value() == 0) return; int results = 0; std::string tx_string; std::string missing_blocks; static RELAY_DATA relay_data; relay_data.serial_data.clear(); relay_data.header.clear(); relay_data.data.clear(); relay_data.amp = amp; missing_blocks.clear(); missing_blocks.assign(txt_relay_selected_blocks->value()); if(progStatus.use_txrx_interval || progStatus.use_header_modem) { results = amp->tx_relay_vector(progStatus.my_call, missing_blocks); if(results < 1) return; relay_data.header = amp->xmt_vector_header(); relay_data.data = amp->xmt_vector_data(); } else { relay_data.serial_data = amp->tx_relay_string(progStatus.my_call, missing_blocks, false); } results = fl_choice("%s", cancel, yes, (const char *)0, cont); if(results < 1) return; transmit_relay(&relay_data); if(progStatus.clear_tosend_on_tx_blocks) { amp->xmt_tosend_clear(); amp->rx_relay_blocks(""); amp->reset_preamble_detection(); txt_relay_selected_blocks->value(""); } } /** ******************************************************** * ***********************************************************/ void tx_removefile(bool all) { if(active_data_io) { LOG_INFO("Unable to remove TX queue item while being accessed."); return; } int flag = 0; if(progStatus.enable_delete_warning && !all) { flag = fl_choice("Remove file %s from queue?", (const char *)"No", (const char *)"Yes", (const char *)0, txt_tx_filename->value()); if(flag < 1) return; } cAmp *amp = tx_amp.get_amp(); if (!tx_amp.size() || !tx_queue->size() || !amp) { clear_tx_panel(); return; } size_t n = 0; size_t count = tx_queue->size(); if(count != tx_amp.size()) return; if(all) { for(int i = count; i > 0; i--) { show_selected_xmt(i); tx_queue->remove(i); tx_amp.remove(i); } } else { n = tx_queue->value(); show_selected_xmt(n); tx_queue->remove(n); tx_amp.remove(n); } count = tx_queue->size(); if(count) { if(count >= n) show_selected_xmt(n); else show_selected_xmt(count); } else { clear_tx_panel(); } } /** ******************************************************** * ***********************************************************/ void save_all_rx_relay_files(void) { if(rx_amp.size()) rx_amp.save_all_relay(); } /** ******************************************************** * ***********************************************************/ void auto_rx_save_file(cAmp *_amp) { if (!_amp) return; size_t fsize = _amp->rx_size(); if(!_amp->rx_completed()) { LOG_ERROR(_("Only completed files can be Saved")); return; } if (!fsize || _amp->get_rx_fname().empty()) return; if(_amp->file_saved()) { int sel = fl_choice("File Already Saved", "Overwrite", "Cancel", (char *)0); if(sel) return; } std::string rx_directory; std::string rx_fname; char date_directory[32]; char test_char = 0; time_t rawtime; struct tm * ztime; time ( &rawtime ); memset(date_directory, 0, sizeof(date_directory)); if(progStatus.auto_rx_save_local_time) { ztime = localtime(&rawtime); snprintf(date_directory, sizeof(date_directory) - 1, "%04d_%02d_%02d", \ ztime->tm_year + 1900, ztime->tm_mon + 1, ztime->tm_mday); } else { ztime = gmtime(&rawtime); snprintf(date_directory, sizeof(date_directory) - 1, "%04d_%02d_%02d_UTC", \ ztime->tm_year + 1900, ztime->tm_mon + 1, ztime->tm_mday); } rx_directory.assign(flamp_rcv_dir); test_char = rx_directory[rx_directory.size() - 1]; if(test_char != PATH_CHAR_SEP) rx_directory.append(PATH_SEP); rx_directory.append(date_directory); mkdir((const char *) rx_directory.c_str(), 0777); test_char = rx_directory[rx_directory.size() - 1]; if(test_char != PATH_CHAR_SEP) rx_directory.append(PATH_SEP); rx_fname.assign(rx_directory); rx_fname.append(_amp->get_rx_fname()); FILE *dfile = fopen(rx_fname.c_str(), "wb"); if (!dfile) { LOG_ERROR("could not open write/binary %s", rx_fname.c_str()); return; } std::string data = _amp->rx_recvd_string(); decompress_maybe(data); size_t r = fwrite((void *)data.c_str(), 1, data.length(), dfile); if (r != data.length()) { LOG_ERROR("%s", "write error"); return; } _amp->file_saved(true); fclose(dfile); } /** ******************************************************** * ***********************************************************/ void writefile(int xfrFlag) { std::string msg; cAmp * amp = rx_amp.get_amp(); if (!amp) return; size_t fsize = amp->rx_size(); if(!amp->rx_completed()) { if(xfrFlag) msg.assign("transfered"); else msg.assign("saved"); fl_alert2("Only completed files can be %s", msg.c_str()); return; } if (!fsize || amp->get_rx_fname().empty()) return; static char rx_filename[FL_PATH_MAX]; std::string rx_directory; std::string rx_fname; rx_directory.assign(flamp_rcv_dir); rx_fname.assign(amp->get_rx_fname()); char test_char = rx_directory[rx_directory.size() - 1]; rx_fname.assign(rx_directory); if(test_char != PATH_CHAR_SEP) rx_fname.append(PATH_SEP); rx_fname.append(amp->get_rx_fname()); const char *p = FSEL::saveas(_("Save file"), "file\t*.*", rx_fname.c_str()); if (!p) return; if (strlen(p) == 0) return; memset(rx_filename, 0, FL_PATH_MAX); strncpy(rx_filename, p, FL_PATH_MAX - 1); FILE *dfile = fopen(rx_filename, "wb"); if (!dfile) { LOG_ERROR("could not open write/binary %s", rx_fname.c_str()); return; } std::string data = amp->rx_recvd_string(); decompress_maybe(data); size_t r = fwrite((void *)data.c_str(), 1, data.length(), dfile); if (r != data.length()) { LOG_ERROR("%s", "write error"); return; } fclose(dfile); if(xfrFlag && dfile) { addfile(rx_fname, amp, amp->compress(), (char *) amp->rx_desc().c_str(), 0); } } /** ******************************************************** * ***********************************************************/ double time_f(void) { struct timeval now; gettimeofday(&now, NULL); return ((double) now.tv_sec) + (((double)now.tv_usec) * 0.000001); } /** ******************************************************** * ***********************************************************/ void abort_tx(void) { send_abort(); send_abort(); for(int i = 0; i < 40; i++) { // 4 seconds MilliSleep(100); if(get_trx_state() == "RX") break; } } /** ******************************************************** * ***********************************************************/ void abort_tx_from_main(void * ptr) { abort_tx(); if(!generate_time_table) { std::string idMessage; // A number of non printable characters are required to overcome long interleave modems. idMessage.assign("\n\n\n\n\n\n\n\n\n\n\nFILE TRANSFER ABORTED\n\nDE ").append(progStatus.my_call).append(" BK\n\n"); transfer(idMessage); } } /** ******************************************************** * ***********************************************************/ void abort_request(void) { int response = fl_choice("Terminate Current Transmission?", "No", "Yes", NULL); if (response == 1) { static int value = TX_BUTTON; deactivate_button((void *) &value); transmit_stop = true; ztime_end = 0; continuous_exception = false; //abort_tx(); } } /** ******************************************************** * ***********************************************************/ void send_fldigi_modem(void *ptr) { if(!ptr) return; int *val = (int *) ptr; static char buffer[32]; memset(buffer, 0, sizeof(buffer)); switch( *val ) { case HEADER_MODEM: strncpy(buffer, cbo_header_modes->value(), sizeof(buffer) - 1); break; case DATA_MODEM: strncpy(buffer, cbo_modes->value(), sizeof(buffer) - 1); break; default: return; } send_new_modem(buffer); } /** ******************************************************** * ***********************************************************/ void get_trx_state_in_main_thread(void *ptr) { if (!ptr) return; std::string *str = (std::string *)ptr; *str = get_trx_state(); } /** ******************************************************** * ***********************************************************/ void transmit_queue_main_thread(void *ptr) { if(progStatus.auto_load_queue && active_data_io == false) { auto_load_tx_queue(); } transmit_queued(true, false); } /** ******************************************************** * ***********************************************************/ void deactivate_button(void *ptr) { if (!ptr) return; int *value = (int *) ptr; if( *value == TX_BUTTON ) btn_send_file->deactivate(); else if( *value ==TX_ALL_BUTTON ) btn_send_queue->deactivate(); } /** ******************************************************** * ***********************************************************/ void activate_button(void *ptr) { if (!ptr) return; int * value = (int *) ptr; if( *value == TX_BUTTON ) btn_send_file->activate(); else if( *value == TX_ALL_BUTTON ) btn_send_queue->activate(); } /** ******************************************************** * ***********************************************************/ void set_button_to_xmit(void *ptr) { btn_send_file->label(XMT_LABEL); } /** ******************************************************** * ***********************************************************/ void set_button_to_cancel(void *ptr) { btn_send_file->label(CANX_LABEL); } /** ******************************************************** * ***********************************************************/ void set_relay_button_label(void *data) { char *str = (char *)0; if(!data) str = (char *) RELAY_LABEL; else str = (char *) data; btn_send_relay->label(str); } /** ******************************************************** * ***********************************************************/ void thread_error_msg(void *data) { if(data) { fl_alert2("%s", (const char *)data); free(data); } } /** ******************************************************** * ***********************************************************/ void set_xmit_label(void *data) { if(data) { btn_send_file->label((const char *)data); free(data); } } /** ******************************************************** * ***********************************************************/ int receive_data_stream(void *ptr) { static char buffer[CNT_BLOCK_SIZE_MAXIMUM]; int n = 0; int size = sizeof(buffer) - 1; if (fldigi_state != FLDIGI_ONLINE) return 0; if(!reading_relay_data) n = rx_fldigi(buffer, size); if(n < 1) { cQue->milliSleep(50); return 0; } cQue->addToQueueNullFiltered(buffer, n); return n; } /** ******************************************************** * ***********************************************************/ int process_que(void *ptr) { size_t readCount = 0, count = 0; size_t oldCount = -1; static char buffer[CNT_BLOCK_SIZE_MAXIMUM + 128]; static char tagBuffer[32]; static char aTag[32]; static char sz_missing[] = "MISSING"; unsigned int chksum = 0; int argCount = 0; int reset = 0; time_t tm_time = 0; unsigned int crcVal = 0; Circular_queue *que = (Circular_queue *)ptr; memset(buffer, 0, sizeof(buffer)); count = 20; oldCount = -1; while(!que->thread_exit()) { readCount = que->lookAheadToTerminator(tagBuffer, '>', count); if(readCount >= count) break; if(readCount > 0 && tagBuffer[readCount - 1] == '>') break; if(oldCount != readCount) // Reset timer que->timeOut(tm_time, 0, TIME_SET); else que->milliSleep(100); if(que->timeOut(tm_time, 10, TIME_COUNT)) { // In seconds return 0; } oldCount = readCount; } if(tagBuffer[readCount - 1] != '>') return que->adjustReadQueIndex(1); int temp; argCount = sscanf(tagBuffer, "<%s %d %x>", aTag, &temp, &chksum); count = temp; if(argCount < 3 || count < 1) return que->adjustReadQueIndex(1); que->adjustReadQueIndex(readCount); if(count > (sizeof(buffer) - 1)) count = sizeof(buffer) - 1; crcVal = 0; oldCount = -1; tm_time = 0; while(!que->thread_exit()) { reset = 1; readCount = que->lookAheadCRC(buffer, count, &crcVal, &reset); if(readCount >= count) break; if(oldCount != readCount) // Reset timer que->timeOut(tm_time, 0, TIME_SET); else que->milliSleep(100); if(que->timeOut(tm_time, 10, TIME_COUNT)) { // In seconds return 0; } oldCount = readCount; } if(chksum != crcVal) return que->adjustReadQueIndex(1); tmp_buffer.assign(tagBuffer); tmp_buffer.append(buffer, count); if(memcmp(aTag, sz_missing, sizeof(sz_missing)) == 0) process_missing_stream(); else process_data_stream(); return que->adjustReadQueIndex(readCount); } /** ******************************************************** * ***********************************************************/ void process_missing_stream(void) { std::string retbuff; char tag[32]; char crc[5]; char hash[5]; int len = 0; int conv = 0; size_t count = 0; std::string txrx_hash; size_t i = 0; cAmp *ctmp = (cAmp *)0; retbuff.assign(tmp_buffer); conv = sscanf(retbuff.c_str(), "<%s %d %4s>{%4s", tag, &len, crc, hash); if (conv == 4) { count = tx_amp.size(); for (i = 0; i < count; i++) { ctmp = tx_amp.index2amp(i + 1); if(!ctmp) continue; txrx_hash = ctmp->xmt_hash(); if (memcmp((const char *)hash, (const char *)txrx_hash.c_str(), sizeof(hash) - 1) == 0) { ctmp->append_report(retbuff); break; } } // For relay operations count = rx_amp.size(); for (i = 0; i < count; i++) { ctmp = rx_amp.index2amp(i + 1); if(!ctmp) continue; txrx_hash = ctmp->rx_hash(); if (memcmp((const char *)hash, (const char *)txrx_hash.c_str(), sizeof(hash) - 1) == 0) { ctmp->append_report(retbuff); break; } } } } /** ******************************************************** * ***********************************************************/ void process_relay_files(void) { std::vector files; std::string file; int count = 0; bool tmp = progStatus.auto_rx_save; count = FSEL::select_multiple(_("Select Relay File(s)"), "*.*", files, flamp_relay_dir.c_str()); reading_relay_data = true; // Temp disable FLDIGI input progStatus.auto_rx_save = false; // Disable Auto Save RX files for (int n = 0; n < count; n++ ) { file.assign(files[n]); process_data_file(file); } progStatus.auto_rx_save = tmp; reading_relay_data = false; } /** ******************************************************** * ***********************************************************/ void process_data_file(std::string file) { std::string retbuff; std::string temp_buff; char tag[32]; char crc[5]; char hash[5]; int len; size_t conv; cAmp *tmp = 0; size_t i = 0; size_t count = rx_amp.size(); size_t mark_pos = 0; signed long end_count = 0; size_t length = 0; size_t pos = 0; std::ifstream relay_file (file.c_str()); if(relay_file) { relay_file.seekg (0, relay_file.end); length = relay_file.tellg(); relay_file.seekg (0, relay_file.beg); char * buffer = new char [length]; if(buffer) { relay_file.read (buffer, length); relay_file.close(); } else { return; } while(pos < length) { if(buffer[pos] == '<') goto check_data; else { pos++; continue; } check_data: conv = sscanf(&buffer[pos], "<%s %d %4s>{%4s", tag, &len, crc, hash); if (conv != 4) { pos++; continue; } end_count = ((signed long) length) - ((signed long) pos); if(end_count > CNT_BLOCK_SIZE_MAXIMUM) end_count = CNT_BLOCK_SIZE_MAXIMUM; if(end_count < len) break; // Not enough data to process temp_buff.assign((const char *) &buffer[pos], (size_t) end_count); mark_pos = temp_buff.find(">{"); retbuff.assign(temp_buff.substr(0, len + mark_pos + 1)); pos += retbuff.size(); cAmp *existing = 0; for (i = 0; i < count; i++) { tmp = rx_amp.index2amp(i + 1); if (tmp->hash(hash)) { existing = tmp; break; } } if (!existing) { // a new rx process std::string temp_fname; temp_fname.assign("Unassigned"); cAmp *nu = new cAmp(); nu->amp_type(RX_AMP); nu->rx_fname(temp_fname); nu->rx_hash(hash); nu->rx_to_tx_hash(); // For relay ops nu->rx_append(retbuff); nu->rx_parse_buffer(); rx_amp.add(nu); std::string s; s.assign("@f").append(nu->rx_sz_percent()).append("\t").append(nu->rx_hash()).append("\t"); s.append(nu->get_rx_fname()); rx_queue->add(s.c_str()); rx_queue->select(rx_queue->size()); rx_amp.set(nu); clear_rx_amp(); show_rx_amp(); LOG_DEBUG("New Amp instance: %s", nu->get_rx_fname().c_str()); count = rx_amp.size(); } else { std::string bline; if (!existing->rx_completed()) { existing->rx_append(retbuff); existing->rx_parse_buffer(); bline.assign("@f").append(existing->rx_sz_percent()).append("\t").append(existing->rx_hash()).append("\t").append(existing->get_rx_fname()); rx_queue->text(i+1, bline.c_str()); } else { if(progStatus.auto_rx_save && !existing->file_saved()) { auto_rx_save_file(existing); } } } } delete[] buffer; } if (count != 0) show_rx_amp(); } /** ******************************************************** * ***********************************************************/ void process_data_stream(void) { std::string retbuff; char tag[32]; char crc[5]; char hash[5]; int len; size_t conv; cAmp *tmp = 0; size_t i = 0; size_t count = rx_amp.size(); retbuff.assign(tmp_buffer); conv = sscanf(retbuff.c_str(), "<%s %d %4s>{%4s", tag, &len, crc, hash); if (conv == 4) { cAmp *existing = 0; for (i = 0; i < count; i++) { tmp = rx_amp.index2amp(i + 1); if (tmp->hash(hash)) { existing = tmp; break; } } if (!existing) { // a new rx process std::string temp_fname; temp_fname.assign("Unassigned"); cAmp *nu = new cAmp(); nu->amp_type(RX_AMP); nu->rx_fname(temp_fname); nu->rx_hash(hash); nu->rx_to_tx_hash(); // For relay ops nu->rx_append(retbuff); nu->rx_parse_buffer(); rx_amp.add(nu); std::string s; s.assign("@f").append(nu->rx_sz_percent()).append("\t").append(nu->rx_hash()).append("\t"); s.append(nu->get_rx_fname()); rx_queue->add(s.c_str()); rx_queue->select(rx_queue->size()); rx_amp.set(nu); clear_rx_amp(); show_rx_amp(); LOG_INFO("New Amp instance: %s", nu->get_rx_fname().c_str()); } else { std::string bline; if (!existing->rx_completed()) { existing->rx_append(retbuff); existing->rx_parse_buffer(); bline.assign("@f").append(existing->rx_sz_percent()).append("\t").append(existing->rx_hash()).append("\t").append(existing->get_rx_fname()); rx_queue->text(i+1, bline.c_str()); } else { if(progStatus.auto_rx_save && !existing->file_saved()) { auto_rx_save_file(existing); } } } } if (count != 0) show_rx_amp(); } /** ******************************************************** * ***********************************************************/ void receive_remove_from_queue(bool all) { if(progStatus.enable_delete_warning && !all) { int flag = fl_choice("Remove file %s from queue?", (const char *)"No", (const char *)"Yes", (const char *)0, txt_tx_filename->value()); if(flag < 1) return; } if (rx_queue->size()) { int n = rx_queue->value(); while(n > 0) { cAmp * amp = rx_amp.index2amp(n); rx_amp.set((cAmp *)0); if (amp) { rx_amp.remove(n); } rx_queue->remove(n); if (rx_queue->size()) { n = 1; rx_amp.set(n); rx_queue->select(n); show_selected_rcv(n); } else { txt_rx_filename->value(""); txt_rx_datetime->value(""); txt_rx_descrip->value(""); txt_rx_callinfo->value(""); txt_rx_filesize->value(""); txt_rx_numblocks->value(""); txt_rx_missing_blocks->value(""); rx_progress->clear(); txt_rx_output->clear(); } rx_queue->redraw(); n = rx_queue->value(); if(all == false) break; } } } /** ******************************************************** * ***********************************************************/ std::string calc_string_tx_time(std::string string_data) { char sz_xfr_size[100]; float xfr_time = 0; float oh = 0; int transfer_size = 0; static std::string ret_str; memset(sz_xfr_size, 0, sizeof(sz_xfr_size)); xfr_time = seconds_from_string(cbo_modes->value(), string_data, &oh); xfr_time += oh; transfer_size = string_data.size(); if (xfr_time < 60) snprintf(sz_xfr_size, sizeof(sz_xfr_size), "%d bytes / %d secs", transfer_size, (int)(xfr_time + 0.5)); else snprintf(sz_xfr_size, sizeof(sz_xfr_size), "%d bytes / %d m %d s", transfer_size, (int)(xfr_time / 60), ((int)xfr_time) % 60); ret_str.assign(sz_xfr_size); return ret_str; } /** ******************************************************** * ***********************************************************/ void estimate(cAmp *amp, bool visible) { int n = 0; if(tx_amp.size() < 1) return; if(!amp) { n = tx_queue->value(); if(n < 1) return; amp = tx_amp.index2amp(n); if(!amp) return; } amp->amp_update(); if(visible) { txt_transfer_size_time->value(amp->estimate().c_str()); txt_tx_numblocks->value(amp->xmt_numblocks().c_str()); } } /** ******************************************************** * ***********************************************************/ void estimate_relay(void) { cAmp *amp = (cAmp *) 0; int n = 0; std::string data; if(rx_amp.size() < 1) return; n = rx_queue->value(); if(n < 1) return; amp = rx_amp.index2amp(n); if(!amp) return; data.assign(txt_relay_selected_blocks->value()); amp->rx_relay_blocks(data); data = amp->rx_relay_blocks(); data = amp->tx_relay_string(progStatus.my_call, data, false); data = calc_string_tx_time(data); txt_transfer_relay_size_time->value(data.c_str()); } /** ******************************************************** * ***********************************************************/ void estimate_bc(void) { static char sz_xfr_size[50]; float xfr_time = 0; float oh = 0; float total_xfr_time = 0; int index = 0; int modem_index = 0; int modem_index_count = 0; int count = 0; bool flag = 0; cAmp *tx = 0; std::string md; std::string temp; std::string xmtstr; count = tx_amp.size(); total_xfr_time = 0; modem_index_count = BROADCAST_MAX_MODEMS; xmtstr.clear(); for(index = 0; index < count; index++) { tx = tx_amp.index2amp(index + 1); xmtstr.append(tx->tx_string(" K\n")); } for(modem_index = 0; modem_index < modem_index_count; modem_index++) { switch(modem_index) { case 0: md.assign(cbo_hamcast_mode_selection_1->value()); break; case 1: md.assign(cbo_hamcast_mode_selection_2->value()); break; case 2: md.assign(cbo_hamcast_mode_selection_3->value()); break; case 3: md.assign(cbo_hamcast_mode_selection_4->value()); break; } xfr_time = seconds_from_string(md, xmtstr, &oh); xfr_time += oh; if (xfr_time < 60) snprintf(sz_xfr_size, sizeof(sz_xfr_size), "%d secs", (int)(xfr_time + 0.5)); else snprintf(sz_xfr_size, sizeof(sz_xfr_size), "%d m %d s", (int)(xfr_time / 60), ((int)xfr_time) % 60); flag = false; switch(modem_index) { case 0: if(progStatus.hamcast_mode_enable_1) flag = true; txt_hamcast_select_1_time->value(sz_xfr_size); break; case 1: if(progStatus.hamcast_mode_enable_2) flag = true; txt_hamcast_select_2_time->value(sz_xfr_size); break; case 2: if(progStatus.hamcast_mode_enable_3) flag = true; txt_hamcast_select_3_time->value(sz_xfr_size); break; case 3: if(progStatus.hamcast_mode_enable_4) flag = true; txt_hamcast_select_4_time->value(sz_xfr_size); break; } if(flag) total_xfr_time += xfr_time; } if (total_xfr_time < 60) snprintf(sz_xfr_size, sizeof(sz_xfr_size), "%d secs", (int)(total_xfr_time + 0.5)); else snprintf(sz_xfr_size, sizeof(sz_xfr_size), "%d m %d s", (int)(total_xfr_time / 60), ((int)total_xfr_time) % 60); txt_hamcast_select_total_time->value(sz_xfr_size); } /** ******************************************************** * ***********************************************************/ void close_ops(void) { progStatus.saveLastState(); FSEL::destroy(); tx_amp.free_all(); rx_amp.free_all(); if (tcpip) { tcpip->close(); delete tcpip; delete localaddr; } debug::stop(); if(cQue) delete cQue; if(s_modems) delete s_modems; } /** ******************************************************** * ***********************************************************/ void clean_shutdown() { if(transmitting) { transmit_stop = true; } // exit_watch_dog = true; close_ops(); exit_server(); TOD_close(); exit(0); } void cb_exit(void) { clean_shutdown(); } /** ******************************************************** * test for running fldigi made immediately after starting * the xmlrpc thread ***********************************************************/ void test_for_fldigi(void) { return; // remaining code in function never called ! std::string test = get_io_mode(); if (test == "NIL" || test.empty()) { // fl_alert2(_("Start fldigi before flamp!")); if (tcpip) { tcpip->close(); delete tcpip; delete localaddr; } // debug::stop(); // if(cQue) delete cQue; // clean_shutdown(); } } /** ******************************************************** * ***********************************************************/ bool numbers_and_dots_only(char *str, int expected_argc) { int f = 0, s = 0, t = 0, fo = 0; int argc = 0; if(str == (char *)0) return false; if(*str == (char) 0) return false; argc = sscanf((const char *)str, "%d.%d.%d.%d", &f, &s, &t, &fo); if(argc == expected_argc) return true; return false; } /** ******************************************************** * ***********************************************************/ int parse_args(int argc, char **argv, int& idx) { char check_for[48]; if (strcasecmp(argv[idx], "--time-table") == 0) { generate_time_table = true; idx++; return 1; } if (strstr(argv[idx], "--config-dir")) { std::string temp_dir = ""; idx++; std::string tmp = argv[idx]; if (!tmp.empty()) temp_dir = tmp; size_t p = std::string::npos; while ( (p = temp_dir.find("\\")) != std::string::npos) temp_dir[p] = '/'; if (temp_dir[temp_dir.length()-1] != '/') temp_dir += '/'; idx++; NBEMS_dir.assign(temp_dir); return 1; } memset(check_for, 0, sizeof(check_for)); strncpy(check_for, "--arq-server-address", sizeof(check_for) - 1); if (strstr(argv[idx], check_for)) { idx++; if(argv[idx]) { if(numbers_and_dots_only(argv[idx], 4)) { progStatus.user_socket_addr.assign(argv[idx]); LOG_DEBUG("%s %s\n", check_for, argv[idx]); idx++; } else { progStatus.user_socket_addr.clear(); LOG_INFO("%s Invalid parameter %s\n", check_for, argv[idx]); } } return 1; } memset(check_for, 0, sizeof(check_for)); strncpy(check_for, "--arq-server-port", sizeof(check_for) - 1); if (strstr(argv[idx], check_for)) { idx++; if(argv[idx]) { if(numbers_and_dots_only(argv[idx], 1)) { progStatus.user_socket_port.assign(argv[idx]); LOG_DEBUG("%s %s\n", check_for, argv[idx]); idx++; } else { progStatus.user_socket_port.clear(); LOG_INFO("%s Invalid parameter %s\n", check_for, argv[idx]); } } return 1; } memset(check_for, 0, sizeof(check_for)); strncpy(check_for, "--xmlrpc-server-address", sizeof(check_for) - 1); if (strstr(argv[idx], check_for)) { idx++; if(argv[idx]) { if(numbers_and_dots_only(argv[idx], 4)) { progStatus.user_xmlrpc_addr.assign(argv[idx]); LOG_DEBUG("%s %s\n", check_for, argv[idx]); idx++; } else { progStatus.user_xmlrpc_addr.clear(); LOG_INFO("%s Invalid parameter %s\n", check_for, argv[idx]); } } return 1; } memset(check_for, 0, sizeof(check_for)); strncpy(check_for, "--xmlrpc-server-port", sizeof(check_for) - 1); if (strstr(argv[idx], check_for)) { idx++; if(argv[idx]) { if(numbers_and_dots_only(argv[idx], 1)) { progStatus.user_xmlrpc_port.assign(argv[idx]); LOG_DEBUG("%s %s\n", check_for, argv[idx]); idx++; } else { progStatus.user_xmlrpc_port.clear(); LOG_INFO("%s Invalid parameter %s\n", check_for, argv[idx]); } } return 1; } if (strcasecmp(argv[idx], "--help") == 0) { int i = 0; while (copyright[i] != NULL) { printf("%s\n", copyright[i]); i++; } printf("\n\n"); i = 0; while (options[i] != NULL) { printf("%s\n", options[i]); i++; } exit (0); } if (strcasecmp(argv[idx], "--version") == 0) { printf("Version: " VERSION "\n"); exit (0); } return 0; } /** ******************************************************** * ***********************************************************/ void exit_main(Fl_Widget *w) { if (Fl::event_key() == FL_Escape) return; cb_exit(); } /** ******************************************************** * ***********************************************************/ static std::string pname = ""; int main (int argc, char *argv[]) { pname = argv[0]; size_t pn = pname.rfind("/"); if (pn != std::string::npos) pname.erase(0, pn + 1); pn = pname.rfind("\\"); if (pn != std::string::npos) pname.erase(0, pn + 1); XmlRpc::set_pname(pname); NBEMS_dir.clear(); { std::string appname = argv[0]; std::string appdir = argv[0]; size_t p; char dirbuf[FL_PATH_MAX + 1]; #ifdef __WOE32__ p = appdir.find("FL_APPS\\"); if (p == std::string::npos) p = appdir.find("FL_APPS/"); if (p == std::string::npos) { char dirbuf[FL_PATH_MAX + 1]; fl_filename_expand(dirbuf, sizeof(dirbuf) -1, "$USERPROFILE/"); NBEMS_dir.assign(dirbuf); } else NBEMS_dir.assign(appdir.substr(0, p + 8)); NBEMS_dir.append("NBEMS.files/"); #else fl_filename_absolute(dirbuf, sizeof(dirbuf), argv[0]); appdir.assign(dirbuf); p = appdir.rfind("flamp"); if (p != std::string::npos) appdir.erase(p); p = appdir.find("FL_APPS/"); if (p != std::string::npos) NBEMS_dir.assign(appdir.substr(0, p + 8)); else { fl_filename_expand(dirbuf, FL_PATH_MAX, "$HOME/"); NBEMS_dir = dirbuf; } DIR *isdir = 0; std::string test_dir; test_dir.assign(NBEMS_dir).append("NBEMS.files/"); isdir = opendir(test_dir.c_str()); if (isdir) { NBEMS_dir = test_dir; closedir(isdir); } else { NBEMS_dir.append(".nbems/"); } #endif } int arg_idx; if (Fl::args(argc, argv, arg_idx, parse_args) != argc) { return 0; } Fl::lock(); Fl::scheme("gtk+"); checkdirectories(); progStatus.loadLastState(); std::string debug_file = flampHomeDir; debug_file.append("debug_log.txt"); debug::start(debug_file.c_str()); LOG_INFO("Base dir: %s", NBEMS_dir.c_str()); main_window = flamp_dialog(); main_window->resize( progStatus.mainX, progStatus.mainY, main_window->w(), main_window->h()); main_window->callback(exit_main); Fl::add_handler(default_handler); Fl_File_Icon::load_system_icons(); FSEL::create(); #if defined(__WOE32__) # ifndef IDI_ICON # define IDI_ICON 101 # endif main_window->icon((char*)LoadIcon(fl_display, MAKEINTRESOURCE(IDI_ICON))); main_window->show (argc, argv); #elif !defined(__APPLE__) make_pixmap(&flamp_icon_pixmap, flamp_icon); main_window->icon((char *)flamp_icon_pixmap); main_window->show(argc, argv); // read in the current window hints, then modify them to allow icon transparency Pixmap mask = -1; // create pixmaps to hold the icon image and its mask XWMHints* hints = XGetWMHints(fl_display, fl_xid(main_window)); hints->flags |= IconMaskHint; // ensure transparency mask is enabled for the XPM icon hints->icon_mask = mask; // set the transparency mask XSetWMHints(fl_display, fl_xid(main_window), hints); XFree(hints); #else main_window->show(argc, argv); #endif if (std::string(main_window->label()) == "") { std::string main_label = PACKAGE_NAME; main_label.append(": ").append(PACKAGE_VERSION); main_window->label(main_label.c_str()); } std::string addr; std::string port; if(progStatus.user_socket_addr.size()) addr.assign(progStatus.user_socket_addr); else addr.assign(progStatus.socket_addr); if(progStatus.user_socket_port.size()) port.assign(progStatus.user_socket_port); else port.assign(progStatus.socket_port); localaddr = new Address(addr.c_str(), port.c_str()); if (!localaddr) clean_shutdown(); xmlrpc_thread = new pthread_t; if (pthread_create(xmlrpc_thread, NULL, xmlrpc_loop, NULL)) { perror("pthread_create: xmlrpc"); clean_shutdown(); } try { cQue = new TagSearch(receive_data_stream, process_que); } catch (const TagSearchException& e) { LOG_ERROR("%d, %s", e.error(), e.what()); exit (EXIT_FAILURE); } cQue->resumeQueue(); txt_tx_mycall->value(progStatus.my_call.c_str()); txt_tx_myinfo->value(progStatus.my_info.c_str()); cnt_blocksize->value(progStatus.blocksize); cnt_repeat_nbr->value(progStatus.repeatNN); cnt_repeat_header->value(progStatus.repeat_header); cnt_repeat_relay_data->value(progStatus.repeat_relay_data); cnt_repeat_relay_header->value(progStatus.repeat_relay_header); tx_buffer.clear(); rx_buffer.clear(); TOD_init(); start_server(61960); if(progStatus.auto_load_queue) { auto_load_tx_queue(); } unproto_widgets(0); Fl::add_timeout(1.0, check_io_mode); return Fl::run(); } /** ******************************************************** * ***********************************************************/ void check_io_mode(void *v) { check_call_and_id(v); // Check to see what io mode FLDIGI is in. std::string io_mode = get_io_mode(); if (io_mode == "NIL") return; int flag = 0; if(!io_mode.empty()) { if(io_mode == "ARQ") return; flag = fl_choice2(_("KISS interface active! Switch FLDIGI to ARQ?"), _("No"), _("Yes"), NULL); if(flag == 1) enable_arq(); } } extern Fl_Group *tab_pointers[]; /** ******************************************************** * ***********************************************************/ void check_call_and_id(void *v) { if(tabs) { if(progStatus.my_call.empty() || progStatus.my_info.empty()) { if(Config_tab) { tabs->value(Config_tab); fl_choice2(_("Update Callsign and Info"), _("Okay"), NULL, NULL); } } else { if(tab_pointers[progStatus.tab_saved_state]) tabs->value(tab_pointers[progStatus.tab_saved_state]); // User Selected } } } /** ******************************************************** * ***********************************************************/ void open_url(const char* url) { LOG_INFO("%s", url); #ifndef __WOE32__ const char* browsers[] = { # ifdef __APPLE__ getenv("FLDIGI_BROWSER"), // valid for any OS - set by user "open" // OS X # else "fl-xdg-open", // Puppy Linux "xdg-open", // other Unix-Linux distros getenv("FLDIGI_BROWSER"), // force use of spec'd browser getenv("BROWSER"), // most Linux distributions "sensible-browser", "firefox", "mozilla" // must be something out there! # endif }; switch (fork()) { case 0: # ifndef NDEBUG unsetenv("MALLOC_CHECK_"); unsetenv("MALLOC_PERTURB_"); # endif for (size_t i = 0; i < sizeof(browsers)/sizeof(browsers[0]); i++) if (browsers[i]) execlp(browsers[i], browsers[i], url, (char*)0); clean_shutdown(); case -1: fl_alert2(_("Could not run a web browser:\n%s\n\n" "Open this URL manually:\n%s"), strerror(errno), url); } #else if ((size_t)ShellExecute(NULL, "open", url, NULL, NULL, SW_SHOWNORMAL) <= 32) fl_alert2(_("Could not open url:\n%s\n"), url); #endif } /** ******************************************************** * ***********************************************************/ void show_help(void) { open_url("http://www.w1hkj.com/flamp-help/index.html"); } /** ******************************************************** * ***********************************************************/ void cb_folders(void) { open_url(flampHomeDir.c_str()); } /** ******************************************************** * ***********************************************************/ void url_to_file(char *path, size_t buffer_length) { if(!path && buffer_length < 1) return; char *convert_buffer = (char *)0; char *cPtr = path; char *cEnd = &path[buffer_length]; char *dPtr = (char *)0; int value = 0; int count = 0; convert_buffer = new char [buffer_length + 1]; if(!convert_buffer) return; memset(convert_buffer, 0, buffer_length + 1); dPtr = convert_buffer; while(cPtr < cEnd) { if(*cPtr == '%') { sscanf(cPtr + 1, "%02x", &value); *dPtr++ = (char) value; cPtr += 3; } else { *dPtr++ = *cPtr++; } count++; } memset(path, 0, buffer_length); memcpy(path, convert_buffer, count); delete [] convert_buffer; } /** ******************************************************** * ***********************************************************/ void drop_file_changed(void) { std::string buffer = Fl::event_text(); size_t length = Fl::event_length(); char *fname = (char *)0; size_t n = 0; int valid = 0; char *cPtr = (char *)0; // char *cFileName = (char *)0; const char *cBufferEnd = (char *)0; drop_file->value(" DnD"); drop_file->redraw(); fname = new char[length + 1]; if(!fname) { LOG_INFO("File name allocation error\n"); return; } memset(fname, 0, length + 1); memcpy(fname, buffer.c_str(), length); if ((n = buffer.find("file:///")) != std::string::npos) { buffer.erase(n, 7); memcpy(fname, buffer.c_str(), buffer.size()); url_to_file(fname, length); valid = 1; } else if ((n = buffer.find(":\\")) != std::string::npos) { valid = 1; } else if ((n = buffer.find("/")) != std::string::npos) { valid = 1; } if(valid == 0) return; cBufferEnd = &fname[length]; // cFileName = cPtr = (char *) fname; // Skip leading spaces while(*cPtr <= ' ' && cPtr < cBufferEnd) cPtr++; // Begining of file path fname = cPtr; // Null terminate control characters while(cPtr < cBufferEnd) { if(*cPtr < ' ') *cPtr = 0; cPtr++; } addfile(fname, 0, false, 0, 0); if(fname) { delete [] fname; fname = 0; } } flamp-2.2.12/src/server/0000775000175000017500000000000014607053767012014 500000000000000flamp-2.2.12/src/server/xml_server.cxx0000664000175000017500000001363414563657712014656 00000000000000// --------------------------------------------------------------------- // // xml_server.cxx, a part of flamp // // Copyflampht (C) 2023 // Dave Freese, W1HKJ // // This library is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with the program; if not, write to the // // Free Software Foundation, Inc. // 51 Franklin Street, Fifth Floor // Boston, MA 02110-1301 USA. // // --------------------------------------------------------------------- #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "flamp.h" #include "flamp_dialog.h" #include "dialogs.h" #include "XmlRpc.h" // The server using namespace XmlRpc; XmlRpcServer flamp_server; //------------------------------------------------------------------------------ // Set fskio transmit std::string //------------------------------------------------------------------------------ extern void FSK_add(std::string); static std::string fskio_text; class flamp_create_script : public XmlRpcServerMethod { public: flamp_create_script(XmlRpcServer* s) : XmlRpcServerMethod("flamp.create_script", s) {} void execute(XmlRpcValue& params, XmlRpcValue& result) { std::string pathname = (std::string)params[0]; std::string text = (std::string)params[1]; if (xml_create_script(pathname, text)) result = 1; else result = 0; } std::string help() { return std::string("sends text using fskio DTR/RTS keying"); } } flamp_create_script(&flamp_server); //------------------------------------------------------------------------------ /** ******************************************************** * ***********************************************************/ bool queue_sent = false; void send_queue(void*) { if(transmitting) { abort_request(); return; } if (tx_queue->size() == 0) { return; } transmit_queued(true, false); queue_sent = true; } class flamp_transmit_queue : public XmlRpcServerMethod { public: flamp_transmit_queue (XmlRpcServer* s) : XmlRpcServerMethod("flamp.transmit_queue", s) {} void execute(XmlRpcValue& params, XmlRpcValue& result) { queue_sent = false; Fl::awake(send_queue); result = queue_sent; } std::string help() { return std::string("transmit queued messages"); } } flamp_transmit_queue(&flamp_server); //------------------------------------------------------------------------------ std::string exec_script_name; void do_xml_execute_script(void *) { xml_execute_script(exec_script_name); } class flamp_execute_script : public XmlRpcServerMethod { public: flamp_execute_script (XmlRpcServer* s) : XmlRpcServerMethod("flamp.execute_script", s) {} void execute(XmlRpcValue& params, XmlRpcValue& result) { exec_script_name = (std::string)(params[0]); Fl::awake(do_xml_execute_script); result = 1; } std::string help() { return std::string("execute script 'pathname'"); } } flamp_execute_script(&flamp_server); struct MLIST { std::string name; std::string signature; std::string help; } mlist[] = { { "flamp.create_script", "i:s", "create script 'pathname', 'script_text'" }, { "flamp.execute_script", "n:s", "execute script 'pathname'"}, { "flamp.transmit_queue", "n:i", "transmit queued messages"} }; class flamp_list_methods : public XmlRpcServerMethod { public: flamp_list_methods(XmlRpcServer *s) : XmlRpcServerMethod("flamp.list_methods", s) {} void execute(XmlRpcValue& params, XmlRpcValue& result) { std::vector methods; for (size_t n = 0; n < sizeof(mlist) / sizeof(*mlist); ++n) { XmlRpcValue::ValueStruct item; item["name"] = mlist[n].name; item["signature"] = mlist[n].signature; item["help"] = mlist[n].help; methods.push_back(item); } result = methods; } std::string help() { return std::string("get flamp methods"); } } flamp_list_methods(&flamp_server); //------------------------------------------------------------------------------ // support thread xmlrpc clients //------------------------------------------------------------------------------ pthread_t *xml_thread = 0; static bool run_server = false; void * xml_thread_loop(void *d) { run_server = true; for(;;) { if (!run_server) break; flamp_server.work(-1.0); } return NULL; } void start_server(int port) { // XmlRpc::setVerbosity(progStatus.rpc_level); // Create the server socket on the specified port flamp_server.bindAndListen(port); // Enable introspection flamp_server.enableIntrospection(true); xml_thread = new pthread_t; if (pthread_create(xml_thread, NULL, xml_thread_loop, NULL)) { perror("pthread_create"); clean_shutdown(); } } void exit_server() { flamp_server.exit(); run_server = false; } void set_server_port(int port) { flamp_server.bindAndListen(port); } std::string print_xmlhelp() { static std::string pstr; pstr.clear(); std::string line; size_t f1_len = 0; for (size_t n = 0; n < sizeof(mlist) / sizeof(*mlist); ++n) { if (mlist[n].name.length() > f1_len) f1_len = mlist[n].name.length(); } for (size_t n = 0; n < sizeof(mlist) / sizeof(*mlist); ++n) { line.clear(); line.assign(mlist[n].name); line.append(f1_len + 2 - line.length(), ' '); line.append(mlist[n].signature); line.append(" "); line.append(mlist[n].help); line.append("\n"); pstr.append(line); } return pstr; } flamp-2.2.12/src/flamp-rc.rc0000644000175000017500000000017114463050062012433 00000000000000#include // include for version info constants #include "flamprc.h" IDI_ICON ICON DISCARDABLE "flamp.ico" flamp-2.2.12/src/flamp_dialog.cxx0000664000175000017500000007501214605333064013562 00000000000000// ===================================================================== // // flamp_dialog.cxx // // Author(s): // Dave Freese, W1HKJ, Copyright (C) 2010, 2011, 2012, 2013 // Robert Stiles, KK5VD, Copyright (C) 2013, 2014, 2015 // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ===================================================================== #include "dialogs.h" #include "flamp_dialog.h" //====================================================================== Fl_Double_Window * main_window = 0; Fl_Double_Window * wCmdLine = 0; extern void show_selected_xmt(int n); extern void cb_load_tx_queue(void); extern void cb_scripts_in_main_thread(void *); char * s_modes[MAX_MODE_POINTERS]; char * s_modems = (char *) 0; size_t no_of_modems = 0; std::string valid_modes; /** ******************************************************** * A std::string table of event types ***********************************************************/ const char *event_types[] = { (char *) "5 min", (char *) "15 min", (char *) "30 min", (char *) "Hourly", (char *) "Even hours", (char *) "Odd hours", (char *) "Repeated at", (char *) "One time at", (char *) "Continuous at", (char *) 0 }; Fl_Group *tab_pointers[tab_count]; /** ******************************************************** * ***********************************************************/ void redraw_rx_panel(void * data) { if(Rx_tab) { txt_rx_filename->redraw(); txt_rx_datetime->redraw(); txt_rx_descrip->redraw(); txt_rx_callinfo->redraw(); txt_rx_filesize->redraw(); txt_rx_numblocks->redraw(); txt_rx_blocksize->redraw(); txt_rx_output->redraw(); txt_relay_selected_blocks->redraw(); rx_progress->redraw(); cnt_repeat_relay_data->redraw(); cnt_repeat_relay_header->redraw(); txt_transfer_relay_size_time->redraw(); } } /** ******************************************************** * ***********************************************************/ inline void add_a_file_message(void) { fl_alert("%s", "Add a file to the TX queue"); } /** ******************************************************** * ***********************************************************/ bool valid_mode_check(std::string &md) { return (valid_modes.find(md) != std::string::npos); } /** ******************************************************** * ***********************************************************/ size_t create_script_modem_check_list(void) { size_t str_length = 0; size_t str_index = 0; if(s_modems) delete s_modems; std::memset(s_modes, 0, sizeof(s_modes)); s_modems = (char *)0; no_of_modems = 0; str_length = valid_modes.size(); s_modems = new char [str_length + 1]; if(s_modems) { std::memcpy(s_modems, valid_modes.c_str(), sizeof(char) * str_length); s_modems[str_length] = 0; while(1) { while(str_index < str_length) { if(s_modems[str_index] > ' ') break; str_index++; } if(no_of_modems >= MAX_MODE_POINTERS || str_index >= str_length) break; if(s_modems[str_index] != '|') s_modes[no_of_modems++] = &s_modems[str_index]; else break; while(str_index < str_length) { if(s_modems[str_index] == '|') { s_modems[str_index++] = 0; break; } str_index++; } } } return no_of_modems; } /** ******************************************************** * ***********************************************************/ void update_cbo_modes(std::string &fldigi_modes) { size_t count = fldigi_modes.size(); size_t start = 0, end = 0; std::string modem_list, modem_name; char *cPtr = (char *)0; valid_modes.clear(); cbo_modes->clear(); cbo_header_modes->clear(); cbo_hamcast_mode_selection_1->clear(); cbo_hamcast_mode_selection_2->clear(); cbo_hamcast_mode_selection_3->clear(); cbo_hamcast_mode_selection_4->clear(); modem_list.assign(fldigi_modes); modem_name.clear(); if(count < 1) { LOG_INFO("update_cbo_modes(): Modem List contains no data!"); return; } LOG_INFO("Modem List: %s", modem_list.c_str()); while(start < count && end < count) { end = modem_list.find("|", start); if(end == std::string::npos) break; modem_name.assign(modem_list.substr(start, end - start)); LOG_INFO("Modem: %s", modem_name.c_str()); start = end + 1; cPtr = (char *) modem_name.c_str(); if(!cPtr) break; cbo_modes->add(cPtr); cbo_header_modes->add(cPtr); cbo_hamcast_mode_selection_1->add(cPtr); cbo_hamcast_mode_selection_2->add(cPtr); cbo_hamcast_mode_selection_3->add(cPtr); cbo_hamcast_mode_selection_4->add(cPtr); valid_modes.append(cPtr).append("|"); } create_script_modem_check_list(); cbo_modes->index(progStatus.selected_mode); cbo_header_modes->index(progStatus.header_selected_mode); cbo_hamcast_mode_selection_1->index(progStatus.hamcast_mode_selection_1); cbo_hamcast_mode_selection_2->index(progStatus.hamcast_mode_selection_2); cbo_hamcast_mode_selection_3->index(progStatus.hamcast_mode_selection_3); cbo_hamcast_mode_selection_4->index(progStatus.hamcast_mode_selection_4); assign_bc_modem_list(); g_modem.assign(cbo_modes->value()); g_header_modem.assign(cbo_header_modes->value()); } /** ******************************************************** * Initialize a minimal set of available modems ***********************************************************/ void init_cbo_modes() { std::string min_modes; min_modes.assign( \ "8PSK125|8PSK250|8PSK500|8PSK1000|8PSK125F|8PSK250F|" \ "8PSK500F|8PSK1000F|8PSK1200F|BPSK31|BPSK63|BPSK63F|BPSK125|" \ "BPSK250|BPSK500|BPSK1000|DOMX22|DOMX44|DOMX88|MFSK16|MFSK22|MFSK31|" \ "MFSK32|MFSK64|MFSK64L|MFSK128|MFSK128L|MT63-500L|MT63-500S|MT63-1KL|" \ "MT63-1KS|MT63-2KL|MT63-2KS|OLIVIA-4/250|OLIVIA-4/500|OLIVIA-8/250|" \ "OLIVIA-8/500|OLIVIA-8/1K|OLIVIA-16/500|OLIVIA-16/1K|OLIVIA-32/1K|" \ "OLIVIA-64/2K|PSK63RC4|PSK63RC5|PSK63RC10|PSK63RC20|PSK63RC32|PSK125R|" \ "PSK125RC4|PSK125RC5|PSK125C12|PSK125RC10|PSK125RC12|PSK125RC16|PSK250R|" \ "PSK250C6|PSK250RC2|PSK250RC3|PSK250RC5|PSK250RC6|PSK250RC7|PSK500R|PSK500C2|" \ "PSK500C4|PSK500RC2|PSK500RC3|PSK500RC4|PSK800C2|PSK800RC2|PSK1000C2|" \ "PSK1000R|PSK1000RC2|QPSK31|QPSK63|QPSK125|QPSK250|QPSK500|THOR16|THOR22|" \ "THOR25x4|THOR50x1|THOR50x2|THOR100|THOR11|THOR32|THOR44|THOR56|" \ ); update_cbo_modes(min_modes); } /** ******************************************************** * ***********************************************************/ void init_cbo_events() { int index = 0; while(event_types[index]) { cbo_repeat_every->add(event_types[index]); index++; } cbo_repeat_every->index(progStatus.repeat_every); } /** ******************************************************** * ***********************************************************/ void cb_cbo_modes(Fl_ComboBox *a, void *b) { progStatus.selected_mode = cbo_modes->index(); g_modem.assign(cbo_modes->value()); update_cAmp_changes(0); amp_mark_all_for_update(); if (progStatus.sync_mode_flamp_fldigi) send_new_modem(cbo_modes->value()); show_selected_xmt(0); estimate_relay(); } /** ******************************************************** * ***********************************************************/ void cb_mnuExit(Fl_Menu_ *a, void *b) { cb_exit(); } /** ******************************************************** * ***********************************************************/ void cb_mnuEventLog(Fl_Menu_ *, void *) { debug::show(); } /** ******************************************************** * ***********************************************************/ void cb_mnuOnLineHelp(Fl_Menu_*, void*) { show_help(); } /** ******************************************************** * ***********************************************************/ void cb_mnu_folders(Fl_Menu_*, void*) { cb_folders(); } /** ******************************************************** * ***********************************************************/ void cb_mnu_scripts(Fl_Menu_*, void*) { cb_scripts(false); } /** ******************************************************** * ***********************************************************/ void cb_mnuAbout(Fl_Menu_ *, void *) { fl_message2("\tFlamp: %s\n\n" \ "\tAuthors:\n" \ "\t\tDave Freese, W1HKJ\n" \ "\t\tRobert Stiles, KK5VD", FLAMP_VERSION); } /** ******************************************************** * ***********************************************************/ void cb_mnu_load_relay(Fl_Menu_ *, void *) { process_relay_files(); } /** ******************************************************** * ***********************************************************/ void cb_mnu_save_relay(Fl_Menu_ *, void *) { save_all_rx_relay_files(); } /** ******************************************************** * ***********************************************************/ void cb_mnuCmdLineParams(Fl_Menu_ *, void *) { if (!wCmdLine) { wCmdLine = new Fl_Double_Window(0,0,604,404,"Command Line Options"); wCmdLine->begin(); Fl_Browser *bwsCmds = new Fl_Browser(2,2,600,400,""); int i = 0; std::string cmdline; while (options[i] != NULL) { cmdline.assign("@f").append(options[i]); bwsCmds->add(cmdline.c_str()); i++; } wCmdLine->end(); } wCmdLine->show(); } /** ******************************************************** * ***********************************************************/ void cb_tx_mycall(Fl_Input2*, void*) { progStatus.my_call = txt_tx_mycall->value(); update_cAmp_changes(0); show_selected_xmt(tx_queue->value()); } /** ******************************************************** * ***********************************************************/ void cb_tx_myinfo(Fl_Input2*, void*) { progStatus.my_info = txt_tx_myinfo->value(); update_cAmp_changes(0); show_selected_xmt(tx_queue->value()); } /** ******************************************************** * ***********************************************************/ void cb_tx_send_to(Fl_Input2*, void*) { update_cAmp_changes(0); show_selected_xmt(tx_queue->value()); } /** ******************************************************** * ***********************************************************/ void cb_tx_descrip(Fl_Input2*, void*) { update_cAmp_changes(0); show_selected_xmt(tx_queue->value()); } /** ******************************************************** * ***********************************************************/ void cb_selected_blocks(Fl_Input2*, void*) { update_cAmp_changes(0); show_selected_xmt(tx_queue->value()); } /** ******************************************************** * ***********************************************************/ void cb_btn_save_file(Fl_Button*, void*) { writefile(0); } /** ******************************************************** * ***********************************************************/ void cb_btn_transfer_file_txQ(Fl_Button*, void*) { writefile(1); } /** ******************************************************** * ***********************************************************/ void cb_btn_rx_remove(Fl_Button*, void*) { receive_remove_from_queue(false); } /** ******************************************************** * ***********************************************************/ void cb_btn_open_file(Fl_Button*, void*) { readfile(); } /** ******************************************************** * ***********************************************************/ void cb_btn_tx_remove_file(Fl_Button*, void*) { tx_removefile(false); } /** ******************************************************** * ***********************************************************/ void cb_btn_copy_missing(Fl_Button*, void*) { send_missing_report(); } /** ******************************************************** * ***********************************************************/ void cb_btn_parse_blocks(Fl_Button*, void*) { recv_missing_report(); } /** ******************************************************** * ***********************************************************/ void cb_tx_queue(Fl_Browser *hb, void*) { int value = tx_queue->value(); show_selected_xmt(value); } /** ******************************************************** * ***********************************************************/ void cb_rx_queue(Fl_Browser *hb, void*) { int n = hb->value(); show_selected_rcv(n); } /** ******************************************************** * ***********************************************************/ void cb_btn_send_file(Fl_Button*, void*) { if(transmitting) { if (do_events_flag == 1) { do_events_flag = 0; do_events->value(0); stop_events(); do_events->label("Start Events"); do_events->redraw_label(); } else { abort_request(); } return; } if ((tx_queue->value() == 0) || (tx_queue->size() == 0)) { add_a_file_message(); return; } btn_send_queue->deactivate(); transmit_current(); } /** ******************************************************** * ***********************************************************/ void cb_btn_send_queue(Fl_Button*, void*) { if(transmitting) { abort_request(); return; } if (tx_queue->size() == 0) { add_a_file_message(); return; } btn_send_queue->deactivate(); if(Fl::event_shift()) transmit_queued(false, true); else transmit_queued(false, false); } /** ******************************************************** * ***********************************************************/ void cb_cnt_blocksize(Fl_Counter*, void*) { int request_blk_size = (int)cnt_blocksize->value(); int reset_flag = false; if(progStatus.blocksize != request_blk_size) reset_flag = true; progStatus.blocksize = request_blk_size; update_cAmp_changes(0); amp_mark_all_for_update(); show_selected_xmt(tx_queue->value()); if(reset_flag) txt_tx_selected_blocks->value(""); } /** ******************************************************** * ***********************************************************/ void cb_cnt_repeat_nbr(Fl_Counter*, void*) { progStatus.repeatNN = (int)cnt_repeat_nbr->value(); update_cAmp_changes(0); amp_mark_all_for_update(); show_selected_xmt(tx_queue->value()); } /** ******************************************************** * ***********************************************************/ void cb_repeat_header(Fl_Counter*, void*) { progStatus.repeat_header = (int)cnt_repeat_header->value(); update_cAmp_changes(0); amp_mark_all_for_update(); show_selected_xmt(tx_queue->value()); } /** ******************************************************** * ***********************************************************/ void cb_use_compression(Fl_Check_Button*, void*) { bool req_compression = btn_use_compression->value(); int reset_flag = false; if(progStatus.use_compression != req_compression) reset_flag = true; progStatus.use_compression = req_compression; update_cAmp_changes(0); show_selected_xmt(tx_queue->value()); if(reset_flag) txt_tx_selected_blocks->value(""); } /** ******************************************************** * ***********************************************************/ void cb_use_encoder(Fl_ComboBox *w, void *) { int req_encoder = encoders->index()+1; int reset_flag = false; if(progStatus.encoder != req_encoder) reset_flag = true; progStatus.encoder = req_encoder; progStatus.encoder_string.assign(encoders->value()); update_cAmp_changes(0); show_selected_xmt(tx_queue->value()); if(reset_flag) txt_tx_selected_blocks->value(""); } /** ******************************************************** * ***********************************************************/ void init_encoders() { encoders->clear(); encoders->add("base64"); encoders->add("base128"); encoders->add("base256"); encoders->index(progStatus.encoder-1); progStatus.encoder_string.assign(encoders->value()); } /** ******************************************************** * ***********************************************************/ void cb_sync_mode_flamp_fldigi(Fl_Check_Button *b, void *) { progStatus.sync_mode_flamp_fldigi = btn_sync_mode_flamp_fldigi->value(); } /** ******************************************************** * ***********************************************************/ void cb_sync_mode_fldigi_flamp(Fl_Check_Button *b, void *) { progStatus.sync_mode_fldigi_flamp = btn_sync_mode_fldigi_flamp->value(); } /** ******************************************************** * ***********************************************************/ void cb_fldigi_xmt_mode_change(Fl_Check_Button *b, void *) { if(progStatus.use_txrx_interval == true) { progStatus.fldigi_xmt_mode_change = true; btn_fldigi_xmt_mode_change->value(progStatus.fldigi_xmt_mode_change); } else { progStatus.fldigi_xmt_mode_change = btn_fldigi_xmt_mode_change->value(); } } /** ******************************************************** * ***********************************************************/ void cb_repeat_at_times(Fl_Check_Button *b, void *) { progStatus.repeat_at_times = btn_repeat_at_times->value(); if (progStatus.repeat_at_times) { btn_repeat_forever->value(0); progStatus.repeat_forever = false; } } /** ******************************************************** * ***********************************************************/ void cb_auto_load_que(Fl_Check_Button *b, void *) { int val = false; val = btn_auto_load_queue->value(); progStatus.auto_load_queue_path.assign(txt_auto_load_queue_path->value()); if(progStatus.auto_load_queue_path.size() < 1 && val == true) { progStatus.auto_load_queue = false; btn_auto_load_queue->value(false); return; } progStatus.auto_load_queue = val; btn_auto_load_queue->value(val); } /** ******************************************************** * ***********************************************************/ void cb_load_from_tx_folder(Fl_Check_Button *b, void *) { progStatus.load_from_tx_folder = btn_load_from_tx_folder->value(); } /** ******************************************************** * ***********************************************************/ void cb_manual_load_que(Fl_Button *b, void *) { cb_load_tx_queue(); } /** ******************************************************** * ***********************************************************/ void cb_auto_load_queue_path(Fl_Input2 *b, void *) { progStatus.auto_load_queue_path.assign(txt_auto_load_queue_path->value()); } /** ******************************************************** * ***********************************************************/ void cb_repeat_every(Fl_ComboBox *cb, void *) { progStatus.repeat_every = cbo_repeat_every->index(); } /** ******************************************************** * ***********************************************************/ void cb_repeat_times(Fl_Input2 *txt, void *) { progStatus.repeat_times = txt_repeat_times->value(); } /** ******************************************************** * ***********************************************************/ void cb_repeat_forever(Fl_Check_Button *b, void *) { progStatus.repeat_forever = btn_repeat_forever->value(); if (progStatus.repeat_forever) { btn_repeat_at_times->value(0); progStatus.repeat_at_times = false; } } /** ******************************************************** * ***********************************************************/ void cb_drop_file(Fl_Input*, void*) { drop_file_changed(); } /** ******************************************************** * ***********************************************************/ void cb_do_events(Fl_Light_Button *b, void*) { if (tx_queue->size() == 0) { do_events->value(0); if(!generate_time_table) add_a_file_message(); return; } do_events_flag = do_events->value(); if (do_events_flag) { do_events->label("Stop Events"); } else { stop_events(); do_events->label("Start Events"); } do_events->redraw_label(); } /** ******************************************************** * ***********************************************************/ void cb_enable_txrx_interval(Fl_Check_Button *a, void *b) { progStatus.use_txrx_interval = (bool) btn_enable_txrx_interval->value(); if(progStatus.use_txrx_interval == true) { progStatus.fldigi_xmt_mode_change = true; btn_fldigi_xmt_mode_change->value(progStatus.fldigi_xmt_mode_change); } show_selected_xmt(tx_queue->value()); } /** ******************************************************** * ***********************************************************/ #include void set_txt_tx_interval() { char szT[25]; int mins = floor(cnt_tx_interval_mins->value()); int secs = round(60 * (cnt_tx_interval_mins->value() - mins)); snprintf(szT, sizeof(szT), "%02d:%02d", mins, secs); txt_tx_interval->value(szT); } /** ******************************************************** * ***********************************************************/ void cb_tx_interval_mins(Fl_Counter *a, void *b) { progStatus.tx_interval_minutes = cnt_tx_interval_mins->value(); set_txt_tx_interval(); } /** ******************************************************** * ***********************************************************/ void cb_rx_interval_secs(Fl_Counter *a, void *b) { progStatus.rx_interval_seconds = cnt_rx_interval_secs->value(); } /** ******************************************************** * ***********************************************************/ void cb_enable_header_modem(Fl_Check_Button *a, void *b) { progStatus.use_header_modem = btn_enable_header_modem->value(); } /** ******************************************************** * ***********************************************************/ void cb_header_modes(Fl_ComboBox *a, void *b) { progStatus.header_selected_mode = cbo_header_modes->index(); g_header_modem.assign(cbo_header_modes->value()); } /** ******************************************************** * ***********************************************************/ void cb_disable_header_modem_on_block_fills(Fl_Check_Button *a, void *b) { progStatus.disable_header_modem_on_block_fills = (bool) btn_disable_header_modem_on_block_fills->value(); } /** ******************************************************** * ***********************************************************/ void cb_enable_tx_on_report(Fl_Check_Button *a, void *b) { progStatus.use_tx_on_report = btn_enable_tx_on_report->value(); } /** ******************************************************** * ***********************************************************/ void cb_clear_tosend_on_tx_blocks(Fl_Check_Button *a, void *b) { progStatus.clear_tosend_on_tx_blocks = btn_clear_tosend_on_tx_blocks->value(); } /** ******************************************************** * ***********************************************************/ void cb_enable_unproto_markers(Fl_Check_Button *a, void *b) { progStatus.enable_unproto_markers = btn_enable_unproto_markers->value(); update_cAmp_changes(0); show_selected_xmt(tx_queue->value()); } /** ******************************************************** * ***********************************************************/ void cb_enable_tx_unproto(Fl_Check_Button *a, void *b) { progStatus.enable_tx_unproto = btn_enable_tx_unproto->value(); if(progStatus.enable_tx_unproto) { btn_use_compression->value(0); progStatus.use_compression = 0; } update_cAmp_changes(0); show_selected_xmt(tx_queue->value()); } /** ******************************************************** * ***********************************************************/ void unproto_widgets(cAmp *amp) { if(amp) progStatus.enable_tx_unproto = amp->unproto(); if(progStatus.enable_tx_unproto) { if(!progStatus.use_txrx_interval) cnt_blocksize->deactivate(); cnt_repeat_header->deactivate(); btn_use_compression->deactivate(); encoders->deactivate(); txt_tx_numblocks->deactivate(); } else { cnt_blocksize->activate(); cnt_repeat_header->activate(); btn_use_compression->activate(); encoders->activate(); txt_tx_numblocks->activate(); cnt_repeat_nbr->activate(); } } /** ******************************************************** * ***********************************************************/ void cb_hamcast_mode_cycle(Fl_Check_Button *a, void *b) { progStatus.hamcast_mode_cycle = btn_hamcast_mode_cycle->value(); if(progStatus.hamcast_mode_cycle) { progStatus.hamcast_mode_cycle = assign_bc_modem_list(); btn_hamcast_mode_cycle->value(progStatus.hamcast_mode_cycle); } estimate_bc(); } /** ******************************************************** * ***********************************************************/ void cb_hamcast_mode_enable_1(Fl_Check_Button *a, void *b) { progStatus.hamcast_mode_enable_1 = btn_hamcast_mode_enable_1->value(); if(!assign_bc_modem_list()) { progStatus.hamcast_mode_cycle = false; btn_hamcast_mode_cycle->value(progStatus.hamcast_mode_cycle); } estimate_bc(); } /** ******************************************************** * ***********************************************************/ void cb_hamcast_mode_selection_1(Fl_ComboBox *a, void *b) { progStatus.hamcast_mode_selection_1 = cbo_hamcast_mode_selection_1->index(); if(!assign_bc_modem_list()) { progStatus.hamcast_mode_cycle = false; btn_hamcast_mode_cycle->value(progStatus.hamcast_mode_cycle); } estimate_bc(); } /** ******************************************************** * ***********************************************************/ void cb_hamcast_mode_enable_2(Fl_Check_Button *a, void *b) { progStatus.hamcast_mode_enable_2 = btn_hamcast_mode_enable_2->value(); if(!assign_bc_modem_list()) { progStatus.hamcast_mode_cycle = false; btn_hamcast_mode_cycle->value(progStatus.hamcast_mode_cycle); } estimate_bc(); } /** ******************************************************** * ***********************************************************/ void cb_hamcast_mode_selection_2(Fl_ComboBox*a, void *b) { progStatus.hamcast_mode_selection_2 = cbo_hamcast_mode_selection_2->index(); if(!assign_bc_modem_list()) { progStatus.hamcast_mode_cycle = false; btn_hamcast_mode_cycle->value(progStatus.hamcast_mode_cycle); } estimate_bc(); } /** ******************************************************** * ***********************************************************/ void cb_hamcast_mode_enable_3(Fl_Check_Button *a, void *b) { progStatus.hamcast_mode_enable_3 = btn_hamcast_mode_enable_3->value(); if(!assign_bc_modem_list()) { progStatus.hamcast_mode_cycle = false; btn_hamcast_mode_cycle->value(progStatus.hamcast_mode_cycle); } estimate_bc(); } /** ******************************************************** * ***********************************************************/ void cb_hamcast_mode_selection_3(Fl_ComboBox *a, void *b) { progStatus.hamcast_mode_selection_3 = cbo_hamcast_mode_selection_3->index(); if(!assign_bc_modem_list()) { progStatus.hamcast_mode_cycle = false; btn_hamcast_mode_cycle->value(progStatus.hamcast_mode_cycle); } estimate_bc(); } /** ******************************************************** * ***********************************************************/ void cb_hamcast_mode_enable_4(Fl_Check_Button *a, void *b) { progStatus.hamcast_mode_enable_4 = btn_hamcast_mode_enable_4->value(); if(!assign_bc_modem_list()) { progStatus.hamcast_mode_cycle = false; btn_hamcast_mode_cycle->value(progStatus.hamcast_mode_cycle); } estimate_bc(); } /** ******************************************************** * ***********************************************************/ void cb_hamcast_mode_selection_4(Fl_ComboBox *a, void *b) { progStatus.hamcast_mode_selection_4 = cbo_hamcast_mode_selection_4->index(); if(!assign_bc_modem_list()) { progStatus.hamcast_mode_cycle = false; btn_hamcast_mode_cycle->value(progStatus.hamcast_mode_cycle); } estimate_bc(); } /** ******************************************************** * ***********************************************************/ void cb_enable_delete_warning(Fl_Check_Button *a, void *b) { progStatus.enable_delete_warning = btn_enable_delete_warning->value(); } /** ******************************************************** * ***********************************************************/ void cb_btn_send_relay(Fl_Button *a, void *b) { if(transmitting) { abort_request(); return; } send_relay_data(); } /** ******************************************************** * ***********************************************************/ void cb_btn_parse_relay_blocks(Fl_Button *a, void *b) { relay_missing_report(); } /** ******************************************************** * ***********************************************************/ void cb_relay_selected_blocks(Fl_Button *a, void *b) { update_rx_missing_blocks(); } /** ******************************************************** * ***********************************************************/ void cb_auto_rx_save(Fl_Check_Button *a, void *b) { progStatus.auto_rx_save = btn_auto_rx_save->value(); } /** ******************************************************** * ***********************************************************/ void cb_relay_retain_data(Fl_Check_Button *a, void *b) { progStatus.relay_retain_data = btn_relay_retain_data->value(); } /** ******************************************************** * ***********************************************************/ void cb_auto_rx_save_local_time(Fl_Check_Button *a, void *b) { progStatus.auto_rx_save_local_time = btn_auto_rx_save_local_time->value(); } /** ******************************************************** * ***********************************************************/ void cb_tab(Fl_Tabs *a, void *b) { int index = 0; Fl_Group *tmp = (Fl_Group *) a->value(); for(index = 0; index < tab_count; index++) { if(tmp == tab_pointers[index]) { break; } } progStatus.tab_saved_state = index; } /** ******************************************************** * ***********************************************************/ void cb_cnt_repeat_relay_data(Fl_Counter *a, void *b) { progStatus.repeat_relay_data = cnt_repeat_relay_data->value(); estimate_relay(); } /** ******************************************************** * ***********************************************************/ void cb_cnt_repeat_relay_header(Fl_Counter *a, void *b) { progStatus.repeat_relay_header = cnt_repeat_relay_header->value(); estimate_relay(); } /** ******************************************************** * ***********************************************************/ void cb_txt_relay_selected_blocks(Fl_Input2 *a, void *b) { estimate_relay(); } flamp-2.2.12/src/lzma/0000775000175000017500000000000014607053767011451 500000000000000flamp-2.2.12/src/lzma/Alloc.h0000644000175000017500000000110514463050062012550 00000000000000/* Alloc.h -- Memory allocation functions 2008-03-13 Igor Pavlov Public domain */ #ifndef __COMMON_ALLOC_H #define __COMMON_ALLOC_H #include void *MyAlloc(size_t size); void MyFree(void *address); #ifdef _WIN32 void SetLargePageSize(); void *MidAlloc(size_t size); void MidFree(void *address); void *BigAlloc(size_t size); void BigFree(void *address); #else #define MidAlloc(size) MyAlloc(size) #define MidFree(address) MyFree(address) #define BigAlloc(size) MyAlloc(size) #define BigFree(address) MyFree(address) #endif #endif flamp-2.2.12/src/lzma/LzHash.h0000644000175000017500000000402014463050062012706 00000000000000/* LzHash.h -- HASH functions for LZ algorithms 2008-10-04 : Igor Pavlov : Public domain */ #ifndef __LZHASH_H #define __LZHASH_H #define kHash2Size (1 << 10) #define kHash3Size (1 << 16) #define kHash4Size (1 << 20) #define kFix3HashSize (kHash2Size) #define kFix4HashSize (kHash2Size + kHash3Size) #define kFix5HashSize (kHash2Size + kHash3Size + kHash4Size) #define HASH2_CALC hashValue = cur[0] | ((LZ_UInt32)cur[1] << 8); #define HASH3_CALC { \ LZ_UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ hash2Value = temp & (kHash2Size - 1); \ hashValue = (temp ^ ((LZ_UInt32)cur[2] << 8)) & p->hashMask; } #define HASH4_CALC { \ LZ_UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ hash2Value = temp & (kHash2Size - 1); \ hash3Value = (temp ^ ((LZ_UInt32)cur[2] << 8)) & (kHash3Size - 1); \ hashValue = (temp ^ ((LZ_UInt32)cur[2] << 8) ^ (p->crc[cur[3]] << 5)) & p->hashMask; } #define HASH5_CALC { \ LZ_UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ hash2Value = temp & (kHash2Size - 1); \ hash3Value = (temp ^ ((LZ_UInt32)cur[2] << 8)) & (kHash3Size - 1); \ hash4Value = (temp ^ ((LZ_UInt32)cur[2] << 8) ^ (p->crc[cur[3]] << 5)); \ hashValue = (hash4Value ^ (p->crc[cur[4]] << 3)) & p->hashMask; \ hash4Value &= (kHash4Size - 1); } /* #define HASH_ZIP_CALC hashValue = ((cur[0] | ((LZ_UInt32)cur[1] << 8)) ^ p->crc[cur[2]]) & 0xFFFF; */ #define HASH_ZIP_CALC hashValue = ((cur[2] | ((LZ_UInt32)cur[0] << 8)) ^ p->crc[cur[1]]) & 0xFFFF; #define MT_HASH2_CALC \ hash2Value = (p->crc[cur[0]] ^ cur[1]) & (kHash2Size - 1); #define MT_HASH3_CALC { \ LZ_UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ hash2Value = temp & (kHash2Size - 1); \ hash3Value = (temp ^ ((LZ_UInt32)cur[2] << 8)) & (kHash3Size - 1); } #define MT_HASH4_CALC { \ LZ_UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ hash2Value = temp & (kHash2Size - 1); \ hash3Value = (temp ^ ((LZ_UInt32)cur[2] << 8)) & (kHash3Size - 1); \ hash4Value = (temp ^ ((LZ_UInt32)cur[2] << 8) ^ (p->crc[cur[3]] << 5)) & (kHash4Size - 1); } #endif flamp-2.2.12/src/lzma/LzFind.h0000644000175000017500000000640614463050062012715 00000000000000/* LzFind.h -- Match finder for LZ algorithms 2008-10-04 : Igor Pavlov : Public domain */ #ifndef __LZFIND_H #define __LZFIND_H #include "Types.h" typedef LZ_UInt32 CLzRef; typedef struct _CMatchFinder { Byte *buffer; LZ_UInt32 pos; LZ_UInt32 posLimit; LZ_UInt32 streamPos; LZ_UInt32 lenLimit; LZ_UInt32 cyclicBufferPos; LZ_UInt32 cyclicBufferSize; /* it must be = (historySize + 1) */ LZ_UInt32 matchMaxLen; CLzRef *hash; CLzRef *son; LZ_UInt32 hashMask; LZ_UInt32 cutValue; Byte *bufferBase; ISeqInStream *stream; int streamEndWasReached; LZ_UInt32 blockSize; LZ_UInt32 keepSizeBefore; LZ_UInt32 keepSizeAfter; LZ_UInt32 numHashBytes; int directInput; int btMode; /* int skipModeBits; */ int bigHash; LZ_UInt32 historySize; LZ_UInt32 fixedHashSize; LZ_UInt32 hashSizeSum; LZ_UInt32 numSons; SRes result; LZ_UInt32 crc[256]; } CMatchFinder; #define Inline_MatchFinder_GetPointerToCurrentPos(p) ((p)->buffer) #define Inline_MatchFinder_GetIndexByte(p, index) ((p)->buffer[(LZ_Int32)(index)]) #define Inline_MatchFinder_GetNumAvailableBytes(p) ((p)->streamPos - (p)->pos) int MatchFinder_NeedMove(CMatchFinder *p); Byte *MatchFinder_GetPointerToCurrentPos(CMatchFinder *p); void MatchFinder_MoveBlock(CMatchFinder *p); void MatchFinder_ReadIfRequired(CMatchFinder *p); void MatchFinder_Construct(CMatchFinder *p); /* Conditions: historySize <= 3 GB keepAddBufferBefore + matchMaxLen + keepAddBufferAfter < 511MB */ int MatchFinder_Create(CMatchFinder *p, LZ_UInt32 historySize, LZ_UInt32 keepAddBufferBefore, LZ_UInt32 matchMaxLen, LZ_UInt32 keepAddBufferAfter, ISzAlloc *alloc); void MatchFinder_Free(CMatchFinder *p, ISzAlloc *alloc); void MatchFinder_Normalize3(LZ_UInt32 subValue, CLzRef *items, LZ_UInt32 numItems); void MatchFinder_ReduceOffsets(CMatchFinder *p, LZ_UInt32 subValue); LZ_UInt32 * GetMatchesSpec1(LZ_UInt32 lenLimit, LZ_UInt32 curMatch, LZ_UInt32 pos, const Byte *buffer, CLzRef *son, LZ_UInt32 _cyclicBufferPos, LZ_UInt32 _cyclicBufferSize, LZ_UInt32 _cutValue, LZ_UInt32 *distances, LZ_UInt32 maxLen); /* Conditions: Mf_GetNumAvailableBytes_Func must be called before each Mf_GetMatchLen_Func. Mf_GetPointerToCurrentPos_Func's result must be used only before any other function */ typedef void (*Mf_Init_Func)(void *object); typedef Byte (*Mf_GetIndexByte_Func)(void *object, LZ_Int32 index); typedef LZ_UInt32 (*Mf_GetNumAvailableBytes_Func)(void *object); typedef const Byte * (*Mf_GetPointerToCurrentPos_Func)(void *object); typedef LZ_UInt32 (*Mf_GetMatches_Func)(void *object, LZ_UInt32 *distances); typedef void (*Mf_Skip_Func)(void *object, LZ_UInt32); typedef struct _IMatchFinder { Mf_Init_Func Init; Mf_GetIndexByte_Func GetIndexByte; Mf_GetNumAvailableBytes_Func GetNumAvailableBytes; Mf_GetPointerToCurrentPos_Func GetPointerToCurrentPos; Mf_GetMatches_Func GetMatches; Mf_Skip_Func Skip; } IMatchFinder; void MatchFinder_CreateVTable(CMatchFinder *p, IMatchFinder *vTable); void MatchFinder_Init(CMatchFinder *p); LZ_UInt32 Bt3Zip_MatchFinder_GetMatches(CMatchFinder *p, LZ_UInt32 *distances); LZ_UInt32 Hc3Zip_MatchFinder_GetMatches(CMatchFinder *p, LZ_UInt32 *distances); void Bt3Zip_MatchFinder_Skip(CMatchFinder *p, LZ_UInt32 num); void Hc3Zip_MatchFinder_Skip(CMatchFinder *p, LZ_UInt32 num); #endif flamp-2.2.12/src/lzma/Alloc.c0000644000175000017500000000502714463050062012552 00000000000000/* Alloc.c -- Memory allocation functions 2008-09-24 Igor Pavlov Public domain */ #ifdef _WIN32 #include #endif #include #include "Alloc.h" /* #define _SZ_ALLOC_DEBUG */ /* use _SZ_ALLOC_DEBUG to debug alloc/free operations */ #ifdef _SZ_ALLOC_DEBUG #include int g_allocCount = 0; int g_allocCountMid = 0; int g_allocCountBig = 0; #endif void *MyAlloc(size_t size) { if (size == 0) return 0; #ifdef _SZ_ALLOC_DEBUG { void *p = malloc(size); fprintf(stderr, "\nAlloc %10d bytes, count = %10d, addr = %8X", size, g_allocCount++, (unsigned)p); return p; } #else return malloc(size); #endif } void MyFree(void *address) { #ifdef _SZ_ALLOC_DEBUG if (address != 0) fprintf(stderr, "\nFree; count = %10d, addr = %8X", --g_allocCount, (unsigned)address); #endif free(address); } #ifdef _WIN32 void *MidAlloc(size_t size) { if (size == 0) return 0; #ifdef _SZ_ALLOC_DEBUG fprintf(stderr, "\nAlloc_Mid %10d bytes; count = %10d", size, g_allocCountMid++); #endif return VirtualAlloc(0, size, MEM_COMMIT, PAGE_READWRITE); } void MidFree(void *address) { #ifdef _SZ_ALLOC_DEBUG if (address != 0) fprintf(stderr, "\nFree_Mid; count = %10d", --g_allocCountMid); #endif if (address == 0) return; VirtualFree(address, 0, MEM_RELEASE); } #ifndef MEM_LARGE_PAGES #undef _7ZIP_LARGE_PAGES #endif #ifdef _7ZIP_LARGE_PAGES SIZE_T g_LargePageSize = 0; typedef SIZE_T (WINAPI *GetLargePageMinimumP)(); #endif void SetLargePageSize() { #ifdef _7ZIP_LARGE_PAGES SIZE_T size = 0; GetLargePageMinimumP largePageMinimum = (GetLargePageMinimumP) GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "GetLargePageMinimum"); if (largePageMinimum == 0) return; size = largePageMinimum(); if (size == 0 || (size & (size - 1)) != 0) return; g_LargePageSize = size; #endif } void *BigAlloc(size_t size) { if (size == 0) return 0; #ifdef _SZ_ALLOC_DEBUG fprintf(stderr, "\nAlloc_Big %10d bytes; count = %10d", size, g_allocCountBig++); #endif #ifdef _7ZIP_LARGE_PAGES if (g_LargePageSize != 0 && g_LargePageSize <= (1 << 30) && size >= (1 << 18)) { void *res = VirtualAlloc(0, (size + g_LargePageSize - 1) & (~(g_LargePageSize - 1)), MEM_COMMIT | MEM_LARGE_PAGES, PAGE_READWRITE); if (res != 0) return res; } #endif return VirtualAlloc(0, size, MEM_COMMIT, PAGE_READWRITE); } void BigFree(void *address) { #ifdef _SZ_ALLOC_DEBUG if (address != 0) fprintf(stderr, "\nFree_Big; count = %10d", --g_allocCountBig); #endif if (address == 0) return; VirtualFree(address, 0, MEM_RELEASE); } #endif flamp-2.2.12/src/lzma/LzmaDec.c0000644000175000017500000006062414463050062013043 00000000000000/* LzmaDec.c -- LZMA Decoder 2008-11-06 : Igor Pavlov : Public domain */ #include "LzmaDec.h" #include #define kNumTopBits 24 #define kTopValue ((LZ_UInt32)1 << kNumTopBits) #define kNumBitModelTotalBits 11 #define kBitModelTotal (1 << kNumBitModelTotalBits) #define kNumMoveBits 5 #define RC_INIT_SIZE 5 #define NORMALIZE if (range < kTopValue) { range <<= 8; code = (code << 8) | (*buf++); } #define IF_BIT_0(p) ttt = *(p); NORMALIZE; bound = (range >> kNumBitModelTotalBits) * ttt; if (code < bound) #define UPDATE_0(p) range = bound; *(p) = (CLzmaProb)(ttt + ((kBitModelTotal - ttt) >> kNumMoveBits)); #define UPDATE_1(p) range -= bound; code -= bound; *(p) = (CLzmaProb)(ttt - (ttt >> kNumMoveBits)); #define GET_BIT2(p, i, A0, A1) IF_BIT_0(p) \ { UPDATE_0(p); i = (i + i); A0; } else \ { UPDATE_1(p); i = (i + i) + 1; A1; } #define GET_BIT(p, i) GET_BIT2(p, i, ; , ;) #define TREE_GET_BIT(probs, i) { GET_BIT((probs + i), i); } #define TREE_DECODE(probs, limit, i) \ { i = 1; do { TREE_GET_BIT(probs, i); } while (i < limit); i -= limit; } /* #define _LZMA_SIZE_OPT */ #ifdef _LZMA_SIZE_OPT #define TREE_6_DECODE(probs, i) TREE_DECODE(probs, (1 << 6), i) #else #define TREE_6_DECODE(probs, i) \ { i = 1; \ TREE_GET_BIT(probs, i); \ TREE_GET_BIT(probs, i); \ TREE_GET_BIT(probs, i); \ TREE_GET_BIT(probs, i); \ TREE_GET_BIT(probs, i); \ TREE_GET_BIT(probs, i); \ i -= 0x40; } #endif #define NORMALIZE_CHECK if (range < kTopValue) { if (buf >= bufLimit) return DUMMY_ERROR; range <<= 8; code = (code << 8) | (*buf++); } #define IF_BIT_0_CHECK(p) ttt = *(p); NORMALIZE_CHECK; bound = (range >> kNumBitModelTotalBits) * ttt; if (code < bound) #define UPDATE_0_CHECK range = bound; #define UPDATE_1_CHECK range -= bound; code -= bound; #define GET_BIT2_CHECK(p, i, A0, A1) IF_BIT_0_CHECK(p) \ { UPDATE_0_CHECK; i = (i + i); A0; } else \ { UPDATE_1_CHECK; i = (i + i) + 1; A1; } #define GET_BIT_CHECK(p, i) GET_BIT2_CHECK(p, i, ; , ;) #define TREE_DECODE_CHECK(probs, limit, i) \ { i = 1; do { GET_BIT_CHECK(probs + i, i) } while (i < limit); i -= limit; } #define kNumPosBitsMax 4 #define kNumPosStatesMax (1 << kNumPosBitsMax) #define kLenNumLowBits 3 #define kLenNumLowSymbols (1 << kLenNumLowBits) #define kLenNumMidBits 3 #define kLenNumMidSymbols (1 << kLenNumMidBits) #define kLenNumHighBits 8 #define kLenNumHighSymbols (1 << kLenNumHighBits) #define LenChoice 0 #define LenChoice2 (LenChoice + 1) #define LenLow (LenChoice2 + 1) #define LenMid (LenLow + (kNumPosStatesMax << kLenNumLowBits)) #define LenHigh (LenMid + (kNumPosStatesMax << kLenNumMidBits)) #define kNumLenProbs (LenHigh + kLenNumHighSymbols) #define kNumStates 12 #define kNumLitStates 7 #define kStartPosModelIndex 4 #define kEndPosModelIndex 14 #define kNumFullDistances (1 << (kEndPosModelIndex >> 1)) #define kNumPosSlotBits 6 #define kNumLenToPosStates 4 #define kNumAlignBits 4 #define kAlignTableSize (1 << kNumAlignBits) #define kMatchMinLen 2 #define kMatchSpecLenStart (kMatchMinLen + kLenNumLowSymbols + kLenNumMidSymbols + kLenNumHighSymbols) #define IsMatch 0 #define IsRep (IsMatch + (kNumStates << kNumPosBitsMax)) #define IsRepG0 (IsRep + kNumStates) #define IsRepG1 (IsRepG0 + kNumStates) #define IsRepG2 (IsRepG1 + kNumStates) #define IsRep0Long (IsRepG2 + kNumStates) #define PosSlot (IsRep0Long + (kNumStates << kNumPosBitsMax)) #define SpecPos (PosSlot + (kNumLenToPosStates << kNumPosSlotBits)) #define Align (SpecPos + kNumFullDistances - kEndPosModelIndex) #define LenCoder (Align + kAlignTableSize) #define RepLenCoder (LenCoder + kNumLenProbs) #define Literal (RepLenCoder + kNumLenProbs) #define LZMA_BASE_SIZE 1846 #define LZMA_LIT_SIZE 768 #define LzmaProps_GetNumProbs(p) ((LZ_UInt32)LZMA_BASE_SIZE + (LZMA_LIT_SIZE << ((p)->lc + (p)->lp))) #if Literal != LZMA_BASE_SIZE StopCompilingDueBUG #endif const char *LZMA_ERRORS[] = { "SZ_OK", "SZ_ERROR_DATA", "SZ_ERROR_MEM", "SZ_ERROR_CRC", "SZ_ERROR_UNSUPPORTED", "SZ_ERROR_PARAM", "SZ_ERROR_INPUT_EOF", "SZ_ERROR_OUTPUT_EOF", "SZ_ERROR_READ", "SZ_ERROR_WRITE", "SZ_ERROR_PROGRESS", "SZ_ERROR_FAIL", "SZ_ERROR_THREAD", "n/a", "n/a", "n/a", "SZ_ERROR_ARCHIVE", "SZ_ERROR_NO_ARCHIVE"}; static const Byte kLiteralNextStates[kNumStates * 2] = { 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 4, 5, 7, 7, 7, 7, 7, 7, 7, 10, 10, 10, 10, 10 }; #define LZMA_DIC_MIN (1 << 12) /* First LZMA-symbol is always decoded. And it decodes new LZMA-symbols while (buf < bufLimit), but "buf" is without last normalization Out: Result: SZ_OK - OK SZ_ERROR_DATA - Error p->remainLen: < kMatchSpecLenStart : normal remain = kMatchSpecLenStart : finished = kMatchSpecLenStart + 1 : Flush marker = kMatchSpecLenStart + 2 : State Init Marker */ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte *bufLimit) { CLzmaProb *probs = p->probs; unsigned state = p->state; LZ_UInt32 rep0 = p->reps[0], rep1 = p->reps[1], rep2 = p->reps[2], rep3 = p->reps[3]; unsigned pbMask = ((unsigned)1 << (p->prop.pb)) - 1; unsigned lpMask = ((unsigned)1 << (p->prop.lp)) - 1; unsigned lc = p->prop.lc; Byte *dic = p->dic; SizeT dicBufSize = p->dicBufSize; SizeT dicPos = p->dicPos; LZ_UInt32 processedPos = p->processedPos; LZ_UInt32 checkDicSize = p->checkDicSize; unsigned len = 0; const Byte *buf = p->buf; LZ_UInt32 range = p->range; LZ_UInt32 code = p->code; do { CLzmaProb *prob; LZ_UInt32 bound; unsigned ttt; unsigned posState = processedPos & pbMask; prob = probs + IsMatch + (state << kNumPosBitsMax) + posState; IF_BIT_0(prob) { unsigned symbol; UPDATE_0(prob); prob = probs + Literal; if (checkDicSize != 0 || processedPos != 0) prob += (LZMA_LIT_SIZE * (((processedPos & lpMask) << lc) + (dic[(dicPos == 0 ? dicBufSize : dicPos) - 1] >> (8 - lc)))); if (state < kNumLitStates) { symbol = 1; do { GET_BIT(prob + symbol, symbol) } while (symbol < 0x100); } else { unsigned matchByte = p->dic[(dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0)]; unsigned offs = 0x100; symbol = 1; do { unsigned bit; CLzmaProb *probLit; matchByte <<= 1; bit = (matchByte & offs); probLit = prob + offs + bit + symbol; GET_BIT2(probLit, symbol, offs &= ~bit, offs &= bit) } while (symbol < 0x100); } dic[dicPos++] = (Byte)symbol; processedPos++; state = kLiteralNextStates[state]; /* if (state < 4) state = 0; else if (state < 10) state -= 3; else state -= 6; */ continue; } else { UPDATE_1(prob); prob = probs + IsRep + state; IF_BIT_0(prob) { UPDATE_0(prob); state += kNumStates; prob = probs + LenCoder; } else { UPDATE_1(prob); if (checkDicSize == 0 && processedPos == 0) return SZ_ERROR_DATA; prob = probs + IsRepG0 + state; IF_BIT_0(prob) { UPDATE_0(prob); prob = probs + IsRep0Long + (state << kNumPosBitsMax) + posState; IF_BIT_0(prob) { UPDATE_0(prob); dic[dicPos] = dic[(dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0)]; dicPos++; processedPos++; state = state < kNumLitStates ? 9 : 11; continue; } UPDATE_1(prob); } else { LZ_UInt32 distance; UPDATE_1(prob); prob = probs + IsRepG1 + state; IF_BIT_0(prob) { UPDATE_0(prob); distance = rep1; } else { UPDATE_1(prob); prob = probs + IsRepG2 + state; IF_BIT_0(prob) { UPDATE_0(prob); distance = rep2; } else { UPDATE_1(prob); distance = rep3; rep3 = rep2; } rep2 = rep1; } rep1 = rep0; rep0 = distance; } state = state < kNumLitStates ? 8 : 11; prob = probs + RepLenCoder; } { unsigned limit, offset; CLzmaProb *probLen = prob + LenChoice; IF_BIT_0(probLen) { UPDATE_0(probLen); probLen = prob + LenLow + (posState << kLenNumLowBits); offset = 0; limit = (1 << kLenNumLowBits); } else { UPDATE_1(probLen); probLen = prob + LenChoice2; IF_BIT_0(probLen) { UPDATE_0(probLen); probLen = prob + LenMid + (posState << kLenNumMidBits); offset = kLenNumLowSymbols; limit = (1 << kLenNumMidBits); } else { UPDATE_1(probLen); probLen = prob + LenHigh; offset = kLenNumLowSymbols + kLenNumMidSymbols; limit = (1 << kLenNumHighBits); } } TREE_DECODE(probLen, limit, len); len += offset; } if (state >= kNumStates) { LZ_UInt32 distance; prob = probs + PosSlot + ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) << kNumPosSlotBits); TREE_6_DECODE(prob, distance); if (distance >= kStartPosModelIndex) { unsigned posSlot = (unsigned)distance; int numDirectBits = (int)(((distance >> 1) - 1)); distance = (2 | (distance & 1)); if (posSlot < kEndPosModelIndex) { distance <<= numDirectBits; prob = probs + SpecPos + distance - posSlot - 1; { LZ_UInt32 mask = 1; unsigned i = 1; do { GET_BIT2(prob + i, i, ; , distance |= mask); mask <<= 1; } while (--numDirectBits != 0); } } else { numDirectBits -= kNumAlignBits; do { NORMALIZE range >>= 1; { LZ_UInt32 t; code -= range; t = (0 - ((LZ_UInt32)code >> 31)); /* (LZ_UInt32)((LZ_Int32)code >> 31) */ distance = (distance << 1) + (t + 1); code += range & t; } /* distance <<= 1; if (code >= range) { code -= range; distance |= 1; } */ } while (--numDirectBits != 0); prob = probs + Align; distance <<= kNumAlignBits; { unsigned i = 1; GET_BIT2(prob + i, i, ; , distance |= 1); GET_BIT2(prob + i, i, ; , distance |= 2); GET_BIT2(prob + i, i, ; , distance |= 4); GET_BIT2(prob + i, i, ; , distance |= 8); } if (distance == (LZ_UInt32)0xFFFFFFFF) { len += kMatchSpecLenStart; state -= kNumStates; break; } } } rep3 = rep2; rep2 = rep1; rep1 = rep0; rep0 = distance + 1; if (checkDicSize == 0) { if (distance >= processedPos) return SZ_ERROR_DATA; } else if (distance >= checkDicSize) return SZ_ERROR_DATA; state = (state < kNumStates + kNumLitStates) ? kNumLitStates : kNumLitStates + 3; /* state = kLiteralNextStates[state]; */ } len += kMatchMinLen; if (limit == dicPos) return SZ_ERROR_DATA; { SizeT rem = limit - dicPos; unsigned curLen = ((rem < len) ? (unsigned)rem : len); SizeT pos = (dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0); processedPos += curLen; len -= curLen; if (pos + curLen <= dicBufSize) { Byte *dest = dic + dicPos; ptrdiff_t src = (ptrdiff_t)pos - (ptrdiff_t)dicPos; const Byte *lim = dest + curLen; dicPos += curLen; do *(dest) = (Byte)*(dest + src); while (++dest != lim); } else { do { dic[dicPos++] = dic[pos]; if (++pos == dicBufSize) pos = 0; } while (--curLen != 0); } } } } while (dicPos < limit && buf < bufLimit); NORMALIZE; p->buf = buf; p->range = range; p->code = code; p->remainLen = len; p->dicPos = dicPos; p->processedPos = processedPos; p->reps[0] = rep0; p->reps[1] = rep1; p->reps[2] = rep2; p->reps[3] = rep3; p->state = state; return SZ_OK; } static void MY_FAST_CALL LzmaDec_WriteRem(CLzmaDec *p, SizeT limit) { if (p->remainLen != 0 && p->remainLen < kMatchSpecLenStart) { Byte *dic = p->dic; SizeT dicPos = p->dicPos; SizeT dicBufSize = p->dicBufSize; unsigned len = p->remainLen; LZ_UInt32 rep0 = p->reps[0]; if (limit - dicPos < len) len = (unsigned)(limit - dicPos); if (p->checkDicSize == 0 && p->prop.dicSize - p->processedPos <= len) p->checkDicSize = p->prop.dicSize; p->processedPos += len; p->remainLen -= len; while (len-- != 0) { dic[dicPos] = dic[(dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0)]; dicPos++; } p->dicPos = dicPos; } } static int MY_FAST_CALL LzmaDec_DecodeReal2(CLzmaDec *p, SizeT limit, const Byte *bufLimit) { do { SizeT limit2 = limit; if (p->checkDicSize == 0) { LZ_UInt32 rem = p->prop.dicSize - p->processedPos; if (limit - p->dicPos > rem) limit2 = p->dicPos + rem; } RINOK(LzmaDec_DecodeReal(p, limit2, bufLimit)); if (p->processedPos >= p->prop.dicSize) p->checkDicSize = p->prop.dicSize; LzmaDec_WriteRem(p, limit); } while (p->dicPos < limit && p->buf < bufLimit && p->remainLen < kMatchSpecLenStart); if (p->remainLen > kMatchSpecLenStart) { p->remainLen = kMatchSpecLenStart; } return 0; } typedef enum { DUMMY_ERROR, /* unexpected end of input stream */ DUMMY_LIT, DUMMY_MATCH, DUMMY_REP } ELzmaDummy; static ELzmaDummy LzmaDec_TryDummy(const CLzmaDec *p, const Byte *buf, SizeT inSize) { LZ_UInt32 range = p->range; LZ_UInt32 code = p->code; const Byte *bufLimit = buf + inSize; CLzmaProb *probs = p->probs; unsigned state = p->state; ELzmaDummy res; { CLzmaProb *prob; LZ_UInt32 bound; unsigned ttt; unsigned posState = (p->processedPos) & ((1 << p->prop.pb) - 1); prob = probs + IsMatch + (state << kNumPosBitsMax) + posState; IF_BIT_0_CHECK(prob) { UPDATE_0_CHECK /* if (bufLimit - buf >= 7) return DUMMY_LIT; */ prob = probs + Literal; if (p->checkDicSize != 0 || p->processedPos != 0) prob += (LZMA_LIT_SIZE * ((((p->processedPos) & ((1 << (p->prop.lp)) - 1)) << p->prop.lc) + (p->dic[(p->dicPos == 0 ? p->dicBufSize : p->dicPos) - 1] >> (8 - p->prop.lc)))); if (state < kNumLitStates) { unsigned symbol = 1; do { GET_BIT_CHECK(prob + symbol, symbol) } while (symbol < 0x100); } else { unsigned matchByte = p->dic[p->dicPos - p->reps[0] + ((p->dicPos < p->reps[0]) ? p->dicBufSize : 0)]; unsigned offs = 0x100; unsigned symbol = 1; do { unsigned bit; CLzmaProb *probLit; matchByte <<= 1; bit = (matchByte & offs); probLit = prob + offs + bit + symbol; GET_BIT2_CHECK(probLit, symbol, offs &= ~bit, offs &= bit) } while (symbol < 0x100); } res = DUMMY_LIT; } else { unsigned len; UPDATE_1_CHECK; prob = probs + IsRep + state; IF_BIT_0_CHECK(prob) { UPDATE_0_CHECK; state = 0; prob = probs + LenCoder; res = DUMMY_MATCH; } else { UPDATE_1_CHECK; res = DUMMY_REP; prob = probs + IsRepG0 + state; IF_BIT_0_CHECK(prob) { UPDATE_0_CHECK; prob = probs + IsRep0Long + (state << kNumPosBitsMax) + posState; IF_BIT_0_CHECK(prob) { UPDATE_0_CHECK; NORMALIZE_CHECK; return DUMMY_REP; } else { UPDATE_1_CHECK; } } else { UPDATE_1_CHECK; prob = probs + IsRepG1 + state; IF_BIT_0_CHECK(prob) { UPDATE_0_CHECK; } else { UPDATE_1_CHECK; prob = probs + IsRepG2 + state; IF_BIT_0_CHECK(prob) { UPDATE_0_CHECK; } else { UPDATE_1_CHECK; } } } state = kNumStates; prob = probs + RepLenCoder; } { unsigned limit, offset; CLzmaProb *probLen = prob + LenChoice; IF_BIT_0_CHECK(probLen) { UPDATE_0_CHECK; probLen = prob + LenLow + (posState << kLenNumLowBits); offset = 0; limit = 1 << kLenNumLowBits; } else { UPDATE_1_CHECK; probLen = prob + LenChoice2; IF_BIT_0_CHECK(probLen) { UPDATE_0_CHECK; probLen = prob + LenMid + (posState << kLenNumMidBits); offset = kLenNumLowSymbols; limit = 1 << kLenNumMidBits; } else { UPDATE_1_CHECK; probLen = prob + LenHigh; offset = kLenNumLowSymbols + kLenNumMidSymbols; limit = 1 << kLenNumHighBits; } } TREE_DECODE_CHECK(probLen, limit, len); len += offset; } if (state < 4) { unsigned posSlot; prob = probs + PosSlot + ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) << kNumPosSlotBits); TREE_DECODE_CHECK(prob, 1 << kNumPosSlotBits, posSlot); if (posSlot >= kStartPosModelIndex) { int numDirectBits = ((posSlot >> 1) - 1); /* if (bufLimit - buf >= 8) return DUMMY_MATCH; */ if (posSlot < kEndPosModelIndex) { prob = probs + SpecPos + ((2 | (posSlot & 1)) << numDirectBits) - posSlot - 1; } else { numDirectBits -= kNumAlignBits; do { NORMALIZE_CHECK range >>= 1; code -= range & (((code - range) >> 31) - 1); /* if (code >= range) code -= range; */ } while (--numDirectBits != 0); prob = probs + Align; numDirectBits = kNumAlignBits; } { unsigned i = 1; do { GET_BIT_CHECK(prob + i, i); } while (--numDirectBits != 0); } } } } } NORMALIZE_CHECK; return res; } static void LzmaDec_InitRc(CLzmaDec *p, const Byte *data) { p->code = ((LZ_UInt32)data[1] << 24) | ((LZ_UInt32)data[2] << 16) | ((LZ_UInt32)data[3] << 8) | ((LZ_UInt32)data[4]); p->range = 0xFFFFFFFF; p->needFlush = 0; } void LzmaDec_InitDicAndState(CLzmaDec *p, int initDic, int initState) { p->needFlush = 1; p->remainLen = 0; p->tempBufSize = 0; if (initDic) { p->processedPos = 0; p->checkDicSize = 0; p->needInitState = 1; } if (initState) p->needInitState = 1; } void LzmaDec_Init(CLzmaDec *p) { p->dicPos = 0; LzmaDec_InitDicAndState(p, True, True); } static void LzmaDec_InitStateReal(CLzmaDec *p) { LZ_UInt32 numProbs = Literal + ((LZ_UInt32)LZMA_LIT_SIZE << (p->prop.lc + p->prop.lp)); LZ_UInt32 i; CLzmaProb *probs = p->probs; for (i = 0; i < numProbs; i++) probs[i] = kBitModelTotal >> 1; p->reps[0] = p->reps[1] = p->reps[2] = p->reps[3] = 1; p->state = 0; p->needInitState = 0; } SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit, const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status) { SizeT inSize = *srcLen; (*srcLen) = 0; LzmaDec_WriteRem(p, dicLimit); *status = LZMA_STATUS_NOT_SPECIFIED; while (p->remainLen != kMatchSpecLenStart) { int checkEndMarkNow; if (p->needFlush != 0) { for (; inSize > 0 && p->tempBufSize < RC_INIT_SIZE; (*srcLen)++, inSize--) p->tempBuf[p->tempBufSize++] = *src++; if (p->tempBufSize < RC_INIT_SIZE) { *status = LZMA_STATUS_NEEDS_MORE_INPUT; return SZ_OK; } if (p->tempBuf[0] != 0) return SZ_ERROR_DATA; LzmaDec_InitRc(p, p->tempBuf); p->tempBufSize = 0; } checkEndMarkNow = 0; if (p->dicPos >= dicLimit) { if (p->remainLen == 0 && p->code == 0) { *status = LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK; return SZ_OK; } if (finishMode == LZMA_FINISH_ANY) { *status = LZMA_STATUS_NOT_FINISHED; return SZ_OK; } if (p->remainLen != 0) { *status = LZMA_STATUS_NOT_FINISHED; return SZ_ERROR_DATA; } checkEndMarkNow = 1; } if (p->needInitState) LzmaDec_InitStateReal(p); if (p->tempBufSize == 0) { SizeT processed; const Byte *bufLimit; if (inSize < LZMA_REQUIRED_INPUT_MAX || checkEndMarkNow) { int dummyRes = LzmaDec_TryDummy(p, src, inSize); if (dummyRes == DUMMY_ERROR) { memcpy(p->tempBuf, src, inSize); p->tempBufSize = (unsigned)inSize; (*srcLen) += inSize; *status = LZMA_STATUS_NEEDS_MORE_INPUT; return SZ_OK; } if (checkEndMarkNow && dummyRes != DUMMY_MATCH) { *status = LZMA_STATUS_NOT_FINISHED; return SZ_ERROR_DATA; } bufLimit = src; } else bufLimit = src + inSize - LZMA_REQUIRED_INPUT_MAX; p->buf = src; if (LzmaDec_DecodeReal2(p, dicLimit, bufLimit) != 0) return SZ_ERROR_DATA; processed = (SizeT)(p->buf - src); (*srcLen) += processed; src += processed; inSize -= processed; } else { unsigned rem = p->tempBufSize, lookAhead = 0; while (rem < LZMA_REQUIRED_INPUT_MAX && lookAhead < inSize) p->tempBuf[rem++] = src[lookAhead++]; p->tempBufSize = rem; if (rem < LZMA_REQUIRED_INPUT_MAX || checkEndMarkNow) { int dummyRes = LzmaDec_TryDummy(p, p->tempBuf, rem); if (dummyRes == DUMMY_ERROR) { (*srcLen) += lookAhead; *status = LZMA_STATUS_NEEDS_MORE_INPUT; return SZ_OK; } if (checkEndMarkNow && dummyRes != DUMMY_MATCH) { *status = LZMA_STATUS_NOT_FINISHED; return SZ_ERROR_DATA; } } p->buf = p->tempBuf; if (LzmaDec_DecodeReal2(p, dicLimit, p->buf) != 0) return SZ_ERROR_DATA; lookAhead -= (rem - (unsigned)(p->buf - p->tempBuf)); (*srcLen) += lookAhead; src += lookAhead; inSize -= lookAhead; p->tempBufSize = 0; } } if (p->code == 0) *status = LZMA_STATUS_FINISHED_WITH_MARK; return (p->code == 0) ? SZ_OK : SZ_ERROR_DATA; } SRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status) { SizeT outSize = *destLen; SizeT inSize = *srcLen; *srcLen = *destLen = 0; for (;;) { SizeT inSizeCur = inSize, outSizeCur, dicPos; ELzmaFinishMode curFinishMode; SRes res; if (p->dicPos == p->dicBufSize) p->dicPos = 0; dicPos = p->dicPos; if (outSize > p->dicBufSize - dicPos) { outSizeCur = p->dicBufSize; curFinishMode = LZMA_FINISH_ANY; } else { outSizeCur = dicPos + outSize; curFinishMode = finishMode; } res = LzmaDec_DecodeToDic(p, outSizeCur, src, &inSizeCur, curFinishMode, status); src += inSizeCur; inSize -= inSizeCur; *srcLen += inSizeCur; outSizeCur = p->dicPos - dicPos; memcpy(dest, p->dic + dicPos, outSizeCur); dest += outSizeCur; outSize -= outSizeCur; *destLen += outSizeCur; if (res != 0) return res; if (outSizeCur == 0 || outSize == 0) return SZ_OK; } } void LzmaDec_FreeProbs(CLzmaDec *p, ISzAlloc *alloc) { alloc->Free(alloc, p->probs); p->probs = 0; } static void LzmaDec_FreeDict(CLzmaDec *p, ISzAlloc *alloc) { alloc->Free(alloc, p->dic); p->dic = 0; } void LzmaDec_Free(CLzmaDec *p, ISzAlloc *alloc) { LzmaDec_FreeProbs(p, alloc); LzmaDec_FreeDict(p, alloc); } SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size) { LZ_UInt32 dicSize; Byte d; if (size < LZMA_PROPS_SIZE) return SZ_ERROR_UNSUPPORTED; else dicSize = data[1] | ((LZ_UInt32)data[2] << 8) | ((LZ_UInt32)data[3] << 16) | ((LZ_UInt32)data[4] << 24); if (dicSize < LZMA_DIC_MIN) dicSize = LZMA_DIC_MIN; p->dicSize = dicSize; d = data[0]; if (d >= (9 * 5 * 5)) return SZ_ERROR_UNSUPPORTED; p->lc = d % 9; d /= 9; p->pb = d / 5; p->lp = d % 5; return SZ_OK; } static SRes LzmaDec_AllocateProbs2(CLzmaDec *p, const CLzmaProps *propNew, ISzAlloc *alloc) { LZ_UInt32 numProbs = LzmaProps_GetNumProbs(propNew); if (p->probs == 0 || numProbs != p->numProbs) { LzmaDec_FreeProbs(p, alloc); p->probs = (CLzmaProb *)alloc->Alloc(alloc, numProbs * sizeof(CLzmaProb)); p->numProbs = numProbs; if (p->probs == 0) return SZ_ERROR_MEM; } return SZ_OK; } SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc) { CLzmaProps propNew; RINOK(LzmaProps_Decode(&propNew, props, propsSize)); RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc)); p->prop = propNew; return SZ_OK; } SRes LzmaDec_Allocate(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc) { CLzmaProps propNew; SizeT dicBufSize; RINOK(LzmaProps_Decode(&propNew, props, propsSize)); RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc)); dicBufSize = propNew.dicSize; if (p->dic == 0 || dicBufSize != p->dicBufSize) { LzmaDec_FreeDict(p, alloc); p->dic = (Byte *)alloc->Alloc(alloc, dicBufSize); if (p->dic == 0) { LzmaDec_FreeProbs(p, alloc); return SZ_ERROR_MEM; } } p->dicBufSize = dicBufSize; p->prop = propNew; return SZ_OK; } SRes LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode, ELzmaStatus *status, ISzAlloc *alloc) { CLzmaDec p; SRes res; SizeT inSize = *srcLen; SizeT outSize = *destLen; *srcLen = *destLen = 0; if (inSize < RC_INIT_SIZE) return SZ_ERROR_INPUT_EOF; LzmaDec_Construct(&p); res = LzmaDec_AllocateProbs(&p, propData, propSize, alloc); if (res != 0) return res; p.dic = dest; p.dicBufSize = outSize; LzmaDec_Init(&p); *srcLen = inSize; res = LzmaDec_DecodeToDic(&p, outSize, src, srcLen, finishMode, status); if (res == SZ_OK && *status == LZMA_STATUS_NEEDS_MORE_INPUT) res = SZ_ERROR_INPUT_EOF; (*destLen) = p.dicPos; LzmaDec_FreeProbs(&p, alloc); return res; } flamp-2.2.12/src/lzma/LzmaEnc.c0000644000175000017500000016477014463050062013064 00000000000000/* LzmaEnc.c -- LZMA Encoder 2009-02-02 : Igor Pavlov : Public domain */ #include /* #define SHOW_STAT */ /* #define SHOW_STAT2 */ #if defined(SHOW_STAT) || defined(SHOW_STAT2) #include #endif #include "LzmaEnc.h" #include "LzFind.h" #ifdef COMPRESS_MF_MT #include "LzFindMt.h" #endif #ifdef SHOW_STAT static int ttt = 0; #endif #define kBlockSizeMax ((1 << LZMA_NUM_BLOCK_SIZE_BITS) - 1) #define kBlockSize (9 << 10) #define kUnpackBlockSize (1 << 18) #define kMatchArraySize (1 << 21) #define kMatchRecordMaxSize ((LZMA_MATCH_LEN_MAX * 2 + 3) * LZMA_MATCH_LEN_MAX) #define kNumMaxDirectBits (31) #define kNumTopBits 24 #define kTopValue ((LZ_UInt32)1 << kNumTopBits) #define kNumBitModelTotalBits 11 #define kBitModelTotal (1 << kNumBitModelTotalBits) #define kNumMoveBits 5 #define kProbInitValue (kBitModelTotal >> 1) #define kNumMoveReducingBits 4 #define kNumBitPriceShiftBits 4 #define kBitPrice (1 << kNumBitPriceShiftBits) void LzmaEncProps_Init(CLzmaEncProps *p) { p->level = 5; p->dictSize = p->mc = 0; p->lc = p->lp = p->pb = p->algo = p->fb = p->btMode = p->numHashBytes = p->numThreads = -1; p->writeEndMark = 0; } void LzmaEncProps_Normalize(CLzmaEncProps *p) { int level = p->level; if (level < 0) level = 5; p->level = level; if (p->dictSize == 0) p->dictSize = (level <= 5 ? (1 << (level * 2 + 14)) : (level == 6 ? (1 << 25) : (1 << 26))); if (p->lc < 0) p->lc = 3; if (p->lp < 0) p->lp = 0; if (p->pb < 0) p->pb = 2; if (p->algo < 0) p->algo = (level < 5 ? 0 : 1); if (p->fb < 0) p->fb = (level < 7 ? 32 : 64); if (p->btMode < 0) p->btMode = (p->algo == 0 ? 0 : 1); if (p->numHashBytes < 0) p->numHashBytes = 4; if (p->mc == 0) p->mc = (16 + (p->fb >> 1)) >> (p->btMode ? 0 : 1); if (p->numThreads < 0) p->numThreads = #ifdef COMPRESS_MF_MT ((p->btMode && p->algo) ? 2 : 1); #else 1; #endif } LZ_UInt32 LzmaEncProps_GetDictSize(const CLzmaEncProps *props2) { CLzmaEncProps props = *props2; LzmaEncProps_Normalize(&props); return props.dictSize; } /* #define LZMA_LOG_BSR */ /* Define it for Intel's CPU */ #ifdef LZMA_LOG_BSR #define kDicLogSizeMaxCompress 30 #define BSR2_RET(pos, res) { unsigned long i; _BitScanReverse(&i, (pos)); res = (i + i) + ((pos >> (i - 1)) & 1); } LZ_UInt32 GetPosSlot1(LZ_UInt32 pos) { LZ_UInt32 res; BSR2_RET(pos, res); return res; } #define GetPosSlot2(pos, res) { BSR2_RET(pos, res); } #define GetPosSlot(pos, res) { if (pos < 2) res = pos; else BSR2_RET(pos, res); } #else #define kNumLogBits (9 + (int)sizeof(size_t) / 2) #define kDicLogSizeMaxCompress ((kNumLogBits - 1) * 2 + 7) void LzmaEnc_FastPosInit(Byte *g_FastPos) { int c = 2, slotFast; g_FastPos[0] = 0; g_FastPos[1] = 1; for (slotFast = 2; slotFast < kNumLogBits * 2; slotFast++) { LZ_UInt32 k = (1 << ((slotFast >> 1) - 1)); LZ_UInt32 j; for (j = 0; j < k; j++, c++) g_FastPos[c] = (Byte)slotFast; } } #define BSR2_RET(pos, res) { LZ_UInt32 i = 6 + ((kNumLogBits - 1) & \ (0 - (((((LZ_UInt32)1 << (kNumLogBits + 6)) - 1) - pos) >> 31))); \ res = p->g_FastPos[pos >> i] + (i * 2); } /* #define BSR2_RET(pos, res) { res = (pos < (1 << (kNumLogBits + 6))) ? \ p->g_FastPos[pos >> 6] + 12 : \ p->g_FastPos[pos >> (6 + kNumLogBits - 1)] + (6 + (kNumLogBits - 1)) * 2; } */ #define GetPosSlot1(pos) p->g_FastPos[pos] #define GetPosSlot2(pos, res) { BSR2_RET(pos, res); } #define GetPosSlot(pos, res) { if (pos < kNumFullDistances) res = p->g_FastPos[pos]; else BSR2_RET(pos, res); } #endif #define LZMA_NUM_REPS 4 typedef unsigned CState; typedef struct _COptimal { LZ_UInt32 price; CState state; int prev1IsChar; int prev2; LZ_UInt32 posPrev2; LZ_UInt32 backPrev2; LZ_UInt32 posPrev; LZ_UInt32 backPrev; LZ_UInt32 backs[LZMA_NUM_REPS]; } COptimal; #define kNumOpts (1 << 12) #define kNumLenToPosStates 4 #define kNumPosSlotBits 6 #define kDicLogSizeMin 0 #define kDicLogSizeMax 32 #define kDistTableSizeMax (kDicLogSizeMax * 2) #define kNumAlignBits 4 #define kAlignTableSize (1 << kNumAlignBits) #define kAlignMask (kAlignTableSize - 1) #define kStartPosModelIndex 4 #define kEndPosModelIndex 14 #define kNumPosModels (kEndPosModelIndex - kStartPosModelIndex) #define kNumFullDistances (1 << (kEndPosModelIndex / 2)) #ifdef _LZMA_PROB32 #define CLzmaProb LZ_UInt32 #else #define CLzmaProb UInt16 #endif #define LZMA_PB_MAX 4 #define LZMA_LC_MAX 8 #define LZMA_LP_MAX 4 #define LZMA_NUM_PB_STATES_MAX (1 << LZMA_PB_MAX) #define kLenNumLowBits 3 #define kLenNumLowSymbols (1 << kLenNumLowBits) #define kLenNumMidBits 3 #define kLenNumMidSymbols (1 << kLenNumMidBits) #define kLenNumHighBits 8 #define kLenNumHighSymbols (1 << kLenNumHighBits) #define kLenNumSymbolsTotal (kLenNumLowSymbols + kLenNumMidSymbols + kLenNumHighSymbols) #define LZMA_MATCH_LEN_MIN 2 #define LZMA_MATCH_LEN_MAX (LZMA_MATCH_LEN_MIN + kLenNumSymbolsTotal - 1) #define kNumStates 12 typedef struct { CLzmaProb choice; CLzmaProb choice2; CLzmaProb low[LZMA_NUM_PB_STATES_MAX << kLenNumLowBits]; CLzmaProb mid[LZMA_NUM_PB_STATES_MAX << kLenNumMidBits]; CLzmaProb high[kLenNumHighSymbols]; } CLenEnc; typedef struct { CLenEnc p; LZ_UInt32 prices[LZMA_NUM_PB_STATES_MAX][kLenNumSymbolsTotal]; LZ_UInt32 tableSize; LZ_UInt32 counters[LZMA_NUM_PB_STATES_MAX]; } CLenPriceEnc; typedef struct _CRangeEnc { LZ_UInt32 range; Byte cache; LZ_UInt64 low; LZ_UInt64 cacheSize; Byte *buf; Byte *bufLim; Byte *bufBase; ISeqOutStream *outStream; LZ_UInt64 processed; SRes res; } CRangeEnc; typedef struct _CSeqInStreamBuf { ISeqInStream funcTable; const Byte *data; SizeT rem; } CSeqInStreamBuf; static SRes MyRead(void *pp, void *data, size_t *size) { size_t curSize = *size; CSeqInStreamBuf *p = (CSeqInStreamBuf *)pp; if (p->rem < curSize) curSize = p->rem; memcpy(data, p->data, curSize); p->rem -= curSize; p->data += curSize; *size = curSize; return SZ_OK; } typedef struct { CLzmaProb *litProbs; CLzmaProb isMatch[kNumStates][LZMA_NUM_PB_STATES_MAX]; CLzmaProb isRep[kNumStates]; CLzmaProb isRepG0[kNumStates]; CLzmaProb isRepG1[kNumStates]; CLzmaProb isRepG2[kNumStates]; CLzmaProb isRep0Long[kNumStates][LZMA_NUM_PB_STATES_MAX]; CLzmaProb posSlotEncoder[kNumLenToPosStates][1 << kNumPosSlotBits]; CLzmaProb posEncoders[kNumFullDistances - kEndPosModelIndex]; CLzmaProb posAlignEncoder[1 << kNumAlignBits]; CLenPriceEnc lenEnc; CLenPriceEnc repLenEnc; LZ_UInt32 reps[LZMA_NUM_REPS]; LZ_UInt32 state; } CSaveState; typedef struct _CLzmaEnc { IMatchFinder matchFinder; void *matchFinderObj; #ifdef COMPRESS_MF_MT int mtMode; CMatchFinderMt matchFinderMt; #endif CMatchFinder matchFinderBase; #ifdef COMPRESS_MF_MT Byte pad[128]; #endif LZ_UInt32 optimumEndIndex; LZ_UInt32 optimumCurrentIndex; LZ_UInt32 longestMatchLength; LZ_UInt32 numPairs; LZ_UInt32 numAvail; COptimal opt[kNumOpts]; #ifndef LZMA_LOG_BSR Byte g_FastPos[1 << kNumLogBits]; #endif LZ_UInt32 ProbPrices[kBitModelTotal >> kNumMoveReducingBits]; LZ_UInt32 matches[LZMA_MATCH_LEN_MAX * 2 + 2 + 1]; LZ_UInt32 numFastBytes; LZ_UInt32 additionalOffset; LZ_UInt32 reps[LZMA_NUM_REPS]; LZ_UInt32 state; LZ_UInt32 posSlotPrices[kNumLenToPosStates][kDistTableSizeMax]; LZ_UInt32 distancesPrices[kNumLenToPosStates][kNumFullDistances]; LZ_UInt32 alignPrices[kAlignTableSize]; LZ_UInt32 alignPriceCount; LZ_UInt32 distTableSize; unsigned lc, lp, pb; unsigned lpMask, pbMask; CLzmaProb *litProbs; CLzmaProb isMatch[kNumStates][LZMA_NUM_PB_STATES_MAX]; CLzmaProb isRep[kNumStates]; CLzmaProb isRepG0[kNumStates]; CLzmaProb isRepG1[kNumStates]; CLzmaProb isRepG2[kNumStates]; CLzmaProb isRep0Long[kNumStates][LZMA_NUM_PB_STATES_MAX]; CLzmaProb posSlotEncoder[kNumLenToPosStates][1 << kNumPosSlotBits]; CLzmaProb posEncoders[kNumFullDistances - kEndPosModelIndex]; CLzmaProb posAlignEncoder[1 << kNumAlignBits]; CLenPriceEnc lenEnc; CLenPriceEnc repLenEnc; unsigned lclp; int fastMode; CRangeEnc rc; int writeEndMark; LZ_UInt64 nowPos64; LZ_UInt32 matchPriceCount; int finished; int multiThread; SRes result; LZ_UInt32 dictSize; LZ_UInt32 matchFinderCycles; ISeqInStream *inStream; CSeqInStreamBuf seqBufInStream; CSaveState saveState; } CLzmaEnc; void LzmaEnc_SaveState(CLzmaEncHandle pp) { CLzmaEnc *p = (CLzmaEnc *)pp; CSaveState *dest = &p->saveState; int i; dest->lenEnc = p->lenEnc; dest->repLenEnc = p->repLenEnc; dest->state = p->state; for (i = 0; i < kNumStates; i++) { memcpy(dest->isMatch[i], p->isMatch[i], sizeof(p->isMatch[i])); memcpy(dest->isRep0Long[i], p->isRep0Long[i], sizeof(p->isRep0Long[i])); } for (i = 0; i < kNumLenToPosStates; i++) memcpy(dest->posSlotEncoder[i], p->posSlotEncoder[i], sizeof(p->posSlotEncoder[i])); memcpy(dest->isRep, p->isRep, sizeof(p->isRep)); memcpy(dest->isRepG0, p->isRepG0, sizeof(p->isRepG0)); memcpy(dest->isRepG1, p->isRepG1, sizeof(p->isRepG1)); memcpy(dest->isRepG2, p->isRepG2, sizeof(p->isRepG2)); memcpy(dest->posEncoders, p->posEncoders, sizeof(p->posEncoders)); memcpy(dest->posAlignEncoder, p->posAlignEncoder, sizeof(p->posAlignEncoder)); memcpy(dest->reps, p->reps, sizeof(p->reps)); memcpy(dest->litProbs, p->litProbs, (0x300 << p->lclp) * sizeof(CLzmaProb)); } void LzmaEnc_RestoreState(CLzmaEncHandle pp) { CLzmaEnc *dest = (CLzmaEnc *)pp; const CSaveState *p = &dest->saveState; int i; dest->lenEnc = p->lenEnc; dest->repLenEnc = p->repLenEnc; dest->state = p->state; for (i = 0; i < kNumStates; i++) { memcpy(dest->isMatch[i], p->isMatch[i], sizeof(p->isMatch[i])); memcpy(dest->isRep0Long[i], p->isRep0Long[i], sizeof(p->isRep0Long[i])); } for (i = 0; i < kNumLenToPosStates; i++) memcpy(dest->posSlotEncoder[i], p->posSlotEncoder[i], sizeof(p->posSlotEncoder[i])); memcpy(dest->isRep, p->isRep, sizeof(p->isRep)); memcpy(dest->isRepG0, p->isRepG0, sizeof(p->isRepG0)); memcpy(dest->isRepG1, p->isRepG1, sizeof(p->isRepG1)); memcpy(dest->isRepG2, p->isRepG2, sizeof(p->isRepG2)); memcpy(dest->posEncoders, p->posEncoders, sizeof(p->posEncoders)); memcpy(dest->posAlignEncoder, p->posAlignEncoder, sizeof(p->posAlignEncoder)); memcpy(dest->reps, p->reps, sizeof(p->reps)); memcpy(dest->litProbs, p->litProbs, (0x300 << dest->lclp) * sizeof(CLzmaProb)); } SRes LzmaEnc_SetProps(CLzmaEncHandle pp, const CLzmaEncProps *props2) { CLzmaEnc *p = (CLzmaEnc *)pp; CLzmaEncProps props = *props2; LzmaEncProps_Normalize(&props); if (props.lc > LZMA_LC_MAX || props.lp > LZMA_LP_MAX || props.pb > LZMA_PB_MAX || props.dictSize > (1 << kDicLogSizeMaxCompress) || props.dictSize > (1 << 30)) return SZ_ERROR_PARAM; p->dictSize = props.dictSize; p->matchFinderCycles = props.mc; { unsigned fb = props.fb; if (fb < 5) fb = 5; if (fb > LZMA_MATCH_LEN_MAX) fb = LZMA_MATCH_LEN_MAX; p->numFastBytes = fb; } p->lc = props.lc; p->lp = props.lp; p->pb = props.pb; p->fastMode = (props.algo == 0); p->matchFinderBase.btMode = props.btMode; { LZ_UInt32 numHashBytes = 4; if (props.btMode) { if (props.numHashBytes < 2) numHashBytes = 2; else if (props.numHashBytes < 4) numHashBytes = props.numHashBytes; } p->matchFinderBase.numHashBytes = numHashBytes; } p->matchFinderBase.cutValue = props.mc; p->writeEndMark = props.writeEndMark; #ifdef COMPRESS_MF_MT /* if (newMultiThread != _multiThread) { ReleaseMatchFinder(); _multiThread = newMultiThread; } */ p->multiThread = (props.numThreads > 1); #endif return SZ_OK; } static const int kLiteralNextStates[kNumStates] = {0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 4, 5}; static const int kMatchNextStates[kNumStates] = {7, 7, 7, 7, 7, 7, 7, 10, 10, 10, 10, 10}; static const int kRepNextStates[kNumStates] = {8, 8, 8, 8, 8, 8, 8, 11, 11, 11, 11, 11}; static const int kShortRepNextStates[kNumStates]= {9, 9, 9, 9, 9, 9, 9, 11, 11, 11, 11, 11}; #define IsCharState(s) ((s) < 7) #define GetLenToPosState(len) (((len) < kNumLenToPosStates + 1) ? (len) - 2 : kNumLenToPosStates - 1) #define kInfinityPrice (1 << 30) static void RangeEnc_Construct(CRangeEnc *p) { p->outStream = 0; p->bufBase = 0; } #define RangeEnc_GetProcessed(p) ((p)->processed + ((p)->buf - (p)->bufBase) + (p)->cacheSize) #define RC_BUF_SIZE (1 << 16) static int RangeEnc_Alloc(CRangeEnc *p, ISzAlloc *alloc) { if (p->bufBase == 0) { p->bufBase = (Byte *)alloc->Alloc(alloc, RC_BUF_SIZE); if (p->bufBase == 0) return 0; p->bufLim = p->bufBase + RC_BUF_SIZE; } return 1; } static void RangeEnc_Free(CRangeEnc *p, ISzAlloc *alloc) { alloc->Free(alloc, p->bufBase); p->bufBase = 0; } static void RangeEnc_Init(CRangeEnc *p) { /* Stream.Init(); */ p->low = 0; p->range = 0xFFFFFFFF; p->cacheSize = 1; p->cache = 0; p->buf = p->bufBase; p->processed = 0; p->res = SZ_OK; } static void RangeEnc_FlushStream(CRangeEnc *p) { size_t num; if (p->res != SZ_OK) return; num = p->buf - p->bufBase; if (num != p->outStream->Write(p->outStream, p->bufBase, num)) p->res = SZ_ERROR_WRITE; p->processed += num; p->buf = p->bufBase; } static void MY_FAST_CALL RangeEnc_ShiftLow(CRangeEnc *p) { if ((LZ_UInt32)p->low < (LZ_UInt32)0xFF000000 || (int)(p->low >> 32) != 0) { Byte temp = p->cache; do { Byte *buf = p->buf; *buf++ = (Byte)(temp + (Byte)(p->low >> 32)); p->buf = buf; if (buf == p->bufLim) RangeEnc_FlushStream(p); temp = 0xFF; } while (--p->cacheSize != 0); p->cache = (Byte)((LZ_UInt32)p->low >> 24); } p->cacheSize++; p->low = (LZ_UInt32)p->low << 8; } static void RangeEnc_FlushData(CRangeEnc *p) { int i; for (i = 0; i < 5; i++) RangeEnc_ShiftLow(p); } static void RangeEnc_EncodeDirectBits(CRangeEnc *p, LZ_UInt32 value, int numBits) { do { p->range >>= 1; p->low += p->range & (0 - ((value >> --numBits) & 1)); if (p->range < kTopValue) { p->range <<= 8; RangeEnc_ShiftLow(p); } } while (numBits != 0); } static void RangeEnc_EncodeBit(CRangeEnc *p, CLzmaProb *prob, LZ_UInt32 symbol) { LZ_UInt32 ttt = *prob; LZ_UInt32 newBound = (p->range >> kNumBitModelTotalBits) * ttt; if (symbol == 0) { p->range = newBound; ttt += (kBitModelTotal - ttt) >> kNumMoveBits; } else { p->low += newBound; p->range -= newBound; ttt -= ttt >> kNumMoveBits; } *prob = (CLzmaProb)ttt; if (p->range < kTopValue) { p->range <<= 8; RangeEnc_ShiftLow(p); } } static void LitEnc_Encode(CRangeEnc *p, CLzmaProb *probs, LZ_UInt32 symbol) { symbol |= 0x100; do { RangeEnc_EncodeBit(p, probs + (symbol >> 8), (symbol >> 7) & 1); symbol <<= 1; } while (symbol < 0x10000); } static void LitEnc_EncodeMatched(CRangeEnc *p, CLzmaProb *probs, LZ_UInt32 symbol, LZ_UInt32 matchByte) { LZ_UInt32 offs = 0x100; symbol |= 0x100; do { matchByte <<= 1; RangeEnc_EncodeBit(p, probs + (offs + (matchByte & offs) + (symbol >> 8)), (symbol >> 7) & 1); symbol <<= 1; offs &= ~(matchByte ^ symbol); } while (symbol < 0x10000); } void LzmaEnc_InitPriceTables(LZ_UInt32 *ProbPrices) { LZ_UInt32 i; for (i = (1 << kNumMoveReducingBits) / 2; i < kBitModelTotal; i += (1 << kNumMoveReducingBits)) { const int kCyclesBits = kNumBitPriceShiftBits; LZ_UInt32 w = i; LZ_UInt32 bitCount = 0; int j; for (j = 0; j < kCyclesBits; j++) { w = w * w; bitCount <<= 1; while (w >= ((LZ_UInt32)1 << 16)) { w >>= 1; bitCount++; } } ProbPrices[i >> kNumMoveReducingBits] = ((kNumBitModelTotalBits << kCyclesBits) - 15 - bitCount); } } #define GET_PRICE(prob, symbol) \ p->ProbPrices[((prob) ^ (((-(int)(symbol))) & (kBitModelTotal - 1))) >> kNumMoveReducingBits]; #define GET_PRICEa(prob, symbol) \ ProbPrices[((prob) ^ ((-((int)(symbol))) & (kBitModelTotal - 1))) >> kNumMoveReducingBits]; #define GET_PRICE_0(prob) p->ProbPrices[(prob) >> kNumMoveReducingBits] #define GET_PRICE_1(prob) p->ProbPrices[((prob) ^ (kBitModelTotal - 1)) >> kNumMoveReducingBits] #define GET_PRICE_0a(prob) ProbPrices[(prob) >> kNumMoveReducingBits] #define GET_PRICE_1a(prob) ProbPrices[((prob) ^ (kBitModelTotal - 1)) >> kNumMoveReducingBits] static LZ_UInt32 LitEnc_GetPrice(const CLzmaProb *probs, LZ_UInt32 symbol, LZ_UInt32 *ProbPrices) { LZ_UInt32 price = 0; symbol |= 0x100; do { price += GET_PRICEa(probs[symbol >> 8], (symbol >> 7) & 1); symbol <<= 1; } while (symbol < 0x10000); return price; } static LZ_UInt32 LitEnc_GetPriceMatched(const CLzmaProb *probs, LZ_UInt32 symbol, LZ_UInt32 matchByte, LZ_UInt32 *ProbPrices) { LZ_UInt32 price = 0; LZ_UInt32 offs = 0x100; symbol |= 0x100; do { matchByte <<= 1; price += GET_PRICEa(probs[offs + (matchByte & offs) + (symbol >> 8)], (symbol >> 7) & 1); symbol <<= 1; offs &= ~(matchByte ^ symbol); } while (symbol < 0x10000); return price; } static void RcTree_Encode(CRangeEnc *rc, CLzmaProb *probs, int numBitLevels, LZ_UInt32 symbol) { LZ_UInt32 m = 1; int i; for (i = numBitLevels; i != 0;) { LZ_UInt32 bit; i--; bit = (symbol >> i) & 1; RangeEnc_EncodeBit(rc, probs + m, bit); m = (m << 1) | bit; } } static void RcTree_ReverseEncode(CRangeEnc *rc, CLzmaProb *probs, int numBitLevels, LZ_UInt32 symbol) { LZ_UInt32 m = 1; int i; for (i = 0; i < numBitLevels; i++) { LZ_UInt32 bit = symbol & 1; RangeEnc_EncodeBit(rc, probs + m, bit); m = (m << 1) | bit; symbol >>= 1; } } static LZ_UInt32 RcTree_GetPrice(const CLzmaProb *probs, int numBitLevels, LZ_UInt32 symbol, LZ_UInt32 *ProbPrices) { LZ_UInt32 price = 0; symbol |= (1 << numBitLevels); while (symbol != 1) { price += GET_PRICEa(probs[symbol >> 1], symbol & 1); symbol >>= 1; } return price; } static LZ_UInt32 RcTree_ReverseGetPrice(const CLzmaProb *probs, int numBitLevels, LZ_UInt32 symbol, LZ_UInt32 *ProbPrices) { LZ_UInt32 price = 0; LZ_UInt32 m = 1; int i; for (i = numBitLevels; i != 0; i--) { LZ_UInt32 bit = symbol & 1; symbol >>= 1; price += GET_PRICEa(probs[m], bit); m = (m << 1) | bit; } return price; } static void LenEnc_Init(CLenEnc *p) { unsigned i; p->choice = p->choice2 = kProbInitValue; for (i = 0; i < (LZMA_NUM_PB_STATES_MAX << kLenNumLowBits); i++) p->low[i] = kProbInitValue; for (i = 0; i < (LZMA_NUM_PB_STATES_MAX << kLenNumMidBits); i++) p->mid[i] = kProbInitValue; for (i = 0; i < kLenNumHighSymbols; i++) p->high[i] = kProbInitValue; } static void LenEnc_Encode(CLenEnc *p, CRangeEnc *rc, LZ_UInt32 symbol, LZ_UInt32 posState) { if (symbol < kLenNumLowSymbols) { RangeEnc_EncodeBit(rc, &p->choice, 0); RcTree_Encode(rc, p->low + (posState << kLenNumLowBits), kLenNumLowBits, symbol); } else { RangeEnc_EncodeBit(rc, &p->choice, 1); if (symbol < kLenNumLowSymbols + kLenNumMidSymbols) { RangeEnc_EncodeBit(rc, &p->choice2, 0); RcTree_Encode(rc, p->mid + (posState << kLenNumMidBits), kLenNumMidBits, symbol - kLenNumLowSymbols); } else { RangeEnc_EncodeBit(rc, &p->choice2, 1); RcTree_Encode(rc, p->high, kLenNumHighBits, symbol - kLenNumLowSymbols - kLenNumMidSymbols); } } } static void LenEnc_SetPrices(CLenEnc *p, LZ_UInt32 posState, LZ_UInt32 numSymbols, LZ_UInt32 *prices, LZ_UInt32 *ProbPrices) { LZ_UInt32 a0 = GET_PRICE_0a(p->choice); LZ_UInt32 a1 = GET_PRICE_1a(p->choice); LZ_UInt32 b0 = a1 + GET_PRICE_0a(p->choice2); LZ_UInt32 b1 = a1 + GET_PRICE_1a(p->choice2); LZ_UInt32 i = 0; for (i = 0; i < kLenNumLowSymbols; i++) { if (i >= numSymbols) return; prices[i] = a0 + RcTree_GetPrice(p->low + (posState << kLenNumLowBits), kLenNumLowBits, i, ProbPrices); } for (; i < kLenNumLowSymbols + kLenNumMidSymbols; i++) { if (i >= numSymbols) return; prices[i] = b0 + RcTree_GetPrice(p->mid + (posState << kLenNumMidBits), kLenNumMidBits, i - kLenNumLowSymbols, ProbPrices); } for (; i < numSymbols; i++) prices[i] = b1 + RcTree_GetPrice(p->high, kLenNumHighBits, i - kLenNumLowSymbols - kLenNumMidSymbols, ProbPrices); } static void MY_FAST_CALL LenPriceEnc_UpdateTable(CLenPriceEnc *p, LZ_UInt32 posState, LZ_UInt32 *ProbPrices) { LenEnc_SetPrices(&p->p, posState, p->tableSize, p->prices[posState], ProbPrices); p->counters[posState] = p->tableSize; } static void LenPriceEnc_UpdateTables(CLenPriceEnc *p, LZ_UInt32 numPosStates, LZ_UInt32 *ProbPrices) { LZ_UInt32 posState; for (posState = 0; posState < numPosStates; posState++) LenPriceEnc_UpdateTable(p, posState, ProbPrices); } static void LenEnc_Encode2(CLenPriceEnc *p, CRangeEnc *rc, LZ_UInt32 symbol, LZ_UInt32 posState, int updatePrice, LZ_UInt32 *ProbPrices) { LenEnc_Encode(&p->p, rc, symbol, posState); if (updatePrice) if (--p->counters[posState] == 0) LenPriceEnc_UpdateTable(p, posState, ProbPrices); } static void MovePos(CLzmaEnc *p, LZ_UInt32 num) { #ifdef SHOW_STAT ttt += num; printf("\n MovePos %d", num); #endif if (num != 0) { p->additionalOffset += num; p->matchFinder.Skip(p->matchFinderObj, num); } } static LZ_UInt32 ReadMatchDistances(CLzmaEnc *p, LZ_UInt32 *numDistancePairsRes) { LZ_UInt32 lenRes = 0, numPairs; p->numAvail = p->matchFinder.GetNumAvailableBytes(p->matchFinderObj); numPairs = p->matchFinder.GetMatches(p->matchFinderObj, p->matches); #ifdef SHOW_STAT printf("\n i = %d numPairs = %d ", ttt, numPairs / 2); ttt++; { LZ_UInt32 i; for (i = 0; i < numPairs; i += 2) printf("%2d %6d | ", p->matches[i], p->matches[i + 1]); } #endif if (numPairs > 0) { lenRes = p->matches[numPairs - 2]; if (lenRes == p->numFastBytes) { const Byte *pby = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1; LZ_UInt32 distance = p->matches[numPairs - 1] + 1; LZ_UInt32 numAvail = p->numAvail; if (numAvail > LZMA_MATCH_LEN_MAX) numAvail = LZMA_MATCH_LEN_MAX; { const Byte *pby2 = pby - distance; for (; lenRes < numAvail && pby[lenRes] == pby2[lenRes]; lenRes++); } } } p->additionalOffset++; *numDistancePairsRes = numPairs; return lenRes; } #define MakeAsChar(p) (p)->backPrev = (LZ_UInt32)(-1); (p)->prev1IsChar = False; #define MakeAsShortRep(p) (p)->backPrev = 0; (p)->prev1IsChar = False; #define IsShortRep(p) ((p)->backPrev == 0) static LZ_UInt32 GetRepLen1Price(CLzmaEnc *p, LZ_UInt32 state, LZ_UInt32 posState) { return GET_PRICE_0(p->isRepG0[state]) + GET_PRICE_0(p->isRep0Long[state][posState]); } static LZ_UInt32 GetPureRepPrice(CLzmaEnc *p, LZ_UInt32 repIndex, LZ_UInt32 state, LZ_UInt32 posState) { LZ_UInt32 price; if (repIndex == 0) { price = GET_PRICE_0(p->isRepG0[state]); price += GET_PRICE_1(p->isRep0Long[state][posState]); } else { price = GET_PRICE_1(p->isRepG0[state]); if (repIndex == 1) price += GET_PRICE_0(p->isRepG1[state]); else { price += GET_PRICE_1(p->isRepG1[state]); price += GET_PRICE(p->isRepG2[state], repIndex - 2); } } return price; } static LZ_UInt32 GetRepPrice(CLzmaEnc *p, LZ_UInt32 repIndex, LZ_UInt32 len, LZ_UInt32 state, LZ_UInt32 posState) { return p->repLenEnc.prices[posState][len - LZMA_MATCH_LEN_MIN] + GetPureRepPrice(p, repIndex, state, posState); } static LZ_UInt32 Backward(CLzmaEnc *p, LZ_UInt32 *backRes, LZ_UInt32 cur) { LZ_UInt32 posMem = p->opt[cur].posPrev; LZ_UInt32 backMem = p->opt[cur].backPrev; p->optimumEndIndex = cur; do { if (p->opt[cur].prev1IsChar) { MakeAsChar(&p->opt[posMem]) p->opt[posMem].posPrev = posMem - 1; if (p->opt[cur].prev2) { p->opt[posMem - 1].prev1IsChar = False; p->opt[posMem - 1].posPrev = p->opt[cur].posPrev2; p->opt[posMem - 1].backPrev = p->opt[cur].backPrev2; } } { LZ_UInt32 posPrev = posMem; LZ_UInt32 backCur = backMem; backMem = p->opt[posPrev].backPrev; posMem = p->opt[posPrev].posPrev; p->opt[posPrev].backPrev = backCur; p->opt[posPrev].posPrev = cur; cur = posPrev; } } while (cur != 0); *backRes = p->opt[0].backPrev; p->optimumCurrentIndex = p->opt[0].posPrev; return p->optimumCurrentIndex; } #define LIT_PROBS(pos, prevByte) (p->litProbs + ((((pos) & p->lpMask) << p->lc) + ((prevByte) >> (8 - p->lc))) * 0x300) static LZ_UInt32 GetOptimum(CLzmaEnc *p, LZ_UInt32 position, LZ_UInt32 *backRes) { LZ_UInt32 numAvail, mainLen, numPairs, repMaxIndex, i, posState, lenEnd, len, cur; LZ_UInt32 matchPrice, repMatchPrice, normalMatchPrice; LZ_UInt32 reps[LZMA_NUM_REPS], repLens[LZMA_NUM_REPS]; LZ_UInt32 *matches; const Byte *data; Byte curByte, matchByte; if (p->optimumEndIndex != p->optimumCurrentIndex) { const COptimal *opt = &p->opt[p->optimumCurrentIndex]; LZ_UInt32 lenRes = opt->posPrev - p->optimumCurrentIndex; *backRes = opt->backPrev; p->optimumCurrentIndex = opt->posPrev; return lenRes; } p->optimumCurrentIndex = p->optimumEndIndex = 0; if (p->additionalOffset == 0) mainLen = ReadMatchDistances(p, &numPairs); else { mainLen = p->longestMatchLength; numPairs = p->numPairs; } numAvail = p->numAvail; if (numAvail < 2) { *backRes = (LZ_UInt32)(-1); return 1; } if (numAvail > LZMA_MATCH_LEN_MAX) numAvail = LZMA_MATCH_LEN_MAX; data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1; repMaxIndex = 0; for (i = 0; i < LZMA_NUM_REPS; i++) { LZ_UInt32 lenTest; const Byte *data2; reps[i] = p->reps[i]; data2 = data - (reps[i] + 1); if (data[0] != data2[0] || data[1] != data2[1]) { repLens[i] = 0; continue; } for (lenTest = 2; lenTest < numAvail && data[lenTest] == data2[lenTest]; lenTest++); repLens[i] = lenTest; if (lenTest > repLens[repMaxIndex]) repMaxIndex = i; } if (repLens[repMaxIndex] >= p->numFastBytes) { LZ_UInt32 lenRes; *backRes = repMaxIndex; lenRes = repLens[repMaxIndex]; MovePos(p, lenRes - 1); return lenRes; } matches = p->matches; if (mainLen >= p->numFastBytes) { *backRes = matches[numPairs - 1] + LZMA_NUM_REPS; MovePos(p, mainLen - 1); return mainLen; } curByte = *data; matchByte = *(data - (reps[0] + 1)); if (mainLen < 2 && curByte != matchByte && repLens[repMaxIndex] < 2) { *backRes = (LZ_UInt32)-1; return 1; } p->opt[0].state = (CState)p->state; posState = (position & p->pbMask); { const CLzmaProb *probs = LIT_PROBS(position, *(data - 1)); p->opt[1].price = GET_PRICE_0(p->isMatch[p->state][posState]) + (!IsCharState(p->state) ? LitEnc_GetPriceMatched(probs, curByte, matchByte, p->ProbPrices) : LitEnc_GetPrice(probs, curByte, p->ProbPrices)); } MakeAsChar(&p->opt[1]); matchPrice = GET_PRICE_1(p->isMatch[p->state][posState]); repMatchPrice = matchPrice + GET_PRICE_1(p->isRep[p->state]); if (matchByte == curByte) { LZ_UInt32 shortRepPrice = repMatchPrice + GetRepLen1Price(p, p->state, posState); if (shortRepPrice < p->opt[1].price) { p->opt[1].price = shortRepPrice; MakeAsShortRep(&p->opt[1]); } } lenEnd = ((mainLen >= repLens[repMaxIndex]) ? mainLen : repLens[repMaxIndex]); if (lenEnd < 2) { *backRes = p->opt[1].backPrev; return 1; } p->opt[1].posPrev = 0; for (i = 0; i < LZMA_NUM_REPS; i++) p->opt[0].backs[i] = reps[i]; len = lenEnd; do p->opt[len--].price = kInfinityPrice; while (len >= 2); for (i = 0; i < LZMA_NUM_REPS; i++) { LZ_UInt32 repLen = repLens[i]; LZ_UInt32 price; if (repLen < 2) continue; price = repMatchPrice + GetPureRepPrice(p, i, p->state, posState); do { LZ_UInt32 curAndLenPrice = price + p->repLenEnc.prices[posState][repLen - 2]; COptimal *opt = &p->opt[repLen]; if (curAndLenPrice < opt->price) { opt->price = curAndLenPrice; opt->posPrev = 0; opt->backPrev = i; opt->prev1IsChar = False; } } while (--repLen >= 2); } normalMatchPrice = matchPrice + GET_PRICE_0(p->isRep[p->state]); len = ((repLens[0] >= 2) ? repLens[0] + 1 : 2); if (len <= mainLen) { LZ_UInt32 offs = 0; while (len > matches[offs]) offs += 2; for (; ; len++) { COptimal *opt; LZ_UInt32 distance = matches[offs + 1]; LZ_UInt32 curAndLenPrice = normalMatchPrice + p->lenEnc.prices[posState][len - LZMA_MATCH_LEN_MIN]; LZ_UInt32 lenToPosState = GetLenToPosState(len); if (distance < kNumFullDistances) curAndLenPrice += p->distancesPrices[lenToPosState][distance]; else { LZ_UInt32 slot; GetPosSlot2(distance, slot); curAndLenPrice += p->alignPrices[distance & kAlignMask] + p->posSlotPrices[lenToPosState][slot]; } opt = &p->opt[len]; if (curAndLenPrice < opt->price) { opt->price = curAndLenPrice; opt->posPrev = 0; opt->backPrev = distance + LZMA_NUM_REPS; opt->prev1IsChar = False; } if (len == matches[offs]) { offs += 2; if (offs == numPairs) break; } } } cur = 0; #ifdef SHOW_STAT2 if (position >= 0) { unsigned i; printf("\n pos = %4X", position); for (i = cur; i <= lenEnd; i++) printf("\nprice[%4X] = %d", position - cur + i, p->opt[i].price); } #endif for (;;) { LZ_UInt32 numAvailFull, newLen, numPairs, posPrev, state, posState, startLen; LZ_UInt32 curPrice, curAnd1Price, matchPrice, repMatchPrice; int nextIsChar; Byte curByte, matchByte; const Byte *data; COptimal *curOpt; COptimal *nextOpt; cur++; if (cur == lenEnd) return Backward(p, backRes, cur); newLen = ReadMatchDistances(p, &numPairs); if (newLen >= p->numFastBytes) { p->numPairs = numPairs; p->longestMatchLength = newLen; return Backward(p, backRes, cur); } position++; curOpt = &p->opt[cur]; posPrev = curOpt->posPrev; if (curOpt->prev1IsChar) { posPrev--; if (curOpt->prev2) { state = p->opt[curOpt->posPrev2].state; if (curOpt->backPrev2 < LZMA_NUM_REPS) state = kRepNextStates[state]; else state = kMatchNextStates[state]; } else state = p->opt[posPrev].state; state = kLiteralNextStates[state]; } else state = p->opt[posPrev].state; if (posPrev == cur - 1) { if (IsShortRep(curOpt)) state = kShortRepNextStates[state]; else state = kLiteralNextStates[state]; } else { LZ_UInt32 pos; const COptimal *prevOpt; if (curOpt->prev1IsChar && curOpt->prev2) { posPrev = curOpt->posPrev2; pos = curOpt->backPrev2; state = kRepNextStates[state]; } else { pos = curOpt->backPrev; if (pos < LZMA_NUM_REPS) state = kRepNextStates[state]; else state = kMatchNextStates[state]; } prevOpt = &p->opt[posPrev]; if (pos < LZMA_NUM_REPS) { LZ_UInt32 i; reps[0] = prevOpt->backs[pos]; for (i = 1; i <= pos; i++) reps[i] = prevOpt->backs[i - 1]; for (; i < LZMA_NUM_REPS; i++) reps[i] = prevOpt->backs[i]; } else { LZ_UInt32 i; reps[0] = (pos - LZMA_NUM_REPS); for (i = 1; i < LZMA_NUM_REPS; i++) reps[i] = prevOpt->backs[i - 1]; } } curOpt->state = (CState)state; curOpt->backs[0] = reps[0]; curOpt->backs[1] = reps[1]; curOpt->backs[2] = reps[2]; curOpt->backs[3] = reps[3]; curPrice = curOpt->price; nextIsChar = False; data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1; curByte = *data; matchByte = *(data - (reps[0] + 1)); posState = (position & p->pbMask); curAnd1Price = curPrice + GET_PRICE_0(p->isMatch[state][posState]); { const CLzmaProb *probs = LIT_PROBS(position, *(data - 1)); curAnd1Price += (!IsCharState(state) ? LitEnc_GetPriceMatched(probs, curByte, matchByte, p->ProbPrices) : LitEnc_GetPrice(probs, curByte, p->ProbPrices)); } nextOpt = &p->opt[cur + 1]; if (curAnd1Price < nextOpt->price) { nextOpt->price = curAnd1Price; nextOpt->posPrev = cur; MakeAsChar(nextOpt); nextIsChar = True; } matchPrice = curPrice + GET_PRICE_1(p->isMatch[state][posState]); repMatchPrice = matchPrice + GET_PRICE_1(p->isRep[state]); if (matchByte == curByte && !(nextOpt->posPrev < cur && nextOpt->backPrev == 0)) { LZ_UInt32 shortRepPrice = repMatchPrice + GetRepLen1Price(p, state, posState); if (shortRepPrice <= nextOpt->price) { nextOpt->price = shortRepPrice; nextOpt->posPrev = cur; MakeAsShortRep(nextOpt); nextIsChar = True; } } numAvailFull = p->numAvail; { LZ_UInt32 temp = kNumOpts - 1 - cur; if (temp < numAvailFull) numAvailFull = temp; } if (numAvailFull < 2) continue; numAvail = (numAvailFull <= p->numFastBytes ? numAvailFull : p->numFastBytes); if (!nextIsChar && matchByte != curByte) /* speed optimization */ { /* try Literal + rep0 */ LZ_UInt32 temp; LZ_UInt32 lenTest2; const Byte *data2 = data - (reps[0] + 1); LZ_UInt32 limit = p->numFastBytes + 1; if (limit > numAvailFull) limit = numAvailFull; for (temp = 1; temp < limit && data[temp] == data2[temp]; temp++); lenTest2 = temp - 1; if (lenTest2 >= 2) { LZ_UInt32 state2 = kLiteralNextStates[state]; LZ_UInt32 posStateNext = (position + 1) & p->pbMask; LZ_UInt32 nextRepMatchPrice = curAnd1Price + GET_PRICE_1(p->isMatch[state2][posStateNext]) + GET_PRICE_1(p->isRep[state2]); /* for (; lenTest2 >= 2; lenTest2--) */ { LZ_UInt32 curAndLenPrice; COptimal *opt; LZ_UInt32 offset = cur + 1 + lenTest2; while (lenEnd < offset) p->opt[++lenEnd].price = kInfinityPrice; curAndLenPrice = nextRepMatchPrice + GetRepPrice(p, 0, lenTest2, state2, posStateNext); opt = &p->opt[offset]; if (curAndLenPrice < opt->price) { opt->price = curAndLenPrice; opt->posPrev = cur + 1; opt->backPrev = 0; opt->prev1IsChar = True; opt->prev2 = False; } } } } startLen = 2; /* speed optimization */ { LZ_UInt32 repIndex; for (repIndex = 0; repIndex < LZMA_NUM_REPS; repIndex++) { LZ_UInt32 lenTest; LZ_UInt32 lenTestTemp; LZ_UInt32 price; const Byte *data2 = data - (reps[repIndex] + 1); if (data[0] != data2[0] || data[1] != data2[1]) continue; for (lenTest = 2; lenTest < numAvail && data[lenTest] == data2[lenTest]; lenTest++); while (lenEnd < cur + lenTest) p->opt[++lenEnd].price = kInfinityPrice; lenTestTemp = lenTest; price = repMatchPrice + GetPureRepPrice(p, repIndex, state, posState); do { LZ_UInt32 curAndLenPrice = price + p->repLenEnc.prices[posState][lenTest - 2]; COptimal *opt = &p->opt[cur + lenTest]; if (curAndLenPrice < opt->price) { opt->price = curAndLenPrice; opt->posPrev = cur; opt->backPrev = repIndex; opt->prev1IsChar = False; } } while (--lenTest >= 2); lenTest = lenTestTemp; if (repIndex == 0) startLen = lenTest + 1; /* if (_maxMode) */ { LZ_UInt32 lenTest2 = lenTest + 1; LZ_UInt32 limit = lenTest2 + p->numFastBytes; LZ_UInt32 nextRepMatchPrice; if (limit > numAvailFull) limit = numAvailFull; for (; lenTest2 < limit && data[lenTest2] == data2[lenTest2]; lenTest2++); lenTest2 -= lenTest + 1; if (lenTest2 >= 2) { LZ_UInt32 state2 = kRepNextStates[state]; LZ_UInt32 posStateNext = (position + lenTest) & p->pbMask; LZ_UInt32 curAndLenCharPrice = price + p->repLenEnc.prices[posState][lenTest - 2] + GET_PRICE_0(p->isMatch[state2][posStateNext]) + LitEnc_GetPriceMatched(LIT_PROBS(position + lenTest, data[lenTest - 1]), data[lenTest], data2[lenTest], p->ProbPrices); state2 = kLiteralNextStates[state2]; posStateNext = (position + lenTest + 1) & p->pbMask; nextRepMatchPrice = curAndLenCharPrice + GET_PRICE_1(p->isMatch[state2][posStateNext]) + GET_PRICE_1(p->isRep[state2]); /* for (; lenTest2 >= 2; lenTest2--) */ { LZ_UInt32 curAndLenPrice; COptimal *opt; LZ_UInt32 offset = cur + lenTest + 1 + lenTest2; while (lenEnd < offset) p->opt[++lenEnd].price = kInfinityPrice; curAndLenPrice = nextRepMatchPrice + GetRepPrice(p, 0, lenTest2, state2, posStateNext); opt = &p->opt[offset]; if (curAndLenPrice < opt->price) { opt->price = curAndLenPrice; opt->posPrev = cur + lenTest + 1; opt->backPrev = 0; opt->prev1IsChar = True; opt->prev2 = True; opt->posPrev2 = cur; opt->backPrev2 = repIndex; } } } } } } /* for (LZ_UInt32 lenTest = 2; lenTest <= newLen; lenTest++) */ if (newLen > numAvail) { newLen = numAvail; for (numPairs = 0; newLen > matches[numPairs]; numPairs += 2); matches[numPairs] = newLen; numPairs += 2; } if (newLen >= startLen) { LZ_UInt32 normalMatchPrice = matchPrice + GET_PRICE_0(p->isRep[state]); LZ_UInt32 offs, curBack, posSlot; LZ_UInt32 lenTest; while (lenEnd < cur + newLen) p->opt[++lenEnd].price = kInfinityPrice; offs = 0; while (startLen > matches[offs]) offs += 2; curBack = matches[offs + 1]; GetPosSlot2(curBack, posSlot); for (lenTest = /*2*/ startLen; ; lenTest++) { LZ_UInt32 curAndLenPrice = normalMatchPrice + p->lenEnc.prices[posState][lenTest - LZMA_MATCH_LEN_MIN]; LZ_UInt32 lenToPosState = GetLenToPosState(lenTest); COptimal *opt; if (curBack < kNumFullDistances) curAndLenPrice += p->distancesPrices[lenToPosState][curBack]; else curAndLenPrice += p->posSlotPrices[lenToPosState][posSlot] + p->alignPrices[curBack & kAlignMask]; opt = &p->opt[cur + lenTest]; if (curAndLenPrice < opt->price) { opt->price = curAndLenPrice; opt->posPrev = cur; opt->backPrev = curBack + LZMA_NUM_REPS; opt->prev1IsChar = False; } if (/*_maxMode && */lenTest == matches[offs]) { /* Try Match + Literal + Rep0 */ const Byte *data2 = data - (curBack + 1); LZ_UInt32 lenTest2 = lenTest + 1; LZ_UInt32 limit = lenTest2 + p->numFastBytes; LZ_UInt32 nextRepMatchPrice; if (limit > numAvailFull) limit = numAvailFull; for (; lenTest2 < limit && data[lenTest2] == data2[lenTest2]; lenTest2++); lenTest2 -= lenTest + 1; if (lenTest2 >= 2) { LZ_UInt32 state2 = kMatchNextStates[state]; LZ_UInt32 posStateNext = (position + lenTest) & p->pbMask; LZ_UInt32 curAndLenCharPrice = curAndLenPrice + GET_PRICE_0(p->isMatch[state2][posStateNext]) + LitEnc_GetPriceMatched(LIT_PROBS(position + lenTest, data[lenTest - 1]), data[lenTest], data2[lenTest], p->ProbPrices); state2 = kLiteralNextStates[state2]; posStateNext = (posStateNext + 1) & p->pbMask; nextRepMatchPrice = curAndLenCharPrice + GET_PRICE_1(p->isMatch[state2][posStateNext]) + GET_PRICE_1(p->isRep[state2]); /* for (; lenTest2 >= 2; lenTest2--) */ { LZ_UInt32 offset = cur + lenTest + 1 + lenTest2; LZ_UInt32 curAndLenPrice; COptimal *opt; while (lenEnd < offset) p->opt[++lenEnd].price = kInfinityPrice; curAndLenPrice = nextRepMatchPrice + GetRepPrice(p, 0, lenTest2, state2, posStateNext); opt = &p->opt[offset]; if (curAndLenPrice < opt->price) { opt->price = curAndLenPrice; opt->posPrev = cur + lenTest + 1; opt->backPrev = 0; opt->prev1IsChar = True; opt->prev2 = True; opt->posPrev2 = cur; opt->backPrev2 = curBack + LZMA_NUM_REPS; } } } offs += 2; if (offs == numPairs) break; curBack = matches[offs + 1]; if (curBack >= kNumFullDistances) GetPosSlot2(curBack, posSlot); } } } } } #define ChangePair(smallDist, bigDist) (((bigDist) >> 7) > (smallDist)) static LZ_UInt32 GetOptimumFast(CLzmaEnc *p, LZ_UInt32 *backRes) { LZ_UInt32 numAvail, mainLen, mainDist, numPairs, repIndex, repLen, i; const Byte *data; const LZ_UInt32 *matches; if (p->additionalOffset == 0) mainLen = ReadMatchDistances(p, &numPairs); else { mainLen = p->longestMatchLength; numPairs = p->numPairs; } numAvail = p->numAvail; *backRes = (LZ_UInt32)-1; if (numAvail < 2) return 1; if (numAvail > LZMA_MATCH_LEN_MAX) numAvail = LZMA_MATCH_LEN_MAX; data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1; repLen = repIndex = 0; for (i = 0; i < LZMA_NUM_REPS; i++) { LZ_UInt32 len; const Byte *data2 = data - (p->reps[i] + 1); if (data[0] != data2[0] || data[1] != data2[1]) continue; for (len = 2; len < numAvail && data[len] == data2[len]; len++); if (len >= p->numFastBytes) { *backRes = i; MovePos(p, len - 1); return len; } if (len > repLen) { repIndex = i; repLen = len; } } matches = p->matches; if (mainLen >= p->numFastBytes) { *backRes = matches[numPairs - 1] + LZMA_NUM_REPS; MovePos(p, mainLen - 1); return mainLen; } mainDist = 0; /* for GCC */ if (mainLen >= 2) { mainDist = matches[numPairs - 1]; while (numPairs > 2 && mainLen == matches[numPairs - 4] + 1) { if (!ChangePair(matches[numPairs - 3], mainDist)) break; numPairs -= 2; mainLen = matches[numPairs - 2]; mainDist = matches[numPairs - 1]; } if (mainLen == 2 && mainDist >= 0x80) mainLen = 1; } if (repLen >= 2 && ( (repLen + 1 >= mainLen) || (repLen + 2 >= mainLen && mainDist >= (1 << 9)) || (repLen + 3 >= mainLen && mainDist >= (1 << 15)))) { *backRes = repIndex; MovePos(p, repLen - 1); return repLen; } if (mainLen < 2 || numAvail <= 2) return 1; p->longestMatchLength = ReadMatchDistances(p, &p->numPairs); if (p->longestMatchLength >= 2) { LZ_UInt32 newDistance = matches[p->numPairs - 1]; if ((p->longestMatchLength >= mainLen && newDistance < mainDist) || (p->longestMatchLength == mainLen + 1 && !ChangePair(mainDist, newDistance)) || (p->longestMatchLength > mainLen + 1) || (p->longestMatchLength + 1 >= mainLen && mainLen >= 3 && ChangePair(newDistance, mainDist))) return 1; } data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1; for (i = 0; i < LZMA_NUM_REPS; i++) { LZ_UInt32 len, limit; const Byte *data2 = data - (p->reps[i] + 1); if (data[0] != data2[0] || data[1] != data2[1]) continue; limit = mainLen - 1; for (len = 2; len < limit && data[len] == data2[len]; len++); if (len >= limit) return 1; } *backRes = mainDist + LZMA_NUM_REPS; MovePos(p, mainLen - 2); return mainLen; } static void WriteEndMarker(CLzmaEnc *p, LZ_UInt32 posState) { LZ_UInt32 len; RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][posState], 1); RangeEnc_EncodeBit(&p->rc, &p->isRep[p->state], 0); p->state = kMatchNextStates[p->state]; len = LZMA_MATCH_LEN_MIN; LenEnc_Encode2(&p->lenEnc, &p->rc, len - LZMA_MATCH_LEN_MIN, posState, !p->fastMode, p->ProbPrices); RcTree_Encode(&p->rc, p->posSlotEncoder[GetLenToPosState(len)], kNumPosSlotBits, (1 << kNumPosSlotBits) - 1); RangeEnc_EncodeDirectBits(&p->rc, (((LZ_UInt32)1 << 30) - 1) >> kNumAlignBits, 30 - kNumAlignBits); RcTree_ReverseEncode(&p->rc, p->posAlignEncoder, kNumAlignBits, kAlignMask); } static SRes CheckErrors(CLzmaEnc *p) { if (p->result != SZ_OK) return p->result; if (p->rc.res != SZ_OK) p->result = SZ_ERROR_WRITE; if (p->matchFinderBase.result != SZ_OK) p->result = SZ_ERROR_READ; if (p->result != SZ_OK) p->finished = True; return p->result; } static SRes Flush(CLzmaEnc *p, LZ_UInt32 nowPos) { /* ReleaseMFStream(); */ p->finished = True; if (p->writeEndMark) WriteEndMarker(p, nowPos & p->pbMask); RangeEnc_FlushData(&p->rc); RangeEnc_FlushStream(&p->rc); return CheckErrors(p); } static void FillAlignPrices(CLzmaEnc *p) { LZ_UInt32 i; for (i = 0; i < kAlignTableSize; i++) p->alignPrices[i] = RcTree_ReverseGetPrice(p->posAlignEncoder, kNumAlignBits, i, p->ProbPrices); p->alignPriceCount = 0; } static void FillDistancesPrices(CLzmaEnc *p) { LZ_UInt32 tempPrices[kNumFullDistances]; LZ_UInt32 i, lenToPosState; for (i = kStartPosModelIndex; i < kNumFullDistances; i++) { LZ_UInt32 posSlot = GetPosSlot1(i); LZ_UInt32 footerBits = ((posSlot >> 1) - 1); LZ_UInt32 base = ((2 | (posSlot & 1)) << footerBits); tempPrices[i] = RcTree_ReverseGetPrice(p->posEncoders + base - posSlot - 1, footerBits, i - base, p->ProbPrices); } for (lenToPosState = 0; lenToPosState < kNumLenToPosStates; lenToPosState++) { LZ_UInt32 posSlot; const CLzmaProb *encoder = p->posSlotEncoder[lenToPosState]; LZ_UInt32 *posSlotPrices = p->posSlotPrices[lenToPosState]; for (posSlot = 0; posSlot < p->distTableSize; posSlot++) posSlotPrices[posSlot] = RcTree_GetPrice(encoder, kNumPosSlotBits, posSlot, p->ProbPrices); for (posSlot = kEndPosModelIndex; posSlot < p->distTableSize; posSlot++) posSlotPrices[posSlot] += ((((posSlot >> 1) - 1) - kNumAlignBits) << kNumBitPriceShiftBits); { LZ_UInt32 *distancesPrices = p->distancesPrices[lenToPosState]; LZ_UInt32 i; for (i = 0; i < kStartPosModelIndex; i++) distancesPrices[i] = posSlotPrices[i]; for (; i < kNumFullDistances; i++) distancesPrices[i] = posSlotPrices[GetPosSlot1(i)] + tempPrices[i]; } } p->matchPriceCount = 0; } void LzmaEnc_Construct(CLzmaEnc *p) { RangeEnc_Construct(&p->rc); MatchFinder_Construct(&p->matchFinderBase); #ifdef COMPRESS_MF_MT MatchFinderMt_Construct(&p->matchFinderMt); p->matchFinderMt.MatchFinder = &p->matchFinderBase; #endif { CLzmaEncProps props; LzmaEncProps_Init(&props); LzmaEnc_SetProps(p, &props); } #ifndef LZMA_LOG_BSR LzmaEnc_FastPosInit(p->g_FastPos); #endif LzmaEnc_InitPriceTables(p->ProbPrices); p->litProbs = 0; p->saveState.litProbs = 0; } CLzmaEncHandle LzmaEnc_Create(ISzAlloc *alloc) { void *p; p = alloc->Alloc(alloc, sizeof(CLzmaEnc)); if (p != 0) LzmaEnc_Construct((CLzmaEnc *)p); return p; } void LzmaEnc_FreeLits(CLzmaEnc *p, ISzAlloc *alloc) { alloc->Free(alloc, p->litProbs); alloc->Free(alloc, p->saveState.litProbs); p->litProbs = 0; p->saveState.litProbs = 0; } void LzmaEnc_Destruct(CLzmaEnc *p, ISzAlloc *alloc, ISzAlloc *allocBig) { #ifdef COMPRESS_MF_MT MatchFinderMt_Destruct(&p->matchFinderMt, allocBig); #endif MatchFinder_Free(&p->matchFinderBase, allocBig); LzmaEnc_FreeLits(p, alloc); RangeEnc_Free(&p->rc, alloc); } void LzmaEnc_Destroy(CLzmaEncHandle p, ISzAlloc *alloc, ISzAlloc *allocBig) { LzmaEnc_Destruct((CLzmaEnc *)p, alloc, allocBig); alloc->Free(alloc, p); } static SRes LzmaEnc_CodeOneBlock(CLzmaEnc *p, int useLimits, LZ_UInt32 maxPackSize, LZ_UInt32 maxUnpackSize) { LZ_UInt32 nowPos32, startPos32; if (p->inStream != 0) { p->matchFinderBase.stream = p->inStream; p->matchFinder.Init(p->matchFinderObj); p->inStream = 0; } if (p->finished) return p->result; RINOK(CheckErrors(p)); nowPos32 = (LZ_UInt32)p->nowPos64; startPos32 = nowPos32; if (p->nowPos64 == 0) { LZ_UInt32 numPairs; Byte curByte; if (p->matchFinder.GetNumAvailableBytes(p->matchFinderObj) == 0) return Flush(p, nowPos32); ReadMatchDistances(p, &numPairs); RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][0], 0); p->state = kLiteralNextStates[p->state]; curByte = p->matchFinder.GetIndexByte(p->matchFinderObj, 0 - p->additionalOffset); LitEnc_Encode(&p->rc, p->litProbs, curByte); p->additionalOffset--; nowPos32++; } if (p->matchFinder.GetNumAvailableBytes(p->matchFinderObj) != 0) for (;;) { LZ_UInt32 pos, len, posState; if (p->fastMode) len = GetOptimumFast(p, &pos); else len = GetOptimum(p, nowPos32, &pos); #ifdef SHOW_STAT2 printf("\n pos = %4X, len = %d pos = %d", nowPos32, len, pos); #endif posState = nowPos32 & p->pbMask; if (len == 1 && pos == (LZ_UInt32)-1) { Byte curByte; CLzmaProb *probs; const Byte *data; RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][posState], 0); data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - p->additionalOffset; curByte = *data; probs = LIT_PROBS(nowPos32, *(data - 1)); if (IsCharState(p->state)) LitEnc_Encode(&p->rc, probs, curByte); else LitEnc_EncodeMatched(&p->rc, probs, curByte, *(data - p->reps[0] - 1)); p->state = kLiteralNextStates[p->state]; } else { RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][posState], 1); if (pos < LZMA_NUM_REPS) { RangeEnc_EncodeBit(&p->rc, &p->isRep[p->state], 1); if (pos == 0) { RangeEnc_EncodeBit(&p->rc, &p->isRepG0[p->state], 0); RangeEnc_EncodeBit(&p->rc, &p->isRep0Long[p->state][posState], ((len == 1) ? 0 : 1)); } else { LZ_UInt32 distance = p->reps[pos]; RangeEnc_EncodeBit(&p->rc, &p->isRepG0[p->state], 1); if (pos == 1) RangeEnc_EncodeBit(&p->rc, &p->isRepG1[p->state], 0); else { RangeEnc_EncodeBit(&p->rc, &p->isRepG1[p->state], 1); RangeEnc_EncodeBit(&p->rc, &p->isRepG2[p->state], pos - 2); if (pos == 3) p->reps[3] = p->reps[2]; p->reps[2] = p->reps[1]; } p->reps[1] = p->reps[0]; p->reps[0] = distance; } if (len == 1) p->state = kShortRepNextStates[p->state]; else { LenEnc_Encode2(&p->repLenEnc, &p->rc, len - LZMA_MATCH_LEN_MIN, posState, !p->fastMode, p->ProbPrices); p->state = kRepNextStates[p->state]; } } else { LZ_UInt32 posSlot; RangeEnc_EncodeBit(&p->rc, &p->isRep[p->state], 0); p->state = kMatchNextStates[p->state]; LenEnc_Encode2(&p->lenEnc, &p->rc, len - LZMA_MATCH_LEN_MIN, posState, !p->fastMode, p->ProbPrices); pos -= LZMA_NUM_REPS; GetPosSlot(pos, posSlot); RcTree_Encode(&p->rc, p->posSlotEncoder[GetLenToPosState(len)], kNumPosSlotBits, posSlot); if (posSlot >= kStartPosModelIndex) { LZ_UInt32 footerBits = ((posSlot >> 1) - 1); LZ_UInt32 base = ((2 | (posSlot & 1)) << footerBits); LZ_UInt32 posReduced = pos - base; if (posSlot < kEndPosModelIndex) RcTree_ReverseEncode(&p->rc, p->posEncoders + base - posSlot - 1, footerBits, posReduced); else { RangeEnc_EncodeDirectBits(&p->rc, posReduced >> kNumAlignBits, footerBits - kNumAlignBits); RcTree_ReverseEncode(&p->rc, p->posAlignEncoder, kNumAlignBits, posReduced & kAlignMask); p->alignPriceCount++; } } p->reps[3] = p->reps[2]; p->reps[2] = p->reps[1]; p->reps[1] = p->reps[0]; p->reps[0] = pos; p->matchPriceCount++; } } p->additionalOffset -= len; nowPos32 += len; if (p->additionalOffset == 0) { LZ_UInt32 processed; if (!p->fastMode) { if (p->matchPriceCount >= (1 << 7)) FillDistancesPrices(p); if (p->alignPriceCount >= kAlignTableSize) FillAlignPrices(p); } if (p->matchFinder.GetNumAvailableBytes(p->matchFinderObj) == 0) break; processed = nowPos32 - startPos32; if (useLimits) { if (processed + kNumOpts + 300 >= maxUnpackSize || RangeEnc_GetProcessed(&p->rc) + kNumOpts * 2 >= maxPackSize) break; } else if (processed >= (1 << 15)) { p->nowPos64 += nowPos32 - startPos32; return CheckErrors(p); } } } p->nowPos64 += nowPos32 - startPos32; return Flush(p, nowPos32); } #define kBigHashDicLimit ((LZ_UInt32)1 << 24) static SRes LzmaEnc_Alloc(CLzmaEnc *p, LZ_UInt32 keepWindowSize, ISzAlloc *alloc, ISzAlloc *allocBig) { LZ_UInt32 beforeSize = kNumOpts; //int btMode; if (!RangeEnc_Alloc(&p->rc, alloc)) return SZ_ERROR_MEM; //btMode = (p->matchFinderBase.btMode != 0); #ifdef COMPRESS_MF_MT p->mtMode = (p->multiThread && !p->fastMode && btMode); #endif { unsigned lclp = p->lc + p->lp; if (p->litProbs == 0 || p->saveState.litProbs == 0 || p->lclp != lclp) { LzmaEnc_FreeLits(p, alloc); p->litProbs = (CLzmaProb *)alloc->Alloc(alloc, (0x300 << lclp) * sizeof(CLzmaProb)); p->saveState.litProbs = (CLzmaProb *)alloc->Alloc(alloc, (0x300 << lclp) * sizeof(CLzmaProb)); if (p->litProbs == 0 || p->saveState.litProbs == 0) { LzmaEnc_FreeLits(p, alloc); return SZ_ERROR_MEM; } p->lclp = lclp; } } p->matchFinderBase.bigHash = (p->dictSize > kBigHashDicLimit); if (beforeSize + p->dictSize < keepWindowSize) beforeSize = keepWindowSize - p->dictSize; #ifdef COMPRESS_MF_MT if (p->mtMode) { RINOK(MatchFinderMt_Create(&p->matchFinderMt, p->dictSize, beforeSize, p->numFastBytes, LZMA_MATCH_LEN_MAX, allocBig)); p->matchFinderObj = &p->matchFinderMt; MatchFinderMt_CreateVTable(&p->matchFinderMt, &p->matchFinder); } else #endif { if (!MatchFinder_Create(&p->matchFinderBase, p->dictSize, beforeSize, p->numFastBytes, LZMA_MATCH_LEN_MAX, allocBig)) return SZ_ERROR_MEM; p->matchFinderObj = &p->matchFinderBase; MatchFinder_CreateVTable(&p->matchFinderBase, &p->matchFinder); } return SZ_OK; } void LzmaEnc_Init(CLzmaEnc *p) { LZ_UInt32 i; p->state = 0; for (i = 0 ; i < LZMA_NUM_REPS; i++) p->reps[i] = 0; RangeEnc_Init(&p->rc); for (i = 0; i < kNumStates; i++) { LZ_UInt32 j; for (j = 0; j < LZMA_NUM_PB_STATES_MAX; j++) { p->isMatch[i][j] = kProbInitValue; p->isRep0Long[i][j] = kProbInitValue; } p->isRep[i] = kProbInitValue; p->isRepG0[i] = kProbInitValue; p->isRepG1[i] = kProbInitValue; p->isRepG2[i] = kProbInitValue; } { LZ_UInt32 num = 0x300 << (p->lp + p->lc); for (i = 0; i < num; i++) p->litProbs[i] = kProbInitValue; } { for (i = 0; i < kNumLenToPosStates; i++) { CLzmaProb *probs = p->posSlotEncoder[i]; LZ_UInt32 j; for (j = 0; j < (1 << kNumPosSlotBits); j++) probs[j] = kProbInitValue; } } { for (i = 0; i < kNumFullDistances - kEndPosModelIndex; i++) p->posEncoders[i] = kProbInitValue; } LenEnc_Init(&p->lenEnc.p); LenEnc_Init(&p->repLenEnc.p); for (i = 0; i < (1 << kNumAlignBits); i++) p->posAlignEncoder[i] = kProbInitValue; p->optimumEndIndex = 0; p->optimumCurrentIndex = 0; p->additionalOffset = 0; p->pbMask = (1 << p->pb) - 1; p->lpMask = (1 << p->lp) - 1; } void LzmaEnc_InitPrices(CLzmaEnc *p) { if (!p->fastMode) { FillDistancesPrices(p); FillAlignPrices(p); } p->lenEnc.tableSize = p->repLenEnc.tableSize = p->numFastBytes + 1 - LZMA_MATCH_LEN_MIN; LenPriceEnc_UpdateTables(&p->lenEnc, 1 << p->pb, p->ProbPrices); LenPriceEnc_UpdateTables(&p->repLenEnc, 1 << p->pb, p->ProbPrices); } static SRes LzmaEnc_AllocAndInit(CLzmaEnc *p, LZ_UInt32 keepWindowSize, ISzAlloc *alloc, ISzAlloc *allocBig) { LZ_UInt32 i; for (i = 0; i < (LZ_UInt32)kDicLogSizeMaxCompress; i++) if (p->dictSize <= ((LZ_UInt32)1 << i)) break; p->distTableSize = i * 2; p->finished = False; p->result = SZ_OK; RINOK(LzmaEnc_Alloc(p, keepWindowSize, alloc, allocBig)); LzmaEnc_Init(p); LzmaEnc_InitPrices(p); p->nowPos64 = 0; return SZ_OK; } static SRes LzmaEnc_Prepare(CLzmaEncHandle pp, ISeqInStream *inStream, ISeqOutStream *outStream, ISzAlloc *alloc, ISzAlloc *allocBig) { CLzmaEnc *p = (CLzmaEnc *)pp; p->inStream = inStream; p->rc.outStream = outStream; return LzmaEnc_AllocAndInit(p, 0, alloc, allocBig); } SRes LzmaEnc_PrepareForLzma2(CLzmaEncHandle pp, ISeqInStream *inStream, LZ_UInt32 keepWindowSize, ISzAlloc *alloc, ISzAlloc *allocBig) { CLzmaEnc *p = (CLzmaEnc *)pp; p->inStream = inStream; return LzmaEnc_AllocAndInit(p, keepWindowSize, alloc, allocBig); } static void LzmaEnc_SetInputBuf(CLzmaEnc *p, const Byte *src, SizeT srcLen) { p->seqBufInStream.funcTable.Read = MyRead; p->seqBufInStream.data = src; p->seqBufInStream.rem = srcLen; } SRes LzmaEnc_MemPrepare(CLzmaEncHandle pp, const Byte *src, SizeT srcLen, LZ_UInt32 keepWindowSize, ISzAlloc *alloc, ISzAlloc *allocBig) { CLzmaEnc *p = (CLzmaEnc *)pp; LzmaEnc_SetInputBuf(p, src, srcLen); p->inStream = &p->seqBufInStream.funcTable; return LzmaEnc_AllocAndInit(p, keepWindowSize, alloc, allocBig); } void LzmaEnc_Finish(CLzmaEncHandle pp) { #ifdef COMPRESS_MF_MT CLzmaEnc *p = (CLzmaEnc *)pp; if (p->mtMode) MatchFinderMt_ReleaseStream(&p->matchFinderMt); #else return; //pp = pp; #endif } typedef struct _CSeqOutStreamBuf { ISeqOutStream funcTable; Byte *data; SizeT rem; int overflow; } CSeqOutStreamBuf; static size_t MyWrite(void *pp, const void *data, size_t size) { CSeqOutStreamBuf *p = (CSeqOutStreamBuf *)pp; if (p->rem < size) { size = p->rem; p->overflow = True; } memcpy(p->data, data, size); p->rem -= size; p->data += size; return size; } LZ_UInt32 LzmaEnc_GetNumAvailableBytes(CLzmaEncHandle pp) { const CLzmaEnc *p = (CLzmaEnc *)pp; return p->matchFinder.GetNumAvailableBytes(p->matchFinderObj); } const Byte *LzmaEnc_GetCurBuf(CLzmaEncHandle pp) { const CLzmaEnc *p = (CLzmaEnc *)pp; return p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - p->additionalOffset; } SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle pp, int reInit, Byte *dest, size_t *destLen, LZ_UInt32 desiredPackSize, LZ_UInt32 *unpackSize) { CLzmaEnc *p = (CLzmaEnc *)pp; LZ_UInt64 nowPos64; SRes res; CSeqOutStreamBuf outStream; outStream.funcTable.Write = MyWrite; outStream.data = dest; outStream.rem = *destLen; outStream.overflow = False; p->writeEndMark = False; p->finished = False; p->result = SZ_OK; if (reInit) LzmaEnc_Init(p); LzmaEnc_InitPrices(p); nowPos64 = p->nowPos64; RangeEnc_Init(&p->rc); p->rc.outStream = &outStream.funcTable; res = LzmaEnc_CodeOneBlock(p, True, desiredPackSize, *unpackSize); *unpackSize = (LZ_UInt32)(p->nowPos64 - nowPos64); *destLen -= outStream.rem; if (outStream.overflow) return SZ_ERROR_OUTPUT_EOF; return res; } SRes LzmaEnc_Encode(CLzmaEncHandle pp, ISeqOutStream *outStream, ISeqInStream *inStream, ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig) { CLzmaEnc *p = (CLzmaEnc *)pp; SRes res = SZ_OK; #ifdef COMPRESS_MF_MT Byte allocaDummy[0x300]; int i = 0; for (i = 0; i < 16; i++) allocaDummy[i] = (Byte)i; #endif RINOK(LzmaEnc_Prepare(pp, inStream, outStream, alloc, allocBig)); for (;;) { res = LzmaEnc_CodeOneBlock(p, False, 0, 0); if (res != SZ_OK || p->finished != 0) break; if (progress != 0) { res = progress->Progress(progress, p->nowPos64, RangeEnc_GetProcessed(&p->rc)); if (res != SZ_OK) { res = SZ_ERROR_PROGRESS; break; } } } LzmaEnc_Finish(pp); return res; } SRes LzmaEnc_WriteProperties(CLzmaEncHandle pp, Byte *props, SizeT *size) { CLzmaEnc *p = (CLzmaEnc *)pp; int i; LZ_UInt32 dictSize = p->dictSize; if (*size < LZMA_PROPS_SIZE) return SZ_ERROR_PARAM; *size = LZMA_PROPS_SIZE; props[0] = (Byte)((p->pb * 5 + p->lp) * 9 + p->lc); for (i = 11; i <= 30; i++) { if (dictSize <= ((LZ_UInt32)2 << i)) { dictSize = (2 << i); break; } if (dictSize <= ((LZ_UInt32)3 << i)) { dictSize = (3 << i); break; } } for (i = 0; i < 4; i++) props[1 + i] = (Byte)(dictSize >> (8 * i)); return SZ_OK; } SRes LzmaEnc_MemEncode(CLzmaEncHandle pp, Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, int writeEndMark, ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig) { SRes res; CLzmaEnc *p = (CLzmaEnc *)pp; CSeqOutStreamBuf outStream; LzmaEnc_SetInputBuf(p, src, srcLen); outStream.funcTable.Write = MyWrite; outStream.data = dest; outStream.rem = *destLen; outStream.overflow = False; p->writeEndMark = writeEndMark; res = LzmaEnc_Encode(pp, &outStream.funcTable, &p->seqBufInStream.funcTable, progress, alloc, allocBig); *destLen -= outStream.rem; if (outStream.overflow) return SZ_ERROR_OUTPUT_EOF; return res; } SRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, const CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeEndMark, ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig) { CLzmaEnc *p = (CLzmaEnc *)LzmaEnc_Create(alloc); SRes res; if (p == 0) return SZ_ERROR_MEM; res = LzmaEnc_SetProps(p, props); if (res == SZ_OK) { res = LzmaEnc_WriteProperties(p, propsEncoded, propsSize); if (res == SZ_OK) res = LzmaEnc_MemEncode(p, dest, destLen, src, srcLen, writeEndMark, progress, alloc, allocBig); } LzmaEnc_Destroy(p, alloc, allocBig); return res; } flamp-2.2.12/src/lzma/Types.h0000644000175000017500000001113214463050062012623 00000000000000/* Types.h -- Basic types 2008-11-23 : Igor Pavlov : Public domain */ #ifndef __7Z_TYPES_H #define __7Z_TYPES_H #include #ifdef _WIN32 #include #endif #define SZ_OK 0 #define SZ_ERROR_DATA 1 #define SZ_ERROR_MEM 2 #define SZ_ERROR_CRC 3 #define SZ_ERROR_UNSUPPORTED 4 #define SZ_ERROR_PARAM 5 #define SZ_ERROR_INPUT_EOF 6 #define SZ_ERROR_OUTPUT_EOF 7 #define SZ_ERROR_READ 8 #define SZ_ERROR_WRITE 9 #define SZ_ERROR_PROGRESS 10 #define SZ_ERROR_FAIL 11 #define SZ_ERROR_THREAD 12 #define SZ_ERROR_ARCHIVE 16 #define SZ_ERROR_NO_ARCHIVE 17 extern const char *LZMA_ERRORS[]; typedef int SRes; #ifdef _WIN32 typedef DWORD WRes; #else typedef int WRes; #endif #ifndef RINOK #define RINOK(x) { int __result__ = (x); if (__result__ != 0) return __result__; } #endif typedef unsigned char Byte; typedef short Int16; typedef unsigned short UInt16; #ifdef _LZMA_LZ_UInt32_IS_ULONG typedef long LZ_Int32; typedef unsigned long LZ_UInt32; #else typedef int LZ_Int32; typedef unsigned int LZ_UInt32; #endif #ifdef _SZ_NO_INT_64 /* define _SZ_NO_INT_64, if your compiler doesn't support 64-bit integers. NOTES: Some code will work incorrectly in that case! */ typedef long LZ_Int64; typedef unsigned long LZ_UInt64; #else #if defined(_MSC_VER) || defined(__BORLANDC__) typedef __LZ_Int64 LZ_Int64; typedef unsigned __LZ_Int64 LZ_UInt64; #else typedef long long int LZ_Int64; typedef unsigned long long int LZ_UInt64; #endif #endif #ifdef _LZMA_NO_SYSTEM_SIZE_T typedef LZ_UInt32 SizeT; #else typedef size_t SizeT; #endif //typedef int Bool; #define True 1 #define False 0 #ifdef _MSC_VER #if _MSC_VER >= 1300 #define MY_NO_INLINE __declspec(noinline) #else #define MY_NO_INLINE #endif #define MY_CDECL __cdecl #define MY_STD_CALL __stdcall #define MY_FAST_CALL MY_NO_INLINE __fastcall #else #define MY_CDECL #define MY_STD_CALL #define MY_FAST_CALL #endif /* The following interfaces use first parameter as pointer to structure */ typedef struct { SRes (*Read)(void *p, void *buf, size_t *size); /* if (input(*size) != 0 && output(*size) == 0) means end_of_stream. (output(*size) < input(*size)) is allowed */ } ISeqInStream; /* it can return SZ_ERROR_INPUT_EOF */ SRes SeqInStream_Read(ISeqInStream *stream, void *buf, size_t size); SRes SeqInStream_Read2(ISeqInStream *stream, void *buf, size_t size, SRes errorType); SRes SeqInStream_ReadByte(ISeqInStream *stream, Byte *buf); typedef struct { size_t (*Write)(void *p, const void *buf, size_t size); /* Returns: result - the number of actually written bytes. (result < size) means error */ } ISeqOutStream; typedef enum { SZ_SEEK_SET = 0, SZ_SEEK_CUR = 1, SZ_SEEK_END = 2 } ESzSeek; typedef struct { SRes (*Read)(void *p, void *buf, size_t *size); /* same as ISeqInStream::Read */ SRes (*Seek)(void *p, LZ_Int64 *pos, ESzSeek origin); } ISeekInStream; typedef struct { SRes (*Look)(void *p, void **buf, size_t *size); /* if (input(*size) != 0 && output(*size) == 0) means end_of_stream. (output(*size) > input(*size)) is not allowed (output(*size) < input(*size)) is allowed */ SRes (*Skip)(void *p, size_t offset); /* offset must be <= output(*size) of Look */ SRes (*Read)(void *p, void *buf, size_t *size); /* reads directly (without buffer). It's same as ISeqInStream::Read */ SRes (*Seek)(void *p, LZ_Int64 *pos, ESzSeek origin); } ILookInStream; SRes LookInStream_LookRead(ILookInStream *stream, void *buf, size_t *size); SRes LookInStream_SeekTo(ILookInStream *stream, LZ_UInt64 offset); /* reads via ILookInStream::Read */ SRes LookInStream_Read2(ILookInStream *stream, void *buf, size_t size, SRes errorType); SRes LookInStream_Read(ILookInStream *stream, void *buf, size_t size); #define LookToRead_BUF_SIZE (1 << 14) typedef struct { ILookInStream s; ISeekInStream *realStream; size_t pos; size_t size; Byte buf[LookToRead_BUF_SIZE]; } CLookToRead; void LookToRead_CreateVTable(CLookToRead *p, int lookahead); void LookToRead_Init(CLookToRead *p); typedef struct { ISeqInStream s; ILookInStream *realStream; } CSecToLook; void SecToLook_CreateVTable(CSecToLook *p); typedef struct { ISeqInStream s; ILookInStream *realStream; } CSecToRead; void SecToRead_CreateVTable(CSecToRead *p); typedef struct { SRes (*Progress)(void *p, LZ_UInt64 inSize, LZ_UInt64 outSize); /* Returns: result. (result != SZ_OK) means break. Value (LZ_UInt64)(LZ_Int64)-1 for size means unknown value. */ } ICompressProgress; typedef struct { void *(*Alloc)(void *p, size_t size); void (*Free)(void *p, void *address); /* address can be 0 */ } ISzAlloc; #define IAlloc_Alloc(p, size) (p)->Alloc((p), size) #define IAlloc_Free(p, a) (p)->Free((p), a) #endif flamp-2.2.12/src/lzma/LzmaDec.h0000644000175000017500000001467614463050062013056 00000000000000/* LzmaDec.h -- LZMA Decoder 2008-10-04 : Igor Pavlov : Public domain */ #ifndef __LZMADEC_H #define __LZMADEC_H #include "Types.h" /* #define _LZMA_PROB32 */ /* _LZMA_PROB32 can increase the speed on some CPUs, but memory usage for CLzmaDec::probs will be doubled in that case */ #ifdef _LZMA_PROB32 #define CLzmaProb LZ_UInt32 #else #define CLzmaProb UInt16 #endif /* ---------- LZMA Properties ---------- */ #define LZMA_PROPS_SIZE 5 typedef struct _CLzmaProps { unsigned lc, lp, pb; LZ_UInt32 dicSize; } CLzmaProps; /* LzmaProps_Decode - decodes properties Returns: SZ_OK SZ_ERROR_UNSUPPORTED - Unsupported properties */ SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size); /* ---------- LZMA Decoder state ---------- */ /* LZMA_REQUIRED_INPUT_MAX = number of required input bytes for worst case. Num bits = log2((2^11 / 31) ^ 22) + 26 < 134 + 26 = 160; */ #define LZMA_REQUIRED_INPUT_MAX 20 typedef struct { CLzmaProps prop; CLzmaProb *probs; Byte *dic; const Byte *buf; LZ_UInt32 range, code; SizeT dicPos; SizeT dicBufSize; LZ_UInt32 processedPos; LZ_UInt32 checkDicSize; unsigned state; LZ_UInt32 reps[4]; unsigned remainLen; int needFlush; int needInitState; LZ_UInt32 numProbs; unsigned tempBufSize; Byte tempBuf[LZMA_REQUIRED_INPUT_MAX]; } CLzmaDec; #define LzmaDec_Construct(p) { (p)->dic = 0; (p)->probs = 0; } void LzmaDec_Init(CLzmaDec *p); /* There are two types of LZMA streams: 0) Stream with end mark. That end mark adds about 6 bytes to compressed size. 1) Stream without end mark. You must know exact uncompressed size to decompress such stream. */ typedef enum { LZMA_FINISH_ANY, /* finish at any point */ LZMA_FINISH_END /* block must be finished at the end */ } ELzmaFinishMode; /* ELzmaFinishMode has meaning only if the decoding reaches output limit !!! You must use LZMA_FINISH_END, when you know that current output buffer covers last bytes of block. In other cases you must use LZMA_FINISH_ANY. If LZMA decoder sees end marker before reaching output limit, it returns SZ_OK, and output value of destLen will be less than output buffer size limit. You can check status result also. You can use multiple checks to test data integrity after full decompression: 1) Check Result and "status" variable. 2) Check that output(destLen) = uncompressedSize, if you know real uncompressedSize. 3) Check that output(srcLen) = compressedSize, if you know real compressedSize. You must use correct finish mode in that case. */ typedef enum { LZMA_STATUS_NOT_SPECIFIED, /* use main error code instead */ LZMA_STATUS_FINISHED_WITH_MARK, /* stream was finished with end mark. */ LZMA_STATUS_NOT_FINISHED, /* stream was not finished */ LZMA_STATUS_NEEDS_MORE_INPUT, /* you must provide more input bytes */ LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK /* there is probability that stream was finished without end mark */ } ELzmaStatus; /* ELzmaStatus is used only as output value for function call */ /* ---------- Interfaces ---------- */ /* There are 3 levels of interfaces: 1) Dictionary Interface 2) Buffer Interface 3) One Call Interface You can select any of these interfaces, but don't mix functions from different groups for same object. */ /* There are two variants to allocate state for Dictionary Interface: 1) LzmaDec_Allocate / LzmaDec_Free 2) LzmaDec_AllocateProbs / LzmaDec_FreeProbs You can use variant 2, if you set dictionary buffer manually. For Buffer Interface you must always use variant 1. LzmaDec_Allocate* can return: SZ_OK SZ_ERROR_MEM - Memory allocation error SZ_ERROR_UNSUPPORTED - Unsupported properties */ SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc); void LzmaDec_FreeProbs(CLzmaDec *p, ISzAlloc *alloc); SRes LzmaDec_Allocate(CLzmaDec *state, const Byte *prop, unsigned propsSize, ISzAlloc *alloc); void LzmaDec_Free(CLzmaDec *state, ISzAlloc *alloc); /* ---------- Dictionary Interface ---------- */ /* You can use it, if you want to eliminate the overhead for data copying from dictionary to some other external buffer. You must work with CLzmaDec variables directly in this interface. STEPS: LzmaDec_Constr() LzmaDec_Allocate() for (each new stream) { LzmaDec_Init() while (it needs more decompression) { LzmaDec_DecodeToDic() use data from CLzmaDec::dic and update CLzmaDec::dicPos } } LzmaDec_Free() */ /* LzmaDec_DecodeToDic The decoding to internal dictionary buffer (CLzmaDec::dic). You must manually update CLzmaDec::dicPos, if it reaches CLzmaDec::dicBufSize !!! finishMode: It has meaning only if the decoding reaches output limit (dicLimit). LZMA_FINISH_ANY - Decode just dicLimit bytes. LZMA_FINISH_END - Stream must be finished after dicLimit. Returns: SZ_OK status: LZMA_STATUS_FINISHED_WITH_MARK LZMA_STATUS_NOT_FINISHED LZMA_STATUS_NEEDS_MORE_INPUT LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK SZ_ERROR_DATA - Data error */ SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit, const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status); /* ---------- Buffer Interface ---------- */ /* It's zlib-like interface. See LzmaDec_DecodeToDic description for information about STEPS and return results, but you must use LzmaDec_DecodeToBuf instead of LzmaDec_DecodeToDic and you don't need to work with CLzmaDec variables manually. finishMode: It has meaning only if the decoding reaches output limit (*destLen). LZMA_FINISH_ANY - Decode just destLen bytes. LZMA_FINISH_END - Stream must be finished after (*destLen). */ SRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status); /* ---------- One Call Interface ---------- */ /* LzmaDecode finishMode: It has meaning only if the decoding reaches output limit (*destLen). LZMA_FINISH_ANY - Decode just destLen bytes. LZMA_FINISH_END - Stream must be finished after (*destLen). Returns: SZ_OK status: LZMA_STATUS_FINISHED_WITH_MARK LZMA_STATUS_NOT_FINISHED LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK SZ_ERROR_DATA - Data error SZ_ERROR_MEM - Memory allocation error SZ_ERROR_UNSUPPORTED - Unsupported properties SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src). */ SRes LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode, ELzmaStatus *status, ISzAlloc *alloc); #endif flamp-2.2.12/src/lzma/LzFind.c0000644000175000017500000004443314463050062012712 00000000000000/* LzFind.c -- Match finder for LZ algorithms 2008-10-04 : Igor Pavlov : Public domain */ #include #include "LzFind.h" #include "LzHash.h" #define kEmptyHashValue 0 #define kMaxValForNormalize ((LZ_UInt32)0xFFFFFFFF) #define kNormalizeStepMin (1 << 10) /* it must be power of 2 */ #define kNormalizeMask (~(kNormalizeStepMin - 1)) #define kMaxHistorySize ((LZ_UInt32)3 << 30) #define kStartMaxLen 3 static void LzInWindow_Free(CMatchFinder *p, ISzAlloc *alloc) { if (!p->directInput) { alloc->Free(alloc, p->bufferBase); p->bufferBase = 0; } } /* keepSizeBefore + keepSizeAfter + keepSizeReserv must be < 4G) */ static int LzInWindow_Create(CMatchFinder *p, LZ_UInt32 keepSizeReserv, ISzAlloc *alloc) { LZ_UInt32 blockSize = p->keepSizeBefore + p->keepSizeAfter + keepSizeReserv; if (p->directInput) { p->blockSize = blockSize; return 1; } if (p->bufferBase == 0 || p->blockSize != blockSize) { LzInWindow_Free(p, alloc); p->blockSize = blockSize; p->bufferBase = (Byte *)alloc->Alloc(alloc, (size_t)blockSize); } return (p->bufferBase != 0); } Byte *MatchFinder_GetPointerToCurrentPos(CMatchFinder *p) { return p->buffer; } Byte MatchFinder_GetIndexByte(CMatchFinder *p, LZ_Int32 index) { return p->buffer[index]; } LZ_UInt32 MatchFinder_GetNumAvailableBytes(CMatchFinder *p) { return p->streamPos - p->pos; } void MatchFinder_ReduceOffsets(CMatchFinder *p, LZ_UInt32 subValue) { p->posLimit -= subValue; p->pos -= subValue; p->streamPos -= subValue; } static void MatchFinder_ReadBlock(CMatchFinder *p) { if (p->streamEndWasReached || p->result != SZ_OK) return; for (;;) { Byte *dest = p->buffer + (p->streamPos - p->pos); size_t size = (p->bufferBase + p->blockSize - dest); if (size == 0) return; p->result = p->stream->Read(p->stream, dest, &size); if (p->result != SZ_OK) return; if (size == 0) { p->streamEndWasReached = 1; return; } p->streamPos += (LZ_UInt32)size; if (p->streamPos - p->pos > p->keepSizeAfter) return; } } void MatchFinder_MoveBlock(CMatchFinder *p) { memmove(p->bufferBase, p->buffer - p->keepSizeBefore, (size_t)(p->streamPos - p->pos + p->keepSizeBefore)); p->buffer = p->bufferBase + p->keepSizeBefore; } int MatchFinder_NeedMove(CMatchFinder *p) { /* if (p->streamEndWasReached) return 0; */ return ((size_t)(p->bufferBase + p->blockSize - p->buffer) <= p->keepSizeAfter); } void MatchFinder_ReadIfRequired(CMatchFinder *p) { if (p->streamEndWasReached) return; if (p->keepSizeAfter >= p->streamPos - p->pos) MatchFinder_ReadBlock(p); } static void MatchFinder_CheckAndMoveAndRead(CMatchFinder *p) { if (MatchFinder_NeedMove(p)) MatchFinder_MoveBlock(p); MatchFinder_ReadBlock(p); } static void MatchFinder_SetDefaultSettings(CMatchFinder *p) { p->cutValue = 32; p->btMode = 1; p->numHashBytes = 4; /* p->skipModeBits = 0; */ p->directInput = 0; p->bigHash = 0; } #define kCrcPoly 0xEDB88320 void MatchFinder_Construct(CMatchFinder *p) { LZ_UInt32 i; p->bufferBase = 0; p->directInput = 0; p->hash = 0; MatchFinder_SetDefaultSettings(p); for (i = 0; i < 256; i++) { LZ_UInt32 r = i; int j; for (j = 0; j < 8; j++) r = (r >> 1) ^ (kCrcPoly & ~((r & 1) - 1)); p->crc[i] = r; } } static void MatchFinder_FreeThisClassMemory(CMatchFinder *p, ISzAlloc *alloc) { alloc->Free(alloc, p->hash); p->hash = 0; } void MatchFinder_Free(CMatchFinder *p, ISzAlloc *alloc) { MatchFinder_FreeThisClassMemory(p, alloc); LzInWindow_Free(p, alloc); } static CLzRef* AllocRefs(LZ_UInt32 num, ISzAlloc *alloc) { size_t sizeInBytes = (size_t)num * sizeof(CLzRef); if (sizeInBytes / sizeof(CLzRef) != num) return 0; return (CLzRef *)alloc->Alloc(alloc, sizeInBytes); } int MatchFinder_Create(CMatchFinder *p, LZ_UInt32 historySize, LZ_UInt32 keepAddBufferBefore, LZ_UInt32 matchMaxLen, LZ_UInt32 keepAddBufferAfter, ISzAlloc *alloc) { LZ_UInt32 sizeReserv; if (historySize > kMaxHistorySize) { MatchFinder_Free(p, alloc); return 0; } sizeReserv = historySize >> 1; if (historySize > ((LZ_UInt32)2 << 30)) sizeReserv = historySize >> 2; sizeReserv += (keepAddBufferBefore + matchMaxLen + keepAddBufferAfter) / 2 + (1 << 19); p->keepSizeBefore = historySize + keepAddBufferBefore + 1; p->keepSizeAfter = matchMaxLen + keepAddBufferAfter; /* we need one additional byte, since we use MoveBlock after pos++ and before dictionary using */ if (LzInWindow_Create(p, sizeReserv, alloc)) { LZ_UInt32 newCyclicBufferSize = (historySize /* >> p->skipModeBits */) + 1; LZ_UInt32 hs; p->matchMaxLen = matchMaxLen; { p->fixedHashSize = 0; if (p->numHashBytes == 2) hs = (1 << 16) - 1; else { hs = historySize - 1; hs |= (hs >> 1); hs |= (hs >> 2); hs |= (hs >> 4); hs |= (hs >> 8); hs >>= 1; /* hs >>= p->skipModeBits; */ hs |= 0xFFFF; /* don't change it! It's required for Deflate */ if (hs > (1 << 24)) { if (p->numHashBytes == 3) hs = (1 << 24) - 1; else hs >>= 1; } } p->hashMask = hs; hs++; if (p->numHashBytes > 2) p->fixedHashSize += kHash2Size; if (p->numHashBytes > 3) p->fixedHashSize += kHash3Size; if (p->numHashBytes > 4) p->fixedHashSize += kHash4Size; hs += p->fixedHashSize; } { LZ_UInt32 prevSize = p->hashSizeSum + p->numSons; LZ_UInt32 newSize; p->historySize = historySize; p->hashSizeSum = hs; p->cyclicBufferSize = newCyclicBufferSize; p->numSons = (p->btMode ? newCyclicBufferSize * 2 : newCyclicBufferSize); newSize = p->hashSizeSum + p->numSons; if (p->hash != 0 && prevSize == newSize) return 1; MatchFinder_FreeThisClassMemory(p, alloc); p->hash = AllocRefs(newSize, alloc); if (p->hash != 0) { p->son = p->hash + p->hashSizeSum; return 1; } } } MatchFinder_Free(p, alloc); return 0; } static void MatchFinder_SetLimits(CMatchFinder *p) { LZ_UInt32 limit = kMaxValForNormalize - p->pos; LZ_UInt32 limit2 = p->cyclicBufferSize - p->cyclicBufferPos; if (limit2 < limit) limit = limit2; limit2 = p->streamPos - p->pos; if (limit2 <= p->keepSizeAfter) { if (limit2 > 0) limit2 = 1; } else limit2 -= p->keepSizeAfter; if (limit2 < limit) limit = limit2; { LZ_UInt32 lenLimit = p->streamPos - p->pos; if (lenLimit > p->matchMaxLen) lenLimit = p->matchMaxLen; p->lenLimit = lenLimit; } p->posLimit = p->pos + limit; } void MatchFinder_Init(CMatchFinder *p) { LZ_UInt32 i; for (i = 0; i < p->hashSizeSum; i++) p->hash[i] = kEmptyHashValue; p->cyclicBufferPos = 0; p->buffer = p->bufferBase; p->pos = p->streamPos = p->cyclicBufferSize; p->result = SZ_OK; p->streamEndWasReached = 0; MatchFinder_ReadBlock(p); MatchFinder_SetLimits(p); } static LZ_UInt32 MatchFinder_GetSubValue(CMatchFinder *p) { return (p->pos - p->historySize - 1) & kNormalizeMask; } void MatchFinder_Normalize3(LZ_UInt32 subValue, CLzRef *items, LZ_UInt32 numItems) { LZ_UInt32 i; for (i = 0; i < numItems; i++) { LZ_UInt32 value = items[i]; if (value <= subValue) value = kEmptyHashValue; else value -= subValue; items[i] = value; } } static void MatchFinder_Normalize(CMatchFinder *p) { LZ_UInt32 subValue = MatchFinder_GetSubValue(p); MatchFinder_Normalize3(subValue, p->hash, p->hashSizeSum + p->numSons); MatchFinder_ReduceOffsets(p, subValue); } static void MatchFinder_CheckLimits(CMatchFinder *p) { if (p->pos == kMaxValForNormalize) MatchFinder_Normalize(p); if (!p->streamEndWasReached && p->keepSizeAfter == p->streamPos - p->pos) MatchFinder_CheckAndMoveAndRead(p); if (p->cyclicBufferPos == p->cyclicBufferSize) p->cyclicBufferPos = 0; MatchFinder_SetLimits(p); } static LZ_UInt32 * Hc_GetMatchesSpec(LZ_UInt32 lenLimit, LZ_UInt32 curMatch, LZ_UInt32 pos, const Byte *cur, CLzRef *son, LZ_UInt32 _cyclicBufferPos, LZ_UInt32 _cyclicBufferSize, LZ_UInt32 cutValue, LZ_UInt32 *distances, LZ_UInt32 maxLen) { son[_cyclicBufferPos] = curMatch; for (;;) { LZ_UInt32 delta = pos - curMatch; if (cutValue-- == 0 || delta >= _cyclicBufferSize) return distances; { const Byte *pb = cur - delta; curMatch = son[_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)]; if (pb[maxLen] == cur[maxLen] && *pb == *cur) { LZ_UInt32 len = 0; while (++len != lenLimit) if (pb[len] != cur[len]) break; if (maxLen < len) { *distances++ = maxLen = len; *distances++ = delta - 1; if (len == lenLimit) return distances; } } } } } LZ_UInt32 * GetMatchesSpec1(LZ_UInt32 lenLimit, LZ_UInt32 curMatch, LZ_UInt32 pos, const Byte *cur, CLzRef *son, LZ_UInt32 _cyclicBufferPos, LZ_UInt32 _cyclicBufferSize, LZ_UInt32 cutValue, LZ_UInt32 *distances, LZ_UInt32 maxLen) { CLzRef *ptr0 = son + (_cyclicBufferPos << 1) + 1; CLzRef *ptr1 = son + (_cyclicBufferPos << 1); LZ_UInt32 len0 = 0, len1 = 0; for (;;) { LZ_UInt32 delta = pos - curMatch; if (cutValue-- == 0 || delta >= _cyclicBufferSize) { *ptr0 = *ptr1 = kEmptyHashValue; return distances; } { CLzRef *pair = son + ((_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)) << 1); const Byte *pb = cur - delta; LZ_UInt32 len = (len0 < len1 ? len0 : len1); if (pb[len] == cur[len]) { if (++len != lenLimit && pb[len] == cur[len]) while (++len != lenLimit) if (pb[len] != cur[len]) break; if (maxLen < len) { *distances++ = maxLen = len; *distances++ = delta - 1; if (len == lenLimit) { *ptr1 = pair[0]; *ptr0 = pair[1]; return distances; } } } if (pb[len] < cur[len]) { *ptr1 = curMatch; ptr1 = pair + 1; curMatch = *ptr1; len1 = len; } else { *ptr0 = curMatch; ptr0 = pair; curMatch = *ptr0; len0 = len; } } } } static void SkipMatchesSpec(LZ_UInt32 lenLimit, LZ_UInt32 curMatch, LZ_UInt32 pos, const Byte *cur, CLzRef *son, LZ_UInt32 _cyclicBufferPos, LZ_UInt32 _cyclicBufferSize, LZ_UInt32 cutValue) { CLzRef *ptr0 = son + (_cyclicBufferPos << 1) + 1; CLzRef *ptr1 = son + (_cyclicBufferPos << 1); LZ_UInt32 len0 = 0, len1 = 0; for (;;) { LZ_UInt32 delta = pos - curMatch; if (cutValue-- == 0 || delta >= _cyclicBufferSize) { *ptr0 = *ptr1 = kEmptyHashValue; return; } { CLzRef *pair = son + ((_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)) << 1); const Byte *pb = cur - delta; LZ_UInt32 len = (len0 < len1 ? len0 : len1); if (pb[len] == cur[len]) { while (++len != lenLimit) if (pb[len] != cur[len]) break; { if (len == lenLimit) { *ptr1 = pair[0]; *ptr0 = pair[1]; return; } } } if (pb[len] < cur[len]) { *ptr1 = curMatch; ptr1 = pair + 1; curMatch = *ptr1; len1 = len; } else { *ptr0 = curMatch; ptr0 = pair; curMatch = *ptr0; len0 = len; } } } } #define MOVE_POS \ ++p->cyclicBufferPos; \ p->buffer++; \ if (++p->pos == p->posLimit) MatchFinder_CheckLimits(p); #define MOVE_POS_RET MOVE_POS return offset; static void MatchFinder_MovePos(CMatchFinder *p) { MOVE_POS; } #define GET_MATCHES_HEADER2(minLen, ret_op) \ LZ_UInt32 lenLimit; LZ_UInt32 hashValue; const Byte *cur; LZ_UInt32 curMatch; \ lenLimit = p->lenLimit; { if (lenLimit < minLen) { MatchFinder_MovePos(p); ret_op; }} \ cur = p->buffer; #define GET_MATCHES_HEADER(minLen) GET_MATCHES_HEADER2(minLen, return 0) #define SKIP_HEADER(minLen) GET_MATCHES_HEADER2(minLen, continue) #define MF_PARAMS(p) p->pos, p->buffer, p->son, p->cyclicBufferPos, p->cyclicBufferSize, p->cutValue #define GET_MATCHES_FOOTER(offset, maxLen) \ offset = (LZ_UInt32)(GetMatchesSpec1(lenLimit, curMatch, MF_PARAMS(p), \ distances + offset, maxLen) - distances); MOVE_POS_RET; #define SKIP_FOOTER \ SkipMatchesSpec(lenLimit, curMatch, MF_PARAMS(p)); MOVE_POS; static LZ_UInt32 Bt2_MatchFinder_GetMatches(CMatchFinder *p, LZ_UInt32 *distances) { LZ_UInt32 offset; GET_MATCHES_HEADER(2) HASH2_CALC; curMatch = p->hash[hashValue]; p->hash[hashValue] = p->pos; offset = 0; GET_MATCHES_FOOTER(offset, 1) } LZ_UInt32 Bt3Zip_MatchFinder_GetMatches(CMatchFinder *p, LZ_UInt32 *distances) { LZ_UInt32 offset; GET_MATCHES_HEADER(3) HASH_ZIP_CALC; curMatch = p->hash[hashValue]; p->hash[hashValue] = p->pos; offset = 0; GET_MATCHES_FOOTER(offset, 2) } static LZ_UInt32 Bt3_MatchFinder_GetMatches(CMatchFinder *p, LZ_UInt32 *distances) { LZ_UInt32 hash2Value, delta2, maxLen, offset; GET_MATCHES_HEADER(3) HASH3_CALC; delta2 = p->pos - p->hash[hash2Value]; curMatch = p->hash[kFix3HashSize + hashValue]; p->hash[hash2Value] = p->hash[kFix3HashSize + hashValue] = p->pos; maxLen = 2; offset = 0; if (delta2 < p->cyclicBufferSize && *(cur - delta2) == *cur) { for (; maxLen != lenLimit; maxLen++) if (cur[(ptrdiff_t)maxLen - delta2] != cur[maxLen]) break; distances[0] = maxLen; distances[1] = delta2 - 1; offset = 2; if (maxLen == lenLimit) { SkipMatchesSpec(lenLimit, curMatch, MF_PARAMS(p)); MOVE_POS_RET; } } GET_MATCHES_FOOTER(offset, maxLen) } static LZ_UInt32 Bt4_MatchFinder_GetMatches(CMatchFinder *p, LZ_UInt32 *distances) { LZ_UInt32 hash2Value, hash3Value, delta2, delta3, maxLen, offset; GET_MATCHES_HEADER(4) HASH4_CALC; delta2 = p->pos - p->hash[ hash2Value]; delta3 = p->pos - p->hash[kFix3HashSize + hash3Value]; curMatch = p->hash[kFix4HashSize + hashValue]; p->hash[ hash2Value] = p->hash[kFix3HashSize + hash3Value] = p->hash[kFix4HashSize + hashValue] = p->pos; maxLen = 1; offset = 0; if (delta2 < p->cyclicBufferSize && *(cur - delta2) == *cur) { distances[0] = maxLen = 2; distances[1] = delta2 - 1; offset = 2; } if (delta2 != delta3 && delta3 < p->cyclicBufferSize && *(cur - delta3) == *cur) { maxLen = 3; distances[offset + 1] = delta3 - 1; offset += 2; delta2 = delta3; } if (offset != 0) { for (; maxLen != lenLimit; maxLen++) if (cur[(ptrdiff_t)maxLen - delta2] != cur[maxLen]) break; distances[offset - 2] = maxLen; if (maxLen == lenLimit) { SkipMatchesSpec(lenLimit, curMatch, MF_PARAMS(p)); MOVE_POS_RET; } } if (maxLen < 3) maxLen = 3; GET_MATCHES_FOOTER(offset, maxLen) } static LZ_UInt32 Hc4_MatchFinder_GetMatches(CMatchFinder *p, LZ_UInt32 *distances) { LZ_UInt32 hash2Value, hash3Value, delta2, delta3, maxLen, offset; GET_MATCHES_HEADER(4) HASH4_CALC; delta2 = p->pos - p->hash[ hash2Value]; delta3 = p->pos - p->hash[kFix3HashSize + hash3Value]; curMatch = p->hash[kFix4HashSize + hashValue]; p->hash[ hash2Value] = p->hash[kFix3HashSize + hash3Value] = p->hash[kFix4HashSize + hashValue] = p->pos; maxLen = 1; offset = 0; if (delta2 < p->cyclicBufferSize && *(cur - delta2) == *cur) { distances[0] = maxLen = 2; distances[1] = delta2 - 1; offset = 2; } if (delta2 != delta3 && delta3 < p->cyclicBufferSize && *(cur - delta3) == *cur) { maxLen = 3; distances[offset + 1] = delta3 - 1; offset += 2; delta2 = delta3; } if (offset != 0) { for (; maxLen != lenLimit; maxLen++) if (cur[(ptrdiff_t)maxLen - delta2] != cur[maxLen]) break; distances[offset - 2] = maxLen; if (maxLen == lenLimit) { p->son[p->cyclicBufferPos] = curMatch; MOVE_POS_RET; } } if (maxLen < 3) maxLen = 3; offset = (LZ_UInt32)(Hc_GetMatchesSpec(lenLimit, curMatch, MF_PARAMS(p), distances + offset, maxLen) - (distances)); MOVE_POS_RET } LZ_UInt32 Hc3Zip_MatchFinder_GetMatches(CMatchFinder *p, LZ_UInt32 *distances) { LZ_UInt32 offset; GET_MATCHES_HEADER(3) HASH_ZIP_CALC; curMatch = p->hash[hashValue]; p->hash[hashValue] = p->pos; offset = (LZ_UInt32)(Hc_GetMatchesSpec(lenLimit, curMatch, MF_PARAMS(p), distances, 2) - (distances)); MOVE_POS_RET } static void Bt2_MatchFinder_Skip(CMatchFinder *p, LZ_UInt32 num) { do { SKIP_HEADER(2) HASH2_CALC; curMatch = p->hash[hashValue]; p->hash[hashValue] = p->pos; SKIP_FOOTER } while (--num != 0); } void Bt3Zip_MatchFinder_Skip(CMatchFinder *p, LZ_UInt32 num) { do { SKIP_HEADER(3) HASH_ZIP_CALC; curMatch = p->hash[hashValue]; p->hash[hashValue] = p->pos; SKIP_FOOTER } while (--num != 0); } static void Bt3_MatchFinder_Skip(CMatchFinder *p, LZ_UInt32 num) { do { LZ_UInt32 hash2Value; SKIP_HEADER(3) HASH3_CALC; curMatch = p->hash[kFix3HashSize + hashValue]; p->hash[hash2Value] = p->hash[kFix3HashSize + hashValue] = p->pos; SKIP_FOOTER } while (--num != 0); } static void Bt4_MatchFinder_Skip(CMatchFinder *p, LZ_UInt32 num) { do { LZ_UInt32 hash2Value, hash3Value; SKIP_HEADER(4) HASH4_CALC; curMatch = p->hash[kFix4HashSize + hashValue]; p->hash[ hash2Value] = p->hash[kFix3HashSize + hash3Value] = p->pos; p->hash[kFix4HashSize + hashValue] = p->pos; SKIP_FOOTER } while (--num != 0); } static void Hc4_MatchFinder_Skip(CMatchFinder *p, LZ_UInt32 num) { do { LZ_UInt32 hash2Value, hash3Value; SKIP_HEADER(4) HASH4_CALC; curMatch = p->hash[kFix4HashSize + hashValue]; p->hash[ hash2Value] = p->hash[kFix3HashSize + hash3Value] = p->hash[kFix4HashSize + hashValue] = p->pos; p->son[p->cyclicBufferPos] = curMatch; MOVE_POS } while (--num != 0); } void Hc3Zip_MatchFinder_Skip(CMatchFinder *p, LZ_UInt32 num) { do { SKIP_HEADER(3) HASH_ZIP_CALC; curMatch = p->hash[hashValue]; p->hash[hashValue] = p->pos; p->son[p->cyclicBufferPos] = curMatch; MOVE_POS } while (--num != 0); } void MatchFinder_CreateVTable(CMatchFinder *p, IMatchFinder *vTable) { vTable->Init = (Mf_Init_Func)MatchFinder_Init; vTable->GetIndexByte = (Mf_GetIndexByte_Func)MatchFinder_GetIndexByte; vTable->GetNumAvailableBytes = (Mf_GetNumAvailableBytes_Func)MatchFinder_GetNumAvailableBytes; vTable->GetPointerToCurrentPos = (Mf_GetPointerToCurrentPos_Func)MatchFinder_GetPointerToCurrentPos; if (!p->btMode) { vTable->GetMatches = (Mf_GetMatches_Func)Hc4_MatchFinder_GetMatches; vTable->Skip = (Mf_Skip_Func)Hc4_MatchFinder_Skip; } else if (p->numHashBytes == 2) { vTable->GetMatches = (Mf_GetMatches_Func)Bt2_MatchFinder_GetMatches; vTable->Skip = (Mf_Skip_Func)Bt2_MatchFinder_Skip; } else if (p->numHashBytes == 3) { vTable->GetMatches = (Mf_GetMatches_Func)Bt3_MatchFinder_GetMatches; vTable->Skip = (Mf_Skip_Func)Bt3_MatchFinder_Skip; } else { vTable->GetMatches = (Mf_GetMatches_Func)Bt4_MatchFinder_GetMatches; vTable->Skip = (Mf_Skip_Func)Bt4_MatchFinder_Skip; } } flamp-2.2.12/src/lzma/LzmaLib.c0000644000175000017500000000276314463050062013056 00000000000000/* LzmaLib.c -- LZMA library wrapper 2008-08-05 Igor Pavlov Public domain */ #include "LzmaEnc.h" #include "LzmaDec.h" #include "Alloc.h" #include "LzmaLib.h" static void *SzAlloc(void *p, size_t size) { p = p; return MyAlloc(size); } static void SzFree(void *p, void *address) { p = p; MyFree(address); } static ISzAlloc g_Alloc = { SzAlloc, SzFree }; MY_STDAPI LzmaCompress(unsigned char *dest, size_t *destLen, const unsigned char *src, size_t srcLen, unsigned char *outProps, size_t *outPropsSize, int level, /* 0 <= level <= 9, default = 5 */ unsigned dictSize, /* use (1 << N) or (3 << N). 4 KB < dictSize <= 128 MB */ int lc, /* 0 <= lc <= 8, default = 3 */ int lp, /* 0 <= lp <= 4, default = 0 */ int pb, /* 0 <= pb <= 4, default = 2 */ int fb, /* 5 <= fb <= 273, default = 32 */ int numThreads /* 1 or 2, default = 2 */ ) { CLzmaEncProps props; LzmaEncProps_Init(&props); props.level = level; props.dictSize = dictSize; props.lc = lc; props.lp = lp; props.pb = pb; props.fb = fb; props.numThreads = numThreads; return LzmaEncode(dest, destLen, src, srcLen, &props, outProps, outPropsSize, 0, NULL, &g_Alloc, &g_Alloc); } MY_STDAPI LzmaUncompress(unsigned char *dest, size_t *destLen, const unsigned char *src, size_t *srcLen, const unsigned char *props, size_t propsSize) { ELzmaStatus status; return LzmaDecode(dest, destLen, src, srcLen, props, (unsigned)propsSize, LZMA_FINISH_ANY, &status, &g_Alloc); } flamp-2.2.12/src/lzma/LzmaEnc.h0000644000175000017500000000535714463050062013064 00000000000000/* LzmaEnc.h -- LZMA Encoder 2008-10-04 : Igor Pavlov : Public domain */ #ifndef __LZMAENC_H #define __LZMAENC_H #include "Types.h" #define LZMA_PROPS_SIZE 5 typedef struct _CLzmaEncProps { int level; /* 0 <= level <= 9 */ LZ_UInt32 dictSize; /* (1 << 12) <= dictSize <= (1 << 27) for 32-bit version (1 << 12) <= dictSize <= (1 << 30) for 64-bit version default = (1 << 24) */ int lc; /* 0 <= lc <= 8, default = 3 */ int lp; /* 0 <= lp <= 4, default = 0 */ int pb; /* 0 <= pb <= 4, default = 2 */ int algo; /* 0 - fast, 1 - normal, default = 1 */ int fb; /* 5 <= fb <= 273, default = 32 */ int btMode; /* 0 - hashChain Mode, 1 - binTree mode - normal, default = 1 */ int numHashBytes; /* 2, 3 or 4, default = 4 */ LZ_UInt32 mc; /* 1 <= mc <= (1 << 30), default = 32 */ unsigned writeEndMark; /* 0 - do not write EOPM, 1 - write EOPM, default = 0 */ int numThreads; /* 1 or 2, default = 2 */ } CLzmaEncProps; void LzmaEncProps_Init(CLzmaEncProps *p); void LzmaEncProps_Normalize(CLzmaEncProps *p); LZ_UInt32 LzmaEncProps_GetDictSize(const CLzmaEncProps *props2); /* ---------- CLzmaEncHandle Interface ---------- */ /* LzmaEnc_* functions can return the following exit codes: Returns: SZ_OK - OK SZ_ERROR_MEM - Memory allocation error SZ_ERROR_PARAM - Incorrect paramater in props SZ_ERROR_WRITE - Write callback error. SZ_ERROR_PROGRESS - some break from progress callback SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version) */ typedef void * CLzmaEncHandle; CLzmaEncHandle LzmaEnc_Create(ISzAlloc *alloc); void LzmaEnc_Destroy(CLzmaEncHandle p, ISzAlloc *alloc, ISzAlloc *allocBig); SRes LzmaEnc_SetProps(CLzmaEncHandle p, const CLzmaEncProps *props); SRes LzmaEnc_WriteProperties(CLzmaEncHandle p, Byte *properties, SizeT *size); SRes LzmaEnc_Encode(CLzmaEncHandle p, ISeqOutStream *outStream, ISeqInStream *inStream, ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig); SRes LzmaEnc_MemEncode(CLzmaEncHandle p, Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, int writeEndMark, ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig); /* ---------- One Call Interface ---------- */ /* LzmaEncode Return code: SZ_OK - OK SZ_ERROR_MEM - Memory allocation error SZ_ERROR_PARAM - Incorrect paramater SZ_ERROR_OUTPUT_EOF - output buffer overflow SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version) */ SRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, const CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeEndMark, ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig); #endif flamp-2.2.12/src/lzma/LzmaLib.h0000644000175000017500000001063714463050062013062 00000000000000/* LzmaLib.h -- LZMA library interface 2008-08-05 Igor Pavlov Public domain */ #ifndef __LZMALIB_H #define __LZMALIB_H #include "Types.h" #ifdef __cplusplus #define MY_EXTERN_C extern "C" #else #define MY_EXTERN_C extern #endif #define MY_STDAPI MY_EXTERN_C int MY_STD_CALL #define LZMA_PROPS_SIZE 5 /* RAM requirements for LZMA: for compression: (dictSize * 11.5 + 6 MB) + state_size for decompression: dictSize + state_size state_size = (4 + (1.5 << (lc + lp))) KB by default (lc=3, lp=0), state_size = 16 KB. LZMA properties (5 bytes) format Offset Size Description 0 1 lc, lp and pb in encoded form. 1 4 dictSize (little endian). */ /* LzmaCompress ------------ outPropsSize - In: the pointer to the size of outProps buffer; *outPropsSize = LZMA_PROPS_SIZE = 5. Out: the pointer to the size of written properties in outProps buffer; *outPropsSize = LZMA_PROPS_SIZE = 5. LZMA Encoder will use defult values for any parameter, if it is -1 for any from: level, loc, lp, pb, fb, numThreads 0 for dictSize level - compression level: 0 <= level <= 9; level dictSize algo fb 0: 16 KB 0 32 1: 64 KB 0 32 2: 256 KB 0 32 3: 1 MB 0 32 4: 4 MB 0 32 5: 16 MB 1 32 6: 32 MB 1 32 7+: 64 MB 1 64 The default value for "level" is 5. algo = 0 means fast method algo = 1 means normal method dictSize - The dictionary size in bytes. The maximum value is 128 MB = (1 << 27) bytes for 32-bit version 1 GB = (1 << 30) bytes for 64-bit version The default value is 16 MB = (1 << 24) bytes. It's recommended to use the dictionary that is larger than 4 KB and that can be calculated as (1 << N) or (3 << N) sizes. lc - The number of literal context bits (high bits of previous literal). It can be in the range from 0 to 8. The default value is 3. Sometimes lc=4 gives the gain for big files. lp - The number of literal pos bits (low bits of current position for literals). It can be in the range from 0 to 4. The default value is 0. The lp switch is intended for periodical data when the period is equal to 2^lp. For example, for 32-bit (4 bytes) periodical data you can use lp=2. Often it's better to set lc=0, if you change lp switch. pb - The number of pos bits (low bits of current position). It can be in the range from 0 to 4. The default value is 2. The pb switch is intended for periodical data when the period is equal 2^pb. fb - Word size (the number of fast bytes). It can be in the range from 5 to 273. The default value is 32. Usually, a big number gives a little bit better compression ratio and slower compression process. numThreads - The number of thereads. 1 or 2. The default value is 2. Fast mode (algo = 0) can use only 1 thread. Out: destLen - processed output size Returns: SZ_OK - OK SZ_ERROR_MEM - Memory allocation error SZ_ERROR_PARAM - Incorrect paramater SZ_ERROR_OUTPUT_EOF - output buffer overflow SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version) */ MY_STDAPI LzmaCompress(unsigned char *dest, size_t *destLen, const unsigned char *src, size_t srcLen, unsigned char *outProps, size_t *outPropsSize, /* *outPropsSize must be = 5 */ int level, /* 0 <= level <= 9, default = 5 */ unsigned dictSize, /* default = (1 << 24) */ int lc, /* 0 <= lc <= 8, default = 3 */ int lp, /* 0 <= lp <= 4, default = 0 */ int pb, /* 0 <= pb <= 4, default = 2 */ int fb, /* 5 <= fb <= 273, default = 32 */ int numThreads /* 1 or 2, default = 2 */ ); /* LzmaUncompress -------------- In: dest - output data destLen - output data size src - input data srcLen - input data size Out: destLen - processed output size srcLen - processed input size Returns: SZ_OK - OK SZ_ERROR_DATA - Data error SZ_ERROR_MEM - Memory allocation arror SZ_ERROR_UNSUPPORTED - Unsupported properties SZ_ERROR_INPUT_EOF - it needs more bytes in input buffer (src) */ MY_STDAPI LzmaUncompress(unsigned char *dest, size_t *destLen, const unsigned char *src, SizeT *srcLen, const unsigned char *props, size_t propsSize); #endif flamp-2.2.12/src/utils/0000775000175000017500000000000014607053767011646 500000000000000flamp-2.2.12/src/utils/mingw.c0000644000175000017500000002102414463050061013030 00000000000000// ---------------------------------------------------------------------------- // mingw.c // // The following routines were copied from git-1.6.1.2/compat/mingw.c: // git_vsnprintf git_snprintf sleep mingw_getcwd mingw_getenv mingw_rename // // The uname routine was adapted from libgw32c 0.4. // // The rest: // Copyright (C) 2009 // Stelios Bounanos, M0GLD // // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ---------------------------------------------------------------------------- #include #include #include #include "compat.h" /* default mode for stdin, stdout and stderr */ unsigned int _CRT_fmode = _O_BINARY; /* * The size parameter specifies the available space, i.e. includes * the trailing NUL byte; but Windows's vsnprintf expects the * number of characters to write without the trailing NUL. */ #define SNPRINTF_SIZE_CORR 1 #undef vsnprintf /** ******************************************************** * ***********************************************************/ int git_vsnprintf(char *str, size_t maxsize, const char *format, va_list ap) { char *s; int ret = -1; if (maxsize > 0) { ret = vsnprintf(str, maxsize-SNPRINTF_SIZE_CORR, format, ap); if (ret == maxsize-1) ret = -1; /* Windows does not NUL-terminate if result fills buffer */ str[maxsize-1] = 0; } if (ret != -1) return ret; s = NULL; if (maxsize < 128) maxsize = 128; while (ret == -1) { maxsize *= 4; str = realloc(s, maxsize); if (! str) break; s = str; ret = vsnprintf(str, maxsize-SNPRINTF_SIZE_CORR, format, ap); if (ret == maxsize-1) ret = -1; } free(s); return ret; } /** ******************************************************** * ***********************************************************/ int git_snprintf(char *str, size_t maxsize, const char *format, ...) { va_list ap; int ret; va_start(ap, format); ret = git_vsnprintf(str, maxsize, format, ap); va_end(ap); return ret; } /** ******************************************************** * ***********************************************************/ unsigned sleep(unsigned seconds) { Sleep(seconds*1000); return 0; } #undef getcwd /** ******************************************************** * ***********************************************************/ char *mingw_getcwd(char *pointer, int len) { int i; char *ret = getcwd(pointer, len); if (!ret) return ret; for (i = 0; pointer[i]; i++) if (pointer[i] == '\\') pointer[i] = '/'; return ret; } #undef getenv /** ******************************************************** * ***********************************************************/ char *mingw_getenv(const char *name) { char *result = getenv(name); if (!result && !strcmp(name, "TMPDIR")) { /* on Windows it is TMP and TEMP */ result = getenv("TMP"); if (!result) result = getenv("TEMP"); } return result; } #undef rename /** ******************************************************** * ***********************************************************/ int mingw_rename(const char *pold, const char *pnew) { DWORD attrs; /* * Try native rename() first to get errno right. * It is based on MoveFile(), which cannot overwrite existing files. */ if (!rename(pold, pnew)) return 0; if (errno != EEXIST) return -1; if (MoveFileEx(pold, pnew, MOVEFILE_REPLACE_EXISTING)) return 0; /* TODO: translate more errors */ if (GetLastError() == ERROR_ACCESS_DENIED && (attrs = GetFileAttributes(pnew)) != INVALID_FILE_ATTRIBUTES) { if (attrs & FILE_ATTRIBUTE_DIRECTORY) { errno = EISDIR; return -1; } if ((attrs & FILE_ATTRIBUTE_READONLY) && SetFileAttributes(pnew, attrs & ~FILE_ATTRIBUTE_READONLY)) { if (MoveFileEx(pold, pnew, MOVEFILE_REPLACE_EXISTING)) return 0; /* revert file attributes on failure */ SetFileAttributes(pnew, attrs); } } errno = EACCES; return -1; } /** ******************************************************** * ***********************************************************/ __attribute__((constructor)) static void wsa_init(void) { WSADATA wsa; static int wsa_init_ = 0; if (wsa_init_) return; if (WSAStartup(MAKEWORD(2, 2), &wsa)) { fprintf(stderr, "unable to initialize winsock: error %d", WSAGetLastError()); exit(EXIT_FAILURE); } atexit((void(*)(void)) WSACleanup); wsa_init_ = 1; } /** ******************************************************** * ***********************************************************/ int socketpair(int family, int type, int protocol, int *sv) { struct sockaddr_in addr; SOCKET sfd; int err, len = sizeof(addr); if (sv == NULL || family != AF_INET || type != SOCK_STREAM || protocol) { WSASetLastError(WSAEINVAL); return SOCKET_ERROR; } sv[0] = sv[1] = INVALID_SOCKET; if ((sfd = socket(family, type, 0)) == INVALID_SOCKET) return SOCKET_ERROR; memset(&addr, 0, sizeof(addr)); addr.sin_family = family; addr.sin_addr.s_addr = inet_addr("127.0.0.1"); addr.sin_port = 0; /* any port */ if ((err = bind(sfd, (const struct sockaddr*)&addr, sizeof(addr))) == SOCKET_ERROR) { err = WSAGetLastError(); closesocket(sfd); WSASetLastError(err); return SOCKET_ERROR; } if ((err = getsockname(sfd, (struct sockaddr*)&addr, &len)) == SOCKET_ERROR) { err = WSAGetLastError(); closesocket(sfd); WSASetLastError(err); return SOCKET_ERROR; } do { if (listen(sfd, 1) == SOCKET_ERROR) break; if ((sv[0] = WSASocket(family, type, 0, NULL, 0, 0)) == INVALID_SOCKET) break; if (connect(sv[0], (const struct sockaddr*)&addr, sizeof(addr)) == SOCKET_ERROR) break; if ((sv[1] = accept(sfd, NULL, NULL)) == INVALID_SOCKET) break; closesocket(sfd); return 0; } while (0); /* error */ err = WSAGetLastError(); closesocket(sfd); closesocket(sv[0]); closesocket(sv[1]); WSASetLastError(err); return SOCKET_ERROR; } /** ******************************************************** * ***********************************************************/ int nanosleep(const struct timespec *req, struct timespec *rem) { if (req->tv_nsec < 0 || req->tv_nsec < 0L || req->tv_nsec > 999999999L) { errno = EINVAL; return -1; } Sleep(req->tv_sec * 1000 + req->tv_nsec / 1000000L); if (rem) { rem->tv_sec = 0; rem->tv_nsec = 0L; } return 0; } BOOL GetOsInfo(LPSTR OsName, LPSTR Release, LPSTR Version); BOOL GetMachInfo(LPSTR MachineName, LPSTR ProcessorName); /** ******************************************************** * ***********************************************************/ int uname(struct utsname *name) { char processor[1024]; if (name == NULL) { errno = EINVAL; return -1; } if (gethostname(name->nodename, sizeof(name->nodename)) < 0) { name->nodename[0] = '\0'; errno = ENOSYS; return -1; } if (!GetOsInfo(name->sysname, name->release, name->version)) { strncpy (name->sysname, "win32", sizeof (name->sysname)); strncpy (name->release, "unknown", sizeof (name->release)); strncpy (name->version, "unknown", sizeof (name->version)); } /* "windows32" is as yet the only universal windows description allowed by config.guess and config.sub */ strncpy(name->sysname, "windows32", sizeof (name->sysname)); if (!GetMachInfo(name->machine, processor)) strncpy(name->machine, "i386", sizeof (name->machine)); return 0; } /** ******************************************************** * ***********************************************************/ int getrusage(int who, struct rusage *usage) { FILETIME ct, et, kt, ut; ULARGE_INTEGER uli; if (who != RUSAGE_SELF) { errno = EINVAL; return -1; } if (!usage) { errno = EFAULT; return -1; } if (!GetProcessTimes(GetCurrentProcess(), &ct, &et, &kt, &ut)) { errno = ENOENT; return -1; } // FILETIMEs use 100-ns units memcpy(&uli, &kt, sizeof(FILETIME)); usage->ru_stime.tv_sec = uli.QuadPart / 10000000L; usage->ru_stime.tv_usec = uli.QuadPart % 10000000L; memcpy(&uli, &ut, sizeof(FILETIME)); usage->ru_utime.tv_sec = uli.QuadPart / 10000000L; usage->ru_utime.tv_usec = uli.QuadPart % 10000000L; return 0; } flamp-2.2.12/src/utils/time_table.cxx0000664000175000017500000002243014517740574014417 00000000000000// ===================================================================== // // time_table.cxx // // Author(s): // Robert Stiles, KK5VD, Copyright (C) 2013, 2014 // // This file is part of FLAMP and FLMSG. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ===================================================================== // Doxygen /** ******************************************************** \page page_modem_timing_table Modem Timing Table Structure A table and functions to calculate the number of seconds or minutes needed to transmit a string of data. \par char *modem_name The string ID of the modem.
Example:
8PSK125, 8PSK250, etc.
\par float scale A value used to scale the resulting toble in an attemp to adjust for errors. However, because of the differential errors for each charater and overhead time, it's not recommended for use. \par float overhead Each modem contains a leading and trailing pre/postamble. The time for both a accumulated and stored in this variable. \par table[256] Floating point representation of the amount of time it takes to transmit the character in seconds. Character value range 0 to 255. \verbatim typedef struct { char *mode_name; float scale; float overhead; float table[256]; } MODE_TIME_TABLE; static MODE_TIME_TABLE mode_time_table[] = { { (char *) "8PSK125", 1.0, 2.973000, { 0.058500, 0.058875, 0.058500, 0.058500, 0.058875, 0.058500, 0.058500, 0.058875, 0.042500, 0.058500, 0.058875, 0.058500, 0.058500, 0.042875, 0.058500, 0.058500, 0.058875, 0.058500, 0.058500, 0.058875, 0.058500, 0.058500, 0.058875, 0.058500, 0.058500, 0.058875, 0.058500, 0.058500, 0.058875, 0.058500, 0.063625, 0.064312, 0.016000, 0.047625, 0.048313, 0.053437, 0.053062, 0.053437, 0.053437, 0.047625, ... },... },... }; \endverbatim ***********************************************************/ #include #include "debug.h" #include "time_table.h" /************************************************************** * NOTICE - Do not modify the following include file contents * as it's software generated. **************************************************************/ #include "time_table_dat.cxx" #include "status.h" /* Max RSID overhead time */ static float symbol_size = (25 * 0.09288); static float max_symbol_count = 2.0; static float time_length(MODE_TIME_TABLE *mTable, const char *string, int length); static int str_cnt(char * str, int count_limit); /** ******************************************************** * \brief Determine the length of the string with a count * limitation. * \return signed integer. The number of characters in the * array not to excede count limit. ***********************************************************/ static int str_cnt(char * str, int count_limit) { if(!str || (count_limit < 1)) return 0; int value = 0; for(int index = 0; index < count_limit; index++) { if(str[index] == 0) break; value++; } return value; } /** ******************************************************** * \brief Calulate the time it take to transmit the given * text with the selected modem. ***********************************************************/ static float time_length(MODE_TIME_TABLE *mTable, const char *string, int length) { unsigned int character = 0; float accum = 0.0; while (length > 0) { character = (unsigned int) *string++; character &= 0xFF; accum += mTable->table[character]; length--; } return (accum); } /** ******************************************************** * \brief Returns the time it take to transmit the given * text with the selected modem. 'C' interface. * \return float Duration in seconds. ***********************************************************/ float seconds_from_c_string(const char *mode, const char *string, int length, float *overhead) { int mode_index = 0; int max_mode_name = 16; int mode_count = sizeof(mode_time_table) / sizeof(MODE_TIME_TABLE); static int last_mode = 0; if(!mode || !string || length < 1) return 0.0; if(strncmp(mode, mode_time_table[last_mode].mode_name, max_mode_name) == 0) { if(overhead) { *overhead = mode_time_table[last_mode].overhead + (symbol_size * max_symbol_count); } return time_length(&mode_time_table[last_mode], string, length); } else { for(mode_index = 0; mode_index < mode_count; mode_index++) { if(strncmp((char *) mode, (char *) mode_time_table[mode_index].mode_name, max_mode_name) == 0) { last_mode = mode_index; if(overhead) { *overhead = mode_time_table[last_mode].overhead + (symbol_size * max_symbol_count); } return time_length(&mode_time_table[mode_index], string, length); } } } return 0.0; } /** ******************************************************** * \brief Returns the time it take to transmit the given * text with the selected modem. 'C' interface. * \return float Duration in minutes. ***********************************************************/ float minutes_from_c_string(const char *mode, const char *string, int length, float *overhead) { float time = 0.0; time = seconds_from_c_string(mode, string, length, overhead) / 60.0; if(overhead) *overhead /= 60.0; return time; } /** ******************************************************** * \brief Returns the time it take to transmit the given * text with the selected modem. 'C++' std::string interface. * \return float Duration in seconds. ***********************************************************/ float seconds_from_string(std::string mode, std::string& str, float *overhead) { try { return seconds_from_c_string(mode.c_str(), str.c_str(), str.length(), overhead); } catch ( ... ) { LOG_ERROR("%s", "String Ref Error"); return 0.0; } } /** ******************************************************** * \brief Returns the time it take to transmit the given * text with the selected modem. 'C++' std::string interface. * \return float Duration in minutes. ***********************************************************/ float minutes_from_string(std::string mode, std::string& str, float *overhead) { float time = 0.0; try { time = seconds_from_c_string(mode.c_str(), str.c_str(), str.length(), overhead) / 60.0; if(overhead) *overhead /= 60.0; } catch ( ... ) { LOG_ERROR("%s", "String Ref Error"); return 0.0; } return time; } /** ******************************************************** * \brief Search the modem table for a modem string match. * 'C++' std::string interface. * \return bool Match found = true. ***********************************************************/ bool modem_available(std::string modem) { if(modem.empty()) return false; return modem_available((char *) modem.c_str(), (int) modem.size()); } /** ******************************************************** * \brief Search the modem table for a modem string match. * 'C' interface. * \return bool Match found = true. ***********************************************************/ bool modem_available(char *modem, int search_limit) { if(!modem || (search_limit < 1)) return false; int mode_count = (int) sizeof(mode_time_table) / sizeof(MODE_TIME_TABLE); int index = 0; int results = 0; bool found = false; for(index = 0; index < mode_count; index++) { results = strncmp(modem, mode_time_table[index].mode_name, search_limit); if(results == 0) { results = str_cnt(mode_time_table[index].mode_name, 16); if(results == search_limit) { found = true; break; } } } return found; } /** ******************************************************** * \brief Return the number of table entires. * \return integer ***********************************************************/ int mode_table_count(void) { return (int) sizeof(mode_time_table) / sizeof(MODE_TIME_TABLE); } /** ******************************************************** * \brief Return modem ID string at position 'x' in the * Table. * \return char *. ***********************************************************/ char * modem_at_index(int index) { static char modem_name[] = "Bad Index"; int index_limit = mode_table_count(); if(index < 0 || index >= index_limit) return (char *) &modem_name[0]; return (char *) mode_time_table[index].mode_name; } #if 0 /** ******************************************************** * \brief Return duration of mode TxID in seconds * 0 if mode not in table * TxID is either 25 or 50 symbols in duration ***********************************************************/ float rsid_duration(std::string modem, int number_of_symbols) { size_t mode_count = sizeof(mode_time_table) / sizeof(*mode_time_table); for( size_t index = 0; index < mode_count; index++) { if (modem == mode_time_table[index].mode_name) return round(mode_time_table[index].rsid_symbols * number_of_symbols); } return 0; } #endif flamp-2.2.12/src/utils/tagSearch.cxx0000664000175000017500000001165114507650001014176 00000000000000// tagSearch.cxx // // Author(s): // Robert Stiles, KK5VD, Copyright (C) 2013, 2015 // Dave Freese, W1HKJ, Copyright (C) 2013 // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // #include "tagSearch.h" // This version performs a direct match on the first four bytes in the string. void * tag_search_parser(void *ptr); const char * searchTags[] = { " matchMaxLen ? size : matchMaxLen; if (size) { patternMatchList[index].string_size = size; memcpy(patternMatchList[index].string, mList[index], size); } const char *cPtr = mList[index]; int val = 0; patternMatchList[index].match = 0; for (size_t index2 = 0; index2 < sizeof(uint32_t); index2++) { val = cPtr[index2]; patternMatchList[index].match |= (val & 0xff); if(index2 < (sizeof(uint32_t) - 1)) patternMatchList[index].match <<= 8; } } else break; } listCount = mlCount; } else { throw TagSearchException("Tag matching allocation error"); } } /** ******************************************************** * ***********************************************************/ void * tag_search_parser(void *ptr) { TagSearch *ts_ptr = (TagSearch *)ptr; int shift_buffer_count = 0; int shift_buffer_size = 0; int count = 0; int found = 1; int read_count = 0; int old_count = 0; time_t tm_time = 0; uint32_t match = 0; uint32_t matchTo = 0; char shift_buffer[sizeof(uint32_t) + 1]; if(!ts_ptr) { return (void *)0; } if(!ts_ptr->matchFound || !ts_ptr->patternMatchList) { return (void *)0; } ts_ptr->thread_running = 1; shift_buffer_size = sizeof(uint32_t); memset(shift_buffer, 0, sizeof(shift_buffer)); while(!ts_ptr->thread_exit()) { found = 0; read_count = ts_ptr->lookAheadForCharacter('<', &found); if(read_count < 1) ts_ptr->milliSleep(50); if(found) { if(read_count > 0) { read_count--; ts_ptr->adjustReadQueIndex(read_count); } shift_buffer_count = 0; old_count = -1; while(shift_buffer_count < shift_buffer_size && !ts_ptr->thread_exit()) { shift_buffer_count = ts_ptr->lookAhead(shift_buffer, shift_buffer_size); if(shift_buffer_count != old_count) ts_ptr->timeOut(tm_time, 10, TIME_SET); else ts_ptr->milliSleep(100); if(ts_ptr->timeOut(tm_time, 10, TIME_COUNT)) break; old_count = shift_buffer_count; } match = 0; for(count = 0; count < shift_buffer_count; count++) { match |= (shift_buffer[count] & 0xff); if(count < (shift_buffer_count - 1)) match <<= 8; } read_count = 1; for (int index = 0; index < ts_ptr->listCount; index++) { matchTo = ts_ptr->patternMatchList[index].match; if(matchTo != match) continue; read_count = 0; if(ts_ptr->inhibitDataOut == CQUE_RESUME) { (ts_ptr->matchFound)((void *)ts_ptr); break; } } } if(read_count > 0) ts_ptr->adjustReadQueIndex(read_count); ts_ptr->milliSleep(50); } ts_ptr->thread_running = 0; return ptr; } flamp-2.2.12/src/utils/timeops.cxx0000664000175000017500000001255714507650001013763 00000000000000// ---------------------------------------------------------------------------- // timeops.cxx // // Copyright (C) 2007-2009 // Stelios Bounanos, M0GLD // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flamp // // flamp is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flamp is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include "timeops.h" #ifdef __MINGW32__ # include "compat.h" #endif #if !HAVE_CLOCK_GETTIME # ifdef __APPLE__ # include # endif # if TIME_WITH_SYS_TIME # include # endif # include int clock_gettime(clockid_t clock_id, struct timespec* tp) { if (clock_id == CLOCK_REALTIME) { struct timeval t; if (gettimeofday(&t, NULL) != 0) return -1; tp->tv_sec = t.tv_sec; tp->tv_nsec = t.tv_usec * 1000; } else if (clock_id == CLOCK_MONOTONIC) { #if defined(__WOE32__) int msec = GetTickCount(); tp->tv_sec = msec / 1000; tp->tv_nsec = (msec % 1000) * 1000000; #elif defined(__APPLE__) static mach_timebase_info_data_t info = { 0, 0 }; if (info.denom == 0) mach_timebase_info(&info); uint64_t t = mach_absolute_time() * info.numer / info.denom; tp->tv_sec = t / 1000000000; tp->tv_nsec = t % 1000000000; #endif } else { errno = EINVAL; return -1; } return 0; } #endif // !HAVE_CLOCK_GETTIME struct timespec operator+(const struct timespec &t0, const double &t) { struct timespec r; r.tv_sec = t0.tv_sec + static_cast(t); r.tv_nsec = t0.tv_nsec + static_cast((t - static_cast(t)) * 1e9); if (r.tv_nsec > 1000000000) { r.tv_nsec -= 1000000000; r.tv_sec++; } return r; } struct timespec operator-(const struct timespec &t0, const struct timespec &t1) { struct timespec r = t0; if (r.tv_nsec < t1.tv_nsec) { --r.tv_sec; r.tv_nsec += 1000000000L; } r.tv_sec -= t1.tv_sec; r.tv_nsec -= t1.tv_nsec; return r; } struct timespec& operator-=(struct timespec &t0, const struct timespec &t1) { if (t0.tv_nsec < t1.tv_nsec) { --t0.tv_sec; t0.tv_nsec += 1000000000L; } t0.tv_sec -= t1.tv_sec; t0.tv_nsec -= t1.tv_nsec; return t0; } bool operator>(const struct timespec &t0, const struct timespec &t1) { if (t0.tv_sec == t1.tv_sec) return t0.tv_nsec > t1.tv_nsec; else if (t0.tv_sec > t1.tv_sec) return true; else return false; } bool operator==(const struct timespec &t0, const struct timespec &t1) { return t0.tv_sec == t1.tv_sec && t0.tv_nsec == t1.tv_nsec; } struct timeval operator+(const struct timeval &t0, const double &t) { struct timeval r; r.tv_sec = t0.tv_sec + static_cast(t); r.tv_usec = t0.tv_usec + static_cast((t - static_cast(t)) * 1e9); if (r.tv_usec > 1000000) { r.tv_usec -= 1000000; r.tv_sec++; } return r; } struct timeval operator-(const struct timeval &t0, const struct timeval &t1) { struct timeval r = t0; if (r.tv_usec < t1.tv_usec) { --r.tv_sec; r.tv_usec += 1000000; } r.tv_sec -= t1.tv_sec; r.tv_usec -= t1.tv_usec; return r; } struct timeval& operator-=(struct timeval &t0, const struct timeval &t1) { if (t0.tv_usec < t1.tv_usec) { --t0.tv_sec; t0.tv_usec += 1000000L; } t0.tv_sec -= t1.tv_sec; t0.tv_usec -= t1.tv_usec; return t0; } bool operator>(const struct timeval &t0, const struct timeval &t1) { if (t0.tv_sec == t1.tv_sec) return t0.tv_usec > t1.tv_usec; else if (t0.tv_sec > t1.tv_sec) return true; else return false; } bool operator==(const struct timeval &t0, const struct timeval &t1) { return t0.tv_sec == t1.tv_sec && t0.tv_usec == t1.tv_usec; } #if !HAVE_GMTIME_R #include static pthread_mutex_t gmtime_r_mutex = PTHREAD_MUTEX_INITIALIZER; struct tm *gmtime_r(const time_t *_Time, struct tm *_Tm) { pthread_mutex_lock (&gmtime_r_mutex); struct tm *p = gmtime(_Time); if (p && _Tm) memcpy (_Tm, p, sizeof (struct tm)); pthread_mutex_unlock (&gmtime_r_mutex); return p; } static pthread_mutex_t gmtime_local_mutex = PTHREAD_MUTEX_INITIALIZER; struct tm *localtime_r(const time_t *_Time,struct tm *_Tm) { pthread_mutex_lock (&gmtime_local_mutex); struct tm *p = localtime(_Time); if (p && _Tm) memcpy (_Tm, p, sizeof (struct tm)); pthread_mutex_unlock (&gmtime_local_mutex); return p; } #endif flamp-2.2.12/src/utils/util.cxx0000664000175000017500000001642114507650001013252 00000000000000// ===================================================================== // // util.cxx // // Author: Stelios Buonanos, M0GLD, Dave Freese, W1HKJ // Copyright: 2010 // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ===================================================================== #include #include #include "config.h" #include "util.h" #ifdef __MINGW32__ # include "compat.h" #endif /* Return the smallest power of 2 not less than n */ uint32_t ceil2(uint32_t n) { --n; n |= n >> 1; n |= n >> 2; n |= n >> 4; n |= n >> 8; n |= n >> 16; return n + 1; } /* Return the largest power of 2 not greater than n */ uint32_t floor2(uint32_t n) { n |= n >> 1; n |= n >> 2; n |= n >> 4; n |= n >> 8; n |= n >> 16; return n - (n >> 1); } #include unsigned long ver2int(const char* version) { unsigned long v; char* p; v = (unsigned long)(strtod(version, &p) * 1e7 + 0.5); while (*p) v += *p++; return v; } #if !HAVE_STRCASESTR # include // from git 1.6.1.2 compat/strcasestr.c char *strcasestr(const char *haystack, const char *needle) { int nlen = strlen(needle); int hlen = strlen(haystack) - nlen + 1; int i; for (i = 0; i < hlen; i++) { int j; for (j = 0; j < nlen; j++) { unsigned char c1 = haystack[i+j]; unsigned char c2 = needle[j]; if (toupper(c1) != toupper(c2)) goto next; } return (char *) haystack + i; next: ; } return NULL; } #endif // !HAVE_STRCASESTR #if !HAVE_STRLCPY // from git 1.6.1.2 compat/strcasestr.c size_t strlcpy(char *dest, const char *src, size_t size) { size_t ret = strlen(src); if (size) { size_t len = (ret >= size) ? size - 1 : ret; memcpy(dest, src, len); dest[len] = '\0'; } return ret; } #endif // !HAVE_STRLCPY #ifdef __WIN32__ int set_cloexec(int fd, unsigned char v) { return 0; } #else # include # include int set_cloexec(int fd, unsigned char v) { int f = fcntl(fd, F_GETFD); return f == -1 ? f : fcntl(fd, F_SETFD, (v ? f | FD_CLOEXEC : f & ~FD_CLOEXEC)); } #endif // __WIN32__ int set_nonblock(int fd, unsigned char v) { #ifndef __WIN32__ int f = fcntl(fd, F_GETFL); return f == -1 ? f : fcntl(fd, F_SETFL, (v ? f | O_NONBLOCK : f & ~O_NONBLOCK)); #else // __WIN32__ u_long v_ = (u_long)v; errno = 0; if (ioctlsocket(fd, FIONBIO, &v_) == SOCKET_ERROR) { errno = WSAGetLastError(); return -1; } else return 0; #endif // __WIN32__ } #ifndef __WIN32__ # include # include # include # include #endif int set_nodelay(int fd, unsigned char v) { int val = v; return setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (const char*)&val, sizeof(val)); } #ifdef __WIN32__ # include #endif int get_bufsize(int fd, int dir, int* len) { socklen_t optlen = sizeof(*len); return getsockopt(fd, SOL_SOCKET, (dir == 0 ? SO_RCVBUF : SO_SNDBUF), (char*)len, &optlen); } int set_bufsize(int fd, int dir, int len) { return setsockopt(fd, SOL_SOCKET, (dir == 0 ? SO_RCVBUF : SO_SNDBUF), (const char*)&len, sizeof(len)); } #ifndef __WIN32__ #include #include #ifndef NSIG # define NSIG 64 #endif static size_t nsig = 0; static struct sigaction* sigact = 0; static pthread_mutex_t sigmutex = PTHREAD_MUTEX_INITIALIZER; #endif void save_signals(void) { #ifndef __WIN32__ pthread_mutex_lock(&sigmutex); if (!sigact) sigact = new struct sigaction[NSIG]; for (nsig = 1; nsig <= NSIG; nsig++) if (sigaction(nsig, NULL, &sigact[nsig-1]) == -1) break; pthread_mutex_unlock(&sigmutex); #endif } void restore_signals(void) { #ifndef __WIN32__ pthread_mutex_lock(&sigmutex); for (size_t i = 1; i <= nsig; i++) sigaction(i, &sigact[i-1], NULL); delete [] sigact; sigact = 0; nsig = 0; pthread_mutex_unlock(&sigmutex); #endif } uint32_t simple_hash_data(const unsigned char* buf, size_t len, uint32_t code) { for (size_t i = 0; i < len; i++) code = ((code << 4) | (code >> (32 - 4))) ^ (uint32_t)buf[i]; return code; } uint32_t simple_hash_str(const unsigned char* str, uint32_t code) { while (*str) code = ((code << 4) | (code >> (32 - 4))) ^ (uint32_t)*str++; return code; } #include #include static const char hexsym[] = "0123456789ABCDEF"; static std::vector* hexbuf; const char* str2hex(const unsigned char* str, size_t len) { if (unlikely(len == 0)) return ""; if (unlikely(!hexbuf)) { hexbuf = new std::vector; hexbuf->reserve(192); } if (unlikely(hexbuf->size() < len * 3)) hexbuf->resize(len * 3); char* p = &(*hexbuf)[0]; size_t i; for (i = 0; i < len; i++) { *p++ = hexsym[str[i] >> 4]; *p++ = hexsym[str[i] & 0xF]; *p++ = ' '; } *(p - 1) = '\0'; return &(*hexbuf)[0]; } const char* str2hex(const char* str, size_t len) { return str2hex((const unsigned char*)str, len ? len : strlen(str)); } static std::vector* binbuf; const char* uint2bin(unsigned u, size_t len) { if (unlikely(len == 0)) len = sizeof(u) * CHAR_BIT; if (unlikely(!binbuf)) { binbuf = new std::vector; binbuf->reserve(sizeof(u) * CHAR_BIT); } if (unlikely(binbuf->size() < len + 1)) binbuf->resize(len + 1); for (size_t i = 0; i < len; i++) { (*binbuf)[len - i - 1] = '0' + (u & 1); u >>= 1; } (*binbuf)[len] = '\0'; return &(*binbuf)[0]; } void MilliSleep(long msecs) { #ifndef __WIN32__ struct timespec tv; tv.tv_sec = msecs / 1000; tv.tv_nsec = (msecs - tv.tv_sec * 1000) * 1000000L; nanosleep(&tv, NULL); #else Sleep(msecs); #endif } //====================================================================== void ucase(std::string &s) { for (size_t n = 0; n < s.length(); n++) s[n] = toupper(s[n]); } void strip_spaces(std::string &s) { while (!s.empty() && s[0] == ' ') s.erase(0,1); while (!s.empty() && s[s.length() - 1] == ' ') s.erase(s.length() - 1, 1); } void strip_leading_zeros(std::string &s) { while(!s.empty() && s[0] == '0') s.erase(0,1); } void strip_lfs(std::string &s) { while (!s.empty() && s[0] == '\n') s.erase(0,1); while (!s.empty() && s[s.length() - 1] == '\n') s.erase(s.length() - 1, 1); } std::string wordwrap(std::string &s, int cnt) { static std::string nustr; nustr.clear(); int cntr = 1; char c; for (size_t n = 0; n < s.length(); n++) { c = s[n]; if (c == '\n') {nustr += c; cntr = 1; } else if (c == ' ' && cntr >= cnt) { nustr += '\n'; cntr = 1; } else { nustr += c; cntr++; } } return nustr; } #ifndef HAVE_STRNLEN int strnlen(const char *cPtr, int limit) { int count = 0; if(!cPtr || limit < 1) return 0; while((limit-- > 0) && *cPtr++) count++; return count; } #endif #include "threads.h" guard_lock::guard_lock(pthread_mutex_t* m) : mutex(m) { pthread_mutex_lock(mutex); } guard_lock::~guard_lock(void) { pthread_mutex_unlock(mutex); } flamp-2.2.12/src/utils/debug.cxx0000664000175000017500000002144614507650001013366 00000000000000// ---------------------------------------------------------------------------- // debug.cxx // // Copyright (C) 2008, 2012 // Stelios Bounanos, M0GLD, Dave Freese, W1HKJ // // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ---------------------------------------------------------------------------- #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "debug.h" #include "icons.h" #include "gettext.h" #include "flamp.h" #define MAX_LINES 65536 static FILE* wfile; static FILE* rfile; static int rfd; static Fl_Double_Window* window; static Fl_Browser* btext; static std::string dbg_buffer; debug* debug::inst = 0; debug::level_e debug::level = debug::INFO_LEVEL; //debug::level_e debug::level = debug::DEBUG_LEVEL; uint32_t debug::mask = ~0u; const char* prefix[] = { _("Quiet"), _("Error"), _("Warning"), _("Info"), _("Debug") }; pthread_mutex_t mutex_log = PTHREAD_MUTEX_INITIALIZER; static void slider_cb(Fl_Widget* w, void*); static void clear_cb(Fl_Widget *w, void*); static void save_cb(Fl_Widget *w, void*); static void synctext(void *); /** ******************************************************** * ***********************************************************/ int strlen_n(char *buf, size_t limit) { size_t index = 0; int count = 0; int value = 0; if(limit < 1) return 0; if(!buf) return 0; for(index = 0; index < limit; index++) { value = *buf++; if(value == 0) break; count++; } return count; } /** ******************************************************** * ***********************************************************/ void debug::start(const char* filename) { if (debug::inst) return; inst = new debug(filename); window = new Fl_Double_Window(600, 256, _("Debug log")); int pad = 2; Fl_Slider* slider = new Fl_Slider(pad, pad, 128, 20, prefix[level]); slider->tooltip(_("Change log level")); slider->align(FL_ALIGN_RIGHT); slider->type(FL_HOR_NICE_SLIDER); slider->range(0.0, LOG_NLEVELS - 1); slider->step(1.0); slider->value(level); slider->callback(slider_cb); Fl_Button* savebtn = new Fl_Button(window->w() - 124, pad, 60, 20, "save"); savebtn->callback(save_cb); Fl_Button* clearbtn = new Fl_Button(window->w() - 60, pad, 60, 20, "clear"); clearbtn->callback(clear_cb); btext = new Fl_Browser(pad, slider->h()+pad, window->w()-2*pad, window->h()-slider->h()-2*pad, 0); btext->textfont(FL_COURIER); window->resizable(btext); dbg_buffer.clear(); window->end(); } /** ******************************************************** * ***********************************************************/ void debug::stop(void) { delete inst; inst = 0; delete window; } static char fmt[1024]; static char sztemp[1024]; static std::string estr = ""; bool debug_in_use = false; /** ******************************************************** * ***********************************************************/ void debug::log(level_e level, const char* func, const char* srcf, int line, const char* format, ...) { if (!inst) return; pthread_mutex_lock(&mutex_log); snprintf(fmt, sizeof(fmt), "%c: %s: %s\n", *prefix[level], func, format); while(debug_in_use) MilliSleep(10); va_list args; va_start(args, format); vsnprintf(sztemp, sizeof(sztemp), fmt, args); estr.append(sztemp); va_end(args); fprintf(wfile, "%s", sztemp); fflush(wfile); append_dbg_buffer(sztemp); pthread_mutex_unlock(&mutex_log); Fl::awake(synctext, 0); MilliSleep(10); } /** ******************************************************** * ***********************************************************/ void debug::slog(level_e level, const char* func, const char* srcf, int line, const char* format, ...) { if (!inst) return; pthread_mutex_lock(&mutex_log); snprintf(fmt, sizeof(fmt), "%c:%s\n", *prefix[level], format); while(debug_in_use) MilliSleep(10); va_list args; va_start(args, format); vsnprintf(sztemp, sizeof(sztemp), fmt, args); estr.append(sztemp); va_end(args); fflush(wfile); pthread_mutex_unlock(&mutex_log); Fl::awake(synctext, 0); MilliSleep(10); } /** ******************************************************** * ***********************************************************/ void debug::elog(const char* func, const char* srcf, int line, const char* text) { log(ERROR_LEVEL, func, srcf, line, "%s: %s", text, strerror(errno)); } /** ******************************************************** * ***********************************************************/ void debug::show(void) { window->show(); } /** ******************************************************** * ***********************************************************/ void debug::sync_text(void *arg) { debug_in_use = true; size_t p0 = 0, p1 = estr.find('\n'); while (p1 != std::string::npos) { btext->insert(1, estr.substr(p0,p1-p0).c_str()); dbg_buffer.append(estr.substr(p0, p1 - p0)).append("\n"); p0 = p1 + 1; p1 = estr.find('\n', p0); } estr = ""; debug_in_use = false; } /** ******************************************************** * ***********************************************************/ void debug::append_dbg_buffer(char * message) { debug_in_use = true; std::string msg; char strTime[64]; char *cPtr = (char *)0; int len = 0; int index = 0; int strIndex = 0; time_t current_time = 0; if(!message) return; msg.assign(message); if(msg.size() < 1) return; size_t p1 = msg.find('\n'); if(p1 == std::string::npos) { msg.append("\n"); } memset(strTime, 0, sizeof(strTime)); current_time = time(0); cPtr = ctime(¤t_time); len = strlen_n(cPtr, sizeof(strTime) - 1); if(len) { strIndex = 0; for(index = 0; index < len; index++) { if(cPtr[index] == '\r' || cPtr[index] == '\n') strTime[strIndex++] = 0; else strTime[strIndex++] = cPtr[index]; } dbg_buffer.append(strTime).append(" "); } dbg_buffer.append(msg); debug_in_use = false; } /** ******************************************************** * ***********************************************************/ debug::debug(const char* filename) { if ((wfile = fopen(filename, "w")) == NULL) throw strerror(errno); setvbuf(wfile, (char*)NULL, _IOLBF, 0); if ((rfile = fopen(filename, "r")) == NULL) throw strerror(errno); rfd = fileno(rfile); #ifndef __WIN32__ int f; if ((f = fcntl(rfd, F_GETFL)) == -1) throw strerror(errno); if (fcntl(rfd, F_SETFL, f | O_NONBLOCK) == -1) throw strerror(errno); #endif } /** ******************************************************** * ***********************************************************/ debug::~debug() { fclose(wfile); fclose(rfile); } /** ******************************************************** * ***********************************************************/ static void synctext(void *d) { debug_in_use = true; for (size_t n = 0; n < estr.length(); n++) if (estr[n] < '\n') estr[n] = ' '; size_t p0 = 0, p1 = estr.find('\n'); while (p1 != std::string::npos) { btext->insert(1, estr.substr(p0,p1-p0).c_str()); p0 = p1 + 1; p1 = estr.find('\n', p0); } estr = ""; debug_in_use = false; } /** ******************************************************** * ***********************************************************/ static void slider_cb(Fl_Widget* w, void*) { debug::level = (debug::level_e)((Fl_Slider*)w)->value(); w->label(prefix[debug::level]); w->parent()->redraw(); } /** ******************************************************** * ***********************************************************/ static void clear_cb(Fl_Widget* w, void*) { btext->clear(); dbg_buffer.clear(); } /** ******************************************************** * ***********************************************************/ static void save_cb(Fl_Widget* w, void*) { if (!btext->size()) return; std::string filename = flampHomeDir; filename.append("events.txt"); std::ofstream out; out.open(filename.c_str(), std::ios::app); out << dbg_buffer; out.close(); fl_alert2("Saved in %s", filename.c_str()); } flamp-2.2.12/src/utils/amp.cxx0000664000175000017500000016233514605333064013066 00000000000000//====================================================================== // amp.cxx // // Author(s): // Dave Freese, W1HKJ, Copyright (C) 2010, 2011, 2012, 2013 // Robert Stiles, KK5VD, Copyright (C) 2013 // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ===================================================================== #include #include "config.h" #include "amp.h" #include "debug.h" #include "status.h" #include "time_table.h" #define nuline "\n" const char * cAmp::ltypes[] = { "lock(); lock(); int index = 0; int count = 0; cAmp_type = src_amp->cAmp_type; //static const char *ltypes[]; // transmit modem.assign(src_amp->modem); report_buffer.assign(src_amp->report_buffer); tosend.assign(src_amp->tosend); xmtbase.assign(src_amp->xmtbase); xmtbuffer.assign(src_amp->xmtbuffer); xmtcall.assign(src_amp->xmtcall); xmtcallto.assign(src_amp->xmtcallto); xmtdata.assign(src_amp->xmtdata); xmtdesc.assign(src_amp->xmtdesc); xmtdttm.assign(src_amp->xmtdttm); xmtfilename_fullpath.assign(src_amp->xmtfilename_fullpath); xmtfilename.assign(src_amp->xmtfilename); xmthash.assign(src_amp->xmthash); xmtinfo.assign(src_amp->xmtinfo); xmtstring.assign(src_amp->xmtstring); xmtunproto.assign(src_amp->xmtunproto); count = header_string_array.size(); for(index = 0; index < count; index++) { header_string_array.push_back(src_amp->header_string_array[index]); } count = data_string_array.size(); for(index = 0; index < count; index++) { data_string_array.push_back(src_amp->data_string_array[index]); } memcpy(&tx_statbuf, &src_amp->tx_statbuf, sizeof(struct stat)); base_conversion_index = src_amp->base_conversion_index; blocksize = src_amp->blocksize; fsize = src_amp->fsize; repeat_header = src_amp->repeat_header; xmt_repeat = src_amp->xmt_repeat; xmtblocksize = src_amp->xmtblocksize; xmtnumblocks = src_amp->xmtnumblocks; _unproto_markers = src_amp->_unproto_markers; preamble_detected_flag = src_amp->preamble_detected_flag; use_compression = src_amp->use_compression; use_forced_compression = src_amp->use_forced_compression; use_unproto = src_amp->use_unproto; Ccrc16 chksum = src_amp->chksum; // receive _rx_raw_cntl.assign(src_amp->_rx_raw_cntl); _rx_raw_desc.assign(src_amp->_rx_raw_desc); _rx_raw_file.assign(src_amp->_rx_raw_file); _rx_raw_id.assign(src_amp->_rx_raw_id); _rx_raw_prog.assign(src_amp->_rx_raw_prog); _rx_raw_size.assign(src_amp->_rx_raw_size); rx_rcvd.assign(src_amp->rx_rcvd); rxbuffer.assign(src_amp->rxbuffer); rxcall_info.assign(src_amp->rxcall_info); rxdata.assign(src_amp->rxdata); rxdesc.assign(src_amp->rxdesc); rxdttm.assign(src_amp->rxdttm); rxfilename.assign(src_amp->rxfilename); rxhash.assign(src_amp->rxhash); rxprogname.assign(src_amp->rxprogname); rxstring.assign(src_amp->rxstring); rx_crc_flags = src_amp->rx_crc_flags; rx_ok_blocks = src_amp->rx_ok_blocks; rxblocksize = src_amp->rxblocksize; rxfilesize = src_amp->rxfilesize; rxnumblocks = src_amp->rxnumblocks; memcpy(temp_buffer, src_amp->temp_buffer, TEMP_BUFFER_SIZE + 1); rxblocks = src_amp->rxblocks; rxDataHeader = src_amp->rxDataHeader; unlock(); src_amp->unlock(); if(cAmp_type == TX_AMP) amp_update(); } /** ******************************************************** * ***********************************************************/ cAmp::cAmp(std::string str, std::string fname) { pthread_mutex_init(&mutex_amp_io, NULL); lock(); modem.clear(); report_buffer.clear(); sz_xfr_size.clear(); tosend.clear(); xmtbase.clear(); xmtbuffer.assign(str); xmtcall.clear(); xmtcallto.clear(); xmtdata.clear(); xmtdesc.clear(); xmtdttm.clear(); xmtfilename_fullpath.clear(); xmtfilename.assign(fname); xmthash.clear(); xmtinfo.clear(); xmtstring.clear(); xmtunproto.clear(); memset(&tx_statbuf, 0, sizeof(tx_statbuf)); _update_required = false; _update_required_vector = false; _valid_tx_data = false; _valid_tx_vec_data = false; _file_saved = false; preamble_detected_flag = false; use_compression = false; use_forced_compression = false; use_unproto = false; if (xmtfilename.empty()) xmtfilename.assign("Unknown.txt"); repeat_header = 1; xmt_repeat = 1; xmtbase = "base64"; xmtblocksize = 64; xmtcallto = "QST"; fsize = xmtdata.length(); xmtnumblocks = xmtdata.length() / xmtblocksize + (xmtdata.length() % xmtblocksize ? 1 : 0); clear_rx(); cAmp_type = 0; thread_locks = 0; unlock(); } /** ******************************************************** * ***********************************************************/ cAmp::~cAmp() { pthread_mutex_destroy(&mutex_amp_io); } /** ******************************************************** * ***********************************************************/ void cAmp::clear_rx() { _rx_raw_cntl.clear(); _rx_raw_desc.clear(); _rx_raw_id.clear(); _rx_raw_prog.clear(); _rx_raw_size.clear(); rx_crc_flags = ( FILE_CRC_FLAG | ID_CRC_FLAG | SIZE_CRC_FLAG ); rxnumblocks = rxblocksize = rxfilesize = rx_ok_blocks = 0; rx_rcvd.clear(); rxblocks.clear(); rxbuffer.clear(); rxcall_info.clear(); rxdata.clear(); rxdesc.clear(); rxdttm.clear(); rxfilename.clear(); rxstring.clear(); } /** ******************************************************** * ***********************************************************/ std::string cAmp::file_hash() { lock(); std::string data; data.assign(_file_hash()); unlock(); return data; } /** ******************************************************** * Unlocked version of file_hash() for internal use ***********************************************************/ std::string cAmp::_file_hash() { std::string chksumdata; std::string filename; char *buf = (char *)0; int bc = 32; chksumdata.clear(); filename.clear(); filename.assign(xmtdttm).append(":").append(xmtfilename); chksumdata.assign(filename); if(use_compression || use_forced_compression) chksumdata.append("1"); else chksumdata.append("0"); chksumdata.append(xmtbase); buf = new char[bc]; if(!buf) return std::string(""); memset(buf, 0, bc); snprintf(buf, bc - 1, "%d", xmtblocksize); chksumdata.append(buf); xmthash = chksum.scrc16(chksumdata); delete [] buf; return xmthash; } /** ******************************************************** * ***********************************************************/ std::string cAmp::program_header(void) { std::string temp; std::string xmit; xmit.clear(); temp.clear(); temp.assign("{").append(xmthash).append("}"); temp.append(PACKAGE_NAME).append(" ").append(PACKAGE_VERSION); xmit.assign(ltypes[_PROG]).append(sz_len(temp)).append(" ").append(chksum.scrc16(temp)); xmit.append(">").append(temp).append(nuline); return xmit; } /** ******************************************************** * ***********************************************************/ std::string cAmp::file_header(void) { std::string temp; std::string xmit; std::string filename; xmit.clear(); temp.clear(); filename.clear(); filename.assign(xmtdttm).append(":").append(xmtfilename); temp.assign("{").append(xmthash).append("}").append(filename); xmit.assign(ltypes[_FILE]).append(sz_len(temp)).append(" ").append(chksum.scrc16(temp)); xmit.append(">").append(temp).append(nuline); return xmit; } /** ******************************************************** * ***********************************************************/ std::string cAmp::id_header(void) { std::string temp; std::string xmit; xmit.clear(); temp.clear(); temp.assign("{").append(xmthash).append("}"); temp.append(xmtcall).append(" ").append(xmtinfo); xmit.assign(ltypes[_ID]).append(sz_len(temp)).append(" ").append(chksum.scrc16(temp)); xmit.append(">").append(temp).append(nuline); return xmit; } /** ******************************************************** * ***********************************************************/ std::string cAmp::desc_header(void) { std::string temp; std::string xmit; xmit.clear(); temp.clear(); temp.assign("{").append(xmthash).append("}").append(xmtdesc); xmit.assign(ltypes[_DESC]).append(sz_len(temp)).append(" ").append(chksum.scrc16(temp)); xmit.append(">").append(temp).append(nuline); return xmit; } /** ******************************************************** * ***********************************************************/ std::string cAmp::size_header(void) { std::string temp; std::string xmit; xmit.clear(); temp.clear(); temp.assign("{").append(xmthash).append("}").append(sz_size()); xmit.assign(ltypes[_SIZE]).append(sz_len(temp)).append(" ").append(chksum.scrc16(temp)); xmit.append(">").append(temp).append(nuline); return xmit; } /** ******************************************************** * ***********************************************************/ std::string cAmp::data_block(int index) { char *blknbr = (char *)0; int bc = 48; std::string temp; std::string xmit; std::string local_hash; xmit.clear(); temp.clear(); local_hash = _file_hash(); blknbr = new char[bc]; if(!blknbr) return temp; memset(blknbr, 0, bc); snprintf(blknbr, bc - 1, "{%s:%d}", local_hash.c_str(), index); temp.assign(blknbr).append(xmtdata.substr((index - 1) * xmtblocksize, xmtblocksize)); xmit.assign(ltypes[_DATA]).append(sz_len(temp)).append(" "); xmit.append(chksum.scrc16(temp)).append(">"); xmit.append(temp).append(nuline); delete [] blknbr; return xmit; } /** ******************************************************** * ***********************************************************/ std::string cAmp::data_eof(void) { std::string temp; std::string xmit; xmit.clear(); temp.clear(); temp.assign("{").append(xmthash).append(":").append("EOF}"); xmit.assign(ltypes[_CNTL]).append(sz_len(temp)).append(" ").append(chksum.scrc16(temp)); xmit.append(">").append(temp).append(nuline); return xmit; } /** ******************************************************** * ***********************************************************/ std::string cAmp::data_eot(void) { std::string temp; std::string xmit; xmit.clear(); temp.clear(); temp.assign("{").append(xmthash).append(":").append("EOT}"); xmit.assign(ltypes[_CNTL]).append(sz_len(temp)).append(" ").append(chksum.scrc16(temp)); xmit.append(">").append(temp).append(nuline); return xmit; } /** ******************************************************** * ***********************************************************/ std::string cAmp::xmt_string(bool use_locks = true) { if(use_locks) lock(); std::string temp; std::string fileline; std::string filename; std::string statsline; std::string idline; std::string fstring; // file std::strings std::string call_from_to; xmtstring.clear(); temp.clear(); fileline.clear(); filename.clear(); statsline.clear(); idline.clear(); fstring.clear(); // file std::strings call_from_to.clear(); if(xmtcallto.empty()) xmtcallto.assign("QST"); call_from_to.assign(xmtcallto).append(" DE ").append(xmtcall).append("\n\n"); xmtstring.assign(call_from_to); xmtstring.append(program_header()); idline.assign(id_header()); fileline.assign(file_header()); statsline.assign(size_header()); xmt_calc_numblocks(); if (tosend.empty()) { for (int i = 0; i < repeat_header; i++) { fstring.append(fileline); fstring.append(idline); fstring.append(statsline); if (!xmtdesc.empty()) { fstring.append(desc_header()); } } for (int i = 0; i < xmtnumblocks; i++) { fstring.append(data_block(i + 1)); } } else { std::string blocks = tosend; int bnbr; while (!blocks.empty()) { if (sscanf(blocks.c_str(), "%d", &bnbr) == 1) { if(bnbr == 0) { for (int i = 0; i < repeat_header; i++) { fstring.append(fileline); fstring.append(idline); fstring.append(statsline); if (!xmtdesc.empty()) { fstring.append(desc_header()); } } } else if (bnbr > 0 && bnbr <= xmtnumblocks) { fstring.append(data_block(bnbr)); } } while (!blocks.empty() && isdigit(blocks[0])) blocks.erase(0,1); while (!blocks.empty() && !isdigit(blocks[0])) blocks.erase(0,1); } } fstring.append(data_eof()); for (int i = 0; i < xmt_repeat; i++) xmtstring.append(fstring); xmtstring.append(data_eot()); if(use_locks) unlock(); return xmtstring; } /** ******************************************************** * ***********************************************************/ int cAmp::convert_to_plain_text(std::string &_buffer) { char *buffer = (char *)0; char *dest_buffer = (char *)0; size_t result_count = 0; size_t count = 0; buffer = (char *) _buffer.c_str(); count = (size_t) _buffer.size(); if(!buffer || count < 1) return 0; dest_buffer = (char *) malloc(count + 2); if(!dest_buffer) return 0; memset(dest_buffer, 0, count + 2); result_count = convert_to_plain_text(buffer, dest_buffer, count); if(result_count > 0) { _buffer.assign(dest_buffer, result_count); } else { _buffer.clear(); } free(dest_buffer); return (int) result_count; } /** ******************************************************** * ***********************************************************/ int cAmp::convert_to_plain_text(char *_src, char *_dst, size_t count) { size_t index = 0; size_t data = 0; //int flag = 0; size_t dest_count = 0; char *buffer = _src; char *dest = (char *)0; char *cPtr = (char *)0; if(_src == (char *)0 || _dst == (char *)0) return 0; if(count < 1) return 0; dest = (char *) malloc(count + 2); if(dest == (char *)0) return 0; memset(dest, 0, count + 2); cPtr = dest; for(index = 0; index < count; index++) { data = buffer[index]; //flag = 0; // Filter data with upper bit set and most non-printable characters if((data < ' ') || (data > '~')) { switch(data) { case '\r': case '\n': case '\t': break; default: continue; } } *cPtr++ = data; dest_count++; } if(dest_count > 0) { memcpy(_dst, dest, dest_count); } free(dest); return (int) dest_count; } /** ******************************************************** * ***********************************************************/ void cAmp::unproto_markers(bool unproto_markers) { lock(); _unproto_markers = unproto_markers; _xmt_unproto(true); unlock(); } /** ******************************************************** * Non thread locking version ***********************************************************/ void cAmp::_xmt_unproto(bool data_repeat_inhibit = false) { size_t pos = 0; int appendFlag = 0; std::string temp; std::string call_from_to = ""; int index = 0; const std::string cmdAppendMsg = "<_md>"; temp.assign(xmtbuffer); if(isPlainText(temp) == false) convert_to_plain_text(temp); if(xmtcallto.empty()) xmtcallto.assign("QST"); call_from_to.assign(xmtcallto).append(" DE ").append(xmtcall).append("\n\n"); pos = 0; do { pos = temp.find(sz_cmd, pos); if(pos != std::string::npos) { appendFlag |= CMD_FLAG; temp.replace(pos, cmdAppendMsg.size(), cmdAppendMsg); pos += 3; } } while(pos != std::string::npos); if(appendFlag) temp.append("\nNOTICE: Command Character Substitution!\n"); if((appendFlag & CMD_FLAG) != 0) { temp.append(cmdAppendMsg).append(" <-> \'_\' = \'c\'\n"); } temp.append("\n"); xmtunproto.clear(); int repeat_count = 0; if(data_repeat_inhibit) repeat_count = 1; else repeat_count = xmt_repeat; for(index = 0; index < repeat_count; index++) { xmtunproto.append("\n").append(call_from_to); if(_unproto_markers) xmtunproto.append("--- start ---\n"); xmtunproto.append(temp); if(_unproto_markers) xmtunproto.append("--- end ---\n"); if(index > (xmt_repeat - 1)) xmtunproto.append("\n").append(call_from_to); } } /** ******************************************************** * ***********************************************************/ int cAmp::xmt_vector_string(bool header_modem, bool unproto_markers, bool data_repeat_inhibit) { lock(); std::string call_from_to = ""; std::string up_string; header_string_array.clear(); data_string_array.clear(); int j = 0; int i = 0; int no_of_elements = 0; int xmit_repeat_count = 0; bool preamble_flag = true; bool data_flag = true; if(xmtcallto.empty()) xmtcallto.assign("QST"); call_from_to.assign(xmtcallto).append(" DE ").append(xmtcall).append("\n\n"); header_string_array.clear(); data_string_array.clear(); no_of_elements = (repeat_header * 6) + (xmt_repeat * xmtnumblocks) + 20; header_string_array.reserve((repeat_header * 6) + 10); data_string_array.reserve(no_of_elements); //no_of_elements = data_string_array.capacity(); xmt_calc_numblocks(); if(use_unproto == true) { std::string call_from_to; int index = 0; int count = 0; int length = 0; int stride = xmtblocksize; _xmt_unproto(data_repeat_inhibit); count = (int) xmtunproto.size(); index = 0; data_string_array.push_back(call_from_to); do { up_string = xmtunproto.substr(index, stride); length = up_string.size(); if(length > 0) data_string_array.push_back(up_string); if(length < stride) break; index += stride; } while(index < count); } else { if(!tosend.empty()) { std::string blocks; int bnbr; blocks.assign(tosend); preamble_flag = false; data_flag = false; while (!blocks.empty()) { if (sscanf(blocks.c_str(), "%d", &bnbr) == 1) { if (bnbr == 0) { preamble_flag = true; } else if(bnbr > 0) { data_flag = true; } if(data_flag && preamble_flag) break; while (!blocks.empty() && isdigit(blocks[0])) blocks.erase(0,1); while (!blocks.empty() && !isdigit(blocks[0])) blocks.erase(0,1); } } } if((preamble_flag || data_flag) && header_modem) if(progStatus.disable_header_modem_on_block_fills) header_modem = false; if(header_modem) { header_string_array.push_back(call_from_to); if(tosend.empty() || preamble_flag) { for (i = 0; i < repeat_header; i++) { header_string_array.push_back(program_header()); header_string_array.push_back(file_header()); header_string_array.push_back(id_header()); header_string_array.push_back(size_header()); if (!xmtdesc.empty()) { header_string_array.push_back(desc_header()); } if(!data_flag) { header_string_array.push_back(data_eof()); } } if(!data_flag) { header_string_array.push_back(data_eot()); } } } else { // !progStatus.use_header_modem data_string_array.push_back(call_from_to); if(tosend.empty() || preamble_flag) { for (i = 0; i < repeat_header; i++) { data_string_array.push_back(program_header()); data_string_array.push_back(file_header()); data_string_array.push_back(id_header()); data_string_array.push_back(size_header()); if (!xmtdesc.empty()) { data_string_array.push_back(desc_header()); } } } } if(data_repeat_inhibit) xmit_repeat_count = 1; else xmit_repeat_count = xmt_repeat; for (i = 0; i < xmit_repeat_count; i++) { if (tosend.empty()) { for (j = 0; j < xmtnumblocks; j++) { up_string = data_block(j + 1); data_string_array.push_back(up_string); } } else { if(data_flag) { std::string blocks; int bnbr; blocks.assign(tosend); while (!blocks.empty()) { if (sscanf(blocks.c_str(), "%d", &bnbr) == 1) { if (bnbr > 0 && bnbr <= xmtnumblocks) { data_string_array.push_back(data_block(bnbr)); } } while (!blocks.empty() && isdigit(blocks[0])) blocks.erase(0,1); while (!blocks.empty() && !isdigit(blocks[0])) blocks.erase(0,1); } } } if(data_flag) { data_string_array.push_back(data_eof()); } } if(data_flag) { data_string_array.push_back(data_eot()); } } unlock(); return (header_string_array.size() + data_string_array.size()); } /** ******************************************************** * ***********************************************************/ void cAmp::time_stamp(time_t *tp) { lock(); if(tp) _time_stamp(tp); unlock(); } /** ******************************************************** * ***********************************************************/ void cAmp::_time_stamp(time_t *tp) { static char szDt[80]; time_t tmptr; tm sTime; time (&tmptr); if (tp == NULL) gmtime_r (&tmptr, &sTime); else gmtime_r (tp, &sTime); strftime(szDt, 79, "%Y%m%d%H%M%S", &sTime); if(strncmp(xmtdttm.c_str(), szDt, xmtdttm.size()) != 0) _update_required = true; xmtdttm = szDt; } /** ******************************************************** * ***********************************************************/ void cAmp::rx_add_data(std::string data) { int blknbr; if (rxhash != data.substr(1,4)) { LOG_DEBUG("Datablock not for %s", rxfilename.c_str()); return; } if (sscanf(data.substr(6).c_str(), "%d", &blknbr) != 1) { LOG_ERROR("%s\ncannot convert %s to block #", rxfilename.c_str(), data.substr(6,3).c_str()); return ; } if (rxblocks.find(blknbr) == rxblocks.end()) { size_t sp = data.find("}"); if (sp == std::string::npos) return; char nstr[20]; snprintf(nstr, sizeof(nstr), "%d", blknbr); rxblocks.insert(AMPmap::value_type(blknbr, data.substr(sp+1))); // Reassemble data header for relay operations memset(temp_buffer, 0, 48); std::string tmp_data = chksum.scrc16(data); int count = data.size(); snprintf(temp_buffer, 47, "%s", count, tmp_data.c_str(), data.substr(0, sp+1).c_str()); rxDataHeader.insert(AMPmap::value_type(blknbr, std::string(temp_buffer))); rx_rcvd.append(nstr).append(" "); LOG_DEBUG("file: %s block %d\n%s", rxfilename.c_str(), blknbr, data.substr(sp+1).c_str()); rx_ok_blocks++; } } /** ******************************************************** * ***********************************************************/ std::string cAmp::rx_recvd_string() { lock(); std::string retstr = ""; if (!rx_completed()) return retstr; AMPmap::iterator iter; for (iter = rxblocks.begin(); iter != rxblocks.end(); iter++) { retstr.append(iter->second); } unlock(); return retstr; } /** ******************************************************** * ***********************************************************/ void cAmp::rx_parse_dttm_filename(char *crc, std::string data) { LOG_DEBUG("%s : %s", crc, data.c_str()); sscanf(data.c_str(), "{%4s}*", crc); size_t p = data.find("}"); data.erase(0, p + 1); size_t pcolon = data.find(":"); if (pcolon == std::string::npos) return; rxdttm = data.substr(0, pcolon); rxfilename = data.substr(pcolon + 1); rxhash = crc; rx_crc_flags &= ~FILE_CRC_FLAG; } /** ******************************************************** * ***********************************************************/ std::string cAmp::rx_parse_hash_line(std::string data) { char hashval[5]; static std::string empty(""); if (sscanf(data.c_str(), "{%4s}*", hashval) != 1) return empty; if (rxhash != hashval) { LOG_ERROR("%s", "not this file"); return empty; } size_t sp = data.find("}"); if (sp == std::string::npos) return empty; return data.substr(sp+1); } /** ******************************************************** * ***********************************************************/ void cAmp::rx_parse_desc(std::string data) { rxdesc = rx_parse_hash_line(data); } /** ******************************************************** * ***********************************************************/ void cAmp::rx_parse_id(std::string data) { rxcall_info = rx_parse_hash_line(data); rx_crc_flags &= ~ID_CRC_FLAG; } /** ******************************************************** * ***********************************************************/ void cAmp::rx_parse_size(std::string data) { char hashval[5]; int fs, nb, bs; if (sscanf(data.c_str(), "{%4s}%d %d %d", hashval, &fs, &nb, &bs) != 4) return; if (rxhash != hashval) { LOG_ERROR("%s", "not this file"); return; } rxfilesize = fs; rxnumblocks = nb; rxblocksize = bs; rx_crc_flags &= ~SIZE_CRC_FLAG; } /** ******************************************************** * ***********************************************************/ bool cAmp::rx_parse_line(int ltype, char *crc, std::string data) { int count = 0; std::string local_crc = ""; int temp_buffer_local_size = 48; if(ltype != _DATA) { // Reassemble data for relay operations. if(temp_buffer_local_size > TEMP_BUFFER_SIZE) temp_buffer_local_size = TEMP_BUFFER_SIZE - 1; memset(temp_buffer, 0, temp_buffer_local_size); temp_buffer_local_size--; count = data.size(); local_crc = chksum.scrc16(data); } switch (ltype) { case _FILE: rx_parse_dttm_filename(crc, data); snprintf(temp_buffer, temp_buffer_local_size, "", count, local_crc.c_str()); _rx_raw_file.assign(temp_buffer).append(data); break; case _DESC: rx_parse_desc(data); snprintf(temp_buffer, temp_buffer_local_size, "", count, local_crc.c_str()); _rx_raw_desc.assign(temp_buffer).append(data); break; case _DATA: rx_add_data(data); break; case _SIZE: rx_parse_size(data); snprintf(temp_buffer, temp_buffer_local_size, "", count, local_crc.c_str()); _rx_raw_size.assign(temp_buffer).append(data); break; case _PROG: rxprogname = rx_parse_hash_line(data); snprintf(temp_buffer, temp_buffer_local_size, "", count, local_crc.c_str()); _rx_raw_prog.assign(temp_buffer).append(data); break; case _ID: rx_parse_id(data); snprintf(temp_buffer, temp_buffer_local_size, "", count, local_crc.c_str()); _rx_raw_id.assign(temp_buffer).append(data); break; case _CNTL: snprintf(temp_buffer, temp_buffer_local_size, "", count, local_crc.c_str()); _rx_raw_cntl.assign(temp_buffer).append(data); default:; } return true; } /** ******************************************************** * ***********************************************************/ void cAmp::rx_parse_buffer() { if (rxbuffer.length() < 16) return; lock(); size_t p = 0, p1 = 0; int len; char crc[5]; for (int n = _FILE; n <= _CNTL; n++) { p = rxbuffer.find(ltypes[n]); if (p != std::string::npos) { if (p > 0) rxbuffer.erase(0, p); if (sscanf(rxbuffer.substr(strlen(ltypes[n])).c_str(), "%d %4s", &len, crc) == 2) { if (len > 2048 + 6) { // exceeds maximum allowable length rxbuffer.erase(0,1); LOG_INFO("corrupt length %d", len); unlock(); return; } p1 = rxbuffer.find(">", strlen(ltypes[n])); if (p1 == std::string::npos) { LOG_INFO("incomplete header %s", rxbuffer.substr(0,15).c_str()); if (rxbuffer.length() > 15) rxbuffer.erase(0,1); unlock(); return; } if (rxbuffer.length() >= p1 + 1 + len) { if (rx_parse_line(n, crc, rxbuffer.substr(p1 + 1, len))) { rxbuffer.erase(0, p1 + 1 + len); unlock(); return; } else { rxbuffer.erase(0,1); unlock(); return; } } } } } unlock(); } /** ******************************************************** * ***********************************************************/ std::string cAmp::rx_stats() { char number[10]; std::string stats; stats.clear(); stats.append("program: ").append(rxprogname).append("\n"); stats.append("filename: ").append(rxfilename).append("\n"); stats.append("datetime: ").append(rxdttm).append("\n"); stats.append("desc: ").append(rxdesc).append("\n"); stats.append("call info: ").append(rxcall_info).append("\n"); snprintf(number, sizeof(number), "%d", rxfilesize); stats.append("file size: ").append(number).append("\n"); snprintf(number, sizeof(number), "%d", rxnumblocks); stats.append("nbr blocks: ").append(number).append("\n"); stats.append("file hash: ").append(rxhash).append("\n"); std::map::iterator iter; for (iter = rxblocks.begin(); iter != rxblocks.end(); iter++) { snprintf(number, sizeof(number),"%d",iter->first); stats.append("Data block # ").append(number).append(" : "); stats.append(iter->second).append("\n"); } return stats; } /** ******************************************************** * ***********************************************************/ std::string cAmp::rx_missing() { lock(); std::string missing; char number[20]; missing.clear(); for (int i = 1; i <= rxnumblocks; i++) { if (rxblocks.find(i) == rxblocks.end()) { snprintf(number, sizeof(number), "%d", i); if (missing.empty()) missing.append(number); else missing.append(", ").append(number); } } unlock(); return missing; } /** ******************************************************** * ***********************************************************/ std::string cAmp::rx_report() { lock(); std::string temp; char number[20]; std::string missing; temp.clear(); temp.assign("{").append(rxhash).append("}"); missing.clear(); for (int i = 1; i <= rxnumblocks; i++) { if (rxblocks.find(i) == rxblocks.end()) { snprintf(number, sizeof(number), "%d ", i); missing.append(number); } } if (rx_crc_flags > 0 && missing.empty()) missing = "PREAMBLE"; else if (missing.empty()) missing = "CONFIRMED"; temp.append(missing); std::string report("").append(temp).append(nuline); unlock(); return report; } /** ******************************************************** * ***********************************************************/ void cAmp::append_report(std::string s) { lock(); report_buffer.append(s); unlock(); } /** ******************************************************** * ***********************************************************/ void cAmp::tx_parse_report(void) { // parse the incoming text stream for instances of // {cccc}n0 n1 n2 n3 ... nN // where nn is data field length // CCCC is crc16 of data field // cccc is crc16 of associated file // n1...nN are missing block numbers // append each valid occurance to the tosend std::string lock(); static const char *sz_missing = " 0) report_buffer.erase(0, p); if (sscanf(report_buffer.c_str(), "", &len, crc) == 2) { p1 = report_buffer.find(">", strlen(sz_missing)); if (p1 != std::string::npos) { if (report_buffer.length() >= p1 + 1 + len) { data.assign(report_buffer.substr(p1 + 1, len)); if (xmthash == data.substr(1,4)) { if (strcmp(crc, chksum.scrc16(data.c_str()).c_str()) == 0) { if(data.find(sz_preamble) != std::string::npos) { preamble_block.assign(" 0"); preamble_detected_flag = true; } else { tosend.append(" ").append(data.substr(6)); if(cAmp_type == TX_AMP) LOG_INFO("%s missing: %s", xmtfilename.c_str(), tosend.c_str()); else LOG_INFO("%s missing: %s", rxfilename.c_str(), tosend.c_str()); } } } } } } p = report_buffer.find(sz_missing, p + 2); } // convert the updated tosend std::string to a vector of integers // removing any duplicate values in the process std::string blocks = tosend; if(preamble_block.size()) { blocks.append(preamble_block); preamble_block.clear(); } tosend = reformat_missing_blocks(blocks); unlock(); } /** ******************************************************** * ***********************************************************/ std::string cAmp::reformat_missing_blocks(std::string &missing_blocks) { std::string to_send_local; int iblock; std::list iblocks; std::list::iterator pblock; bool insert_ok = false; while (!missing_blocks.empty()) { if (sscanf(missing_blocks.c_str(), "%d", &iblock) == 1) { insert_ok = true; for (pblock = iblocks.begin(); pblock != iblocks.end(); pblock++) if (*pblock == iblock) { insert_ok = false; break; } if (insert_ok) iblocks.push_back(iblock); } while (!missing_blocks.empty() && isdigit(missing_blocks[0])) missing_blocks.erase(0,1); while (!missing_blocks.empty() && !isdigit(missing_blocks[0])) missing_blocks.erase(0,1); } // sort the vector and then reassemble as a std::string sequence of comma // delimited values iblocks.sort(); to_send_local.clear(); char szblock[10]; _missing_block_count = 0; for (pblock = iblocks.begin(); pblock != iblocks.end(); pblock++) { snprintf(szblock, sizeof(szblock), "%d", *pblock); if (to_send_local.empty()) to_send_local.append(szblock); else to_send_local.append(",").append(szblock); _missing_block_count++; } return to_send_local; } /** ******************************************************** * ***********************************************************/ std::string cAmp::tx_relay_string(std::string callfrom, std::string missing_blocks, bool filesave_flag) { lock(); AMPmap::iterator ihead; AMPmap::iterator idata; char *block_flags = (char *)0; int index = 0; int blknbr = 0; int count = 0; int repeat_index = 0; int header_repeat = 0; int data_repeat = 0; std::string blocks; std::string the_data; std::string callto_from; std::string temp_data; if(callfrom.empty()) { unlock(); return xmtstring; } if(filesave_flag) { header_repeat = 1; data_repeat = 1; } else { header_repeat = progStatus.repeat_relay_header; data_repeat = progStatus.repeat_relay_data; } the_data.clear(); xmtstring.clear(); callto_from.assign("\nDE ").append(callfrom).append("\n"); callto_from.append("\nFLAMP Relay\n\n"); blocks = reformat_missing_blocks(missing_blocks); if(blocks.empty()) { for(repeat_index = 0; repeat_index < header_repeat; repeat_index++) { if(_rx_raw_prog.size()) the_data.append(_rx_raw_prog).append("\n"); if(_rx_raw_file.size()) the_data.append(_rx_raw_file).append("\n"); if(_rx_raw_id.size()) the_data.append(_rx_raw_id).append("\n"); if(_rx_raw_size.size()) the_data.append(_rx_raw_size).append("\n"); if(_rx_raw_desc.size()) the_data.append(_rx_raw_desc).append("\n"); } for(repeat_index = 0; repeat_index < data_repeat; repeat_index++) { for (idata = rxblocks.begin(), ihead = rxDataHeader.begin(); ((idata != rxblocks.end()) || (ihead != rxDataHeader.end())); idata++, ihead++) { the_data.append(ihead->second); the_data.append(idata->second).append("\n"); } } } else { count = rxnumblocks; if(count < 1) { count = 0; for (idata = rxblocks.begin(); idata != rxblocks.end(); idata++) { if(idata->first > count) count = idata->first; } } block_flags = new char [count + 2]; if(!block_flags) { unlock(); return xmtstring; } memset(block_flags, 0, count + 2); while (!blocks.empty()) { if(sscanf(blocks.c_str(), "%d", &blknbr) == 1) { if((blknbr >= 0) && (blknbr <= count)) block_flags[blknbr] = 1; } while (!blocks.empty() && isdigit(blocks[0])) blocks.erase(0,1); while (!blocks.empty() && !isdigit(blocks[0])) blocks.erase(0,1); } if(block_flags[0]) { for(repeat_index = 0; repeat_index < header_repeat; repeat_index++) { if(_rx_raw_prog.size()) the_data.append(_rx_raw_prog).append("\n"); if(_rx_raw_file.size()) the_data.append(_rx_raw_file).append("\n"); if(_rx_raw_id.size()) the_data.append(_rx_raw_id).append("\n"); if(_rx_raw_size.size()) the_data.append(_rx_raw_size).append("\n"); if(_rx_raw_desc.size()) the_data.append(_rx_raw_desc).append("\n"); } } for(repeat_index = 0; repeat_index < data_repeat; repeat_index++) { for(index = 1; index <= count; index++) { if(block_flags[index]) { idata = rxblocks.find(index); ihead = rxDataHeader.find(index); if(idata == rxblocks.end() || ihead == rxDataHeader.end()) continue; the_data.append(ihead->second); the_data.append(idata->second).append("\n"); } } } delete [] block_flags; } if(the_data.size()) { char cntl[32]; char tmp[48]; std::string crc; memset(cntl, 0, sizeof(cntl)); memset(tmp, 0, sizeof(tmp)); snprintf(cntl, sizeof(cntl)-1, "{%s:EOF}", xmthash.c_str()); temp_data.assign(cntl); crc = chksum.scrc16(temp_data); snprintf(tmp, sizeof(tmp)-1, "", (int) temp_data.size(), crc.c_str()); the_data.append(tmp).append(temp_data).append("\n"); snprintf(cntl, sizeof(cntl)-1, "{%s:EOT}", xmthash.c_str()); temp_data.assign(cntl); crc = chksum.scrc16(temp_data); snprintf(tmp, sizeof(tmp)-1, "", (int) temp_data.size(), crc.c_str()); the_data.append(tmp).append(temp_data).append("\n"); the_data.append("\nDE ").append(callfrom).append(" K\n\n\n"); xmtstring.assign(callto_from).append(the_data); } unlock(); return xmtstring; } /** ******************************************************** * ***********************************************************/ int cAmp::tx_relay_vector(std::string callfrom, std::string missing_blocks) { lock(); AMPmap::iterator idata; AMPmap::iterator ihead; char *block_flags = (char *)0; int blknbr = 0; int count = 0; int index = 0; std::string blocks; std::string callto_from; std::string temp_data; std::string the_data; int repeat_index = 0; int header_repeat = 0; int data_repeat = 0; header_repeat = progStatus.repeat_relay_header; data_repeat = progStatus.repeat_relay_data; if(callfrom.empty()) { unlock(); return 0; } header_string_array.clear(); data_string_array.clear(); callto_from.assign("\nDE ").append(callfrom).append("\n"); callto_from.append("\nFLAMP Relay\n\n"); data_string_array.push_back(callto_from); blocks = reformat_missing_blocks(missing_blocks); if(blocks.empty()) { for(repeat_index = 0; repeat_index < header_repeat; repeat_index++) { if(_rx_raw_prog.size()) { the_data.assign(_rx_raw_prog).append("\n"); data_string_array.push_back(the_data); } if(_rx_raw_file.size()) { the_data.assign(_rx_raw_file).append("\n"); data_string_array.push_back(the_data); } if(_rx_raw_id.size()) { the_data.assign(_rx_raw_id).append("\n"); data_string_array.push_back(the_data); } if(_rx_raw_size.size()) { the_data.assign(_rx_raw_size).append("\n"); data_string_array.push_back(the_data); } if(_rx_raw_desc.size()) { the_data.assign(_rx_raw_desc).append("\n"); data_string_array.push_back(the_data); } } for(repeat_index = 0; repeat_index < data_repeat; repeat_index++) { for (idata = rxblocks.begin(), ihead = rxDataHeader.begin(); ((idata != rxblocks.end()) || (ihead != rxDataHeader.end())); idata++, ihead++) { the_data.assign(ihead->second).append(idata->second).append("\n"); data_string_array.push_back(the_data); } } } else { count = rxnumblocks; if(count < 1) { count = 0; for (idata = rxblocks.begin(); idata != rxblocks.end(); idata++) { if(idata->first > count) count = idata->first; } } block_flags = new char [count + 2]; if(!block_flags) { unlock(); return 0; } memset(block_flags, 0, count + 2); while (!blocks.empty()) { if(sscanf(blocks.c_str(), "%d", &blknbr) == 1) { if((blknbr >= 0) && (blknbr <= count)) block_flags[blknbr] = 1; } while (!blocks.empty() && isdigit(blocks[0])) blocks.erase(0,1); while (!blocks.empty() && !isdigit(blocks[0])) blocks.erase(0,1); } if(block_flags[0]) { for(repeat_index = 0; repeat_index < header_repeat; repeat_index++) { if(_rx_raw_prog.size()) { the_data.assign(_rx_raw_prog).append("\n"); data_string_array.push_back(the_data); } if(_rx_raw_file.size()) { the_data.assign(_rx_raw_file).append("\n"); data_string_array.push_back(the_data); } if(_rx_raw_id.size()) { the_data.assign(_rx_raw_id).append("\n"); data_string_array.push_back(the_data); } if(_rx_raw_size.size()) { the_data.assign(_rx_raw_size).append("\n"); data_string_array.push_back(the_data); } if(_rx_raw_desc.size()) { the_data.assign(_rx_raw_desc).append("\n"); data_string_array.push_back(the_data); } } for(repeat_index = 0; repeat_index < data_repeat; repeat_index++) { for(index = 1; index <= count; index++) { if(block_flags[index]) { idata = rxblocks.find(index); ihead = rxDataHeader.find(index); if(idata == rxblocks.end() || ihead == rxDataHeader.end()) continue; the_data.assign(ihead->second).append(idata->second).append("\n"); data_string_array.push_back(the_data); } } } } delete [] block_flags; } if(the_data.size()) { char cntl[32]; char tmp[48]; std::string crc; memset(cntl, 0, sizeof(cntl)); memset(tmp, 0, sizeof(tmp)); snprintf(cntl, sizeof(cntl)-1, "{%s:EOF}", xmthash.c_str()); temp_data.assign(cntl); crc = chksum.scrc16(temp_data); snprintf(tmp, sizeof(tmp)-1, "", (int) temp_data.size(), crc.c_str()); the_data.assign(tmp).append(temp_data).append("\n"); data_string_array.push_back(the_data); snprintf(cntl, sizeof(cntl)-1, "{%s:EOT}", xmthash.c_str()); temp_data.assign(cntl); crc = chksum.scrc16(temp_data); snprintf(tmp, sizeof(tmp)-1, "", (int) temp_data.size(), crc.c_str()); the_data.assign(tmp).append(temp_data).append("\n"); data_string_array.push_back(the_data); } unlock(); return data_string_array.size(); } /** ******************************************************** * ***********************************************************/ std::string cAmp::tx_string(std::string t_string) { lock(); std::string auto_send; if(use_unproto) { auto_send.assign(xmtunproto); } else { auto_send.assign(xmtstring); } auto_send.append("\n").append("DE ").append(xmtcall).append(t_string); auto_send.append("\n\n\n"); unlock(); return auto_send; } /** ******************************************************** * ***********************************************************/ std::string cAmp::estimate(void) { std::string ret_str; ret_str.assign(sz_xfr_size); return ret_str; } /** ******************************************************** * ***********************************************************/ void cAmp::_estimate(void) { char _sz_xfr_size[50]; float xfr_time = 0; float oh = 0; int transfer_size; memset(_sz_xfr_size, 0, sizeof(_sz_xfr_size)); std::string xmtstr; if(use_unproto) { xmtstr.assign(xmtunproto); } else { xmtstr.assign(xmtstring); } xmtstr.append(" K\n"); xmt_calc_numblocks(); transfer_size = xmtstr.length(); xfr_time = seconds_from_string(modem.c_str(), xmtstr, &oh); xfr_time += oh; if (xfr_time < 60) snprintf(_sz_xfr_size, sizeof(_sz_xfr_size), "%d bytes / %d secs", transfer_size, (int)(xfr_time + 0.5)); else snprintf(_sz_xfr_size, sizeof(_sz_xfr_size), "%d bytes / %d m %d s", transfer_size, (int)(xfr_time / 60), ((int)xfr_time) % 60); sz_xfr_size.assign(_sz_xfr_size); } /** ******************************************************** * ***********************************************************/ void cAmp::amp_update(void) { if(!_update_required) return; lock(); std::string auto_send; std::string send_to = xmtcallto; std::string temp; if (send_to.empty()) send_to.assign("QST"); send_to.append(" DE ").append(xmtcall); for (size_t n = 0; n < send_to.length(); n++) send_to[n] = toupper(send_to[n]); temp.clear(); if(use_unproto == false) { temp.assign(xmtbuffer); compress_maybe(temp, base_conversion_index, (use_compression | use_forced_compression)); xmtdata.assign(temp); auto_send.append(xmt_string(false)); } else { _xmt_unproto(); auto_send.append(xmtunproto); } _file_hash(); _estimate(); _valid_tx_data = true; _update_required = false; unlock(); } /** ******************************************************** * ***********************************************************/ void cAmp::callto(std::string n) { lock(); xmtcallto = n; unlock(); } /** ******************************************************** * ***********************************************************/ std::string cAmp::callto(void) { lock(); std::string data; data.assign(xmtcallto); unlock(); return data; } /** ******************************************************** * ***********************************************************/ void cAmp::unproto(bool n) { lock(); if((use_unproto == true) && (n == false)) _update_required = true; use_unproto = n; unlock(); } /** ******************************************************** * ***********************************************************/ bool cAmp::unproto(void) { lock(); int tmp = 0; tmp = use_unproto; unlock(); return tmp; } /** ******************************************************** * ***********************************************************/ void cAmp::tx_blocksize(int n) { lock(); if(blocksize != n) _update_required = true; blocksize = n; unlock(); } /** ******************************************************** * ***********************************************************/ int cAmp::tx_blocksize(void) { lock(); int tmp = 0; tmp = blocksize; unlock(); return tmp; } /** ******************************************************** * ***********************************************************/ int cAmp::tx_base_conv_index(void) { lock(); int tmp = 0; tmp = base_conversion_index; unlock(); return tmp; } /** ******************************************************** * ***********************************************************/ void cAmp::tx_base_conv_index(int val) { lock(); if(base_conversion_index != val) _update_required = true; base_conversion_index = val; unlock(); } /** ******************************************************** * ***********************************************************/ std::string cAmp::tx_base_conv_str(void) { lock(); std::string data; data.assign(xmtbase); unlock(); return data; } /** ******************************************************** * ***********************************************************/ void cAmp::tx_base_conv_str(std::string &str) { lock(); if(strncmp(xmtbase.c_str(), str.c_str(), str.size()) != 0) _update_required = true; xmtbase.assign(str); unlock(); } /** ******************************************************** * ***********************************************************/ void cAmp::tx_base_conv_str(const char *str) { lock(); std::string tmp; tmp.assign(str); if(strncmp(xmtbase.c_str(), tmp.c_str(), tmp.size()) != 0) _update_required = true; xmtbase.assign(tmp); unlock(); } /** ******************************************************** * ***********************************************************/ std::string cAmp::xmt_buffer(void) { lock(); std::string data; data.assign(xmtbuffer); unlock(); return data; } /** ******************************************************** * ***********************************************************/ void cAmp::xmt_buffer(std::string &str) { lock(); std::string tmp; if(xmtbuffer.size() != str.size()) { _update_required = true; xmtbuffer.assign(str); } else if(strncmp(xmtbuffer.c_str(), str.c_str(), str.size()) != 0) { _update_required = true; xmtbuffer.assign(str); } unlock(); } /** ******************************************************** * ***********************************************************/ std::string cAmp::xmt_unproto_string(void) { lock(); std::string data; data.assign(xmtunproto); unlock(); return data; } /** ******************************************************** * ***********************************************************/ void cAmp::xmt_unproto_string(std::string &str) { lock(); std::string tmp; if(xmtunproto.size() != str.size()) _update_required = true; else if(strncmp(xmtunproto.c_str(), str.c_str(), str.size()) != 0) _update_required = true; xmtunproto.assign(str); unlock(); } /** ******************************************************** * ***********************************************************/ void cAmp::xmt_data(std::string &str) { lock(); std::string tmp; if(xmtdata.size() != str.size()) _update_required = true; else if(strncmp(xmtdata.c_str(), str.c_str(), str.size()) != 0) _update_required = true; xmtdata.assign(str); fsize = xmtdata.length(); xmt_calc_numblocks(); unlock(); } /** ******************************************************** * ***********************************************************/ std::string cAmp::xmt_data(void) { lock(); std::string ret_data; ret_data.assign(xmtdata); unlock(); return ret_data; } /** ******************************************************** * ***********************************************************/ std::string cAmp::xmt_hash(void) { lock(); std::string data; data.assign(xmthash); unlock(); return data; } /** ******************************************************** * ***********************************************************/ void cAmp::xmt_fname(std::string fn) { lock(); xmtfilename.assign(fn); _time_stamp(&tx_statbuf.st_mtime); unlock(); } /** ******************************************************** * ***********************************************************/ bool cAmp::xmt_stat(struct stat *stat_storage) { if(stat_storage) { memcpy(stat_storage, &tx_statbuf, sizeof(tx_statbuf)); return true; } return false; } /** ******************************************************** * ***********************************************************/ bool cAmp::xmt_file_modified(void) { lock(); struct stat cur_stat; if(xmtfilename_fullpath.size() > 0) { stat(xmtfilename_fullpath.c_str(), &cur_stat); if(cur_stat.st_mtime == tx_statbuf.st_mtime) { unlock(); return false; } } unlock(); return true; } /** ******************************************************** * ***********************************************************/ std::string cAmp::xmt_fname() { lock(); std::string data; data.assign(xmtfilename); unlock(); return data; } /** ******************************************************** * ***********************************************************/ std::string cAmp::xmt_full_path_fname() { lock(); std::string data; data.assign(xmtfilename_fullpath); unlock(); return data; } /** ******************************************************** * ***********************************************************/ void cAmp::xmt_full_path_fname(std::string fname) { lock(); xmtfilename_fullpath = fname; stat(xmtfilename_fullpath.c_str(), &tx_statbuf); _time_stamp(&tx_statbuf.st_mtime); unlock(); } /** ******************************************************** * ***********************************************************/ std::vector &cAmp::xmt_vector_header(void) { return header_string_array; } /** ******************************************************** * ***********************************************************/ std::vector &cAmp::xmt_vector_data(void) { return data_string_array; } /** ******************************************************** * ***********************************************************/ void cAmp::xmt_descrip(std::string desc) { xmtdesc.assign(desc); } /** ******************************************************** * ***********************************************************/ std::string cAmp::xmt_descrip(void) { lock(); std::string data; data.assign(xmtdesc); unlock(); return data; } /** ******************************************************** * ***********************************************************/ void cAmp::xmt_tosend_clear(void) { lock(); tosend.clear(); report_buffer.clear(); unlock(); } /** ******************************************************** * ***********************************************************/ void cAmp::xmt_tosend(std::string str) { lock(); tosend = str; unlock(); } /** ******************************************************** * ***********************************************************/ std::string cAmp::xmt_tosend(void) { lock(); std::string data; data.assign(tosend); unlock(); return data; } /** ******************************************************** * ***********************************************************/ void cAmp::xmt_modem(std::string _m) { if(_m.empty()) return; lock(); if(modem.compare(_m) != 0) { _update_required = true; modem.assign(_m); } unlock(); } /** ******************************************************** * ***********************************************************/ std::string cAmp::xmt_modem(void) { lock(); std::string m; m.assign(modem); unlock(); return m; } /** ******************************************************** * ***********************************************************/ void cAmp::xmt_blocksize(int n) { lock(); if(xmtblocksize != n) _update_required = true; xmtblocksize = n; unlock(); } /** ******************************************************** * ***********************************************************/ int cAmp::xmt_blocksize() { lock(); int tmp = 0; tmp = xmtblocksize; unlock(); return tmp; } /** ******************************************************** * ***********************************************************/ std::string cAmp::xmt_numblocks() { lock(); std::string data; xmt_calc_numblocks(); int count = xmtnumblocks; data.assign(sz_num(count)); unlock(); return data; } /** ******************************************************** * Internal use locks not required. ***********************************************************/ void cAmp::xmt_calc_numblocks(void) { xmtnumblocks = xmtdata.length() / xmtblocksize + (xmtdata.length() % xmtblocksize ? 1 : 0); } /** ******************************************************** * ***********************************************************/ void cAmp::my_call(std::string call) { lock(); xmtcall.assign(call); unlock(); } /** ******************************************************** * ***********************************************************/ std::string cAmp::my_call(void) { lock(); std::string data; data.assign(xmtcall); unlock(); return data; } /** ******************************************************** * ***********************************************************/ void cAmp::my_info(std::string info) { lock(); xmtinfo.assign(info); unlock(); } /** ******************************************************** * ***********************************************************/ std::string cAmp::my_info(void) { lock(); std::string data; data.assign(xmtinfo); unlock(); return data; } /** ******************************************************** * ***********************************************************/ void cAmp::compress(bool comp) { lock(); if(use_compression != comp) _update_required = true; use_compression = comp; unlock(); } /** ******************************************************** * ***********************************************************/ bool cAmp::compress() { lock(); bool tmp = false; tmp = use_compression; unlock(); return tmp; } /** ******************************************************** * ***********************************************************/ void cAmp::forced_compress(bool comp) { lock(); if(use_forced_compression != comp) _update_required = true; use_forced_compression = comp; unlock(); } /** ******************************************************** * ***********************************************************/ bool cAmp::forced_compress(void) { lock(); bool tmp = false; tmp = use_forced_compression; unlock(); return tmp; } /** ******************************************************** * ***********************************************************/ void cAmp::repeat(int n) { lock(); if(xmt_repeat != n) _update_required = true; xmt_repeat = n; unlock(); } /** ******************************************************** * ***********************************************************/ int cAmp::repeat() { lock(); int tmp = 0; tmp = xmt_repeat; unlock(); return tmp; } /** ******************************************************** * ***********************************************************/ void cAmp::header_repeat(int n) { lock(); if(repeat_header != n) _update_required = true; repeat_header = n; unlock(); } /** ******************************************************** * ***********************************************************/ int cAmp::header_repeat(void) { lock(); int tmp = 0; tmp = repeat_header; unlock(); return tmp; } /** ******************************************************** * ***********************************************************/ bool cAmp::update_required(void) { lock(); bool tmp = 0; tmp = _update_required; unlock(); return tmp; } /** ******************************************************** * ***********************************************************/ void cAmp::lock(void) { thread_locks++; pthread_mutex_lock(&mutex_amp_io); } /** ******************************************************** * ***********************************************************/ void cAmp::unlock(void) { if(thread_locks > 0) thread_locks--; pthread_mutex_unlock(&mutex_amp_io); } flamp-2.2.12/src/utils/socket.cxx0000664000175000017500000005707314507650001013575 00000000000000// ---------------------------------------------------------------------------- // socket.cxx // // Copyright (C) 2008-2009 // Stelios Bounanos, M0GLD // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ---------------------------------------------------------------------------- #include #include #ifndef __MINGW32__ # include # include # include # include # include # include #else # include "compat.h" #endif #include #include #include #include #include #include #include #include #include #include #include #include "debug.h" #include "socket.h" #include "flamp.h" #if HAVE_GETADDRINFO && !defined(AI_NUMERICSERV) # define AI_NUMERICSERV 0 #endif // // utility functions // #if HAVE_GETADDRINFO /** ******************************************************** * ***********************************************************/ static void copy_addrinfo(struct addrinfo** info, const struct addrinfo* src) { struct addrinfo* p = *info; for (const struct addrinfo* rp = src; rp; rp = rp->ai_next) { if (p) { p->ai_next = new struct addrinfo; p = p->ai_next; } else { p = new struct addrinfo; if (!*info) *info = p; } p->ai_flags = rp->ai_flags; p->ai_family = rp->ai_family; p->ai_socktype = rp->ai_socktype; p->ai_protocol = rp->ai_protocol; p->ai_addrlen = rp->ai_addrlen; if (rp->ai_addr) { p->ai_addr = reinterpret_cast(new struct sockaddr_storage); memcpy(p->ai_addr, rp->ai_addr, rp->ai_addrlen); } else p->ai_addr = NULL; if (rp->ai_canonname) p->ai_canonname = strdup(rp->ai_canonname); else p->ai_canonname = NULL; p->ai_next = NULL; } } /** ******************************************************** * ***********************************************************/ static void free_addrinfo(struct addrinfo* ai) { for (struct addrinfo *next, *p = ai; p; p = next) { next = p->ai_next; delete reinterpret_cast(p->ai_addr); free(p->ai_canonname); delete p; } } #else /** ******************************************************** * ***********************************************************/ static void copy_charpp(char*** dst, const char* const* src) { if (src == NULL) { *dst = NULL; return; } size_t n = 0; for (const char* const* s = src; *s; s++) n++; *dst = new char*[n+1]; for (size_t i = 0; i < n; i++) (*dst)[i] = strdup(src[i]); (*dst)[n] = NULL; } /** ******************************************************** * ***********************************************************/ static void copy_hostent(struct hostent* dst, const struct hostent* src) { if (src->h_name) dst->h_name = strdup(src->h_name); else dst->h_name = NULL; copy_charpp(&dst->h_aliases, src->h_aliases); dst->h_length = src->h_length; if (src->h_addr_list) { size_t n = 0; for (const char* const* p = src->h_addr_list; *p; p++) n++; dst->h_addr_list = new char*[n+1]; for (size_t i = 0; i < n; i++) { dst->h_addr_list[i] = new char[src->h_length]; memcpy(dst->h_addr_list[i], src->h_addr_list[i], src->h_length); } dst->h_addr_list[n] = NULL; } else dst->h_addr_list = NULL; } /** ******************************************************** * ***********************************************************/ static void copy_servent(struct servent* dst, const struct servent* src) { if (src->s_name) dst->s_name = strdup(src->s_name); else dst->s_name = NULL; copy_charpp(&dst->s_aliases, src->s_aliases); dst->s_port = src->s_port; if (src->s_proto) dst->s_proto = strdup(src->s_proto); else dst->s_proto = NULL; } /** ******************************************************** * ***********************************************************/ static void free_charpp(char** pp) { if (!pp) return; for (char** p = pp; *p; p++) free(*p); delete [] pp; } /** ******************************************************** * ***********************************************************/ static void free_hostent(struct hostent* hp) { free(const_cast(hp->h_name)); free_charpp(hp->h_aliases); if (hp->h_addr_list) { for (char** p = hp->h_addr_list; *p; p++) delete [] *p; delete [] hp->h_addr_list; } } /** ******************************************************** * ***********************************************************/ static void free_servent(struct servent* sp) { free(const_cast(sp->s_name)); free_charpp(sp->s_aliases); free(sp->s_proto); } #endif // HAVE_GETADDRINFO // // Address class // /** ******************************************************** * ***********************************************************/ Address::Address(const char* host, int port, const char* proto_name) : node(host), copied(false) { #if HAVE_GETADDRINFO info = NULL; #else memset(&host_entry, 0, sizeof(host_entry)); memset(&service_entry, 0, sizeof(service_entry)); #endif if (node.empty() && port == 0) return; std::ostringstream s; s << port; service = s.str(); lookup(proto_name); } /** ******************************************************** * ***********************************************************/ Address::Address(const char* host, const char* port_name, const char* proto_name) : node(host), service(port_name), copied(false) { #if HAVE_GETADDRINFO info = NULL; #else memset(&host_entry, 0, sizeof(host_entry)); memset(&service_entry, 0, sizeof(service_entry)); #endif lookup(proto_name); } /** ******************************************************** * ***********************************************************/ Address::Address(const Address& addr) { #if HAVE_GETADDRINFO info = NULL; #else memset(&host_entry, 0, sizeof(host_entry)); memset(&service_entry, 0, sizeof(service_entry)); #endif *this = addr; } /** ******************************************************** * ***********************************************************/ Address::~Address() { #if HAVE_GETADDRINFO if (info) { if (!copied) freeaddrinfo(info); else free_addrinfo(info); } #else free_hostent(&host_entry); free_servent(&service_entry); #endif } /** ******************************************************** * ***********************************************************/ Address& Address::operator=(const Address& rhs) { if (this == &rhs) return *this; node = rhs.node; service = rhs.service; #if HAVE_GETADDRINFO if (info) { if (!copied) freeaddrinfo(info); else free_addrinfo(info); } copy_addrinfo(&info, rhs.info); #else free_hostent(&host_entry); free_servent(&service_entry); copy_hostent(&host_entry, &rhs.host_entry); copy_servent(&service_entry, &rhs.service_entry); addr.ai_protocol = rhs.addr.ai_protocol; addr.ai_socktype = rhs.addr.ai_socktype; #endif copied = true; return *this; } /** ******************************************************** * ***********************************************************/ void Address::lookup(const char* proto_name) { int proto; if (!strcasecmp(proto_name, "tcp")) proto = IPPROTO_TCP; else if (!strcasecmp(proto_name, "udp")) proto = IPPROTO_UDP; else { throw SocketException("Bad protocol name"); } #if HAVE_GETADDRINFO struct addrinfo hints; memset(&hints, 0, sizeof(hints)); # ifdef AI_ADDRCONFIG hints.ai_flags = AI_ADDRCONFIG; # endif hints.ai_family = AF_UNSPEC; hints.ai_socktype = (proto == IPPROTO_TCP ? SOCK_STREAM : SOCK_DGRAM); if (service.find_first_not_of("0123456789") == std::string::npos) hints.ai_flags |= AI_NUMERICSERV; int r; if ((r = getaddrinfo(node.empty() ? NULL : node.c_str(), service.c_str(), &hints, &info)) < 0) { std::string errstr = "getaddrinfo: "; errstr.append(node).append(" : ").append(service); throw SocketException(r, errstr.c_str()); } #else // use gethostbyname etc. memset(&host_entry, 0, sizeof(host_entry)); memset(&service_entry, 0, sizeof(service_entry)); if (node.empty()) node = "0.0.0.0"; struct hostent* hp; if ((hp = gethostbyname(node.c_str())) == NULL) { #ifdef __WIN32__ std::string errstr = "gethostbyname: "; errstr.append(node).append(" not found"); throw SocketException(0, errstr.c_str()); #else throw SocketException(hstrerror(HOST_NOT_FOUND)); #endif } copy_hostent(&host_entry, hp); int port; struct servent* sp; if ((sp = getservbyname(service.c_str(), NULL)) == NULL) { // if a service name std::string could not be looked up by name, it must be numeric if (service.find_first_not_of("0123456789") != std::string::npos) { throw SocketException("Unknown service name"); } port = htons(atoi(service.c_str())); sp = getservbyport(port, NULL); } if (!sp) service_entry.s_port = port; else copy_servent(&service_entry, sp); memset(&addr, 0, sizeof(addr)); addr.ai_protocol = proto; addr.ai_socktype = (proto == IPPROTO_TCP ? SOCK_STREAM : SOCK_DGRAM); #endif } /** ******************************************************** * Returns the number of addresses available for * the node and service ***********************************************************/ size_t Address::size(void) const { size_t n = 0; #if HAVE_GETADDRINFO if (!info) return 0; for (struct addrinfo* p = info; p; p = p->ai_next) n++; #else if (!host_entry.h_addr_list) return 0; for (char** p = host_entry.h_addr_list; *p; p++) n++; #endif return n; } /** ******************************************************** * Returns an address from the list of those available * for the node and service ***********************************************************/ const addr_info_t* Address::get(size_t n) const { #if HAVE_GETADDRINFO if (!info) return NULL; struct addrinfo* p = info; for (size_t i = 0; i < n; i++) p = p->ai_next; LOG_DEBUG("Found address %s", get_str(p).c_str()); return p; #else if (!host_entry.h_addr_list) return NULL; memset(&saddr, 0, sizeof(saddr)); saddr.sin_family = AF_INET; saddr.sin_addr = *(struct in_addr*)host_entry.h_addr_list[n]; saddr.sin_port = service_entry.s_port; addr.ai_family = saddr.sin_family; addr.ai_addrlen = sizeof(saddr); addr.ai_addr = (struct sockaddr*)&saddr; LOG_DEBUG("Found address %s", get_str(&addr).c_str()); return &addr; #endif } /** ******************************************************** * Returns the std::string representation of an address ***********************************************************/ std::string Address::get_str(const addr_info_t* addr) { if (!addr) return ""; #if HAVE_GETADDRINFO char host[NI_MAXHOST], port[NI_MAXSERV]; memset(host, 0, sizeof(host)); if (getnameinfo(addr->ai_addr, sizeof(struct sockaddr_storage), host, sizeof(host), port, sizeof(port), NI_NUMERICHOST | NI_NUMERICSERV) == 0) return std::string("[").append(host).append("]:").append(port); else return ""; #else char* host, port[8]; host = inet_ntoa(((struct sockaddr_in*)addr->ai_addr)->sin_addr); snprintf(port, sizeof(port), "%u", htons(((struct sockaddr_in*)addr->ai_addr)->sin_port)); return std::string("[").append(host).append("]:").append(port); #endif } /** ******************************************************** * Constructs a Socket object and associates the address addr with it. * This address will be used by subsequent calls to the bind() or connect() * methods * @param addr An Address object ***********************************************************/ Socket::Socket(const Address& addr) { buffer = new char[S_BUFSIZ]; memset(&timeout, 0, sizeof(timeout)); anum = 0; nonblocking = false; autoclose = true; open(addr); } /** ******************************************************** * Constructs a Socket object from a file descriptor * @param fd A file descriptor ***********************************************************/ Socket::Socket(int fd) : sockfd(fd) { buffer = new char[S_BUFSIZ]; anum = 0; memset(&timeout, 0, sizeof(timeout)); if (sockfd == -1) return; #ifndef __MINGW32__ int r = fcntl(sockfd, F_GETFL); if (r == -1) throw SocketException(errno, "fcntl"); nonblocking = r & O_NONBLOCK; #else // no way to retrieve nonblocking status on woe32(?!) set_nonblocking(false); #endif autoclose = true; } /** ******************************************************** * Constructs a Socket object by copying another instance ***********************************************************/ Socket::Socket(const Socket& s) : sockfd(s.sockfd), address(s.address), anum(s.anum), nonblocking(s.nonblocking), autoclose(true) { buffer = new char[S_BUFSIZ]; ainfo = address.get(anum); memcpy(&timeout, &s.timeout, sizeof(timeout)); s.set_autoclose(false); } /** ******************************************************** * ***********************************************************/ Socket::~Socket() { delete [] buffer; if (autoclose) close(); } /** ******************************************************** * ***********************************************************/ Socket& Socket::operator=(const Socket& rhs) { if (this == &rhs) return *this; sockfd = rhs.sockfd; address = rhs.address; anum = rhs.anum; ainfo = address.get(anum); memcpy(&timeout, &rhs.timeout, sizeof(timeout)); nonblocking = rhs.nonblocking; autoclose = rhs.autoclose; rhs.set_autoclose(false); return *this; } /** ******************************************************** * Associates the Socket with an address * This address will be used by subsequent calls to the bind() or connect * methods. * @params addr An address object ***********************************************************/ void Socket::open(const Address& addr) { address = addr; size_t n = address.size(); for (anum = 0; anum < n; anum++) { ainfo = address.get(anum); LOG_DEBUG("Trying %s", address.get_str(ainfo).c_str()); if ((sockfd = socket(ainfo->ai_family, ainfo->ai_socktype, ainfo->ai_protocol)) != -1) break; } if (sockfd == -1) throw SocketException(errno, "socket"); set_close_on_exec(true); } /** ******************************************************** * Shuts down the socket ***********************************************************/ void Socket::close(void) { ::close(sockfd); } /** ******************************************************** * Waits for the socket file descriptor to become ready for I/O * @params dir Specifies the I/O direction. 0 is input, 1 is output. * @return True if the file descriptor became ready within the timeout * period, false otherwise. @see Socket::set_timeout ***********************************************************/ bool Socket::wait(int dir) { fd_set fdset; FD_ZERO(&fdset); FD_SET((unsigned)sockfd, &fdset); struct timeval t = { timeout.tv_sec, timeout.tv_usec }; int r; if (dir == 0) r = select(sockfd + 1, &fdset, NULL, NULL, &t); else if (dir == 1) r = select(sockfd + 1, NULL, &fdset, NULL, &t); else throw SocketException(EINVAL, "Socket::wait"); if (r == -1) throw SocketException(errno, "select"); return r; } /** ******************************************************** * Binds the socket to the address associated with the object * @see Socket::open ***********************************************************/ void Socket::bind(void) { int r = 1; if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, (const char*)&r, sizeof(r)) == -1) perror("setsockopt SO_REUSEADDR"); if (::bind(sockfd, ainfo->ai_addr, ainfo->ai_addrlen) == -1) throw SocketException(errno, "bind"); } /** ******************************************************** * Calls listen(2) on the socket file desriptor * The socket must already have been bound to an address via a call to the bind * method. * @params backlog The maximum number of pending connections (default SOMAXCONN) ***********************************************************/ void Socket::listen(int backlog) { if (::listen(sockfd, backlog) == -1) throw SocketException(errno, "listen"); } /** ******************************************************** * Accepts a connection * The socket must already have been bound to an address via a call to the bind * method. * @return A Socket instance for the accepted connection ***********************************************************/ Socket Socket::accept(void) { listen(); // wait for fd to become readable if (nonblocking && (timeout.tv_sec > 0 || timeout.tv_usec > 0)) if (!wait(0)) throw SocketException(ETIMEDOUT, "select"); int r; if ((r = ::accept(sockfd, NULL, 0)) == -1) throw SocketException(errno, "accept"); set_close_on_exec(true, r); return Socket(r); } /** ******************************************************** * Accepts a single connection and then closes the listening socket * @see Socket::accept * @return A Socket instance for the accepted connection ***********************************************************/ Socket Socket::accept1(void) { bind(); Socket s = accept(); close(); s.set_close_on_exec(true); return s; } /** ******************************************************** * Connects the socket to the address that is associated with the object ***********************************************************/ void Socket::connect(void) { LOG_DEBUG("Connecting to %s", address.get_str(ainfo).c_str()); if (::connect(sockfd, ainfo->ai_addr, ainfo->ai_addrlen) == -1) throw SocketException(errno, "connect"); } /** ******************************************************** * Connects the socket to an address * @param addr The address to connect to ***********************************************************/ void Socket::connect(const Address& addr) { close(); open(addr); connect(); } /** ******************************************************** * Sends a buffer * @param buf * @param len * @return The amount of data that was sent. This may be less than len * if the socket is non-blocking. ***********************************************************/ size_t Socket::send(const void* buf, size_t len) { // if we have a nonblocking socket and a nonzero timeout, // wait for fd to become writeable if (nonblocking && (timeout.tv_sec > 0 || timeout.tv_usec > 0)) if (!wait(1)) return 0; ssize_t r = 0; ssize_t sent = 0; const char *cbuf = (const char *)buf; int retries = 0; while (len && retries < 10) { r = ::send(sockfd, cbuf, len, 0); if (r == 0) { shutdown(sockfd, SHUT_WR); } else if (r == -1) { if (errno != EAGAIN) throw SocketException(errno, "send"); r = 0; } len -= r; cbuf += r; sent += r; if (len == 0) break; retries--; MilliSleep(50); } return sent; } /** ******************************************************** * Sends a std::string * @param buf * @return The amount of data that was sent. This may be less than len * if the socket is non-blocking. ***********************************************************/ size_t Socket::send(const std::string& buf) { return send(buf.data(), buf.length()); } /** ******************************************************** * Receives data into a buffer * @arg buf * @arg len The maximum number of bytes to write to buf. * @return The amount of data that was received. This may be less than len * if the socket is non-blocking. ***********************************************************/ size_t Socket::recv(void* buf, size_t len) { // if we have a nonblocking socket and a nonzero timeout, // wait for fd to become writeable if (nonblocking && (timeout.tv_sec > 0 || timeout.tv_usec > 0)) if (!wait(0)) return 0; int r = ::recv(sockfd, (char*)buf, len, 0); if (r == 0) shutdown(sockfd, SHUT_RD); else if (r == -1) { if (errno != EAGAIN) throw SocketException(errno, "recv"); r = 0; } if (r == 0) return 0; return r; } /** ******************************************************** * Receives all available data and appends it to a std::string. * @arg buf * @return The amount of data that was received. ***********************************************************/ size_t Socket::recv(std::string& buf) { size_t n = 0; ssize_t r; while ((r = recv(buffer, S_BUFSIZ)) > 0) { buf.reserve(buf.length() + r); buf.append(buffer, r); n += r; } return n; } /** ******************************************************** * Retrieves the socket's receive or send buffer size * @param dir Specifies the I/O direction. 0 is input, 1 is output. ***********************************************************/ int Socket::get_bufsize(int dir) { int len; if (::get_bufsize(sockfd, dir, &len) == -1) throw SocketException(errno, "get_bufsize"); return len; } /** ******************************************************** * Sets the socket's receive or send buffer size * @param dir Specifies the I/O direction. 0 is input, 1 is output. * @param len Specifies the new buffer size ***********************************************************/ void Socket::set_bufsize(int dir, int len) { if (::set_bufsize(sockfd, dir, len) == -1) throw SocketException(errno, "set_bufsize"); } /** ******************************************************** * Sets the socket's blocking mode * @param v If true, the socket is set to non-blocking ***********************************************************/ void Socket::set_nonblocking(bool v) { if (set_nonblock(sockfd, v) == -1) throw SocketException(errno, "set_nonblock"); nonblocking = v; } /** ******************************************************** * Enables the use of Nagle's algorithm for the socket * @param v If true, Nagle's algorithm is disabled. ***********************************************************/ void Socket::set_nodelay(bool v) { if (::set_nodelay(sockfd, v) == -1) throw SocketException(errno, "set_nodelay"); } /** ******************************************************** * Sets the timeout associated with non-blocking operations * @param t ***********************************************************/ void Socket::set_timeout(const struct timeval& t) { timeout.tv_sec = t.tv_sec; timeout.tv_usec = t.tv_usec; } /** ******************************************************** * ***********************************************************/ void Socket::set_timeout(double t) { timeout.tv_sec = (time_t)floor(t); timeout.tv_usec = (suseconds_t)((t - timeout.tv_sec) * 1e6); } /** ******************************************************** * Sets the socket's autoclose mode. * If autoclose is disabled, the socket file descriptor will not be closed when * the Socket object is destructed. * @param v If true, the socket will be closed by the destructor ***********************************************************/ void Socket::set_autoclose(bool v) const { autoclose = v; } /** ******************************************************** * Sets the socket's close-on-exec flag ***********************************************************/ void Socket::set_close_on_exec(bool v, int fd) { if (fd == -1) fd = sockfd; if (set_cloexec(fd, v) == -1) throw SocketException(errno, "set_cloexec"); } /** ******************************************************** * Returns the Socket's file descriptor. * The descriptor should only be used for reading and writing. * @return the socket file descriptor ***********************************************************/ int Socket::fd(void) { return sockfd; } flamp-2.2.12/src/utils/base64.cxx0000664000175000017500000001007514507650001013360 00000000000000// ===================================================================== // // base64.cxx // // Author: Dave Freese, W1HKJ // Copyright: 2010 // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ===================================================================== #include "base64.h" /** ******************************************************** * ***********************************************************/ void base64::init(void) { iolen = 0; iocp = 0; ateof = false; linelength = 0; // create the etable for encoding for (int i = 0; i < 9; i++) { etable[i] = 'A' + i; etable[i + 9] = 'J' + i; etable[26 + i] = 'a' + i; etable[26 + i + 9] = 'j' + i; } for (int i = 0; i < 8; i++) { etable[i + 18] = 'S' + i; etable[26 + i + 18] = 's' + i; } for (int i = 0; i < 10; i++) etable[52 + i] = '0' + i; etable[62] = '+'; etable[63] = '/'; // create the dtable for decoding for (int i= 0; i < 255; i++) dtable[i] = 0x80; for (int i = 'A'; i <= 'I'; i++) dtable[i] = 0 + (i - 'A'); for (int i = 'J'; i <= 'R'; i++) dtable[i] = 9 + (i - 'J'); for (int i = 'S'; i <= 'Z'; i++) dtable[i] = 18 + (i - 'S'); for (int i = 'a'; i <= 'i'; i++) dtable[i] = 26 + (i - 'a'); for (int i = 'j'; i <= 'r'; i++) dtable[i] = 35 + (i - 'j'); for (int i = 's'; i <= 'z'; i++) dtable[i] = 44 + (i - 's'); for (int i = '0'; i <= '9'; i++) dtable[i] = 52 + (i - '0'); dtable[(int)'+'] = 62; dtable[(int)'/'] = 63; dtable[(int)'='] = 0; } /** ******************************************************** * ***********************************************************/ std::string base64::encode(std::string in) { int n; t_byte igroup[3], ogroup[4]; // output = "\n"; output.clear(); iocp = 0; ateof = false; if (crlf) linelength = 0; iolen = in.length(); while (!ateof) { igroup[0] = igroup[1] = igroup[2] = 0; for (n = 0; n < 3; n++) { if (iocp == iolen) { ateof = true; break; } igroup[n] = (t_byte)in[iocp]; iocp++; } if (n > 0) { ogroup[0] = etable[igroup[0] >> 2]; ogroup[1] = etable[((igroup[0] & 3) << 4) | (igroup[1] >> 4)]; ogroup[2] = etable[((igroup[1] & 0xF) << 2) | (igroup[2] >> 6)]; ogroup[3] = etable[igroup[2] & 0x3F]; if (n < 3) ogroup[3] = '='; if (n < 2) ogroup[2] = '='; for (int i = 0; i < 4; i++) { if (crlf) if (linelength >= LINELEN) { output += '\n'; linelength = 0; } output += (t_byte)ogroup[i]; if (crlf) linelength++; } } } if (crlf) output += '\n'; return output; } /** ******************************************************** * ***********************************************************/ std::string base64::decode(std::string in, bool &decode_error) { int i; output = ""; iocp = 0; iolen = in.length(); t_byte c; decode_error = false; while (iocp < iolen) { t_byte a[4], b[4], o[3]; for (i = 0; i < 4; i++) { if (iocp == iolen) { output = "b64 file length error.\n"; decode_error = true; return output; } c = in[iocp++]; while (c <= ' ') { if (iocp == iolen) { return output; } c = in[iocp++]; } if (dtable[c] & 0x80) { output = "Illegal character in b64 file.\n"; decode_error = true; return output; } a[i] = c; b[i] = (t_byte)dtable[c]; } o[0] = (b[0] << 2) | (b[1] >> 4); o[1] = (b[1] << 4) | (b[2] >> 2); o[2] = (b[2] << 6) | b[3]; output += o[0]; if (a[2] != '=') { output += o[1]; if (a[3] != '=') output += o[2]; } } return output; } flamp-2.2.12/src/utils/getsysinfo.c0000644000175000017500000002411514463050061014105 00000000000000/* Adapted from libgw32c-0.4 */ /* Platform SDK: Windows System Information See: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/sysinfo_5r76.asp */ #include #include #define BUFSIZE 80 #define VIDSIZE 13 static const char * vid_cyrix = "CyrixInstead"; static const char * vid_centaur = "CentaurHauls"; static const char * vid_rise = "RiseRiseRise"; static const char * vid_intel = "GenuineIntel"; static const char * vid_amd = "AuthenticAMD"; static const char * vid_tmx86 = "GenuineTMx86"; static const char * vid_geode = "Geode by NSC"; static const char * vid_umc = "UMC UMC UMC "; static const char * vid_amd2 = "AMD ISBETTER"; static const char * vid_amd3 = "DEI "; static const char * vid_amd4 = "NexGenerationAMD"; static const char * vid_nexgen = "NexGenDriven"; #define cpuid(op,a,b,c,d)\ __asm__("cpuid": "=a" (a), "=b" (b), "=c" (c), "=d" (d) : "a" (op)); /** ******************************************************** * ***********************************************************/ static void GetVendorID (char *vid) { unsigned long MaxEax, ebx, ecx, edx, zerobyte; cpuid (0, MaxEax, ebx, ecx, edx); memcpy (vid, &ebx, 4); memcpy (vid+4, &edx, 4); memcpy (vid+8, &ecx, 4); zerobyte = 0; memcpy (vid+12, &zerobyte, 1); } /** ******************************************************** * ***********************************************************/ BOOL GetMachInfo(LPSTR MachineName, LPSTR ProcessorName) { SYSTEM_INFO sysinf; int family, model, stepping; char VendorId [VIDSIZE+2]; ZeroMemory(&sysinf, sizeof(SYSTEM_INFO)); GetSystemInfo(&sysinf); family = sysinf.wProcessorLevel; model = HIBYTE(sysinf.wProcessorRevision); stepping = LOBYTE(sysinf.wProcessorRevision); switch (sysinf.wProcessorArchitecture) { case PROCESSOR_ARCHITECTURE_UNKNOWN: strcpy(MachineName, "unknown"); break; case PROCESSOR_ARCHITECTURE_INTEL: strcpy(MachineName, "ix86"); break; case PROCESSOR_ARCHITECTURE_MIPS: strcpy(MachineName, "mips"); break; case PROCESSOR_ARCHITECTURE_ALPHA: strcpy(MachineName, "alpha"); break; case PROCESSOR_ARCHITECTURE_PPC: strcpy(MachineName, "ppc"); break; case PROCESSOR_ARCHITECTURE_IA64: strcpy(MachineName, "IA64"); break; case PROCESSOR_ARCHITECTURE_IA32_ON_WIN64: strcpy(MachineName, "IA32 on Win64"); break; case PROCESSOR_ARCHITECTURE_AMD64: strcpy(MachineName, "amd64"); break; case PROCESSOR_ARCHITECTURE_SHX: strcpy(MachineName, "sh"); break; case PROCESSOR_ARCHITECTURE_ARM: strcpy(MachineName, "arm"); break; case PROCESSOR_ARCHITECTURE_ALPHA64: strcpy(MachineName, "alpha64"); break; case PROCESSOR_ARCHITECTURE_MSIL: strcpy(MachineName, "msil"); break; default: strcpy(MachineName, "unknown"); break; } if (sysinf.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL) switch(family) { case 3: strcpy(MachineName, "i386"); break; case 4: strcpy(MachineName, "i486"); break; case 5: strcpy(MachineName, "i586"); break; case 6: strcpy(MachineName, "i686"); break; case 7: strcpy(MachineName, "i786"); break; case 15: strcpy(MachineName, "i786"); break; default: strcpy(MachineName, "ix86"); } GetVendorID(VendorId); if (!strcmp(VendorId, vid_cyrix)) strcpy(ProcessorName, "Cyrix"); else if (!strcmp(VendorId, vid_centaur)) strcpy(ProcessorName, "Centaur"); else if (!strcmp(VendorId, vid_rise)) strcpy(ProcessorName, "Rise"); else if (!strcmp(VendorId, vid_intel)) strcpy(ProcessorName, "Intel"); else if (!strcmp(VendorId, vid_amd)) strcpy(ProcessorName, "AMD"); else if (!strcmp(VendorId, vid_tmx86)) strcpy(ProcessorName, "Transmeta"); else if (!strcmp(VendorId, vid_geode)) strcpy(ProcessorName, "Geode"); else if (!strcmp(VendorId, vid_umc)) strcpy(ProcessorName, "UMC"); else if (!strcmp(VendorId, vid_amd2)) strcpy(ProcessorName, "AMD"); else if (!strcmp(VendorId, vid_amd3)) strcpy(ProcessorName, "AMD"); else if (!strcmp(VendorId, vid_amd4)) strcpy(ProcessorName, "AMD"); else if (!strcmp(VendorId, vid_nexgen)) strcpy(ProcessorName, "NexGen"); else strcpy(ProcessorName, "Unknown"); return TRUE; } /* Platform SDK: Windows System Information Adapted from: http://msdn.microsoft.com/library/en-us/sysinfo/base/getting_the_system_version.asp http://www.codeproject.com/system/winvertable.asp Getting the System Version The following example uses the GetVersionEx function to display the version of the currently running operating system. Relying on version information is not the best way to test for a feature. Instead, refer to the documentation for the feature of interest. For more information on common techniques for feature detection, see Operating System Version. If you must require a particular operating system, be sure to use it as a minimum supported version, rather than design the test for the one operating system. This way, your detection code will continue to work on future versions of Windows. */ #undef BUFSIZE #define BUFSIZE 255 /** ******************************************************** * ***********************************************************/ BOOL GetOsInfo(LPSTR OsName, LPSTR Release, LPSTR Version) { OSVERSIONINFOEX osvi; BOOL bOsVersionInfoEx; DWORD BuildNumber; // Try calling GetVersionEx using the OSVERSIONINFOEX structure. // If that fails, try using the OSVERSIONINFO structure. ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX)); osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); if( !(bOsVersionInfoEx = GetVersionEx ((LPOSVERSIONINFO) &osvi)) ) { // If OSVERSIONINFOEX doesn't work, try OSVERSIONINFO. osvi.dwOSVersionInfoSize = sizeof (OSVERSIONINFO); if (! GetVersionEx ( (LPOSVERSIONINFO) &osvi) ) return FALSE; } BuildNumber = osvi.dwBuildNumber & 0xFFFF; switch (osvi.dwPlatformId) { // Tests for Windows NT product family. case VER_PLATFORM_WIN32_NT: // Test for the product. if ( osvi.dwMajorVersion == 3 && osvi.dwMinorVersion == 51 ) strcpy(OsName, "Microsoft Windows NT 3.51"); else if ( osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 0 ) strcpy(OsName, "Microsoft Windows NT 4.0"); else if ( osvi.dwMajorVersion <= 4 && osvi.dwMinorVersion == 0 ) strcpy(OsName, "Microsoft Windows NT"); else if ( osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 2 ) strcpy(OsName, "Microsoft Windows Server 2003 family, "); else if ( osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 1 ) strcpy(OsName, "Microsoft Windows XP"); else if ( osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0 ) strcpy(OsName, "Microsoft Windows 2000"); if( bOsVersionInfoEx ) { // Use information from GetVersionEx. // Test for the workstation type. if ( osvi.wProductType == VER_NT_WORKSTATION ) { if( osvi.wSuiteMask & VER_SUITE_PERSONAL ) strcat(OsName, " Home Edition" ); else strcat(OsName, " Professional" ); } // Test for the server type. else if ( osvi.wProductType == VER_NT_SERVER) { if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 2) { if( osvi.wSuiteMask & VER_SUITE_DATACENTER ) strcat(OsName, " Datacenter Edition" ); else if( osvi.wSuiteMask & VER_SUITE_ENTERPRISE ) if( osvi.dwMajorVersion == 4 ) strcat(OsName, " Advanced Server" ); else strcat(OsName, " Enterprise Edition" ); else if ( osvi.wSuiteMask == VER_SUITE_BLADE ) strcat(OsName, " Web Edition" ); else strcat(OsName, " Standard Edition" ); } else if( osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0 ) { if( osvi.wSuiteMask & VER_SUITE_DATACENTER ) strcat(OsName, " Datacenter Server" ); else if( osvi.wSuiteMask & VER_SUITE_ENTERPRISE ) strcat(OsName, " Advanced Server" ); else strcat(OsName, " Server" ); } else // Windows NT 4.0 { if( osvi.wSuiteMask & VER_SUITE_ENTERPRISE ) strcat(OsName, "Server 4.0, Enterprise Edition "); else strcat(OsName, "Server 4.0 " ); } } else { // Use the registry on early versions of Windows NT. HKEY hKey; char szProductType[BUFSIZE]; DWORD dwBufLen=BUFSIZE; LONG lRet; lRet = RegOpenKeyEx( HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Control\\ProductOptions", 0, KEY_QUERY_VALUE, &hKey ); if( lRet != ERROR_SUCCESS ) return FALSE; lRet = RegQueryValueEx( hKey, "ProductType", NULL, NULL, (LPBYTE) szProductType, &dwBufLen); if( (lRet != ERROR_SUCCESS) || (dwBufLen > BUFSIZE) ) return FALSE; RegCloseKey( hKey ); if ( lstrcmpi( "WINNT", szProductType) == 0 ) strcat(OsName, " Professional" ); if ( lstrcmpi( "LANMANNT", szProductType) == 0 ) strcat(OsName, " Server" ); if ( lstrcmpi( "SERVERNT", szProductType) == 0 ) strcat(OsName, " Advanced Server" ); } // Display version, service pack (if any), and build number. strcat (OsName, " "); strcat (OsName, osvi.szCSDVersion); break; // Test for the Windows 95 product family. case VER_PLATFORM_WIN32_WINDOWS: if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 0) { strcpy(OsName, "Microsoft Windows 95"); if (BuildNumber > 950 && BuildNumber <= 1080) strcat(OsName, " SP1"); else if (BuildNumber > 1080) strcat(OsName, " OSR2"); /* if ( osvi.szCSDVersion[1] == 'C' || osvi.szCSDVersion[1] == 'B' ) strcat(OsName, "OSR2 " ); */ } if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 10) { strcpy(OsName, "Microsoft Windows 98"); if (BuildNumber > 1998 && BuildNumber < 2183) strcat(OsName, " SP1"); else if (BuildNumber >= 2183) strcat(OsName, " SE"); /* if ( osvi.szCSDVersion[1] == 'A' ) strcat(OsName, "SE " ); */ } if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 90) { strcpy(OsName, "Microsoft Windows Millennium Edition "); } break; } sprintf(Release, "%lu.%lu.%lu", osvi.dwPlatformId, osvi.dwMajorVersion, osvi.dwMinorVersion); sprintf(Version, "%lu", osvi.dwBuildNumber & 0xFFFF); return TRUE; } flamp-2.2.12/src/utils/run_scripts.cxx0000664000175000017500000011647214563657712014701 00000000000000/** ************************************************************** \page run_scripts Executing Script Parsing Class \par run_script.cxx (FLAMP) \par Author(s): Robert Stiles, KK5VD, Copyright © 2014

This is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see .

\par USE: This code is the interface between the parsing engine and the GUI code. The processing of the GUI is performed via 'C' style callback fuctions.
\par NOTE: Do not call process_xxx() functions directly. Must be called from the ScriptParsing Class. *******************************************************************/ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include //#include #include #include "flamp.h" #include "amp.h" #include "flamp_dialog.h" #include "dialogs.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "flinput2.h" #include "date.h" #include "calendar.h" #include "icons.h" #include "fileselect.h" #include "file_io.h" #include "status.h" #include "pixmaps.h" #include "threads.h" #include "xml_io.h" #include "tagSearch.h" #include "time_table.h" #include "ztimer.h" #include "script_parsing.h" #include "fileselect.h" #ifdef WIN32 # include "flamprc.h" # include "compat.h" #endif #include #include #include #include #ifdef __WIN32__ #define PATH_SEPERATOR "\\" #define PATH_CHAR_SEPERATOR '\\' #else #define PATH_SEPERATOR "/" #define PATH_CHAR_SEPERATOR '/' #endif pthread_mutex_t mutex_script_io = PTHREAD_MUTEX_INITIALIZER; //extern const char *s_basic_modes[]; extern const char *event_types[]; extern std::string flamp_script_dir; extern std::string flamp_script_default_dir; extern std::string flamp_relay_dir; extern void addfile(ScriptParsing *sp, SCRIPT_COMMANDS *sc); extern void auto_load_tx_queue_from_tx_directory(void); static int process_auto_load_queue(ScriptParsing *sp, SCRIPT_COMMANDS *sc); static int process_base(ScriptParsing *sp, SCRIPT_COMMANDS *sc); static int process_blocks(ScriptParsing *sp, SCRIPT_COMMANDS *sc); static int process_callfrom(ScriptParsing *sp, SCRIPT_COMMANDS *sc); static int process_clear_missing(ScriptParsing *sp, SCRIPT_COMMANDS *sc); static int process_clear_rx_queue(ScriptParsing *sp, SCRIPT_COMMANDS *sc); static int process_clear_tx_queue(ScriptParsing *sp, SCRIPT_COMMANDS *sc); static int process_compression(ScriptParsing *sp, SCRIPT_COMMANDS *sc); static int process_event_forever(ScriptParsing *sp, SCRIPT_COMMANDS *sc); static int process_event_timed(ScriptParsing *sp, SCRIPT_COMMANDS *sc); static int process_event_times(ScriptParsing *sp, SCRIPT_COMMANDS *sc); static int process_event_type(ScriptParsing *sp, SCRIPT_COMMANDS *sc); static int process_event(ScriptParsing *sp, SCRIPT_COMMANDS *sc); static int process_file(ScriptParsing *sp, SCRIPT_COMMANDS *sc); static int process_hamcast_modem(ScriptParsing *sp, SCRIPT_COMMANDS *sc); static int process_hamcast(ScriptParsing *sp, SCRIPT_COMMANDS *sc); static int process_header_modem(ScriptParsing *sp, SCRIPT_COMMANDS *sc); static int process_header_repeat(ScriptParsing *sp, SCRIPT_COMMANDS *sc); static int process_info(ScriptParsing *sp, SCRIPT_COMMANDS *sc); static int process_inhibit_header(ScriptParsing *sp, SCRIPT_COMMANDS *sc); static int process_interval(ScriptParsing *sp, SCRIPT_COMMANDS *sc); static int process_load_txdir(ScriptParsing *sp, SCRIPT_COMMANDS *sc); static int process_modem(ScriptParsing *sp, SCRIPT_COMMANDS *sc); static int process_queue_filepath(ScriptParsing *sp, SCRIPT_COMMANDS *sc); static int process_reset(ScriptParsing *sp, SCRIPT_COMMANDS *sc); static int process_rx_interval(ScriptParsing *sp, SCRIPT_COMMANDS *sc); static int process_sync_with(ScriptParsing *sp, SCRIPT_COMMANDS *sc); static int process_tx_interval(ScriptParsing *sp, SCRIPT_COMMANDS *sc); static int process_tx_report(ScriptParsing *sp, SCRIPT_COMMANDS *sc); static int process_unproto_markers(ScriptParsing *sp, SCRIPT_COMMANDS *sc); static int process_warn_user(ScriptParsing *sp, SCRIPT_COMMANDS *sc); static int process_xmit_repeat(ScriptParsing *sp, SCRIPT_COMMANDS *sc); #if 0 // Unsued fuctions static int process_callto(ScriptParsing *sp, SCRIPT_COMMANDS *sc); static int process_header(ScriptParsing *sp, SCRIPT_COMMANDS *sc); static int process_path(ScriptParsing *sp, SCRIPT_COMMANDS *sc); static int process_proto(ScriptParsing *sp, SCRIPT_COMMANDS *sc); #endif typedef struct _call_script { char filename[FL_PATH_MAX]; bool queueflag; } CALL_SCRIPT; CALL_SCRIPT call_script; void script_execute(void *); void script_execute(const char *filename, bool queue_flag); //! @struct command_funcs //! An array of script commands to their respect call functions. Used //! to assign the call back routine. typedef struct command_funcs { char * command; int (*func)(ScriptParsing *sp, SCRIPT_COMMANDS *sc); } COMMAND_FUNCS; //! @typedef COMMAND_FUNCS //! @see struct command_funcs //! Storage for the command to function call backs. static COMMAND_FUNCS callback_functions[] = { { (char *) CMD_AUTO_LOAD_QUEUE, process_auto_load_queue }, { (char *) CMD_BASE, process_base }, { (char *) CMD_BLOCKS, process_blocks }, { (char *) CMD_CALLFROM, process_callfrom }, { (char *) CMD_CLEAR_MISSING, process_clear_missing }, { (char *) CMD_CLEAR_RXQ, process_clear_rx_queue }, { (char *) CMD_CLEAR_TXQ, process_clear_tx_queue }, { (char *) CMD_COMP, process_compression }, { (char *) CMD_EVENT_FOREVER, process_event_forever }, { (char *) CMD_EVENT_TIMED, process_event_timed }, { (char *) CMD_EVENT_TIMES, process_event_times }, { (char *) CMD_EVENT_TYPE, process_event_type }, { (char *) CMD_EVENT, process_event }, { (char *) CMD_FILE, process_file }, { (char *) CMD_HAMCAST_MODEM, process_hamcast_modem }, { (char *) CMD_HAMCAST, process_hamcast }, { (char *) CMD_HDR_REPEAT, process_header_repeat }, { (char *) CMD_HEADER_MODEM, process_header_modem }, { (char *) CMD_INFO, process_info }, { (char *) CMD_INHIBIT_HEADER, process_inhibit_header}, { (char *) CMD_INTERVAL, process_interval }, { (char *) CMD_LOAD_TXDIR, process_load_txdir}, { (char *) CMD_MODEM, process_modem }, { (char *) CMD_QUEUE_FILEPATH, process_queue_filepath }, { (char *) CMD_RESET, process_reset }, { (char *) CMD_RX_INTERVAL, process_rx_interval }, { (char *) CMD_SYNC_WITH, process_sync_with }, { (char *) CMD_TX_INTERVAL, process_tx_interval }, { (char *) CMD_TX_REPORT, process_tx_report }, { (char *) CMD_UNPROTO_MARKERS, process_unproto_markers }, { (char *) CMD_WARN_USER, process_warn_user }, { (char *) CMD_XMIT_REPEAT, process_xmit_repeat }, #if 0 // Currently not used at this level { (char *) CMD_CALLTO, process_callto }, // Handled in the GUI code { (char *) CMD_HEADER, process_header }, // Handled in HEADER MODEM COMMAND { (char *) CMD_PATH, process_path }, // Handled internally { (char *) CMD_PROTO, process_proto }, // Handled in the GUI code #endif { (char *) 0, 0} }; #if 0 // Unused Functions, Do not remove code. /** ******************************************************** * \brief Enable/Disable protocol use (AMP-2). * \param sp Access to ScritpParsing members. * \param sc Access to SCRIPT_COMMANDS structure variables. * \return 0 (no error) Other (error) ***********************************************************/ static int process_proto(ScriptParsing *sp, SCRIPT_COMMANDS *sc) { bool flag = sp->proto(); // Logic inverted for syntax reasons. if(flag) { btn_enable_tx_unproto->value(false); progStatus.enable_tx_unproto = false; } else { btn_enable_tx_unproto->value(true); progStatus.enable_tx_unproto = true; } return 0; } /** ******************************************************** * \brief Not used. * \param sp Access to ScritpParsing members. * \param sc Access to SCRIPT_COMMANDS structure variables. * \return 0 (no error) Other (error) ***********************************************************/ static int process_header(ScriptParsing *sp, SCRIPT_COMMANDS *sc) { btn_enable_header_modem->value(sp->header_modem_enable()); progStatus.use_header_modem = sp->header_modem_enable(); return 0; } /** ******************************************************** * \brief Assign Call to. * \param sp Access to ScritpParsing members. * \param sc Access to SCRIPT_COMMANDS structure variables. * \return 0 (no error) Other (error) * \par Note: * This string storage can be assigned to anything. User * should follow the limitations imposed by the rules * of the host country. ***********************************************************/ static int process_callto(ScriptParsing *sp, SCRIPT_COMMANDS *sc) { return 0; // Leave this in place. cAmp panel data update conflict. if(!sp->call_to().empty()) { txt_tx_send_to->value(sp->call_to().c_str()); } return 0; } #endif // #if 0 Unused Functions, Do not remove code. /** ******************************************************** * \brief Trim leading and trailing spaces from string. * \param s String to modify * \return s modified string. ***********************************************************/ static inline std::string &trim(std::string &s) { char *buffer = (char *)0; char *dst = (char *)0; char *end = (char *)0; char *src = (char *)0; long count = s.size(); buffer = new char[count + 1]; if(!buffer) return s; memcpy(buffer, s.c_str(), count); buffer[count] = 0; dst = src = buffer; end = &buffer[count]; while(src < end) { if(*src > ' ') break; src++; } if(src > dst) { while((dst < end) && (src < end)) *dst++ = *src++; *dst = 0; } while(end >= buffer) { if(*end > ' ') break; *end-- = 0; } s.assign(buffer); delete [] buffer; return s; } /** ******************************************************** * \brief Assign auto load queue flag for timed events. * \param sp Access to ScritpParsing members. * \param sc Access to SCRIPT_COMMANDS structure variables. * \return 0 (no error) Other (error) ***********************************************************/ static int process_auto_load_queue(ScriptParsing *sp, SCRIPT_COMMANDS *sc) { bool value = sp->auto_load_queue(); progStatus.auto_load_queue = value; btn_auto_load_queue->value(value); return 0; } /** ******************************************************** * \brief Assign base conversion type. * \param sp Access to ScritpParsing members. * \param sc Access to SCRIPT_COMMANDS structure variables. * \return 0 (no error) Other (error) ***********************************************************/ static int process_base(ScriptParsing *sp, SCRIPT_COMMANDS *sc) { return 0; // Leave this in place. cAmp panel data update conflict. char *base_string = (char *)0; int base = sp->base(); int index = 0; switch(base) { case 64: base_string = (char *) "base64"; index = 1; break; case 128: base_string = (char *) "base128"; index = 2; break; case 256: base_string = (char *) "base256"; index = 3; break; default: LOG_INFO("Unknown base encoder selected (%d)", base); return -1; } progStatus.encoder = index; encoders->value(base_string); return 0; } /** ******************************************************** * \brief Assign block size. * \param sp Access to ScritpParsing members. * \param sc Access to SCRIPT_COMMANDS structure variables. * \return 0 (no error) Other (error) ***********************************************************/ static int process_blocks(ScriptParsing *sp, SCRIPT_COMMANDS *sc) { int blocks = sp->blocks(); int mask = ~0x0f; int value = 0; if((blocks >= CNT_BLOCK_SIZE_MINIMUM) && (blocks <= CNT_BLOCK_SIZE_MAXIMUM)) { value = blocks & mask; cnt_blocksize->value(value); progStatus.blocksize = value; } return 0; } /** ******************************************************** * \brief Assign Call from. * \param sp Access to ScritpParsing members. * \param sc Access to SCRIPT_COMMANDS structure variables. * \return 0 (no error) Other (error) * \par Note: * This string storage can be assigned to anything. User * should follow the limitations imposed by the rules * of the host country. ***********************************************************/ static int process_callfrom(ScriptParsing *sp, SCRIPT_COMMANDS *sc) { if(!sp->call_from().empty()) { txt_tx_mycall->value(sp->call_from().c_str()); progStatus.my_call.assign(sp->call_from()); } return 0; } /** ******************************************************** * \brief Set flag to clear the missing report queue after * the retransmitting of the missed data. * \param sp Access to ScritpParsing members. * \param sc Access to SCRIPT_COMMANDS structure variables. * \return 0 (no error) Other (error) ***********************************************************/ static int process_clear_missing(ScriptParsing *sp, SCRIPT_COMMANDS *sc) { bool value = sp->clear_missing(); progStatus.clear_tosend_on_tx_blocks = value; btn_clear_tosend_on_tx_blocks->value(value); return 0; } /** ******************************************************** * \brief Clear the receive queue. * \param sp Access to ScritpParsing members. * \param sc Access to SCRIPT_COMMANDS structure variables. * \return 0 (no error) Other (error) ***********************************************************/ static int process_clear_rx_queue(ScriptParsing *sp, SCRIPT_COMMANDS *sc) { int count = rx_queue->size(); if(count) { rx_queue->select(1); receive_remove_from_queue(true); } return 0; } /** ******************************************************** * \brief Clear the transmit queue. * \param sp Access to ScritpParsing members. * \param sc Access to SCRIPT_COMMANDS structure variables. * \return 0 (no error) Other (error) ***********************************************************/ static int process_clear_tx_queue(ScriptParsing *sp, SCRIPT_COMMANDS *sc) { int count = tx_queue->size(); if(count) { tx_queue->select(1); tx_removefile(true); } return 0; } /** ******************************************************** * \brief Enable/Disable Compression. Compression may or may * not be enabled as file size takes precedence. * \param sp Access to ScritpParsing members. * \param sc Access to SCRIPT_COMMANDS structure variables. * \return 0 (no error) Other (error) ***********************************************************/ static int process_compression(ScriptParsing *sp, SCRIPT_COMMANDS *sc) { bool value = sp->comp(); progStatus.use_compression = value; btn_use_compression->value(value); return 0; } /** ******************************************************** * \brief * \param sp Access to ScritpParsing members. * \param sc Access to SCRIPT_COMMANDS structure variables. * \return 0 (no error) Other (error) ***********************************************************/ static int process_event_times(ScriptParsing *sp, SCRIPT_COMMANDS *sc) { std::string event_time; event_time.assign(sp->event_times()); if(event_time.empty()) return 0; event_time = trim(event_time); txt_repeat_times->value(event_time.c_str()); progStatus.repeat_times.assign(event_time); return 0; } /** ******************************************************** * \brief * \param sp Access to ScritpParsing members. * \param sc Access to SCRIPT_COMMANDS structure variables. * \return 0 (no error) Other (error) ***********************************************************/ static int process_event_timed(ScriptParsing *sp, SCRIPT_COMMANDS *sc) { bool value = sp->event_timed(); btn_repeat_at_times->value(value); btn_repeat_at_times->do_callback(); if(value) sp->event_forever(false); return 0; } /** ******************************************************** * \brief * \param sp Access to ScritpParsing members. * \param sc Access to SCRIPT_COMMANDS structure variables. * \return 0 (no error) Other (error) ***********************************************************/ static int process_event_type(ScriptParsing *sp, SCRIPT_COMMANDS *sc) { int event_type = sp->event_type(); char *cPtr = (char *)0; switch(event_type) { case et_5_min: case et_15_min: case et_30_min: case et_hourly: case et_even_hours: case et_odd_hours: case et_repeat_at: case et_one_time_at: case et_continious_at: progStatus.repeat_every = event_type; cPtr = (char *) event_types[event_type]; if(cPtr) { cbo_repeat_every->value(cPtr); } } return 0; } /** ******************************************************** * \brief Enable/Disable Events (all kinds) * \param sp Access to ScritpParsing members. * \param sc Access to SCRIPT_COMMANDS structure variables. * \return 0 (no error) Other (error) **********************************************************/ static int process_event(ScriptParsing *sp, SCRIPT_COMMANDS *sc) { bool value = sp->event(); int results = 1; int warn = 0; warn = sp->event_forever() | btn_repeat_forever->value(); if(value && warn) results = fl_choice2(_("Enable Events?\nIMMEDIATE TRANSMISSION WILL OCCUR!"), _("No"), _("Yes"), NULL); warn = sp->event_timed() | btn_repeat_at_times->value(); if(value && warn) results = fl_choice2(_("Enable Events?\nImmediate Transmission is possible!"), _("No"), _("Yes"), NULL); if(results) { do_events->value(value); do_events->do_callback(); } return 0; } /** ******************************************************** * \brief Enable/Disable forever events * \param sp Access to ScritpParsing members. * \param sc Access to SCRIPT_COMMANDS structure variables. * \return 0 (no error) Other (error) **********************************************************/ static int process_event_forever(ScriptParsing *sp, SCRIPT_COMMANDS *sc) { bool repeat_forever = sp->event_forever(); btn_repeat_forever->value(repeat_forever); btn_repeat_forever->do_callback(); if(repeat_forever) sp->event_timed(false); return 0; } /** ******************************************************** * \brief Add a file to the transmit queue. * \param sp Access to ScritpParsing members. * \param sc Access to SCRIPT_COMMANDS structure variables. * \return 0 (no error) Other (error) ***********************************************************/ static int process_file(ScriptParsing *sp, SCRIPT_COMMANDS *sc) { addfile(sp, sc); return 0; } /** ******************************************************** * \brief Select the Hamcast modem for each of the 4 positions * available. * \param sp Access to ScritpParsing members. * \param sc Access to SCRIPT_COMMANDS structure variables. * \return 0 (no error) Other (error) ***********************************************************/ static int process_hamcast_modem(ScriptParsing *sp, SCRIPT_COMMANDS *sc) { if(!sc->args[0]) return -1; int modem_index = atoi(sc->args[0]); if(modem_index < 1 || modem_index > 4) return -1; switch(modem_index) { case 1: btn_hamcast_mode_enable_1->value(sp->hamcast_modem_1_enable()); progStatus.hamcast_mode_enable_1 = sp->hamcast_modem_1_enable(); if(!sp->hamcast_modem_1().empty()) { cbo_hamcast_mode_selection_1->value(sp->hamcast_modem_1().c_str()); progStatus.hamcast_mode_selection_1 = cbo_hamcast_mode_selection_1->index(); } break; case 2: btn_hamcast_mode_enable_2->value(sp->hamcast_modem_2_enable()); progStatus.hamcast_mode_enable_2 = sp->hamcast_modem_2_enable(); if(!sp->hamcast_modem_2().empty()) { cbo_hamcast_mode_selection_2->value(sp->hamcast_modem_2().c_str()); progStatus.hamcast_mode_selection_2 = cbo_hamcast_mode_selection_2->index(); } break; case 3: btn_hamcast_mode_enable_3->value(sp->hamcast_modem_3_enable()); progStatus.hamcast_mode_enable_3 = sp->hamcast_modem_3_enable(); if(!sp->hamcast_modem_3().empty()) { cbo_hamcast_mode_selection_3->value(sp->hamcast_modem_3().c_str()); progStatus.hamcast_mode_selection_3 = cbo_hamcast_mode_selection_3->index(); } break; case 4: btn_hamcast_mode_enable_4->value(sp->hamcast_modem_4_enable()); progStatus.hamcast_mode_enable_4 = sp->hamcast_modem_4_enable(); if(!sp->hamcast_modem_4().empty()) { cbo_hamcast_mode_selection_4->value(sp->hamcast_modem_4().c_str()); progStatus.hamcast_mode_selection_4 = cbo_hamcast_mode_selection_4->index(); } break; } return 0; } /** ******************************************************** * \brief Enable/Disable Hamcast operation during event triggered operations. * \param sp Access to ScritpParsing members. * \param sc Access to SCRIPT_COMMANDS structure variables. * \return 0 (no error) Other (error) ***********************************************************/ static int process_hamcast(ScriptParsing *sp, SCRIPT_COMMANDS *sc) { btn_hamcast_mode_cycle->value(sp->hamcast()); progStatus.hamcast_mode_cycle = sp->hamcast(); return 0; } /** ******************************************************** * \brief Enable/Disable Header modem and select the header * modem used for transmitting. * \param sp Access to ScritpParsing members. * \param sc Access to SCRIPT_COMMANDS structure variables. * \return 0 (no error) Other (error) ***********************************************************/ static int process_header_modem(ScriptParsing *sp, SCRIPT_COMMANDS *sc) { btn_enable_header_modem->value(sp->header_modem_enable()); progStatus.use_header_modem = sp->header_modem_enable(); if(!sp->header_modem().empty()) { cbo_header_modes->value(sp->header_modem().c_str()); progStatus.header_selected_mode = cbo_header_modes->index(); } return 0; } /** ******************************************************** * \brief Number of times the header data is repeated. * \param sp Access to ScritpParsing members. * \param sc Access to SCRIPT_COMMANDS structure variables. * \return 0 (no error) Other (error) ***********************************************************/ static int process_header_repeat(ScriptParsing *sp, SCRIPT_COMMANDS *sc) { int value = sp->hdr_repeat(); int min = cnt_repeat_header->minimum(); int max = cnt_repeat_header->maximum(); if(value > max) value = max; if(value < min) value = min; cnt_repeat_header->value(value); progStatus.repeat_header = value; return 0; } /** ******************************************************** * \brief Set the information field in the configuration panel * \param sp Access to ScritpParsing members. * \param sc Access to SCRIPT_COMMANDS structure variables. * \return 0 (no error) Other (error) ***********************************************************/ static int process_info(ScriptParsing *sp, SCRIPT_COMMANDS *sc) { if(!sp->info().empty()) { txt_tx_myinfo->value(sp->info().c_str()); progStatus.my_info.assign(sp->info()); } return 0; } /** ******************************************************** * \brief Enable/Diable Inhibit header modem on fills. * \param sp Access to ScritpParsing members. * \param sc Access to SCRIPT_COMMANDS structure variables. * \return 0 (no error) Other (error) ***********************************************************/ static int process_inhibit_header(ScriptParsing *sp, SCRIPT_COMMANDS *sc) { btn_disable_header_modem_on_block_fills->value(sp->inhibit_header()); progStatus.disable_header_modem_on_block_fills = sp->inhibit_header(); return 0; } /** ******************************************************** * \brief Enable/Disable Interval timer * \param sp Access to ScritpParsing members. * \param sc Access to SCRIPT_COMMANDS structure variables. * \return 0 (no error) Other (error) ***********************************************************/ static int process_interval(ScriptParsing *sp, SCRIPT_COMMANDS *sc) { btn_enable_txrx_interval->value(sp->interval()); progStatus.use_txrx_interval = sp->interval(); return 0; } /** ******************************************************** * \brief Flag event load queue to load from tx/ direcotry * \param sp Access to ScritpParsing members. * \param sc Access to SCRIPT_COMMANDS structure variables. * \return 0 (no error) Other (error) ***********************************************************/ static int process_load_txdir(ScriptParsing *sp, SCRIPT_COMMANDS *sc) { btn_load_from_tx_folder->value(sp->load_txdir()); progStatus.load_from_tx_folder = sp->load_txdir(); return 0; } /** ******************************************************** * \brief Select transmit modem * \param sp Access to ScritpParsing members. * \param sc Access to SCRIPT_COMMANDS structure variables. * \return 0 (no error) Other (error) ***********************************************************/ static int process_modem(ScriptParsing *sp, SCRIPT_COMMANDS *sc) { if(!sp->modem().empty()) { cbo_modes->put_value(sp->modem().c_str()); progStatus.selected_mode = cbo_modes->index(); cbo_modes->do_callback(); } return 0; } /** ******************************************************** * \brief Set the filename and path of the event queue load script. * \param sp Access to ScritpParsing members. * \param sc Access to SCRIPT_COMMANDS structure variables. * \return 0 (no error) Other (error) ***********************************************************/ static int process_queue_filepath(ScriptParsing *sp, SCRIPT_COMMANDS *sc) { if(sp->queue_filepath().empty()) return 0; txt_auto_load_queue_path->value(sp->queue_filepath().c_str()); progStatus.auto_load_queue_path.assign(sp->queue_filepath()); return 0; } /** ******************************************************** * \brief Reset Configuration panel attributes * \param sp Access to ScritpParsing members. * \param sc Access to SCRIPT_COMMANDS structure variables. * \return 0 (no error) Other (error) ***********************************************************/ static int process_reset(ScriptParsing *sp, SCRIPT_COMMANDS *sc) { int reset_type = sp->reset(); switch(reset_type) { case RESET_ALL: sp->call_to(""); txt_tx_mycall->value(""); progStatus.my_call.clear(); sp->info(""); txt_tx_myinfo->value(""); progStatus.my_info.clear(); case RESET_PARTIAL: sp->interval(false); btn_enable_txrx_interval->value(false); progStatus.use_txrx_interval = false; sp->sync_with_flamp(false); btn_sync_mode_flamp_fldigi->value(false); progStatus.sync_mode_flamp_fldigi = false; sp->sync_with_fldigi(false); btn_sync_mode_fldigi_flamp->value(false); progStatus.sync_mode_fldigi_flamp = false; sp->sync_with_prior(false); btn_fldigi_xmt_mode_change->value(false); progStatus.fldigi_xmt_mode_change = false; sp->tx_report(false); btn_enable_tx_on_report->value(false); progStatus.use_txrx_interval = false; sp->warn_user(false); btn_enable_delete_warning->value(false); progStatus.use_tx_on_report = false; sp->clear_missing(false); btn_clear_tosend_on_tx_blocks->value(false); progStatus.clear_tosend_on_tx_blocks = false; sp->inhibit_header(false); btn_disable_header_modem_on_block_fills->value(false); progStatus.disable_header_modem_on_block_fills = false; sp->header_modem_enable(false); btn_enable_header_modem->value(false); progStatus.use_header_modem = false; sp->proto(true); btn_enable_tx_unproto->value(false); progStatus.enable_tx_unproto = false; sp->unproto_markers(false); btn_enable_unproto_markers->value(false); progStatus.enable_unproto_markers = false; sp->load_txdir(false); btn_load_from_tx_folder->value(false); progStatus.load_from_tx_folder = false; sp->event(false); btn_repeat_at_times->value(false); progStatus.repeat_at_times = false; sp->queue_filepath(""); txt_auto_load_queue_path->value(""); progStatus.auto_load_queue_path.clear(); sp->auto_load_queue(false); btn_auto_load_queue->value(false); progStatus.auto_load_queue = false; sp->event_times(""); txt_repeat_times->value(""); progStatus.repeat_times.clear(); sp->hamcast_modem_1_enable(false); btn_hamcast_mode_enable_1->value(false); progStatus.hamcast_mode_enable_1 = false; sp->hamcast_modem_2_enable(false); btn_hamcast_mode_enable_2->value(false); progStatus.hamcast_mode_enable_2 = false; sp->hamcast_modem_3_enable(false); btn_hamcast_mode_enable_3->value(false); progStatus.hamcast_mode_enable_3 = false; sp->hamcast_modem_4_enable(false); btn_hamcast_mode_enable_4->value(false); progStatus.hamcast_mode_enable_4 = false; sp->hamcast(false); btn_hamcast_mode_cycle->value(false); progStatus.hamcast_mode_cycle = false; sp->event_forever(false); btn_repeat_forever->value(false); btn_repeat_forever->do_callback(); // Requires callback() sp->event_timed(false); btn_repeat_at_times->value(false); btn_repeat_at_times->do_callback(); // Requires callback() do_events->value(false); do_events->do_callback(); // Requires callback() default:; } return 0; } /** ******************************************************** * \brief Set the receive interval in seconds * \param sp Access to ScritpParsing members. * \param sc Access to SCRIPT_COMMANDS structure variables. * \return 0 (no error) Other (error) ***********************************************************/ static int process_rx_interval(ScriptParsing *sp, SCRIPT_COMMANDS *sc) { int max = cnt_rx_interval_secs->maximum(); int min = cnt_rx_interval_secs->minimum(); int value = sp->rx_interval(); if(value > max) value = max; if(value < min) value = min; cnt_rx_interval_secs->value(value); progStatus.rx_interval_seconds = value; return 0; } /** ******************************************************** * \brief Set the sync modes between FLAMP and FLDIGI * \param sp Access to ScritpParsing members. * \param sc Access to SCRIPT_COMMANDS structure variables. * \return 0 (no error) Other (error) ***********************************************************/ static int process_sync_with(ScriptParsing *sp, SCRIPT_COMMANDS *sc) { std::string str; str.assign(sc->args[0]); if(str.empty()) return 0; int i = 0; int c = (int) str.size(); for(i = 0; i < c; i++) str[i] = toupper(str[i]); if(strncmp(str.c_str(), "FLDIGI", 6) == 0) { btn_sync_mode_flamp_fldigi->value(sp->sync_with_fldigi()); progStatus.sync_mode_flamp_fldigi = sp->sync_with_fldigi(); btn_sync_mode_flamp_fldigi->do_callback(); return 0; } if(strncmp(str.c_str(), "FLAMP", 5) == 0) { btn_sync_mode_fldigi_flamp->value(sp->sync_with_flamp()); progStatus.sync_mode_fldigi_flamp = sp->sync_with_flamp(); btn_sync_mode_fldigi_flamp->do_callback(); return 0; } if(strncmp(str.c_str(), "PRIOR", 5) == 0) { btn_fldigi_xmt_mode_change->value(sp->sync_with_prior()); progStatus.fldigi_xmt_mode_change = sp->sync_with_prior(); btn_fldigi_xmt_mode_change->do_callback(); return 0; } return -1; } /** ******************************************************** * \brief Set the transmit interval in minutes. * \param sp Access to ScritpParsing members. * \param sc Access to SCRIPT_COMMANDS structure variables. * \return 0 (no error) Other (error) ***********************************************************/ static int process_tx_interval(ScriptParsing *sp, SCRIPT_COMMANDS *sc) { float max = cnt_tx_interval_mins->maximum(); float min = cnt_tx_interval_mins->minimum(); float value = sp->tx_interval(); if(value > max) value = max; if(value < min) value = min; cnt_tx_interval_mins->value(value); progStatus.tx_interval_minutes = value; set_txt_tx_interval(); return 0; } /** ******************************************************** * \brief Enable/Disable transmit on report * \param sp Access to ScritpParsing members. * \param sc Access to SCRIPT_COMMANDS structure variables. * \return 0 (no error) Other (error) ***********************************************************/ static int process_tx_report(ScriptParsing *sp, SCRIPT_COMMANDS *sc) { btn_enable_tx_on_report->value(sp->tx_report()); progStatus.use_tx_on_report = sp->tx_report(); return 0; } /** ******************************************************** * \brief Enable/Disable unproto start and end markers. * \param sp Access to ScritpParsing members. * \param sc Access to SCRIPT_COMMANDS structure variables. * \return 0 (no error) Other (error) ***********************************************************/ static int process_unproto_markers(ScriptParsing *sp, SCRIPT_COMMANDS *sc) { btn_enable_unproto_markers->value(sp->unproto_markers()); progStatus.enable_unproto_markers = sp->unproto_markers(); return 0; } /** ******************************************************** * \brief Enable/Disable dialog box warning when deleting * transmit queue items. * \param sp Access to ScritpParsing members. * \param sc Access to SCRIPT_COMMANDS structure variables. * \return 0 (no error) Other (error) ***********************************************************/ static int process_warn_user(ScriptParsing *sp, SCRIPT_COMMANDS *sc) { btn_enable_delete_warning->value(sp->warn_user()); progStatus.enable_delete_warning = sp->warn_user(); return 0; } /** ******************************************************** * \brief Set the number of time the non header data is sent. * \param sp Access to ScritpParsing members. * \param sc Access to SCRIPT_COMMANDS structure variables. * \return 0 (no error) Other (error) ***********************************************************/ static int process_xmit_repeat(ScriptParsing *sp, SCRIPT_COMMANDS *sc) { int max = cnt_repeat_nbr->maximum(); int min = cnt_repeat_nbr->minimum(); int value = sp->xmit_repeat(); if(value > max) value = max; if(value < min) value = min; cnt_repeat_nbr->value(value); progStatus.repeatNN = value; return 0; } extern std::string valid_modes; /** ******************************************************** * \brief Call back function when executing a configuration script. * Called from the File->Execute Config Script menu item. * \param void ***********************************************************/ void script_execute(const char *filename, bool queue_flag) { int index = 0; SCRIPT_CODES error = script_no_errors; ScriptParsing *sp = 0; static std::string script_filename = ""; if(!filename) { LOG_INFO("Script file name (path) null pointer"); return; } script_filename.assign(filename); if(script_filename.empty()) { LOG_INFO("Script file name (path) invalid"); return; } sp = new ScriptParsing; if(!sp) { LOG_INFO("ScriptParsing Class Allocation Fail (%s)", script_filename.c_str()); return; } index = 0; // All commands support callback functions. while(callback_functions[index].command) { sp->assign_callback(callback_functions[index].command, callback_functions[index].func); index++; } // Assign "validation parameters" to the following functions. sp->assign_valid_parameters("MODEM", (const char **) s_modes, no_of_modems); sp->assign_valid_parameters("HEADER MODEM", (const char **) s_modes, no_of_modems); sp->assign_valid_parameters("HAMCAST MODEM", (const char **) s_modes, no_of_modems); // Limit command set depending on queue_flag if(queue_flag) { sp->file_type(QUEUE_COMMAND); } else { sp->file_type(SCRIPT_COMMAND); } // LOG_INFO("Executing Script:%s", script_filename.c_str()); error = sp->parse_commands((char *) script_filename.c_str()); if(error != script_no_errors) { LOG_INFO("Error(s) in processing script file: %s", script_filename.c_str()); fl_alert("%s", "Script File contains Error(s)\nSee Log file for details."); } if(sp) delete sp; } /** ******************************************************** * \brief Call back function when executing a configuration script. * Called from the File->Execute Config Script menu item. * \param void ***********************************************************/ void cb_scripts(bool reset_path = false) { pthread_mutex_lock(&mutex_script_io); static bool first_time = true; static char script_filename[FL_PATH_MAX + 1]; std::string new_path = ""; if(reset_path || first_time) { memset(script_filename, 0, sizeof(script_filename)); strncpy(script_filename, flamp_script_dir.c_str(), FL_PATH_MAX); int len = strnlen(script_filename, FL_PATH_MAX); if(len > 0) { len--; if(script_filename[len] == PATH_CHAR_SEPERATOR); else strncat(script_filename, PATH_SEPERATOR, FL_PATH_MAX); } else { return; } first_time = false; } const char *p = FSEL::select((char *)"Script Files", (char *)"*.txt", \ script_filename); if(p) { memset(script_filename, 0, sizeof(script_filename)); strncpy(script_filename, p, FL_PATH_MAX); Fl::lock(); script_execute(script_filename, false); Fl::unlock(); show_selected_xmt(1); } pthread_mutex_unlock(&mutex_script_io); } /** ******************************************************** * \brief Call back function when executing a queue script. * \param void ***********************************************************/ void cb_load_tx_queue(void) { std::string script_filename; script_filename.assign(txt_auto_load_queue_path->value()); if(progStatus.load_from_tx_folder) { auto_load_tx_queue_from_tx_directory(); } else { std::string script_filename; script_filename.assign(txt_auto_load_queue_path->value()); if(script_filename.empty()) { LOG_INFO("Queue Load file list (path) not assigned"); return; } pthread_mutex_lock(&mutex_script_io); strncpy(call_script.filename, script_filename.c_str(), FL_PATH_MAX-1); call_script.queueflag = true; Fl::awake(script_execute, (void *)&call_script); pthread_mutex_unlock(&mutex_script_io); } show_selected_xmt(0); } /** ******************************************************** * \brief Hander for FL:awake call. * \param void ***********************************************************/ void script_execute(void *v) { CALL_SCRIPT *s = (CALL_SCRIPT *)v; if(!s) return; Fl::lock(); script_execute(s->filename, s->queueflag); Fl::unlock(); } /** ************************************************************** * \brief Execute a configuration script from an xmlrpc procedure. * \param std::string script_path_filename *****************************************************************/ #include void xml_execute_script(std::string script_path_name) { std::cout << "xml_execute_script( " << script_path_name << " )\n"; pthread_mutex_lock(&mutex_script_io); Fl::lock(); script_execute(script_path_name.c_str(), false); Fl::unlock(); show_selected_xmt(1); pthread_mutex_unlock(&mutex_script_io); } int xml_create_script(std::string script_path_name, std::string text) { try { std::ofstream oscript(script_path_name.c_str()); oscript << text; oscript.close(); return 1; } catch (...) { LOG_ERROR("Could not create %s", script_path_name.c_str()); return 0; } } flamp-2.2.12/src/utils/circular_queue.cxx0000664000175000017500000002353014507650001015304 00000000000000// circular_queue.cxx // // Author(s): // Robert Stiles, KK5VD, Copyright (C) 2013 // Dave Freese, W1HKJ, Copyright (C) 2013 // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // #include #include #include #include #include #include #include #include "util.h" #include "circular_queue.h" /** ******************************************************** * ***********************************************************/ Circular_queue::Circular_queue() { } /** ******************************************************** * ***********************************************************/ Circular_queue::Circular_queue( int po2, int (*_matchFound)(void *), int (*_readDataFrom)(void *), void * (*_queueParser)(void *)) { setUp(po2, _matchFound, _readDataFrom, _queueParser); } /** ******************************************************** * ***********************************************************/ Circular_queue::~Circular_queue() { signal(); pthread_mutex_lock(&mutex); exit_thread = 1; pthread_mutex_unlock(&mutex); pthread_join(thread, NULL); pthread_cond_destroy(&condition); delete [] buffer; } /** ******************************************************** * ***********************************************************/ void Circular_queue::setUp( int po2, int (*_matchFound)(void *), int (*_readDataFrom)(void *), void * (*_queueParser)(void *)) { if(!_matchFound || !_readDataFrom || !_queueParser) { throw CircQueException("Null Calling Function(s)"); } matchFound = _matchFound; readData = _readDataFrom; queueParser = _queueParser; buffer_size = (1 << po2); buffer = new char[buffer_size]; if (!buffer) { throw CircQueException("Cannot allocate buffer"); } memset(buffer, 0, buffer_size); bufferCount = 0; index_mask = 1; for(int i = 1; i < po2; i++) index_mask |= (index_mask << 1); exit_thread = 0; inhibitDataOut = CQUE_HOLD; pthread_mutex_init(&mutex, NULL); pthread_cond_init(&condition, NULL); int perr = pthread_create(&thread, 0, queueParser, this); if (perr) { throw CircQueException(perr, "Cannot create thread"); } inhibitDataOut = CQUE_RESUME; } /** ******************************************************** * ***********************************************************/ void Circular_queue::stopDataOut() { inhibitDataOut = CQUE_HOLD; } /** ******************************************************** * ***********************************************************/ void Circular_queue::startDataOut() { inhibitDataOut = CQUE_RESUME; } /** ******************************************************** * ***********************************************************/ void Circular_queue::addToQueueNullFiltered(char *_buffer, int _size) { if(!_buffer || _size < 1) return; pthread_mutex_lock(&mutex); while(_size > 0) { if (bufferCount >= buffer_size) { stalled = 1; break; } write_index &= index_mask; if(*_buffer) { // Filter out null characters buffer[write_index++] = *_buffer; bufferCount++; } _buffer++; _size--; } pthread_mutex_unlock(&mutex); } /** ******************************************************** * ***********************************************************/ void Circular_queue::addToQueue(char *_buffer, int _size) { if(!_buffer || _size < 1) return; pthread_mutex_lock(&mutex); while(_size > 0) { if (bufferCount >= buffer_size) { stalled = 1; break; } write_index &= index_mask; buffer[write_index++] = *_buffer++; bufferCount++; _size--; } pthread_mutex_unlock(&mutex); } /** ******************************************************** * ***********************************************************/ int Circular_queue::lookAheadCRC(char *_buffer, int _size, unsigned int *crcVal, int *reset) { if(!_buffer || _size < 1 || !crcVal || !reset) return 0; int count = 0; int temp_index = 0; int buffer_count = 0; // unsigned int crcval = *crcVal; char *cPtr = _buffer; pthread_mutex_lock(&mutex); temp_index = read_index; buffer_count = bufferCount; if(*reset) { crcValidate.reset(); *reset = 0; } if (buffer_count > 0) { while(!exit_thread) { if (count >= _size) break; temp_index &= index_mask; if (buffer_count > 0) { *cPtr = buffer[temp_index++]; cPtr[1] = 0; buffer_count--; count++; crcValidate.crc16(*cPtr); cPtr++; } else break; } } pthread_mutex_unlock(&mutex); readQueData(buffer_count); *crcVal = crcValidate.val(); return count; } /** ******************************************************** * ***********************************************************/ int Circular_queue::lookAhead(char *_buffer, int _size) { if(!_buffer || _size < 1) return 0; int count = 0; int temp_index = 0; int buffer_count = 0; char *cPtr = _buffer; pthread_mutex_lock(&mutex); temp_index = read_index; buffer_count = bufferCount; if(buffer_count > 0) { while(!exit_thread) { if(count >= _size) break; temp_index &= index_mask; if(buffer_count > 0) { *cPtr = buffer[temp_index++]; cPtr[1] = 0; cPtr++; buffer_count--; count++; } else break; } } pthread_mutex_unlock(&mutex); readQueData(buffer_count); return count; } /** ******************************************************** * ***********************************************************/ int Circular_queue::readQueData(int buffer_count) { if(buffer_count < 32 && readData) { (*readData)((void *)this); } pthread_mutex_lock(&mutex); if(stalled) if(buffer_count < buffer_size) stalled = 0; pthread_mutex_unlock(&mutex); return 0; } /** ******************************************************** * ***********************************************************/ int Circular_queue::adjustReadQueIndex(int count) { if (count < 1) return 0; pthread_mutex_lock(&mutex); if(bufferCount > 0) { if(count >= bufferCount) count = bufferCount; bufferCount -= count; read_index += count; read_index &= index_mask; } if(bufferCount < 1) { bufferCount = 0; write_index = read_index; } pthread_mutex_unlock(&mutex); readQueData(bufferCount); return count; } /** ******************************************************** * ***********************************************************/ int Circular_queue::lookAheadToTerminator(char *_buffer, char terminator, int maxLen) { if (!_buffer || maxLen < 1) return 0; int count = 0; char *cPtr = _buffer; pthread_mutex_lock(&mutex); int temp_index = read_index; int buffer_count = bufferCount; if (buffer_count > 0) { while (!exit_thread) { if(count >= maxLen) break; temp_index &= index_mask; if (buffer_count > 0) { *cPtr = buffer[temp_index++]; cPtr[1] = 0; buffer_count--; count++; } else break; if(*cPtr == terminator) { break; } cPtr++; } } pthread_mutex_unlock(&mutex); readQueData(buffer_count); return count; } /** ******************************************************** * ***********************************************************/ int Circular_queue::lookAheadForCharacter(char character, int *found) { if (!found) return 0; int count = 0; char valueRead = 0; pthread_mutex_lock(&mutex); int temp_index = read_index; int buffer_count = bufferCount; if (buffer_count > 0) { *found = 0; while (!exit_thread) { temp_index &= index_mask; if (buffer_count > 0) { valueRead = buffer[temp_index++]; buffer_count--; count++; } else break; if(valueRead == character) { *found = 1; break; } } } pthread_mutex_unlock(&mutex); readQueData(buffer_count); return count; } /** ******************************************************** * ***********************************************************/ void Circular_queue::stopQueue() { inhibitDataOut = CQUE_HOLD; } /** ******************************************************** * ***********************************************************/ void Circular_queue::resumeQueue() { inhibitDataOut = CQUE_RESUME; } /** ******************************************************** * ***********************************************************/ bool Circular_queue::timeOut(time_t &timeValue, time_t seconds, int attribute) { time_t currentTime = time(NULL); time_t ExpTime = timeValue + seconds; bool ret = false; switch(attribute) { case TIME_SET: timeValue = currentTime; ret = true; break; case TIME_COUNT: if(currentTime > ExpTime) { timeValue = 0; ret = true; } break; } if(timeValue == 0 && seconds > 0) timeValue = currentTime; return ret; } /** ******************************************************** * ***********************************************************/ void Circular_queue::sleep(int seconds, int milliseconds) { struct timespec ts; struct timeval tp; gettimeofday(&tp, NULL); ts.tv_nsec = (tp.tv_usec * 1000) + milliseconds * 1000000; ts.tv_sec = tp.tv_sec + seconds; pthread_mutex_lock(&mutex); pthread_cond_timedwait(&condition, &mutex, &ts); pthread_mutex_unlock(&mutex); } /** ******************************************************** * ***********************************************************/ void Circular_queue::signal(void) { pthread_cond_signal(&condition); } flamp-2.2.12/src/utils/file_io.cxx0000664000175000017500000003263714605333401013713 00000000000000// file_io.cxx // // Author(s): Dave Freese, W1HKJ (2012) // Robert Stiles, KK5VD (2013, 2014) // // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // $Id: main.c 141 2008-07-19 15:59:57Z jessekornblum $ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "config.h" #include "flamp_config.h" #include "flamp.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "flinput2.h" #include "date.h" #include "calendar.h" #include "icons.h" #include "fileselect.h" #include "file_io.h" #include "xml_io.h" #include "status.h" #include "pixmaps.h" #include "base64.h" #include "base128.h" #include "base256.h" #include "lzma/LzmaLib.h" #include "status.h" #include "threads.h" #include "ztimer.h" #include "flamp_dialog.h" #include "dialogs.h" #ifdef WIN32 # include "flamprc.h" # include "compat.h" # define dirent fl_dirent_no_thanks #endif #include #include "dirent-check.h" #include #include #include Socket *tcpip = (Socket *)0; Address *localaddr = (Address *)0; const char *b64_start = "[b64:start]"; const char *b64_end = "\n[b64:end]"; const char *b128_start = "[b128:start]"; const char *b128_end = "\n[b128:end]"; const char *b256_start = "[b256:start]"; const char *b256_end = "\n[b256:end]"; std::string errtext; base64 b64; // use b65(1) to insert lf for ease of viewing required base128 b128; base256 b256; std::string inptext = ""; std::string wtext = ""; std::string check = ""; std::string wrap_outfilename = ""; std::string wrap_inpfilename = ""; std::string wrap_inpshortname = ""; std::string wrap_outshortname = ""; std::string wrap_foldername = ""; pthread_mutex_t mutex_comp_data = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t mutex_decomp_data = PTHREAD_MUTEX_INITIALIZER; /** ******************************************************** * ***********************************************************/ static void base64encode(std::string &inptext) { std::string outtext; outtext.clear(); outtext.reserve(inptext.size() + 100); outtext.assign(b64.encode(inptext)); inptext.assign(b64_start); inptext.append(outtext); inptext.append(b64_end); } /** ******************************************************** * ***********************************************************/ static void base128encode(std::string &inptext) { std::string outtext; outtext.clear(); outtext.reserve(inptext.size() + 100); outtext.assign(b128.encode(inptext)); inptext.assign(b128_start); inptext.append(outtext); inptext.append(b128_end); } /** ******************************************************** * ***********************************************************/ static void base256encode(std::string &inptext) { std::string outtext; outtext.clear(); outtext.reserve(inptext.size() + 100); outtext.assign(b256.encode(inptext)); inptext.assign(b256_start); inptext.append(outtext); inptext.append(b256_end); } #if 0 // Unused function(s) /** ******************************************************** * ***********************************************************/ static void convert2crlf(std::string &s) { size_t p = s.find('\n', 0); while (p != std::string::npos) { s.replace(p, 1, "\r\n"); p = s.find('\n', p + 2); } } /** ******************************************************** * ***********************************************************/ static bool convert2lf(std::string &s) { bool converted = false; size_t p = s.find("\r\n", 0); while (p != std::string::npos) { s.replace(p, 2, "\n"); p = s.find("\r\n", p + 1); converted = true; } return converted; } #endif #define LZMA_STR "\1LZMA" /** ******************************************************** * ***********************************************************/ void compress_maybe(std::string& input, int encode_with, bool try_compress) { // allocate 110% of the original size for the output buffer guard_lock mcd(&mutex_comp_data); size_t outlen = (size_t)ceil(input.length() * 1.1); unsigned char* buf = new unsigned char[outlen]; size_t plen = LZMA_PROPS_SIZE; unsigned char outprops[LZMA_PROPS_SIZE]; uint32_t origlen = htonl(input.length()); std::string bufstr; if (try_compress) { // replace input with: LZMA_STR + original size (in network byte order) + props + data int r; bufstr.assign(LZMA_STR); if ((r = LzmaCompress( buf, &outlen, (const unsigned char*)input.data(), input.length(), outprops, &plen, 9, 0, -1, -1, -1, -1, -1)) == SZ_OK) { bufstr.append((const char*)&origlen, sizeof(origlen)); bufstr.append((const char*)&outprops, sizeof(outprops)); bufstr.append((const char*)buf, outlen); if (input.length() < bufstr.length()) { LOG_DEBUG("%s", "Lzma could not compress data"); bufstr.assign(input); } } else { LOG_ERROR("Lzma Compress failed: %s", LZMA_ERRORS[r]); bufstr.assign(input); } if (encode_with == BASE256) base256encode(bufstr); else if (encode_with == BASE128) base128encode(bufstr); else base64encode(bufstr); } else { bufstr.reserve(input.size() * 2); bufstr.assign(input); if (binary(bufstr)) { if (encode_with == BASE256) base256encode(bufstr); else if (encode_with == BASE128) base128encode(bufstr); else base64encode(bufstr); } } delete [] buf; input = bufstr; return; } /** ******************************************************** * ***********************************************************/ void decompress_maybe(std::string& input) { guard_lock mdd(&mutex_decomp_data); int decode = NONE; //BASE64; bool decode_error = false; size_t p0 = std::string::npos, p1 = std::string::npos, p2 = std::string::npos, p3 = std::string::npos; if ((p0 = p1 = input.find(b64_start)) != std::string::npos) { p1 += strlen(b64_start); p2 = input.find(b64_end, p1); } else if ((p0 = p1 = input.find(b128_start)) != std::string::npos) { p1 += strlen(b128_start); p2 = input.find(b128_end, p1); decode = BASE128; } else if ((p0 = p1 = input.find(b256_start)) != std::string::npos) { p1 += strlen(b256_start); p2 = input.find(b256_end, p1); decode = BASE256; } if (p2 == std::string::npos) { switch (decode) { case BASE64 : fprintf(stderr, "Base 64 decode failed\n"); break; case BASE128 : fprintf(stderr, "Base 128 decode failed\n"); break; case BASE256 : fprintf(stderr, "Base 256 decode failed\n"); break; case NONE : default : ; } return; } switch (decode) { case BASE128 : p3 = p2 + strlen(b128_end); break; case BASE256 : p3 = p2 + strlen(b256_end); break; case BASE64 : default : p3 = p2 + strlen(b64_end); } std::string cmpstr = input.substr(p1, p2-p1); switch (decode) { case BASE128 : cmpstr = b128.decode(cmpstr, decode_error); break; case BASE256 : cmpstr = b256.decode(cmpstr, decode_error); break; case BASE64 : default: cmpstr = b64.decode(cmpstr, decode_error); } if (decode_error == true) { fprintf(stderr,"%s\n", cmpstr.c_str()); return; } if (cmpstr.find(LZMA_STR) == std::string::npos) { input.replace(p0, p3 - p0, cmpstr); return; } const char* in = cmpstr.data(); size_t outlen = ntohl(*reinterpret_cast(in + strlen(LZMA_STR))); if (outlen > 1 << 25) { fprintf(stderr, "Refusing to decompress data (> 32 MiB)\n"); return; } unsigned char* buf = new unsigned char[outlen]; unsigned char inprops[LZMA_PROPS_SIZE]; memcpy(inprops, in + strlen(LZMA_STR) + sizeof(uint32_t), LZMA_PROPS_SIZE); size_t inlen = cmpstr.length() - strlen(LZMA_STR) - sizeof(uint32_t) - LZMA_PROPS_SIZE; int r; if ((r = LzmaUncompress(buf, &outlen, (const unsigned char*)in + cmpstr.length() - inlen, &inlen, inprops, LZMA_PROPS_SIZE)) != SZ_OK) fprintf(stderr, "Lzma Uncompress failed: %s\n", LZMA_ERRORS[r]); else { cmpstr.assign((const char*)buf, outlen); input.replace(p0, p3 - p0, cmpstr); } delete [] buf; } /** ******************************************************** * ***********************************************************/ static void wait(int n) { while (n > 0) { MilliSleep(10); Fl::awake(); n -= 10; } } std::string now() { std::string nw; time_t tm; tm = time_check(); nw = ctime(&tm); size_t p = nw.find(":"); if (p == std::string::npos) return ""; nw.erase(0, p-2); p = nw.find(" "); nw.erase(p); return nw; } #define XFR_BLOCK_SIZE 512 struct timeval start_time; int transfer_minutes; void transfer(std::string tosend) { if (fldigi_state != FLDIGI_ONLINE) return; gettimeofday(&start_time, NULL); transfer_minutes = progStatus.tx_interval_minutes; guard_lock fio(&mutex_file_io); try { while (tosend.length() > XFR_BLOCK_SIZE) { tcpip->send(tosend.substr(0,XFR_BLOCK_SIZE)); tosend.erase(0,XFR_BLOCK_SIZE); wait(50); } if (!tosend.empty()) { tcpip->send(tosend.c_str()); wait(50); } } catch (const SocketException& e) { file_io_errno = errno; if(e.error() != 0) { fldigi_state = FLDIGI_OFFLINE; LOG_ERROR("%s %d", e.what(), file_io_errno); } } return; } std::string rx_buff; /** ******************************************************** * ***********************************************************/ int rx_fldigi(std::string &retbuff) { int buff_length = 0; if (fldigi_state != FLDIGI_ONLINE) return 0; guard_lock fio(&mutex_file_io); try { rx_buff.clear(); tcpip->set_nonblocking(); tcpip->recv(rx_buff); retbuff = rx_buff; buff_length = rx_buff.length(); } catch (const SocketException& e) { file_io_errno = errno; if(e.error() != 0) { fldigi_state = FLDIGI_OFFLINE; LOG_ERROR("%s %d", e.what(), file_io_errno); } } return buff_length; } /** ******************************************************** * ***********************************************************/ int rx_fldigi(char *buffer, int limit) { int buff_length = 0; if (fldigi_state != FLDIGI_ONLINE) return 0; guard_lock fio(&mutex_file_io); try { tcpip->set_nonblocking(); buff_length = tcpip->recv(buffer, (size_t) limit); } catch (const SocketException& e) { file_io_errno = errno; if(e.error() != 0) { fldigi_state = FLDIGI_OFFLINE; LOG_ERROR("%s %d", e.what(), file_io_errno); } } return buff_length; } // allowable characters for uncompress / unencoded transmissions // are in 0 locations. int not_allowed[256] = { // 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, // 16 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 32 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 48 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 64 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 80 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 96 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 112 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, // 128 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 144 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 160 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 176 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 192 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 208 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 224 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 240 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 // 256 }; /** ******************************************************** * ***********************************************************/ bool binary(std::string &s) { for (size_t n = 0; n < s.length(); n++) { if (not_allowed[(s[n] & 0xFF)]) return true; } return false; } /** ******************************************************** * ***********************************************************/ bool c_binary(int c) { if (not_allowed[c & 0xFF]) return true; else return false; } /** ******************************************************** * ***********************************************************/ bool isPlainText(std::string &_buffer) { int count = 0; int index = 0; int data = 0; count = _buffer.size(); for(index = 0; index < count; index++) { data = _buffer[index]; if(c_binary(data) || (data & 0x80)) { return false; } } return true; } /** ******************************************************** * ***********************************************************/ bool isPlainText(char *_buffer, size_t count) { size_t index = 0; int data = 0; if(!_buffer || count) return false; for(index = 0; index < count; index++) { data = _buffer[index]; if(c_binary(data) || (data & 0x80)) { return false; } } return true; } flamp-2.2.12/src/utils/ztimer.cxx0000664000175000017500000004473114563657712013636 00000000000000// ===================================================================== // // ztimer.cxx // // Author(s): // Copyright (C) 2014 Robert Stiles, KK5VD // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ===================================================================== #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "debug.h" #include "util.h" #include "gettext.h" #include "flinput2.h" #include "icons.h" #include "status.h" #include "threads.h" #include "flamp.h" #include "flamp_dialog.h" #include "dialogs.h" #include "xml_io.h" #include "ztimer.h" #include "fileselect.h" extern void close_ops(); static char szoutTimeValue[] = "12:30:00"; static char sztime[] = "123000"; static int ztime; time_t ztime_current; time_t ztime_end; bool continuous_exception = false; bool event_timer_on = false; bool exit_watch_dog = false; float tx_time_g = 0; pthread_t *watch_dog_thread = 0; pthread_mutex_t mutex_watch_dog = PTHREAD_MUTEX_INITIALIZER; time_t watch_dog_seconds = 0; time_t time_check(void); extern bool event_bail_flag; bool tx_ztimer_flag = false; /** ******************************************************** * \brief Trim leading and trailing spaces from std::string. * \param s std::string to modify * \return s modified std::string. ***********************************************************/ static inline std::string &trim(std::string &s) { char *buffer = (char *)0; char *dst = (char *)0; char *end = (char *)0; char *src = (char *)0; long count = s.size(); buffer = new char[count + 1]; if(!buffer) return s; memcpy(buffer, s.c_str(), count); buffer[count] = 0; dst = src = buffer; end = &buffer[count]; while(src < end) { if(*src > ' ') break; src++; } if(src > dst) { while((dst < end) && (src < end)) *dst++ = *src++; *dst = 0; } while(end >= buffer) { if(*end > ' ') break; *end-- = 0; } s.assign(buffer); delete [] buffer; return s; } /** ******************************************************** * ***********************************************************/ void turn_off_events(void *ptr) { do_events->value(0); do_events_flag = 0; cb_do_events((Fl_Light_Button *)0, (void*)0); } /** ******************************************************** * \brief Stop currently running events. * \param void Not used * \return void No returned values. ***********************************************************/ void stop_events(void) { ztime_end = 0; continuous_exception = false; if(transmitting) abort_request(); } #if 0 /** ******************************************************** * \brief Parse event time entries * \param delete_flag if true deletes the current event on completion. * \return true = no errors, false = errors ***********************************************************/ time_t parse_repeat_times(bool delete_flag, unsigned int zt) { bool local_flag = false; char etime[10]; char ttime[10]; time_t diff = 0; time_t diff_hs = 0; time_t diff_ms = 0; time_t e_h = 0; time_t e_m = 0; time_t hm_zt = 0; time_t s_h = 0; time_t s_m = 0; time_t time_end = 0; time_t time_seconds = 0; time_t time_start = 0; snprintf(ttime, sizeof(ttime), "%06d", zt); ttime[4] = '-'; ttime[5] = 0; hm_zt = atoi(ttime); size_t s = progStatus.repeat_times.length(); size_t p = progStatus.repeat_times.find(ttime); if(p != std::string::npos) { if(progStatus.repeat_every != 8) return false; delete_flag = false; continuous_exception = true; local_flag = true; } else { ttime[4] = 0; p = progStatus.repeat_times.find(ttime); if(p == std::string::npos) return 0; if(p > 0) if(progStatus.repeat_times[p - 1] == '-') return 0; local_flag = false; time_end = time_check(); } int len = 4; while (((p + len) < s) && !isdigit(progStatus.repeat_times[p + len])) len++; int count = 0; if(continuous_exception && local_flag) { while (((p + len) < s) && isdigit(progStatus.repeat_times[p + len])) { etime[count++] = progStatus.repeat_times[p + len]; if(count > 4) break; if((p + len) < s) len++; } etime[4] = 0; time_end = (time_t) atoi(etime); time_start = hm_zt; e_h = time_end / 100; e_m = time_end - (e_h * 100); s_h = time_start / 100; s_m = time_start - (s_h * 100); if(time_end < time_start) { e_h += 23; diff_ms = (60 - s_m) + e_m; } else { diff_ms = e_m - s_m; } diff_hs = e_h - s_h; diff_hs *= 3600; diff_ms *= 60; time_seconds = diff_hs + diff_ms; time_end = time_check() + ((time_t) time_seconds); #ifdef CONSOLE_OUTPUT printf(" e_h = %ld e_m = %ld\n", e_h, e_m); printf(" s_h = %ld s_m = %ld\n", s_h, s_m); printf("diff_hs = %ld diff_ms = %ld\n", diff_hs, diff_ms); printf(" hm_zt = %ld duration = %f\n", hm_zt, time_seconds/3600.0); #endif // CONSOLE_OUTPUT } if(delete_flag) { if((p + len) > s) { len = s - p; if(len < 0) len = 0; } if(len) progStatus.repeat_times.erase(p, len); txt_repeat_times->value(progStatus.repeat_times.c_str()); if (progStatus.repeat_times.empty()) { do_events->value(0); do_events_flag = 0; cb_do_events((Fl_Light_Button *)0, (void*)0); } } return time_end; } #else /** ******************************************************** * ***********************************************************/ char *skip_spaces(char *cPtr, char *ePtr) { if(!cPtr || !ePtr) return (char *)0; while(1) { if(*cPtr == 0) return (char *)0; if(cPtr >= ePtr) return (char *)0; if(*cPtr > ' ') break; cPtr++; } return cPtr; } /** ******************************************************** * ***********************************************************/ char *skip_numbers(char *cPtr, char *ePtr) { if(!cPtr || !ePtr) return (char *)0; while(1) { if(*cPtr == 0) return (char *)0; if(cPtr >= ePtr) return (char *)0; if(*cPtr == '-' || isdigit(*cPtr)) { cPtr++; continue; } break; } return cPtr; } /** ******************************************************** * \brief Parse event time entries * \param delete_flag if true deletes the current event on completion. * \return true = no errors, false = errors ***********************************************************/ bool parse_repeat_times(bool delete_flag, unsigned int zt, int mode) { time_t time_end = 0; time_t time_start = 0; //time_t time_diff = 0; time_t time_current = 0; //time_t seconds_in_day = 0; //int index = 0; int count = 0; char *cPtr = (char *)0; char *ePtr = (char *)0; char ttime[10]; //char etime[10]; size_t s = 0; size_t p = 0; int len = 0; snprintf(ttime, sizeof(ttime), "%06d", zt); ttime[4] = 0; time_current = atoi(ttime); switch(mode) { case 6: case 7: s = progStatus.repeat_times.length(); p = progStatus.repeat_times.find(ttime); if(p == std::string::npos) { return false; } len = 4; while (((p + len) < s) && !isdigit(progStatus.repeat_times[p + len]) && progStatus.repeat_times[p + len] == '-') len++; if(delete_flag) { if((p + len) > s) { len = s - p; if(len < 0) len = 0; } if(len) progStatus.repeat_times.erase(p, len); progStatus.repeat_times = trim(progStatus.repeat_times); txt_repeat_times->value(progStatus.repeat_times.c_str()); if (progStatus.repeat_times.empty()) { Fl::awake(turn_off_events, (void *)0); } } break; case 8: cPtr = (char *) progStatus.repeat_times.c_str(); ePtr = &cPtr[progStatus.repeat_times.size()]; while(1) { cPtr = skip_spaces(cPtr, ePtr); if(cPtr == (char *)0) return 0; count = sscanf(cPtr, "%ld-%ld", &time_start, &time_end); if(count < 2) return false; if(time_end < time_start) { if(((time_current >= time_start) && (time_current <= 2400)) || ((time_current >= 0) && (time_current <= time_end))) return true; } if((time_current >= time_start) && (time_current <= time_end)) return true; cPtr = skip_numbers(cPtr, ePtr); if(cPtr == (char *)0) return false; } break; default:; } return true; } #endif /** ******************************************************** * \brief Thread safe time() function. * \param void No paramters (void). * \return time_t in seconds. ***********************************************************/ time_t time_check(void) { pthread_mutex_lock(&mutex_watch_dog); time_t the_time = time(0); pthread_mutex_unlock(&mutex_watch_dog); return the_time; } /** ******************************************************** * \brief Start/Continue FLTK's event timer. * \param flag true initialize, false reset to continue. * \param tv struct timeval storage by reference. * \return void ***********************************************************/ /* void execute_ztimer(bool flag, struct timeval &tv) { pthread_mutex_lock(&mutex_watch_dog); gettimeofday(&tv, NULL); if (flag) { double st = 1.0 - tv.tv_usec / 1e6; Fl::repeat_timeout(st, ztimer); } else { Fl::repeat_timeout(1.0, ztimer); } pthread_mutex_unlock(&mutex_watch_dog); } */ /** ******************************************************** * fldigi was closed before flamp ... abort ***********************************************************/ void abort_flamp(void *) { fl_alert2(_("fldigi off line")); clean_shutdown(); } //#define TEST_INTERVAL 2 // CHECK every nn seconds /** ******************************************************** * ***********************************************************/ extern size_t fldigi_state; void connect_to_fldigi(void *) { guard_lock fio(&mutex_file_io); guard_lock lock(&mutex_xmlrpc); try { if (!tcpip && (fldigi_state != FLDIGI_ONLINE)) { tcpip = new Socket (*localaddr); tcpip->set_timeout(0.01); } tcpip->connect(); fldigi_state |= FLDIGI_STREAM_ONLINE; LOG_DEBUG("Connected to %d", tcpip->fd()); } catch (const SocketException& e) { if (tcpip) tcpip->close(); delete tcpip; tcpip = 0; file_io_errno = errno; if(e.error() != 0) { fldigi_state = FLDIGI_OFFLINE; LOG_ERROR("%s %d", e.what(), file_io_errno); } } } /** ******************************************************** * ***********************************************************/ extern size_t fldigi_state; void fldigi_ok() { std::string test = get_io_mode(); if (test == "ARQ") { if(fldigi_state == FLDIGI_XMLRPC_ONLINE) connect_to_fldigi(NULL); } else if(test == "KISS") { LOG_INFO("FLDIGI I/O Setting are set to KISS, Requires ARQ."); } } /** ******************************************************* * \brief Watch dog for ztimer. * * In the event the user adjusts the system time there is * a possiblility the event timer will timeout and not * continue. The watch dog loop monitors the condition and * will restart the event timer if needed. * * \param *p unused. Required for pthread call. * \return void* null unused. Required for pthread call. * ***********************************************************/ /* void *watch_dog_loop(void *p) { time_t current_time = 0; double diff_time = 0; double limit = 10.0; int counter = 0; struct timeval tv; exit_watch_dog = false; while(!exit_watch_dog) { MilliSleep(250); if((counter++) < 40) continue; // Check every 10 seconds else counter = 0; current_time = time_check(); diff_time = (double) (watch_dog_seconds - current_time); if((diff_time > limit) || (diff_time < (-limit))) { execute_ztimer(false, tv); } } return (void *)0; } */ void watch_dog_check() { time_t current_time = time_check(); double diff_time = (double) (watch_dog_seconds - current_time); if (diff_time > 10.0 || (diff_time < -10.0)) { // reset the clock // execute_ztimer(false, tv); } } /** ******************************************************** * \brief FLAMP event timer. * \param *first_call. if true initialzation occures. Otherwise, the * count down timer is reset. * \return void (nothing) ***********************************************************/ void ztimer() //void* first_call) { struct timeval tv; static bool tx_toggle = false; static time_t tx_start = 0; static time_t tx_time_seconds = 0; static time_t tx_time_minutes = 0; static std::string tx_state; static std::string tx_duration; bool flag = false; pthread_mutex_lock(&mutex_watch_dog); gettimeofday(&tv, NULL); pthread_mutex_unlock(&mutex_watch_dog); struct tm tm; time_t t_temp; t_temp = (time_t) tv.tv_sec; gmtime_r(&t_temp, &tm); if (!strftime(sztime, sizeof(sztime), "%H%M%S", &tm)) strcpy(sztime, "000000"); ztime = atoi(sztime); if (!strftime(szoutTimeValue, sizeof(szoutTimeValue), "%H:%M:%S", &tm)) memset(szoutTimeValue, 0, sizeof(szoutTimeValue)); // int tc = atoi(&sztime[4]); // if (tc % TEST_INTERVAL == 0) { // fldigi_ok(); // } if (generate_time_table) return; // No Events Allow in Time Table Generation Mode. watch_dog_seconds = time_check(); tx_state = get_trx_state(); if((tx_state == "RX")) tx_ztimer_flag = false; else tx_ztimer_flag = true; //LOG_DEBUG("tx_ztimer_flag=%s", tx_ztimer_flag ? "TRUE" : "FALSE"); if(tx_ztimer_flag && tx_toggle == false) { tx_start = watch_dog_seconds; tx_toggle = true; } if(!tx_ztimer_flag && tx_toggle == true) { tx_time_seconds = watch_dog_seconds - tx_start; tx_start = tx_time_seconds; tx_time_minutes = tx_time_seconds / 60.0; tx_time_seconds -= (tx_time_minutes * 60); tx_toggle = false; if(tx_time_g <= 0.0) tx_time_g = 1; LOG_DEBUG("TX time [mm:ss]: %02ld:%02ld [m:%ld c:%1.3f r:%1.6f] %s", \ tx_time_minutes, tx_time_seconds, tx_start, tx_time_g, \ tx_start/tx_time_g, g_modem.c_str()); } outTimeValue->value(szoutTimeValue); if (do_events_flag && !tx_ztimer_flag && !transmitting) { if (progStatus.repeat_at_times && (ztime % 100 == 0) && (progStatus.repeat_every != 8)) { switch (progStatus.repeat_every) { case 0 : // every 5 minutes if (ztime % 500 == 0) Fl::awake(transmit_queue_main_thread, (void *)0); break; case 1 : // every 15 minutes if (ztime % 1500 == 0) Fl::awake(transmit_queue_main_thread, (void *)0); break; case 2 : // every 30 minutes if (ztime % 3000 == 0) Fl::awake(transmit_queue_main_thread, (void *)0); break; case 3 : // hourly if (ztime % 10000 == 0) Fl::awake(transmit_queue_main_thread, (void *)0); break; case 4 : // even hours if (ztime == 0 || ztime == 20000 || ztime == 40000 || ztime == 60000 || ztime == 80000 || ztime == 100000 || ztime == 120000 || ztime == 140000 || ztime == 160000 || ztime == 180000 || ztime == 200000 || ztime == 220000 ) Fl::awake(transmit_queue_main_thread, (void *)0); break; case 5 : // odd hours if (ztime == 10000 || ztime == 30000 || ztime == 50000 || ztime == 70000 || ztime == 90000 || ztime == 110000 || ztime == 130000 || ztime == 150000 || ztime == 170000 || ztime == 190000 || ztime == 210000 || ztime == 230000 ) Fl::awake(transmit_queue_main_thread, (void *)0); break; case 6 : // at specified times flag = parse_repeat_times(false, ztime, progStatus.repeat_every); if (flag) Fl::awake(transmit_queue_main_thread, (void *)0); break; case 7 : // One time scheduled flag = parse_repeat_times(true, ztime, progStatus.repeat_every); if (flag) Fl::awake(transmit_queue_main_thread, (void *)0); break; default : // do nothing break; } } else if(progStatus.repeat_at_times && (progStatus.repeat_every == 8)) { ztime_current = time_check(); ztime_end = parse_repeat_times(false, ztime, progStatus.repeat_every); if(ztime_end == 0) { continuous_exception = false; event_bail_flag = true; } else { continuous_exception = true; event_bail_flag = false; } if(continuous_exception) { try { Fl::awake(transmit_queue_main_thread, (void *)0); } catch (...) { } } } else if (progStatus.repeat_forever) { try { Fl::awake(transmit_queue_main_thread, (void *)0); } catch (...) { } } } } //====================================================================== // TOD Thread loop //====================================================================== static pthread_t TOD_thread; bool TOD_enabled = false; bool TOD_exit = false; void *TOD_loop(void *args) { // SET_THREAD_ID(TOD_TID); #define LOOP 100 int cnt = 0; int wdcnt = 0; int fldigi_cnt = 0; while(1) { if (TOD_exit) break; if (++cnt == 10) { // every second // guard_lock tmlock(&time_mutex); ztimer(); cnt = 0; } if (++fldigi_cnt == 20) { fldigi_ok(); fldigi_cnt = 0; } if (++wdcnt == 100) { // every 10 seconds watch_dog_check(); wdcnt = 0; } MilliSleep(LOOP); } // exit the TOD thread // SET_THREAD_CANCEL(); return NULL; } //====================================================================== // //====================================================================== void TOD_init() { if (TOD_enabled) return; TOD_exit = false; if (pthread_create(&TOD_thread, NULL, TOD_loop, NULL) < 0) { LOG_ERROR("%s", "pthread_create failed"); return; } LOG_INFO("%s", "Time Of Day thread started"); TOD_enabled = true; } //====================================================================== // //====================================================================== void TOD_close() { if (!TOD_enabled) return; TOD_exit = true; pthread_join(TOD_thread, NULL); TOD_enabled = false; LOG_INFO("%s", "Time Of Day thread terminated. "); } flamp-2.2.12/src/utils/transmit_camp.cxx0000664000175000017500000011406114605333064015143 00000000000000//====================================================================== // transmit_camp.cxx // // Author(s): // Dave Freese, W1HKJ, Copyright (C) 2010, 2011, 2012, 2013 // Robert Stiles, KK5VD, Copyright (C) 2014 // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ===================================================================== #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "flamp.h" #include "amp.h" #include "flamp_dialog.h" #include "dialogs.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "flinput2.h" #include "date.h" #include "calendar.h" #include "icons.h" #include "fileselect.h" #include "file_io.h" #include "status.h" #include "pixmaps.h" #include "threads.h" #include "xml_io.h" #include "tagSearch.h" #include "time_table.h" #include "ztimer.h" #include "script_parsing.h" #include "global_amp.h" #include "transmit_camp.h" pthread_mutex_t mutex_tx_data = PTHREAD_MUTEX_INITIALIZER; bool active_data_io = false; bool transmit_queue = false; int last_selected_tx_file = 0; int tx_thread_running_count = 0; static bool shift_key_flag = false; static bool using_rsid = false; static void wait_milliseconds(int milliseconds, int millisecond_increments); static void wait_seconds(int seconds, int millisecond_increments); /** ******************************************************** * ***********************************************************/ void transfer_in_main_thread(void *ptr) { if (!ptr) return; if (fldigi_state != FLDIGI_ONLINE) return; std::string *data = (std::string *)ptr; transfer(*data); } #if 0 /** ******************************************************** * ***********************************************************/ std::string tx_string(cAmp *tx, std::string t_string) { std::string auto_send; pthread_mutex_lock(&mutex_tx_data); active_data_io = true; std::string send_to = tx->callto(); std::string temp; if (send_to.empty()) send_to.assign("QST"); send_to.append(" DE ").append(progStatus.my_call); for (size_t n = 0; n < send_to.length(); n++) send_to[n] = toupper(send_to[n]); tx->my_call(progStatus.my_call); tx->my_info(progStatus.my_info); tx->xmt_blocksize(progStatus.blocksize); tx->repeat(progStatus.repeatNN); tx->header_repeat(progStatus.repeat_header); temp.clear(); temp.assign(tx->xmt_buffer()); if(tx->unproto() == false) { compress_maybe(temp, tx->tx_base_conv_index(), (tx->compress() | tx->forced_compress())); tx->xmt_data(temp); auto_send.append(tx->xmt_string(true)); } else { tx->xmt_unproto(progStatus.enable_unproto_markers); auto_send.append(tx->xmt_unproto_string()); } auto_send.append("\n").append(send_to).append(t_string); auto_send.append("\n\n\n"); active_data_io = false; pthread_mutex_unlock(&mutex_tx_data); return auto_send; } #else /** ******************************************************** * ***********************************************************/ std::string tx_string(cAmp *tx, std::string t_string) { std::string auto_send; pthread_mutex_lock(&mutex_tx_data); active_data_io = true; auto_send.assign(tx->tx_string(t_string)); active_data_io = false; pthread_mutex_unlock(&mutex_tx_data); return auto_send; } #endif // Create time table for the various modes // Starts at current selected mode. #define MIN_TX_TIME 10.0 double measure_tx_time(int character_to_send, double *over_head); /** ******************************************************** * ***********************************************************/ void * create_tx_table(void *ptr) { TX_FLDIGI_THREAD *thread_ptr = (TX_FLDIGI_THREAD *)ptr; static bool in_use = false; if((fldigi_state != FLDIGI_ONLINE) || in_use) { return run_in_thread_destroy(thread_ptr, 3, 0); } in_use = true; int end_mode = 0; int index = 0; int mode = 0; int start_mode = 0; double overhead = 0.0; double time_seconds = 0; char filename[256]; #define P_RELSOL "%3.6f" #define P_RELSOL2 "%1.6f" std::string response; std::string txBuffer; std::string mode_name; FILE *fd = (FILE *)0; transmitting = true; { Fl::awake(set_button_to_cancel, (void *)0); static int value = TX_ALL_BUTTON; Fl::awake(deactivate_button, (void *) &value); } turn_rsid_off(); pthread_mutex_lock(&thread_ptr->mutex); thread_ptr->thread_running = 1; thread_ptr->exit_thread = 0; pthread_mutex_unlock(&thread_ptr->mutex); memset(filename, 0, sizeof(filename)); for(index = 0; index < 100; index++) { snprintf(filename, sizeof(filename)-1, "time_table-%02d.txt", index); fd = fopen(filename, "r"); if(!fd) break; fclose(fd); } if(index > 99) { LOG_DEBUG("time_table-xx.txt files reached count limit, delete some."); in_use = 0; return run_in_thread_destroy(thread_ptr, 3, &in_use); } if(fd) fclose(fd); fd = fopen(filename, "w"); if(fd) { LOG_DEBUG("Table Gen filename %s", filename); fprintf(fd, "/**********************************************\n"); fprintf(fd, " * Software Generated - Do Not Modify\n"); fprintf(fd, " **********************************************/\n"); fprintf(fd, "typedef struct {\n" "\tchar *mode_name;\n" "\tfloat scale;\n" "\tfloat overhead;\n" "\tfloat table[256];\n" "} MODE_TIME_TABLE;\n\n"); fprintf(fd, "%s", "static MODE_TIME_TABLE mode_time_table[] = {\n"); fflush(fd); if(thread_ptr->que) { start_mode = 0; } else { start_mode = cbo_modes->index(); } end_mode = cbo_modes->lsize(); mode = start_mode; do { LOG_DEBUG("Processing Modem %s", cbo_modes->value()); send_clear_tx(); send_new_modem("CW"); cbo_modes->index(mode); mode_name = cbo_modes->value(); send_new_modem(mode_name.c_str()); wait_seconds(1, 200); time_seconds = measure_tx_time((int) 'A', &overhead); LOG_DEBUG("Mode %s overhead=%f", mode_name.c_str(), overhead); fprintf(fd, "\t{\n\t\t(char *) \"%s\", 1.0, " P_RELSOL2 ", \n\t\t{\n\t\t\t", mode_name.c_str(), overhead); fflush(fd); if(mode_name.find("Olivia") != std::string::npos || mode_name.find("MT63") != std::string::npos) { for(index = 0; index < 128; index++) { if((index % 8) == 0 && index != 0) { fprintf(fd, "\n\t\t\t"); } fprintf(fd, P_RELSOL", ", time_seconds); } fflush(fd); time_seconds = measure_tx_time((int) 130, &overhead); for(index = 128; index < 256; index++) { if((index % 8) == 0 && index != 0) { fprintf(fd, "\n\t\t\t"); } fprintf(fd, P_RELSOL, time_seconds); if(index < 255) fprintf(fd, ", "); } fflush(fd); } else { for(index = 0; index < 256; index++) { if(transmit_stop || thread_ptr->exit_thread) { char msg[] = "\nNOTICE: User requested Termination\n"; fprintf(fd, "%s", msg); LOG_DEBUG("%s", msg); fclose(fd); return run_in_thread_destroy(thread_ptr, 3, &in_use); } LOG_DEBUG("Proc Char = %d, %X : ", index, index); if((index % 8) == 0 && index != 0) { fprintf(fd, "\n\t\t\t"); } time_seconds = measure_tx_time(index, 0); fprintf(fd, P_RELSOL, time_seconds); if(index < 255) fprintf(fd, ", "); if(index < ' ') LOG_DEBUG("Charater \'%d (%X)\' Transmit time in seconds=%f", (index & 0xff), (index & 0xff), time_seconds); else LOG_DEBUG("Charater \'%c\' Transmit time in seconds=%f", (index & 0xff), time_seconds); fflush(fd); } } fprintf(fd, "\n\t\t}\n\t}"); mode++; if(mode < end_mode) fprintf(fd, ","); fprintf(fd, "\n"); fflush(fd); } while(mode < end_mode); fprintf(fd, "};\n"); fflush(fd); fclose(fd); } else { LOG_ERROR("%s = %d", "File open Error", errno); } in_use = 0; return run_in_thread_destroy(thread_ptr, 3, &in_use); } /** ******************************************************** * ***********************************************************/ double measure_tx_time(int character_to_send, double *over_head) { double duration = 0; double retun_val = 0.0; unsigned int oh = 0; unsigned int s = 0; unsigned int sr = 0; std::string tx_duration; // set_xmlrpc_timeout(8.0); tx_duration = get_char_timing(character_to_send); // set_xmlrpc_timeout_default(); if(tx_duration.size() < 1) { LOG_ERROR("No Data returned."); transmit_stop = true; return retun_val; } int count = sscanf(tx_duration.c_str(), "%u:%u:%u", &s, &sr, &oh); if(count != 3) { LOG_ERROR("Returned parameter error. Count = %d should be 3", count); transmit_stop = true; return retun_val; } if(sr != 0) { duration = 1.0 * s / sr; if(over_head) { *over_head = 1.0 * oh / sr; } } else duration = 1.0; return duration; } /** ******************************************************** * ***********************************************************/ void transmit_relay(RELAY_DATA *rd) { if (fldigi_state != FLDIGI_ONLINE) return; if(transmitting) return; transmit_stop = false; transmit_queue = false; if(progStatus.use_txrx_interval || progStatus.use_header_modem) run_in_thread(transmit_relay_interval, TX_SEGMENTED, false, false, rd); else run_in_thread(transmit_serial_relay, 0, false, false, rd); } /** ******************************************************** * ***********************************************************/ void transmit_current() { if (fldigi_state != FLDIGI_ONLINE) return; if(transmitting) return; amp_update_all(); transmit_stop = false; transmit_queue = false; last_selected_tx_file = tx_queue->value() - 1; if(generate_time_table) { run_in_thread(create_tx_table, 0, 0, 0, 0); } else { if(progStatus.use_txrx_interval) { run_in_thread(transmit_interval, TX_SEGMENTED, false, false, 0); } else if(progStatus.use_header_modem) { turn_rsid_on(); run_in_thread(transmit_interval, TX_CONTINIOUS, false, false, 0); } else { run_in_thread(transmit_serial_current, 0, false, false, 0); } } } /** ******************************************************** * ***********************************************************/ void transmit_queued(bool event_driven, bool shift_key_pressed) { if (fldigi_state != FLDIGI_ONLINE) return; if(transmitting) return; transmit_stop = false; transmit_queue = true; g_event_driven = event_driven; amp_update_all(); if(event_driven) event_bail_flag = false; last_selected_tx_file = tx_queue->value() - 1; shift_key_flag = shift_key_pressed; if(generate_time_table) { run_in_thread(create_tx_table, 1, 1, event_driven, 0); } else { if(progStatus.use_txrx_interval) { run_in_thread(transmit_interval, TX_SEGMENTED, true, event_driven, 0); } else if(progStatus.use_header_modem) { turn_rsid_on(); run_in_thread(transmit_interval, TX_CONTINIOUS, true, event_driven, 0); } else { run_in_thread(transmit_serial_queued, 0, true, event_driven, 0); } } } /** ******************************************************** * ***********************************************************/ void * transmit_serial_current(void *ptr) { void * ret = 0; transmitting = true; static bool in_use = false; if(in_use) { return run_in_thread_destroy((TX_FLDIGI_THREAD *) ptr, 3, 0); } in_use = true; { Fl::awake(set_button_to_cancel, (void *)0); static int value = TX_ALL_BUTTON; Fl::awake(deactivate_button, (void *) &value); } int n = tx_queue->value(); if (!n) { return run_in_thread_destroy((TX_FLDIGI_THREAD *) ptr, 3, &in_use); } if (progStatus.fldigi_xmt_mode_change) send_new_modem(cbo_modes->value()); float tx_time = 0; cAmp *tx = 0; std::string autosend = ""; std::string send_to = ""; std::string temp = ""; std::string temp2 = ""; autosend.clear(); send_to.clear(); temp.clear(); active_data_io = true; tx = tx_amp.index2amp(n); if(!tx) { active_data_io = false; return run_in_thread_destroy((TX_FLDIGI_THREAD *) ptr, 3, &in_use); } tx = new cAmp(tx); // Operate on a copy of if(!tx) { active_data_io = false; return run_in_thread_destroy((TX_FLDIGI_THREAD *) ptr, 3, &in_use); } autosend = tx_string(tx, " K\n"); printf("autosend %ld\n", (long) autosend.size()); int value = tx->xmt_buffer().size(); if (!value) { active_data_io = false; in_use = false; return run_in_thread_destroy((TX_FLDIGI_THREAD *) ptr, 3, &in_use); } float oh = 0; tx_time = seconds_from_string(cbo_modes->value(), autosend, &oh); tx_time += oh; tx_time_g = tx_time; transfer(autosend); wait_for_rx((int) tx_time); delete tx; in_use = false; ret = run_in_thread_destroy((TX_FLDIGI_THREAD *) ptr, 3, &in_use); return ret; } /** ******************************************************** * ***********************************************************/ void * transmit_serial_queued(void *ptr) { transmitting = true; static bool in_use = false; TX_FLDIGI_THREAD *thread = (TX_FLDIGI_THREAD *) ptr; if(in_use) { return run_in_thread_destroy(thread, 3, &in_use); } in_use = true; Fl::awake(set_button_to_cancel, (void *)0); static int val = TX_ALL_BUTTON; Fl::awake(deactivate_button, (void *) &val); float tx_time = 0; if (tx_amp.size() == 0) { in_use = false; return run_in_thread_destroy(thread, 3, &in_use); } if (progStatus.fldigi_xmt_mode_change) send_new_modem(thread->modem.c_str()); cAmp *tx; std::string autosend = ""; std::string null_string = ""; std::string temp = ""; std::string terminator = ""; bool fills = false; autosend.clear(); temp.clear(); unsigned int count = (unsigned int) tx_amp.size(); if(continuous_exception) terminator.assign(" BK\n"); else terminator.assign(" K\n"); for (size_t num = 0; num < count; num++) { tx = tx_amp.index2amp(num + 1); if(!tx) { in_use = false; return run_in_thread_destroy(thread, 3, &in_use); } tx = new cAmp(tx); // Operate on a copy of. if(!tx) { in_use = false; return run_in_thread_destroy(thread, 3, &in_use); } fills = false; if(shift_key_flag) { if(tx->xmt_tosend().size() && !tx->unproto()) fills = true; } if((fills && shift_key_flag) || !shift_key_flag) { tx->xmt_modem(thread->modem.c_str()); if (tx->xmt_buffer().empty()) return run_in_thread_destroy(thread, 3, &in_use); if(num == (count - 1)) temp = tx->tx_string(terminator); else temp = tx->tx_string(null_string); autosend.append(temp); } delete tx; } transfer(autosend); float oh = 0; tx_time = seconds_from_string(thread->modem.c_str(), autosend, &oh); tx_time += oh; tx_time_g = tx_time; wait_for_rx((int) tx_time); in_use = false; return run_in_thread_destroy(thread, 3, &in_use); } /** ******************************************************** * ***********************************************************/ void turn_rsid_on() { // Turn on RX/TX RSIDs transfer("ONON"); using_rsid = true; MilliSleep(1000); } /** ******************************************************** * ***********************************************************/ void turn_rsid_off() { // Turn on RX/TX RSIDs transfer("OFFOFF"); using_rsid = false; MilliSleep(1000); } /** ******************************************************** * ***********************************************************/ void * transmit_serial_relay(void *ptr) { float tx_time = 0; RELAY_DATA *relay_data = (RELAY_DATA *) 0; static bool in_use = false; TX_FLDIGI_THREAD *t_ptr = (TX_FLDIGI_THREAD *) ptr; void * ret = 0; cAmp *tx = 0; std::string autosend = ""; std::string send_to = ""; std::string temp = ""; std::string temp2 = ""; if(in_use) { return run_in_thread_destroy(t_ptr, 3, 0); } in_use = true; transmitting = true; { static char *msg = (char *) CANX_LABEL; Fl::awake(set_relay_button_label, (void *) msg); } if(!ptr) return ptr; // This should not happen. relay_data = (RELAY_DATA *) t_ptr->data; if(!relay_data) return run_in_thread_destroy(t_ptr, 3, &in_use); { static char *msg = (char *) CANX_LABEL; Fl::awake(set_relay_button_label, (void *) msg); } if (progStatus.fldigi_xmt_mode_change) send_new_modem(cbo_modes->value()); temp.clear(); autosend.clear(); send_to.clear(); active_data_io = true; tx = relay_data->amp; if(!tx) { active_data_io = false; return ptr; } autosend = relay_data->serial_data; int value = autosend.size(); if (!value) { active_data_io = false; return run_in_thread_destroy(t_ptr, 3, &in_use); } float oh = 0; tx_time = seconds_from_string(cbo_modes->value(), autosend, &oh); tx_time += oh; tx_time_g = tx_time; transfer(autosend); wait_for_rx((int) tx_time); ret = run_in_thread_destroy(t_ptr, 3, &in_use); return ret; } /** ******************************************************** * ***********************************************************/ void * transmit_relay_interval(void * ptr) { transmitting = true; static bool in_use = false; if(in_use) { return run_in_thread_destroy((TX_FLDIGI_THREAD *) ptr, 3, 0); } in_use = true; { static char *msg = (char *) CANX_LABEL; Fl::awake(set_relay_button_label, (void *) msg); } cAmp *tx = (cAmp *)0; int vector_data_count = 0; int vector_header_count = 0; RELAY_DATA *relay_data = (RELAY_DATA *) 0; std::string send_to = ""; std::string tail; std::string temp; std::vector vector_data; std::vector vector_header_data; TX_FLDIGI_THREAD *thread_ptr = (TX_FLDIGI_THREAD *)ptr; pthread_mutex_lock(&thread_ptr->mutex); thread_ptr->thread_running = 1; thread_ptr->exit_thread = 0; pthread_mutex_unlock(&thread_ptr->mutex); if(progStatus.use_header_modem) { turn_rsid_on(); } relay_data = (RELAY_DATA *) thread_ptr->data; if(!relay_data) return run_in_thread_destroy(thread_ptr, 3, &in_use); tx = relay_data->amp; if(!tx) return run_in_thread_destroy(thread_ptr, 3, &in_use); vector_header_data = relay_data->header; vector_header_count = vector_header_data.size(); vector_data = relay_data->data; vector_data_count = vector_data.size(); if((vector_header_count < 1) && (vector_data_count < 1)) { LOG_DEBUG("Empty xmt_vector_string"); return run_in_thread_destroy(thread_ptr, 3, &in_use); } if(check_block_tx_time(vector_header_data, vector_data, thread_ptr) == false) { return run_in_thread_destroy(thread_ptr, 3, &in_use); } send_to.clear(); send_to.append(" DE ").append(progStatus.my_call); for (size_t n = 0; n < send_to.length(); n++) send_to[n] = toupper(send_to[n]); tail.assign("\n").append(send_to).append(" K\n\n"); thread_ptr->mode = TX_SEGMENTED; LOG_DEBUG("vector_header_count = %d", vector_header_count); if(progStatus.use_header_modem) { if(vector_header_count > 0) { LOG_DEBUG("Header Modem Sent to FLDGI. (%s)", g_header_modem.c_str()); send_new_modem(thread_ptr->header_modem); if(!send_vector_to_fldigi(thread_ptr, thread_ptr->header_modem, tail, vector_header_data, thread_ptr->mode, tx)) { delete tx; return run_in_thread_destroy(thread_ptr, 3, &in_use); } } } wait_seconds(1, 100); // Data section if(progStatus.use_header_modem || progStatus.fldigi_xmt_mode_change) { send_new_modem(thread_ptr->modem); } vector_data = relay_data->data; vector_data_count = vector_data.size(); LOG_DEBUG("vector_data_count = %d", vector_data_count); if(vector_data_count) send_vector_to_fldigi(thread_ptr, thread_ptr->modem, tail, vector_data, thread_ptr->mode, tx); event_bail_flag = false; return run_in_thread_destroy(thread_ptr, 3, &in_use); } /** ******************************************************** * ***********************************************************/ void * transmit_interval(void * ptr) { static bool in_use = false; if(in_use) { return run_in_thread_destroy((TX_FLDIGI_THREAD *)ptr, 3, 0); } in_use = true; transmitting = true; Fl::awake(set_button_to_cancel, (void *)0); static int val = TX_ALL_BUTTON; Fl::awake(deactivate_button, (void *) &val); cAmp *tx = (cAmp *)0; TX_FLDIGI_THREAD *thread_ptr = (TX_FLDIGI_THREAD *)ptr; int count = 0; int vector_data_count = 0; int vector_header_count = 0; int limit = 0; int index = 0; bool fills = 0; std::vector vector_data; std::vector vector_header_data; std::string temp; std::string tail_k; std::string tail_bk; std::string tail; std::string send_to = ""; int n = 0; int value = 0; vector_data.clear(); vector_header_data.clear(); temp.clear(); tail.clear(); send_to.clear(); pthread_mutex_lock(&thread_ptr->mutex); thread_ptr->thread_running = 1; thread_ptr->exit_thread = 0; pthread_mutex_unlock(&thread_ptr->mutex); count = 0; if(thread_ptr->que) { index = 0; limit = tx_amp.size(); } else { n = tx_queue->value(); if (!n) return run_in_thread_destroy(thread_ptr, 3, &in_use); index = n - 1; limit = 1; } if(progStatus.use_header_modem) { turn_rsid_on(); } event_bail_flag = false; tx = 0; do { if(transmit_stop) { if(tx) delete tx; return run_in_thread_destroy(thread_ptr, 3, &in_use); } tx = tx_amp.index2amp(index + 1); if(tx) tx = new cAmp(tx); // Operate on a copy of if(!tx) return run_in_thread_destroy(thread_ptr, 3, &in_use); Fl::awake(show_current_selected_file, (void *)&index); send_to = tx->callto(); if (send_to.empty()) send_to.assign("QST"); send_to.append(" DE ").append(progStatus.my_call); for (size_t n = 0; n < send_to.length(); n++) send_to[n] = toupper(send_to[n]); tail_bk.clear(); tail_bk.assign("\n").append(send_to).append(" BK\n\n"); tail_k.clear(); tail_k.assign("\n").append(send_to).append(" K\n\n"); value = tx->xmt_buffer().size(); if (!value) { LOG_DEBUG("Empty xmt_buffer"); delete tx; return run_in_thread_destroy(thread_ptr, 3, &in_use); } temp.assign(tx->xmt_buffer()); compress_maybe(temp, tx->tx_base_conv_index(), (tx->compress() || tx->forced_compress())); bool data_repeat_inhibit = true; if(!tx->xmt_vector_string(progStatus.use_header_modem, progStatus.enable_unproto_markers, data_repeat_inhibit)) { LOG_DEBUG("Empty xmt_vector_string"); delete tx; return run_in_thread_destroy(thread_ptr, 3, &in_use); } if(check_block_tx_time(tx->xmt_vector_header(), tx->xmt_vector_data(), thread_ptr) == false) { delete tx; return run_in_thread_destroy(thread_ptr, 3, &in_use); } fills = false; if((progStatus.disable_header_modem_on_block_fills && tx->preamble_detected() == false) || shift_key_flag) { if(thread_ptr->que) { if(tx->xmt_tosend().size() && !tx->unproto()) fills = true; } else { char *cPtr = (char *) txt_tx_selected_blocks->value(); if(cPtr) { int _limit = 0; while(*cPtr) { if(isdigit(*cPtr)) { fills = true; break; } cPtr++; if(_limit++ > 16) break; } } } } if((fills && shift_key_flag) || !shift_key_flag) { if(count > 0 && !transmit_stop) { if(progStatus.use_txrx_interval) wait_seconds(thread_ptr->rx_interval_time, 100); else wait_seconds(1, 100); } if(transmit_stop) { delete tx; return run_in_thread_destroy(thread_ptr, 3, &in_use); } vector_data = tx->xmt_vector_data(); vector_data_count = vector_data.size(); // Header section vector_header_data = tx->xmt_vector_header(); vector_header_count = vector_header_data.size(); LOG_DEBUG("vector_header_count = %d", vector_header_count); int repeat_count = 0; int no_of_repeats = progStatus.repeatNN; for(repeat_count = 0; repeat_count < no_of_repeats; repeat_count++) { if(transmit_stop) { delete tx; return run_in_thread_destroy(thread_ptr, 3, &in_use); } if(repeat_count > 0) { if(progStatus.use_txrx_interval) wait_seconds(thread_ptr->rx_interval_time, 100); else wait_seconds(1, 100); } int headerm = progStatus.use_header_modem; if(headerm && (tx->unproto() == false)) { if(vector_header_count > 0) { LOG_DEBUG("Header Modem Sent to FLDGI. (%s)", g_header_modem.c_str()); send_new_modem(thread_ptr->header_modem); if(!send_vector_to_fldigi(thread_ptr, thread_ptr->header_modem, tail_bk, vector_header_data, thread_ptr->mode, tx)) { delete tx; return run_in_thread_destroy(thread_ptr, 3, &in_use); } } } if(vector_header_count > 0) { if(thread_ptr->mode == TX_SEGMENTED) { if(progStatus.use_txrx_interval) wait_seconds(thread_ptr->rx_interval_time, 100); else wait_seconds(1, 100); } } // Data section if(progStatus.use_header_modem || progStatus.fldigi_xmt_mode_change) { send_new_modem(thread_ptr->modem); } if(transmit_stop) { delete tx; return run_in_thread_destroy(thread_ptr, 3, &in_use); } LOG_DEBUG("vector_data_count = %d", vector_data_count); tail.assign(tail_bk); if((count >= (limit - 1)) && !continuous_exception) if(repeat_count >= (no_of_repeats - 1)) tail.assign(tail_k); if(vector_data_count) send_vector_to_fldigi(thread_ptr, thread_ptr->modem, tail, vector_data, thread_ptr->mode, tx); } } if(event_bail_flag && thread_ptr->event_driven) break; if(tx) { delete tx; tx = 0; } index++; count++; } while(count < limit); event_bail_flag = false; Fl::awake(show_current_selected_file, (void *)&last_selected_tx_file); if(tx) { delete tx; tx = 0; } return run_in_thread_destroy(thread_ptr, 3, &in_use); } /** ******************************************************** * ***********************************************************/ bool send_vector_to_fldigi(TX_FLDIGI_THREAD *thread, std::string modem, std::string &tail, std::vector vector_data, int mode, cAmp *tx) { std::string temp; std::string send; std::string extras; int count = 0; int index = 0; float data_time_seconds = 0; float transfer_segment_time = 0; float transfer_limit_time = 0; float overhead = 0; float length = 0; float next_length = 0; float wait_factor = 3.0; float extras_time = 0.0; std::string send_to = tx->callto(); if(transmit_stop) return false; send.clear(); temp.clear(); extras.assign("\n\n\n\n "); if(mode == TX_SEGMENTED) { extras.append("BK"); } else { extras.append("ID"); } extras_time = seconds_from_string(modem, extras, NULL); if(tx->amp_type() == RX_AMP) send_to.clear(); else if (send_to.empty()) send_to.assign("QST"); send_to.append(" DE ").append(progStatus.my_call); for (size_t n = 0; n < send_to.length(); n++) send_to[n] = toupper(send_to[n]); temp.clear(); count = vector_data.size(); for(index = 0; index < count; index++) { temp.append(vector_data[index]); } data_time_seconds = seconds_from_string(modem, temp, &overhead); data_time_seconds += overhead; tx_time_g = data_time_seconds; if(data_time_seconds <= 0.0) return false; if(mode == TX_SEGMENTED) { transfer_limit_time = thread->tx_interval_time; if (transfer_limit_time < 1) return false; } else transfer_limit_time = (float) ID_TIME_SECONDS; length = seconds_from_string(modem, send, &overhead); length = overhead; length += extras_time; length += 0.5; if(data_time_seconds > transfer_limit_time) { temp.assign("\n"); for(index = 0; index < count; index++) { if(transmit_stop) return false; length += seconds_from_string(modem, vector_data[index], &overhead); temp.append(vector_data[index]); if(index < (count - 1)) { next_length = seconds_from_string(modem, vector_data[index + 1], &overhead); } else next_length = 0; transfer_segment_time = length + next_length; if (round(transfer_segment_time) >= transfer_limit_time) { tx_time_g = length; send.append(temp).append("\n").append(send_to); if(mode == TX_SEGMENTED) { send.append(" BK"); } else { send.append(" ID"); } send.append("\n"); transfer(send); if(mode == TX_SEGMENTED) { if (!wait_for_rx(length, wait_factor)) return false; if(progStatus.use_txrx_interval) wait_seconds(thread->rx_interval_time, 100); else wait_seconds(1, 100); } send.assign("\n"); temp.clear(); length = overhead; length += extras_time; length += 0.5; } } if(temp.size()) send.append(temp); if(tail.size()) send.append(tail); if(send.size()) { tx_time_g = seconds_from_string(modem, send, &overhead); tx_time_g += overhead; transfer(send); if (!wait_for_rx(transfer_segment_time, wait_factor)) return false; } } else { send.append("\n").append(temp); if(tail.size()) send.append(tail); transfer(send); if (!wait_for_rx(data_time_seconds, wait_factor)) return false; } if(progStatus.use_header_modem) { if(progStatus.hamcast_mode_cycle && transmit_queue && g_event_driven) { std::string m; switch(modem_rotation_index) { case 0: send_new_modem(cbo_hamcast_mode_selection_1->value()); break; case 1: send_new_modem(cbo_hamcast_mode_selection_2->value()); break; case 2: send_new_modem(cbo_hamcast_mode_selection_3->value()); break; case 3: send_new_modem(cbo_hamcast_mode_selection_4->value()); break; default: send_new_modem(cbo_modes->value()); } } else { send_new_modem(cbo_modes->value()); // Change to primary modem } } return true; } /** ******************************************************** * ***********************************************************/ bool check_block_tx_time(std::vector &header, std::vector &data, TX_FLDIGI_THREAD *thread_ptr) { int index = 0; int count = 0; float max_tx_time = 0; float interval_time = (float) cnt_tx_interval_mins->value(); float tx_time = 0; bool return_value = true; char str_buffer[THREAD_ERR_MSG_SIZE]; std::string modem; count = header.size(); modem.clear(); if(progStatus.use_header_modem) modem.assign(cbo_header_modes->value()); else modem.assign(cbo_modes->value()); for(index = 0; index < count; index++) { tx_time = minutes_from_string(modem, header[index], (float *)0); if(tx_time > max_tx_time) { max_tx_time = tx_time; } } if(max_tx_time > interval_time) { memset(str_buffer, 0, sizeof(str_buffer)); snprintf(str_buffer, sizeof(str_buffer), "Header Section Modem: %s\nRequired Block Tx time: %3.1f Mins.\nUse Faster Mode, Increase Interval Time,\nor decrease block size.", \ modem.c_str(), max_tx_time); LOG_INFO("%s", str_buffer); return_value = false; if(thread_ptr) { memset(&thread_ptr->err_msg[0], 0, THREAD_ERR_MSG_SIZE); strcpy(&thread_ptr->err_msg[0], str_buffer); thread_ptr->err_flag = true; } } count = data.size(); modem.clear(); modem.assign(cbo_modes->value()); max_tx_time = 0; for(index = 0; index < count; index++) { tx_time = minutes_from_string(modem, data[index], (float *)0); if(tx_time > max_tx_time) { max_tx_time = tx_time; } } if(max_tx_time > interval_time) { memset(str_buffer, 0, sizeof(str_buffer)); snprintf(str_buffer, sizeof(str_buffer), "Data Section Modem: %s\nRequired Block Tx time: %3.1f Mins.\nUse Faster Mode, Increase Interval Time,\nor decrease block size.", \ modem.c_str(), max_tx_time); LOG_INFO("%s", str_buffer); return_value = false; if(thread_ptr) { memset(&thread_ptr->err_msg[0], 0, THREAD_ERR_MSG_SIZE); strcpy(&thread_ptr->err_msg[0], str_buffer); thread_ptr->err_flag = true; } } return return_value; } #define EXTRA_TIME 30 /** ******************************************************** * ***********************************************************/ bool wait_for_rx(int max_wait_seconds, float factor) { int wait_time_in_seconds = 0; if(max_wait_seconds < 1) return false; wait_time_in_seconds = (int) (((float) max_wait_seconds) * factor); wait_time_in_seconds += EXTRA_TIME; for(int i = 0; i < 2; i++) { if(transmit_stop) return false; wait_seconds(1, 500); if((get_trx_state() == "TX")) break; } for(int i = 0; i < wait_time_in_seconds; i++) { if(transmit_stop) return false; wait_milliseconds(1000, 250); if((get_trx_state() == "RX")) { return true; } } return false; } //#define LOG_TIME_WAIT #undef LOG_TIME_WAIT /** ******************************************************** * ***********************************************************/ static void wait_seconds(int seconds, int millisecond_increments) { struct timeval tp; double end_time = 0.0; double current_time = 0.0; if(seconds < 1 || transmit_stop) return; if((seconds * 1000) < millisecond_increments) millisecond_increments = (seconds * 1000) >> 1; if(millisecond_increments < 1) millisecond_increments = 1; gettimeofday(&tp, NULL); end_time = (tp.tv_sec + seconds) + (tp.tv_usec * 0.000001); do { if(transmit_stop) break; MilliSleep(millisecond_increments); gettimeofday(&tp, NULL); current_time = (tp.tv_sec) + (tp.tv_usec * 0.000001); } while(current_time < end_time); #ifdef LOG_TIME_WAIT gettimeofday(&tp, NULL); current_time = (tp.tv_sec) + (tp.tv_usec * 0.000001); LOG_DEBUG("SEC: %f DELAY", current_time - start_time); #endif } /** ******************************************************** * ***********************************************************/ static void wait_milliseconds(int milliseconds, int millisecond_increments) { struct timeval tp; double end_time = 0.0; double current_time = 0.0; if(milliseconds < 1 || transmit_stop) return; if(milliseconds < millisecond_increments) millisecond_increments = milliseconds >> 1; if(millisecond_increments < 1) millisecond_increments = 1; gettimeofday(&tp, NULL); end_time = (tp.tv_sec) + (tp.tv_usec * 0.000001) + (milliseconds * 0.001); do { if(transmit_stop) break; MilliSleep(millisecond_increments); gettimeofday(&tp, NULL); current_time = (tp.tv_sec) + (tp.tv_usec * 0.000001); } while(current_time < end_time); #ifdef LOG_TIME_WAIT gettimeofday(&tp, NULL); current_time = (tp.tv_sec) + (tp.tv_usec * 0.000001); LOG_DEBUG("SEC: %f DELAY", current_time - start_time); #endif } /** ******************************************************** * ***********************************************************/ TX_FLDIGI_THREAD * run_in_thread(void *(*func)(void *), int mode, bool queued, bool event_driven, RELAY_DATA *relay_data) { TX_FLDIGI_THREAD *tx_thread = (TX_FLDIGI_THREAD *)0; int count = 0; size_t index_size = 0; if(transmitting) return tx_thread; tx_thread = new TX_FLDIGI_THREAD; if(tx_thread) { tx_thread->err_flag = false; tx_thread->mode = mode; tx_thread->que = queued; tx_thread->event_driven = event_driven; tx_thread->rx_interval_time = cnt_rx_interval_secs->value(); tx_thread->tx_interval_time = floor(cnt_tx_interval_mins->value() * 60); tx_thread->data = (void *) relay_data; index_size = bc_modems.size(); if(relay_data) tx_thread->amp_type = RX_AMP; else tx_thread->amp_type = TX_AMP; if(progStatus.hamcast_mode_cycle && g_event_driven && queued) { if(modem_rotation_index >= index_size) modem_rotation_index = 0; g_modem.assign(bc_modems[modem_rotation_index]); //LOG_DEBUG("%s %d", g_modem.c_str(), modem_rotation_index); tx_thread->modem.assign(g_modem); modem_rotation_index++; modem_rotation_index &= 0x3; } else { g_modem.assign(cbo_modes->value()); tx_thread->modem.assign(g_modem); } tx_thread->header_modem.assign(g_header_modem); if(!pthread_mutex_init(&tx_thread->mutex, NULL)) { count++; if(!pthread_cond_init(&tx_thread->condition, NULL)) { count++; if(!pthread_attr_init(&tx_thread->attr)) { count++; if(!pthread_attr_setdetachstate(&tx_thread->attr, PTHREAD_CREATE_DETACHED)) { count++; if(!pthread_create(&tx_thread->thread, &tx_thread->attr, func, (void *) tx_thread)) { tx_thread_running_count++; return tx_thread; } } } } } run_in_thread_destroy(tx_thread, count, 0); LOG_ERROR("%s", "Thread creation error: run_in_thread()"); } return (TX_FLDIGI_THREAD *) 0; } /** ******************************************************** * ***********************************************************/ void * run_in_thread_destroy(TX_FLDIGI_THREAD *tx_thread, int level, bool *in_use_flag) { if(in_use_flag) *in_use_flag = false; if(!tx_thread) return 0; transmitting = false; transmit_queue = false; if(transmit_stop) Fl::awake(abort_tx_from_main, (void *)0); if(tx_thread_running_count > 0) tx_thread_running_count--; { static int value = TX_BUTTON; Fl::awake(deactivate_button, (void *) &value); } pthread_mutex_lock(&tx_thread->mutex); tx_thread->thread_running = 0; pthread_mutex_unlock(&tx_thread->mutex); if(level > 3 || level < 1) level = 3; switch (level) { case 3: pthread_attr_destroy(&tx_thread->attr); case 2: pthread_cond_destroy(&tx_thread->condition); case 1: pthread_mutex_destroy(&tx_thread->mutex); } if(tx_thread->err_flag) { char *msg = (char *) malloc(THREAD_ERR_MSG_SIZE); if(msg) { memset(msg, 0, THREAD_ERR_MSG_SIZE); strcpy(msg, tx_thread->err_msg); Fl::awake(thread_error_msg, (void *)msg); } } delete tx_thread; Fl::awake(set_relay_button_label, (void *)0); Fl::awake(set_button_to_xmit, (void *)0); Fl::awake(clear_missing, (void *)0); { static int value = TX_BUTTON; Fl::awake(activate_button, (void *)&value); static int value2 = TX_ALL_BUTTON; Fl::awake(activate_button, (void *)&value2); } wait_for_rx(5); transmitting = false; transmit_queue = false; return 0; } flamp-2.2.12/src/utils/base128.cxx0000664000175000017500000001452514507650001013445 00000000000000// ===================================================================== // // base128 and base256 text encoding // // Author: Dave Freese, W1HKJ // Copyright: 2010 // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ===================================================================== #include #include "base128.h" //---------------------------------------------------------------------- // base 128 class //---------------------------------------------------------------------- void base128::init() { iolen = 0; iocp = 0; ateof = false; linelength = 0; } /** ******************************************************** * /brief FLDIGI uses some control codes to alter the program state * several digital modems suppress some control and high bit set * characters this function substitutes a two character * sequence for the offending characters ***********************************************************/ void base128::escape(std::string &in, bool encode) { std::string out; if (encode) { for( size_t i = 0; i < in.length(); i++) { switch ((in[i] & 0xFF)) { case ':' : out.append("::"); break; case 0x00 : out.append(":0"); break; case 0x01 : out.append(":1"); break; // mt63 case 0x02 : out.append(":2"); break; case 0x03 : out.append(":3"); break; case 0x04 : out.append(":4"); break; case 0x05 : out.append(":5"); break; case 0x06 : out.append(":6"); break; case 0x07 : out.append(":7"); break; case 0x08 : out.append(":8"); break; case 0x09 : out.append(":9"); break; case '\n' : out.append(":A"); break; case '\r' : out.append(":B"); break; case '^' : out.append(":C"); break; case 0x7F : out.append(":D"); break; case 0xFF : out.append(":E"); break; // mt63 default: out += in[i]; } } } else { unsigned char ch = 0; for (size_t i = 0; i < in.length(); i++) { ch = in[i] & 0xFF; if (ch == ':') { i++; ch = in[i] & 0xFF; switch (ch) { case ':' : out += ':'; break; case '0' : out += ' '; out[out.length() - 1] = 0x00; break; case '1' : out += 0x01; break; case '2' : out += 0x02; break; case '3' : out += 0x03; break; case '4' : out += 0x04; break; case '5' : out += 0x05; break; case '6' : out += 0x06; break; case '7' : out += 0x07; break; case '8' : out += 0x08; break; case '9' : out += 0x09; break; case 'A' : out += '\n'; break; case 'B' : out += '\r'; break; case 'C' : out += '^'; break; case 'D' : out += 0x7F; break; case 'E' : out += 0xFF; break; } } else out += ch; } } in = out; } /** ******************************************************** * ***********************************************************/ void base128::addlf(std::string &in) { std::string out; int len = 0; for (size_t n = 0; n < in.length(); n++) { if (len < LINELEN) {out += in[n]; len++;} else {out += '\n'; out += in[n]; len = 0;} } in.assign(out); } /** ******************************************************** * ***********************************************************/ void base128::remlf(std::string &in) { std::string out; for (size_t n = 0; n < in.length(); n++) { if (in[n] != '\n') out += in[n]; } in.assign(out); } /** ******************************************************** * ***********************************************************/ std::string base128::encode(std::string &in) { size_t n; t_byte igroup[7], ogroup[8]; char insize[20]; snprintf(insize, sizeof(insize), "%d\n", (int)in.length()); output.assign(insize); iocp = 0; ateof = false; iolen = in.length(); std::string temp; while (!ateof) { igroup[0] = igroup[1] = igroup[2] = igroup[3] = igroup[4] = igroup[5] = igroup[6] = 0; for (n = 0; n < 7; n++) { if (iocp == iolen) { ateof = true; break; } igroup[n] = (t_byte)in[iocp]; iocp++; } if (n > 0) { ogroup[0] = (igroup[0] >> 1) & 0x7F; ogroup[1] = ((igroup[0] << 6) & 0x40) | ((igroup[1] >> 2) & 0x3F); ogroup[2] = ((igroup[1] << 5) & 0x60) | ((igroup[2] >> 3) & 0x1F); ogroup[3] = ((igroup[2] << 4) & 0x70) | ((igroup[3] >> 4) & 0x0F); ogroup[4] = ((igroup[3] << 3) & 0x78) | ((igroup[4] >> 5) & 0x07); ogroup[5] = ((igroup[4] << 2) & 0x7C) | ((igroup[5] >> 6) & 0x03); ogroup[6] = ((igroup[5] << 1) & 0x7E) | ((igroup[6] >> 7) & 0x01); ogroup[7] = (igroup[6] & 0x7F); for (int i = 0; i < 8; i++) temp += (t_byte)ogroup[i]; } } escape (temp); output.append(temp); return output; } /** ******************************************************** * ***********************************************************/ std::string base128::decode(std::string &in, bool &decode_error) { int i, itemp; size_t nbr = 0; std::string temp = in; size_t p = temp.find("\n"); decode_error = false; if (p == std::string::npos) { decode_error = true; return "ERROR: b128 missing character count"; } sscanf(temp.substr(0, p).c_str(), "%d", &itemp); nbr = itemp; temp.erase(0, p+1); escape(temp, false); output.clear(); if (temp.length() % 8) { decode_error = true; return "ERROR: b128 file length error.\n"; } iocp = 0; iolen = temp.length(); t_byte b[8], o[7]; int k = 0; while (iocp < nbr) { for (i = 0; i < 7; i++) o[i] = 0; for (i = 0; i < 8; i++) b[i] = temp[k + i]; k += 8; o[0] = ((b[0] << 1) & 0xFE) | ((b[1] >> 6) & 0x01); o[1] = ((b[1] << 2) & 0xFC) | ((b[2] >> 5) & 0x03); o[2] = ((b[2] << 3) & 0xF8) | ((b[3] >> 4) & 0x07); o[3] = ((b[3] << 4) & 0xF0) | ((b[4] >> 3) & 0x0F); o[4] = ((b[4] << 5) & 0xE0) | ((b[5] >> 2) & 0x1F); o[5] = ((b[5] << 6) & 0xC0) | ((b[6] >> 1) & 0x3F); o[6] = ((b[6] << 7) & 0x80) | (b[7] & 0x7F); for (i = 0; i < 7; i++) { if (iocp++ < nbr) output += o[i]; } } return output; } flamp-2.2.12/src/utils/global_amp.cxx0000664000175000017500000001501314605333064014374 00000000000000//====================================================================== // global_amp.cxx // // Author(s): // Robert Stiles, KK5VD, Copyright (C) 2014 // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ===================================================================== #include #include #include "config.h" #include "amp.h" #include "global_amp.h" #include "status.h" /** ******************************************************** * ***********************************************************/ cAmpGlobal::cAmpGlobal() { amp = 0; amp_array.clear(); locked = false; pthread_mutex_init(&mutex_amp, NULL); } /** ******************************************************** * ***********************************************************/ cAmpGlobal::~cAmpGlobal() { if(locked) unlock(); pthread_mutex_destroy(&mutex_amp); } /** ******************************************************** * ***********************************************************/ cAmp * cAmpGlobal::get_amp(void) { lock(); cAmp *ret = amp; unlock(); return ret; } /** ******************************************************** * ***********************************************************/ int cAmpGlobal::get_index(void) { lock(); int index = 0; int count = amp_array.size(); int ret = 0; for(index = 0; index < count; index++) { if(amp == amp_array[index]) ret = index + 1; } unlock(); return ret; } /** ******************************************************** * ***********************************************************/ bool cAmpGlobal::set(int pos) { lock(); int count = amp_array.size(); int ret = false; if((pos > count) || (pos < 1)) amp = (cAmp *)0; else amp = amp_array[pos - 1]; if(amp) ret = true; unlock(); return ret; } /** ******************************************************** * ***********************************************************/ bool cAmpGlobal::set(cAmp *src_amp) { lock(); bool ret = false; amp = src_amp; if(amp) ret = true; unlock(); return ret; } /** ******************************************************** * ***********************************************************/ int cAmpGlobal::amp2index(cAmp *src_amp) { lock(); int index = 0; int count = amp_array.size(); int ret = 0; for(index = 0; index < count; index++) { if(src_amp == amp_array[index]) ret = index + 1; } unlock(); return ret; } /** ******************************************************** * ***********************************************************/ cAmp *cAmpGlobal::index2amp(int pos) { lock(); cAmp *tmp = (cAmp *)0; int count = amp_array.size(); if(pos > 0 && pos <= count) { pos--; tmp = amp_array[pos]; } unlock(); return tmp; } /** ******************************************************** * ***********************************************************/ bool cAmpGlobal::add(cAmp *nu_amp) { lock(); bool ret = false; if(nu_amp) { amp_array.push_back(nu_amp); ret = true; } unlock(); return ret; } /** ******************************************************** * ***********************************************************/ bool cAmpGlobal::remove(cAmp *src_amp) { lock(); bool ret = false; if(src_amp) { int index = 0; int count = amp_array.size(); for(index = 0; index < count; index++) { if(src_amp == amp_array[index]) { amp_array[index] = 0; amp_array.erase(amp_array.begin() + index); if(src_amp == amp) amp = 0; //if(src_amp) delete src_amp; ret = true; } } } unlock(); return ret; } /** ******************************************************** * ***********************************************************/ bool cAmpGlobal::remove(int pos) { lock(); int count = amp_array.size(); bool ret = false; cAmp *tmp = (cAmp *)0; if(pos > 0 && pos <= count) { pos--; tmp = amp_array[pos]; amp_array[pos] = 0; amp_array.erase(amp_array.begin() + pos); if(amp == tmp) amp = 0; if(tmp) delete tmp; ret = true; } unlock(); return ret; } /** ******************************************************** * ***********************************************************/ void cAmpGlobal::free(cAmp *tmp) { lock(); if(amp) delete amp; unlock(); } extern std::string flamp_relay_dir; /** ******************************************************** * ***********************************************************/ void cAmpGlobal::relay_write_save(cAmp *amp) { std::string relay_data; if(!amp) return; if(amp->amp_type() != RX_AMP) return; std::string file_name; std::string path; std::string path_and_filename; std::string temp; temp = amp->get_rx_fname(); if(temp.size() > 0) file_name.assign(amp->rx_hash()).append("_").append(temp); else file_name.assign(amp->rx_hash()).append("_unassigned"); path.assign(flamp_relay_dir); path_and_filename.assign(path).append(file_name); std::ofstream file(path_and_filename.c_str()); temp.clear(); if (file.good()) { relay_data = amp->tx_relay_string(progStatus.my_call, temp, true); file << relay_data; } file.close(); } /** ******************************************************** * ***********************************************************/ void cAmpGlobal::save_all_relay(void) { lock(); cAmp *amp = 0; int size = amp_array.size(); for (int i = 0; i < size; i++) { amp = amp_array[i]; if(amp) relay_write_save(amp); } unlock(); } /** ******************************************************** * ***********************************************************/ void cAmpGlobal::free_all(void) { lock(); cAmp *amp = 0; int size = amp_array.size(); for (int i = 0; i < size; i++) { amp = amp_array[i]; if(amp) { if(progStatus.relay_retain_data) relay_write_save(amp); delete amp; } } amp_array.clear(); unlock(); } /** ******************************************************** * ***********************************************************/ size_t cAmpGlobal::size(void) { lock(); size_t count = (size_t) amp_array.size(); unlock(); return count; } flamp-2.2.12/src/utils/xml_io.cxx0000664000175000017500000004115114605333401013563 00000000000000//====================================================================== // flamp xml_io.cxx // // copyright 2012, W1HKJ // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // xmlrpc interface to fldigi // // fetches current list of modem types from fldigi // fetches current modem in use in fldigi // sets fldigi modem-by-name when required // //====================================================================== #include #include #include #include #include #include #include #include "flamp.h" #include "flamp_dialog.h" #include "dialogs.h" #include "xml_io.h" #include "XmlRpc.h" #include "status.h" #include "debug.h" #include "threads.h" using XmlRpc::XmlRpcValue; double xmlrpc_timeout = INIT_XMLRPC_TIMEOUT; // these are get only static const char* modem_get_name = "modem.get_name"; static const char* modem_get_io_names = "modem.get_io_names"; // these are set only static const char* modem_set_by_name = "modem.set_by_name"; static const char* text_clear_tx = "text.clear_tx"; static const char* text_add_tx = "text.add_tx"; static const char* text_clear_rx = "text.clear_rx"; static const char* fldigi_get_version = "fldigi.version"; static const char* main_get_trx_state = "main.get_trx_state"; static const char* main_tx = "main.tx"; static const char* main_tune = "main.tune"; static const char* main_rx = "main.rx"; static const char* main_abort = "main.abort"; static const char* main_get_rsid = "main.get_rsid"; static const char* main_set_rsid = "main.set_rsid"; static const char* main_get_char_rates = "main.get_char_rates"; static const char* main_get_tx_timing = "main.get_tx_timing"; static const char* main_get_char_timing = "main.get_char_timing"; static const char* io_in_use = "io.in_use"; static const char* io_enable_arq = "io.enable_arq"; static const char* io_enable_kiss = "io.enable_kiss"; static XmlRpc::XmlRpcClient* client = 0; #define XMLRPC_UPDATE_INTERVAL 200 #define XMLRPC_UPDATE_AFTER_WRITE 1000 #define XMLRPC_RETRY_INTERVAL 2000 extern int errno; size_t fldigi_state = FLDIGI_OFFLINE; static bool modem_list_received = false; //===================================================================== // socket ops //===================================================================== int update_interval = XMLRPC_UPDATE_INTERVAL; std::string xmlcall = ""; void open_xmlrpc() { guard_lock xmlrpc_client(&mutex_xmlrpc); std::string addr; std::string port; // Check if address/port passed via command line if(progStatus.user_xmlrpc_addr.size()) addr.assign(progStatus.user_xmlrpc_addr); else addr.assign(progStatus.xmlrpc_addr); if(progStatus.user_xmlrpc_port.size()) port.assign(progStatus.user_xmlrpc_port); else port.assign(progStatus.xmlrpc_port); int server_port = atoi(port.c_str()); client = new XmlRpc::XmlRpcClient( addr.c_str(), server_port ); // XmlRpc::setVerbosity(5); // 0...5 } void close_xmlrpc() { guard_lock xmlrpc_client(&mutex_xmlrpc); delete client; client = NULL; } static inline void execute(const char* name, const XmlRpcValue& param, XmlRpcValue& result) { if (client) { if (!client->execute(name, param, result, xmlrpc_timeout)) { xmlrpc_errno = errno; if(client->isFault()) LOG_DEBUG("Server fault response!"); throw XmlRpc::XmlRpcException(name); } } xmlrpc_errno = errno; } void set_xmlrpc_timeout(double value) { guard_lock xmlrpc_client(&mutex_xmlrpc); if(value < DEFAULT_XMLRPC_TIMEOUT) return; xmlrpc_timeout = value; } void set_xmlrpc_timeout_default(void) { xmlrpc_timeout = DEFAULT_XMLRPC_TIMEOUT; } // -------------------------------------------------------------------- // send functions // -------------------------------------------------------------------- //extern std::string g_modem; void send_new_modem(std::string modem) { guard_lock xmlrpc_client(&mutex_xmlrpc); try { XmlRpcValue mode(modem), res; execute(modem_set_by_name, mode, res); } catch (const XmlRpc::XmlRpcException& e) { LOG_ERROR("%s xmlrpc_errno = %d", e.getMessage().c_str(), xmlrpc_errno); } update_interval = XMLRPC_UPDATE_AFTER_WRITE; // Give FLDIGI time to switch modems. MilliSleep(150); } /** ******************************************************** * ***********************************************************/ void send_clear_tx(void) { guard_lock xmlrpc_client(&mutex_xmlrpc); try { XmlRpcValue res; execute(text_clear_tx, 0, res); } catch (const XmlRpc::XmlRpcException& e) { LOG_ERROR("%s xmlrpc_errno = %d", e.getMessage().c_str(), xmlrpc_errno); } update_interval = XMLRPC_UPDATE_AFTER_WRITE; } /** ******************************************************** * ***********************************************************/ void send_clear_rx(void) { guard_lock xmlrpc_client(&mutex_xmlrpc); try { XmlRpcValue res; execute(text_clear_rx, 0, res); } catch (const XmlRpc::XmlRpcException& e) { LOG_ERROR("%s xmlrpc_errno = %d", e.getMessage().c_str(), xmlrpc_errno); } update_interval = XMLRPC_UPDATE_AFTER_WRITE; } /** ******************************************************** * ***********************************************************/ void send_report(std::string report) { guard_lock xmlrpc_client(&mutex_xmlrpc); try { XmlRpcValue res, xml_str = report; execute(text_clear_tx, 0, res); execute(text_add_tx, xml_str, res); } catch (const XmlRpc::XmlRpcException& e) { LOG_ERROR("%s xmlrpc_errno = %d", e.getMessage().c_str(), xmlrpc_errno); } update_interval = XMLRPC_UPDATE_AFTER_WRITE; } /** ******************************************************** * ***********************************************************/ void send_tx(void) { guard_lock xmlrpc_client(&mutex_xmlrpc); try { XmlRpcValue res; execute(main_tx, 0, res); } catch (const XmlRpc::XmlRpcException& e) { LOG_ERROR("%s xmlrpc_errno = %d", e.getMessage().c_str(), xmlrpc_errno); } update_interval = XMLRPC_UPDATE_AFTER_WRITE; } /** ******************************************************** * ***********************************************************/ void send_rx(void) { guard_lock xmlrpc_client(&mutex_xmlrpc); try { XmlRpcValue res; execute(main_rx, 0, res); } catch (const XmlRpc::XmlRpcException& e) { LOG_ERROR("%s xmlrpc_errno = %d", e.getMessage().c_str(), xmlrpc_errno); } update_interval = XMLRPC_UPDATE_AFTER_WRITE; } /** ******************************************************** * ***********************************************************/ void set_rsid(void) { guard_lock xmlrpc_client(&mutex_xmlrpc); try { XmlRpcValue res; execute(main_set_rsid, 0, res); } catch (const XmlRpc::XmlRpcException& e) { LOG_ERROR("%s xmlrpc_errno = %d", e.getMessage().c_str(), xmlrpc_errno); } update_interval = XMLRPC_UPDATE_AFTER_WRITE; } /** ******************************************************** * ***********************************************************/ void send_abort(void) { guard_lock xmlrpc_client(&mutex_xmlrpc); try { XmlRpcValue res; execute(main_abort, 0, res); } catch (const XmlRpc::XmlRpcException& e) { LOG_ERROR("%s xmlrpc_errno = %d", e.getMessage().c_str(), xmlrpc_errno); } update_interval = XMLRPC_UPDATE_AFTER_WRITE; } /** ******************************************************** * ***********************************************************/ void send_tune(void) { guard_lock xmlrpc_client(&mutex_xmlrpc); try { XmlRpcValue res; execute(main_tune, 0, res); } catch (const XmlRpc::XmlRpcException& e) { LOG_ERROR("%s xmlrpc_errno = %d", e.getMessage().c_str(), xmlrpc_errno); } update_interval = XMLRPC_UPDATE_AFTER_WRITE; } /** ******************************************************** * ***********************************************************/ std::string get_tx_timing(std::string data) { XmlRpcValue status; XmlRpcValue xmlData((void *)data.c_str(), data.size()); static std::string response; guard_lock xmlrpc_client(&mutex_xmlrpc); try { execute(main_get_tx_timing, xmlData, status); std::string resp = status; response = resp; } catch (const XmlRpc::XmlRpcException& e) { LOG_ERROR("%s xmlrpc_errno = %d", e.getMessage().c_str(), xmlrpc_errno); } update_interval = XMLRPC_UPDATE_AFTER_WRITE; return response; } /** ******************************************************** * ***********************************************************/ std::string get_char_timing(int character) { guard_lock xmlrpc_client(&mutex_xmlrpc); XmlRpcValue status; static std::string response; char buff[20]; memset(buff, 0, sizeof(buff)); snprintf(buff, sizeof(buff) - 1, "%d", character); std::string data; data.assign(buff); XmlRpcValue xmlData((void *) data.c_str(), data.size()); try { execute(main_get_char_timing, xmlData, status); std::string resp = status; response = resp; } catch (const XmlRpc::XmlRpcException& e) { LOG_ERROR("%s xmlrpc_errno = %d", e.getMessage().c_str(), xmlrpc_errno); } update_interval = XMLRPC_UPDATE_AFTER_WRITE; return response; } /** ******************************************************** * ***********************************************************/ void enable_arq(void) { guard_lock xmlrpc_client(&mutex_xmlrpc); try { XmlRpcValue res; execute(io_enable_arq, 0, res); } catch (const XmlRpc::XmlRpcException& e) { LOG_ERROR("%s xmlrpc_errno = %d", e.getMessage().c_str(), xmlrpc_errno); } update_interval = XMLRPC_UPDATE_AFTER_WRITE; } void enable_kiss(void) { guard_lock xmlrpc_client(&mutex_xmlrpc); try { XmlRpcValue res; execute(io_enable_kiss, 0, res); } catch (const XmlRpc::XmlRpcException& e) { LOG_ERROR("%s xmlrpc_errno = %d", e.getMessage().c_str(), xmlrpc_errno); } update_interval = XMLRPC_UPDATE_AFTER_WRITE; } // -------------------------------------------------------------------- // receive functions // -------------------------------------------------------------------- /** ******************************************************** * ***********************************************************/ void set_offline_state(void) { modem_list_received = 0; fldigi_state = FLDIGI_OFFLINE; } /** ******************************************************** * fldigi_online() * returns either FLDIGI_OFFLINE or FLDIGI_ONLINE * depending on whether the get version query receives a * response from the target fldigi instance ***********************************************************/ int fldigi_online() { XmlRpcValue status; XmlRpcValue query; guard_lock lock(&mutex_xmlrpc); try { execute(fldigi_get_version, query, status); fldigi_state |= FLDIGI_XMLRPC_ONLINE; } catch (const XmlRpc::XmlRpcException& e) { LOG_ERROR("%s xmlrpc_errno = %d", e.getMessage().c_str(), xmlrpc_errno); set_offline_state(); } return fldigi_state; } /** ******************************************************** * ***********************************************************/ std::string get_io_mode(void) { XmlRpcValue status; XmlRpcValue query; static std::string response; guard_lock xmlrpc_client(&mutex_xmlrpc); try { execute(io_in_use, query, status); std::string resp = status; response = resp; fldigi_state |= FLDIGI_XMLRPC_ONLINE; } catch (const XmlRpc::XmlRpcException& e) { LOG_ERROR("%s xmlrpc_errno = %d", e.getMessage().c_str(), xmlrpc_errno); response = "NIL"; set_offline_state(); } xmlrpc_timeout = DEFAULT_XMLRPC_TIMEOUT; return response; } /** ******************************************************** * ***********************************************************/ static void set_combo(void *str) { std::string s = (char *)str; if(progStatus.use_header_modem != 0) return; if (s != cbo_modes->value() && valid_mode_check(s)) { cbo_modes->value(s.c_str()); progStatus.selected_mode = cbo_modes->index(); g_modem.assign(cbo_modes->value()); cbo_modes->do_callback(); } } /** ******************************************************** * ***********************************************************/ std::string get_rsid_state(void) { XmlRpcValue status; XmlRpcValue query; static std::string response; guard_lock xmlrpc_client(&mutex_xmlrpc); try { execute(main_get_rsid, query, status); std::string resp = status; response = resp; } catch (const XmlRpc::XmlRpcException& e) { LOG_ERROR("%s xmlrpc_errno = %d", e.getMessage().c_str(), xmlrpc_errno); } return response; } /** ******************************************************** * ***********************************************************/ void connected_to_fldigi(void *state) { if (state) { box_not_connected->hide(); box_connected->show(); } else { box_not_connected->show(); box_connected->hide(); } box_not_connected->redraw(); box_connected->redraw(); } /** ******************************************************** * ***********************************************************/ std::string get_trx_state() { XmlRpcValue status; XmlRpcValue query; static std::string response; guard_lock xmlrpc_client(&mutex_xmlrpc); try { execute(main_get_trx_state, query, status); std::string resp = status; response = resp; fldigi_state |= FLDIGI_XMLRPC_ONLINE; } catch (const XmlRpc::XmlRpcException& e) { LOG_ERROR("%s xmlrpc_errno = %d", e.getMessage().c_str(), xmlrpc_errno); response = "ABORT"; // This function is used to test if FLDIGI is off/on line. set_offline_state(); } return response; } /** ******************************************************** * ***********************************************************/ std::string get_char_rates() { XmlRpcValue status; XmlRpcValue query; static std::string response; guard_lock xmlrpc_client(&mutex_xmlrpc); try { execute(main_get_char_rates, query, status); std::string resp = status; response = resp; } catch (const XmlRpc::XmlRpcException& e) { LOG_ERROR("%s xmlrpc_errno = %d", e.getMessage().c_str(), xmlrpc_errno); } return response; } /** ******************************************************** * ***********************************************************/ static void get_fldigi_modem() { if (!progStatus.sync_mode_fldigi_flamp) return; XmlRpcValue status; XmlRpcValue query; static std::string response; guard_lock xmlrpc_client(&mutex_xmlrpc); try { execute(modem_get_name, query, status); std::string resp = status; response = resp; if (!response.empty()) { Fl::awake(set_combo, (void *)response.c_str()); } } catch (const XmlRpc::XmlRpcException& e) { LOG_ERROR("%s xmlrpc_errno = %d", e.getMessage().c_str(), xmlrpc_errno); } } /** ******************************************************** * ***********************************************************/ static void get_fldigi_modems() { XmlRpcValue status; XmlRpcValue query; static std::string response; static std::string tmp; static std::string fldigi_modes; fldigi_modes.clear(); guard_lock xmlrpc_client(&mutex_xmlrpc); try { execute(modem_get_io_names, query, status); for (int i = 0; i < status.size(); i++) { tmp = (std::string)status[i]; fldigi_modes.append(tmp).append("|"); } update_cbo_modes(fldigi_modes); modem_list_received = true; } catch (const XmlRpc::XmlRpcException& e) { LOG_ERROR("%s xmlrpc_errno = %d", e.getMessage().c_str(), xmlrpc_errno); if(e.getMessage().find("expected an array") == std::string::npos) set_offline_state(); } } /** ******************************************************** * ***********************************************************/ void * xmlrpc_loop(void *d) { if (!client) open_xmlrpc(); size_t state = 0; static size_t old_state = FLDIGI_OFFLINE; for (;;) { try { state = (fldigi_online() & FLDIGI_XMLRPC_ONLINE); if (state && !modem_list_received) get_fldigi_modems(); else if (state) get_fldigi_modem(); else set_offline_state(); state = fldigi_state == FLDIGI_ONLINE ? 1 : 0; if(old_state != state) Fl::awake(connected_to_fldigi, (void *)state); old_state = state; } catch (const XmlRpc::XmlRpcException& e) { LOG_ERROR("%s xmlrpc_errno = %d", e.getMessage().c_str(), xmlrpc_errno); } MilliSleep(XMLRPC_UPDATE_INTERVAL); } return NULL; } flamp-2.2.12/src/utils/status.cxx0000664000175000017500000002757214605333064013637 00000000000000// ===================================================================== // // status.cxx // // Author(s): // Dave Freese, W1HKJ Copyright (C) 2010 // Robert Stiles, KK5VD Copyright (C) 2013 // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ===================================================================== #include #include #include #include #include "status.h" #include "config.h" #include "flamp.h" #include "flamp_dialog.h" #include "dialogs.h" #include "file_io.h" status progStatus = { 50, // int mainX; 50, // int mainY; "", // my_call "", // my_info "127.0.0.1", // fldigi socket address "7322", // fldigi socket port "127.0.0.1", // fldigi xmlrpc socket address "7362", // fldigi xmlrpc socket port // User Assigned addr/ports not saved. "", // User assigned fldigi socket address "", // User assigned fldigi socket port "", // User assigned fldigi xmlrpc socket address "", // User assigned fldigi xmlrpc socket port true, // use_compression BASE256, // encoder "base256", // encoder string name 1, // selected_mode 64, // blocksize 1, // repeatNN 1, // repeat_header false, // bool sync_mode_flamp_fldigi; false, // bool sync_mode_fldigi_flamp; false, // bool fldigi_xmt_mode_change; 1, // int repeat_every; false, // bool repeat_at_times; "", // string repeat_times; false, // bool repeat_at_times; false, // bool use_txrx_interval; 3.0, // int tx_interval_minutes; 10, // int rx_interval_seconds; false, // bool use_header_modem; 1, // int header_selected_mode; false, // bool disable_header_modem_on_block_fills; 0, // int use_tx_on_report; false, // bool clear_tosend_on_tx_blocks; false, // bool enable_delete_warning; false, // bool enable_tx_unproto false, // bool enable_unproto_markers false, // bool queue_fills_only false, // bool auto_load_queue false, // bool load_from_tx_folder "", // string auto_load_queue_path false, // bool hamcast_mode_cycle false, // bool hamcast_mode_enable_1 1, // int hamcast_mode_selection_1 false, // bool hamcast_mode_enable_2 1, // int hamcast_mode_selection_2 false, // bool hamcast_mode_enable_3 1, // int hamcast_mode_selection_3 false, // bool hamcast_mode_enable_4 1, // int hamcast_mode_selection_4 true, // bool auto_rx_save true, // bool auto_rx_save_local_time true, // bool relay_retain_data 0, // int tab_saved_state 1, // int repeat_relay_data; 1 // int repeat_relay_header; }; extern std::string selected_encoder_string; /** ******************************************************** * ***********************************************************/ void status::saveLastState() { Fl_Preferences FLAMPpref(flampHomeDir.c_str(), "w1hkj.com", PACKAGE_NAME); int mX = main_window->x(); int mY = main_window->y(); if (mX >= 0 && mX >= 0) { mainX = mX; mainY = mY; } FLAMPpref.set("version", PACKAGE_VERSION); FLAMPpref.set("mainx", mX); FLAMPpref.set("mainy", mY); my_call = txt_tx_mycall->value(); my_info = txt_tx_myinfo->value(); FLAMPpref.set("mycall", my_call.c_str()); FLAMPpref.set("myinfo", my_info.c_str()); FLAMPpref.set("socket_address", socket_addr.c_str()); FLAMPpref.set("socket_port", socket_port.c_str()); FLAMPpref.set("xmlrpc_address", xmlrpc_addr.c_str()); FLAMPpref.set("xmlrpc_port", xmlrpc_port.c_str()); FLAMPpref.set("blocksize", blocksize); FLAMPpref.set("repeatNN", repeatNN); FLAMPpref.set("repeat_header", repeat_header); FLAMPpref.set("selected_mode", selected_mode); FLAMPpref.set("compression", use_compression); FLAMPpref.set("encoder", encoder); FLAMPpref.set("encoder_string", encoder_string.c_str()); FLAMPpref.set("sync_mode_flamp_fldigi", sync_mode_flamp_fldigi); FLAMPpref.set("sync_mode_fldigi_flamp", sync_mode_fldigi_flamp); FLAMPpref.set("fldigi_xmt_mode_change", fldigi_xmt_mode_change); FLAMPpref.set("repeat_every", repeat_every); FLAMPpref.set("repeat_at_times", repeat_at_times); FLAMPpref.set("repeat_times", repeat_times.c_str()); FLAMPpref.set("repeat_forever", repeat_forever); FLAMPpref.set("use_repeater_interval", use_txrx_interval); FLAMPpref.set("repeater_tx_minutes", tx_interval_minutes); FLAMPpref.set("repeater_rx_seconds", rx_interval_seconds); FLAMPpref.set("disable_header_modem_on_block_fills", disable_header_modem_on_block_fills); FLAMPpref.set("use_header_modem", use_header_modem); FLAMPpref.set("header_selected_mode", header_selected_mode); FLAMPpref.set("use_tx_on_report", use_tx_on_report); FLAMPpref.set("clear_tosend_on_tx_blocks", clear_tosend_on_tx_blocks); FLAMPpref.set("enable_delete_warning", enable_delete_warning); FLAMPpref.set("enable_tx_unproto", enable_tx_unproto); FLAMPpref.set("enable_unproto_markers", enable_unproto_markers); FLAMPpref.set("queue_fills_only", queue_fills_only); FLAMPpref.set("auto_load_queue", auto_load_queue); FLAMPpref.set("load_from_tx_folder", load_from_tx_folder); FLAMPpref.set("auto_load_queue_path", auto_load_queue_path.c_str()); FLAMPpref.set("hamcast_mode_cycle", hamcast_mode_cycle); FLAMPpref.set("hamcast_mode_enable_1", hamcast_mode_enable_1); FLAMPpref.set("hamcast_mode_selection_1", hamcast_mode_selection_1); FLAMPpref.set("hamcast_mode_enable_2", hamcast_mode_enable_2); FLAMPpref.set("hamcast_mode_selection_2", hamcast_mode_selection_2); FLAMPpref.set("hamcast_mode_enable_3", hamcast_mode_enable_3); FLAMPpref.set("hamcast_mode_selection_3", hamcast_mode_selection_3); FLAMPpref.set("hamcast_mode_enable_4", hamcast_mode_enable_4); FLAMPpref.set("hamcast_mode_selection_4", hamcast_mode_selection_4); FLAMPpref.set("auto_rx_save", auto_rx_save); FLAMPpref.set("auto_rx_save_local_time", auto_rx_save_local_time); FLAMPpref.set("relay_retain_data", relay_retain_data); FLAMPpref.set("tab_saved_state", tab_saved_state); FLAMPpref.set("repeat_relay_data", repeat_relay_data); FLAMPpref.set("repeat_relay_header", repeat_relay_header); } /** ******************************************************** * ***********************************************************/ void status::loadLastState() { Fl_Preferences FLAMPpref(flampHomeDir.c_str(), "w1hkj.com", PACKAGE_NAME); if (FLAMPpref.entryExists("version")) { char *defbuffer; FLAMPpref.get("mainx", mainX, mainX); FLAMPpref.get("mainy", mainY, mainY); FLAMPpref.get("mycall", defbuffer, ""); my_call = defbuffer; free(defbuffer); FLAMPpref.get("myinfo", defbuffer, ""); my_info = defbuffer; free(defbuffer); FLAMPpref.get("socket_address", defbuffer, socket_addr.c_str()); socket_addr = defbuffer; free(defbuffer); FLAMPpref.get("socket_port", defbuffer, socket_port.c_str()); socket_port = defbuffer; free(defbuffer); FLAMPpref.get("xmlrpc_address", defbuffer, xmlrpc_addr.c_str()); xmlrpc_addr = defbuffer; free(defbuffer); FLAMPpref.get("xmlrpc_port", defbuffer, xmlrpc_port.c_str()); xmlrpc_port = defbuffer; free(defbuffer); FLAMPpref.get("blocksize", blocksize, blocksize); FLAMPpref.get("repeatNN", repeatNN, repeatNN); FLAMPpref.get("repeat_header", repeat_header, repeat_header); FLAMPpref.get("selected_mode", selected_mode, selected_mode); int i = 0; FLAMPpref.get("compression", i, use_compression); use_compression = i; FLAMPpref.get("sync_mode_flamp_fldigi", i, sync_mode_flamp_fldigi); sync_mode_flamp_fldigi = i; FLAMPpref.get("sync_mode_fldigi_flamp", i, sync_mode_fldigi_flamp); sync_mode_fldigi_flamp = i; FLAMPpref.get("fldigi_xmt_mode_change", i, fldigi_xmt_mode_change); fldigi_xmt_mode_change = i; FLAMPpref.get("encoder", encoder, encoder); FLAMPpref.get("encoder_string", defbuffer, encoder_string.c_str()); encoder_string = defbuffer; free(defbuffer); FLAMPpref.get("repeat_every", repeat_every, repeat_every); FLAMPpref.get("repeat_at_times", i, repeat_at_times); repeat_at_times = i; FLAMPpref.get("repeat_times", defbuffer, repeat_times.c_str()); repeat_times = defbuffer; free(defbuffer); FLAMPpref.get("repeat_forever", i, repeat_forever); repeat_forever = i; FLAMPpref.get("use_repeater_interval", i, use_txrx_interval); use_txrx_interval = (bool) i; FLAMPpref.get("repeater_tx_minutes", tx_interval_minutes, tx_interval_minutes); FLAMPpref.get("repeater_rx_seconds", i, rx_interval_seconds); rx_interval_seconds = i; FLAMPpref.get("disable_header_modem_on_block_fills", i, disable_header_modem_on_block_fills); disable_header_modem_on_block_fills = (bool) i; FLAMPpref.get("use_header_modem", i, use_header_modem); use_header_modem = (bool) i; FLAMPpref.get("header_selected_mode", i, header_selected_mode); header_selected_mode = i; FLAMPpref.get("use_tx_on_report", i, use_tx_on_report); use_tx_on_report = i; FLAMPpref.get("clear_tosend_on_tx_blocks", i, clear_tosend_on_tx_blocks); clear_tosend_on_tx_blocks = (bool) i; FLAMPpref.get("enable_delete_warning", i, enable_delete_warning); enable_delete_warning = (bool) i; FLAMPpref.get("enable_tx_unproto", i, enable_tx_unproto); enable_tx_unproto = (bool) i; FLAMPpref.get("enable_unproto_markers", i, enable_unproto_markers); enable_unproto_markers = (bool) i; FLAMPpref.get("queue_fills_only", i, queue_fills_only); queue_fills_only = (bool) i; FLAMPpref.get("auto_load_queue", i, auto_load_queue); auto_load_queue = (bool) i; FLAMPpref.get("load_from_tx_folder", i, load_from_tx_folder); load_from_tx_folder = (bool) i; FLAMPpref.get("auto_load_queue_path", defbuffer, ""); auto_load_queue_path.assign(defbuffer); free(defbuffer); FLAMPpref.get("hamcast_mode_cycle", i, hamcast_mode_cycle); hamcast_mode_cycle = (bool) i; FLAMPpref.get("hamcast_mode_enable_1", i, hamcast_mode_enable_1); hamcast_mode_enable_1 = (bool) i; FLAMPpref.get("hamcast_mode_selection_1", i, hamcast_mode_selection_1); hamcast_mode_selection_1 = i; FLAMPpref.get("hamcast_mode_enable_2", i, hamcast_mode_enable_2); hamcast_mode_enable_2 = (bool) i; FLAMPpref.get("hamcast_mode_selection_2", i, hamcast_mode_selection_2); hamcast_mode_selection_2 = i; FLAMPpref.get("hamcast_mode_enable_3", i, hamcast_mode_enable_3); hamcast_mode_enable_3 = (bool) i; FLAMPpref.get("hamcast_mode_selection_3", i, hamcast_mode_selection_3); hamcast_mode_selection_3 = i; FLAMPpref.get("hamcast_mode_enable_4", i, hamcast_mode_enable_4); hamcast_mode_enable_4 = (bool) i; FLAMPpref.get("hamcast_mode_selection_4", i, hamcast_mode_selection_4); hamcast_mode_selection_4 = i; FLAMPpref.get("auto_rx_save", i, auto_rx_save); auto_rx_save = (bool) i; FLAMPpref.get("auto_rx_save_local_time", i, auto_rx_save_local_time); auto_rx_save_local_time = (bool) i; FLAMPpref.get("relay_retain_data", i, relay_retain_data); relay_retain_data = (bool) i; FLAMPpref.get("tab_saved_state", i, tab_saved_state); tab_saved_state = (int) i; FLAMPpref.get("repeat_relay_data", i, repeat_relay_data); repeat_relay_data = (int) i; FLAMPpref.get("repeat_relay_header", i, repeat_relay_header); repeat_relay_header = (int) i; if(auto_load_queue_path.size() < 1) auto_load_queue = false; if(enable_tx_unproto) { use_header_modem = false; } } } flamp-2.2.12/src/utils/base256.cxx0000644000175000017500000001124414463050061013441 00000000000000// ===================================================================== // // base256 text encoding // // Author: Dave Freese, W1HKJ // Copyright: 2010 // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ===================================================================== #include #include "base256.h" /** ******************************************************** * ***********************************************************/ void base256::init() { iolen = 0; iocp = 0; ateof = false; linelength = 0; } /** ******************************************************** * /brief FLDIGI uses some control codes to alter the program state * several digital modems suppress some control and high bit set * characters this function substitutes a two character * sequence for the offending characters ***********************************************************/ void base256::escape(std::string &in, bool encode) { std::string out; if (encode) { for( size_t i = 0; i < in.length(); i++) { switch ((in[i] & 0xFF)) { case ':' : out.append("::"); break; case 0x00 : out.append(":0"); break; case 0x01 : out.append(":1"); break; // mt63 case 0x02 : out.append(":2"); break; case 0x03 : out.append(":3"); break; case 0x04 : out.append(":4"); break; case 0x05 : out.append(":5"); break; case 0x06 : out.append(":6"); break; case 0x07 : out.append(":7"); break; case 0x08 : out.append(":8"); break; case 0x09 : out.append(":9"); break; case '\n' : out.append(":A"); break; case '\r' : out.append(":B"); break; case '^' : out.append(":C"); break; case 0x7F : out.append(":D"); break; case 0xFF : out.append(":E"); break; // mt63 default: out += in[i]; } } } else { unsigned char ch = 0; for (size_t i = 0; i < in.length(); i++) { ch = in[i] & 0xFF; if (ch == ':') { i++; ch = in[i] & 0xFF; switch (ch) { case ':' : out += ':'; break; case '0' : out += ' '; out[out.length() - 1] = 0x00; break; case '1' : out += 0x01; break; case '2' : out += 0x02; break; case '3' : out += 0x03; break; case '4' : out += 0x04; break; case '5' : out += 0x05; break; case '6' : out += 0x06; break; case '7' : out += 0x07; break; case '8' : out += 0x08; break; case '9' : out += 0x09; break; case 'A' : out += '\n'; break; case 'B' : out += '\r'; break; case 'C' : out += '^'; break; case 'D' : out += 0x7F; break; case 'E' : out += 0xFF; break; } } else out += ch; } } in = out; } /** ******************************************************** * ***********************************************************/ void base256::addlf(std::string &in) { std::string out; int len = 0; for (size_t n = 0; n < in.length(); n++) { if (len < LINELEN) {out += in[n]; len++;} else {out += '\n'; out += in[n]; len = 0;} } in.assign(out); } /** ******************************************************** * ***********************************************************/ void base256::remlf(std::string &in) { std::string out; for (size_t n = 0; n < in.length(); n++) { if (in[n] != '\n') out += in[n]; } in.assign(out); } /** ******************************************************** * ***********************************************************/ std::string base256::encode(std::string &in) { char insize[20]; snprintf(insize, sizeof(insize), "%d\n", (int)in.length()); output.assign(insize); iocp = 0; ateof = false; std::string temp (in); escape (temp); output.append(temp); return output; } /** ******************************************************** * ***********************************************************/ std::string base256::decode(std::string &in, bool &decode_error) { int temp; //size_t nbr = 0; std::string output = in; decode_error = false; size_t p = output.find("\n"); if (p == std::string::npos) { decode_error = true; return "ERROR: base256 missing character count"; } sscanf(output.substr(0, p).c_str(), "%d", &temp); //nbr = temp; output.erase(0, p+1); escape(output, false); return output; } flamp-2.2.12/src/utils/script_parsing.cxx0000664000175000017500000025751314507650001015335 00000000000000/** ************************************************************** \page script_parsing Script Parsing Class \par script_parsing.cxx (FLAMP) \par Author(s): Robert Stiles, KK5VD, Copyright © 2014

This is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see .

\par USE: Create a structure of data contained within the SCRIPT_COMMANDS structure \(see \ref script_cmds\). Each element are as follows.
\verbatim { SCRIPT_COMMAND, 0, "AUTO LOAD QUEUE", 1, {0}, { p_string }, 0, 0, 0, 0 } \endverbatim \par "int flags " Indicates if the script command is a global assignment (SCRIPT_COMMAND) or local for each of the queued files (QUEUE_COMMAND). \par "size_t command_length" Programmer assignment not required. Internally Assigned. This is the length of the script command in bytes. \par "char command[MAX_COMMAND_LENGTH]" The script command used to match within the content of the script file. MAX_COMMAND_LENGTH is the maximum length of the supplied buffer. \par "int argc" The number of argument as required for the script command. The parsing engine will limit the number of scanned parameters even of more has been supplied. \par "char *args[MAX_CMD_PARAMETERS]" An array of char string pointers to each parameter scanned for the specific command. MAX_CMD_PARAMETERS is the maximum number of positions available in the parameter buffer table. \par "enum paramter_types param_check[MAX_CMD_PARAMETERS]" A list of validation flags for each parameters required. MAX_CMD_PARAMETERS is the maximum number of positions available in the param_check buffer table. See \ref paramter_types for a list of valid values.
\par "calling_func func" When a command string is matched in the script file, this StringParsing Class member is executed for further processing of the command paramaters. This can include any validation checks if required. The member functions are assigned during the creation of the class instance. See the constructor member ScriptParsing::ScriptParsing() for details. \par "const char **valid_values" List of valid paramters. Use function int assign_valid_parameters(const char *command, const char **array, const int array_count); to asssign the values to a specific script command. \par "int valid_value_count" Number of valid paramters. \par "int (*cb)(ScriptParsing *sp, struct script_cmds *sd)" This is assigned using the StringParsing Member:

int assign_callback(const char *scriptCommand, int (*cb)(ScriptParsing *sp, SCRIPT_COMMANDS *sc));

The function which is supplied by the programmer after the creation of the Class instance is called when the command is matched. This allows the programmer access to a multitude of information for further processing outside of the ScriptParsing Class instance.

Example:
\verbatim #include "script_parsing.h" static const char *modems[] = { "BPSK31", "MFSK32", "MT63-500", "MFSK64" }; int callback(ScriptParsing *sp, struct script_cmds *sc) { // do something return 0; } int main(int argc, const char * argv[]) { ScriptParsing *sp = new ScriptParsing; if(sp) { sp->assign_valid_parameters("MODEM", modems, sizeof(modems)/sizeof(char *)); sp->assign_callback("FILE", callback); sp->parse_commands((char *)"/fldigi-dev/test_parse_commands/running_test.txt"); } return 0; } \endverbatim
See \ref script_parsing_class and \ref script_cmds for details about what data is provided by the ScriptParsing *sp and SCRIPT_COMMANDS *sc pointers. The passed SCRIPT_COMMANDS *sc pointer is a copy of the original data. Modification of this information does not alter the internal data.

Note: The member and function pointers within the SCRIPT_COMMANDS *sc pointer are set to dummy functions which return back to the caller if executed. *******************************************************************/ #include "config.h" #include "util.h" #include #include #include #include #include #include #include //#define EXTERNAL_TESTING #undef EXTERNAL_TESTING #ifdef EXTERNAL_TESTING #define TESTING 1 #define LOG_INFO printf #else #include "debug.h" #endif #ifdef __WIN32__ #define PATH_SEPERATOR "\\" #define PATH_CHAR_SEPERATOR '\\' #include #define get_current_dir _getcwd #else #define PATH_SEPERATOR "/" #define PATH_CHAR_SEPERATOR '/' #include #define get_current_dir getcwd #endif #include "script_parsing.h" // This table (by reference) is not used. Copy to another memory location. // Do not change the order of this without changing the order of // void ScriptParsing::initialize_function_members(void) to match. static const SCRIPT_COMMANDS default_script_command_table[] = { { CMD_AUTO_LOAD_QUEUE, SCRIPT_COMMAND, 0, 1, {0}, { p_string }, 0, 0, 0, 0 }, { CMD_BASE, SCRIPT_COMMAND | QUEUE_COMMAND, 0, 1, {0}, { p_unsigned_int }, 0, 0, 0, 0 }, { CMD_BLOCKS, SCRIPT_COMMAND, 0, 1, {0}, { p_unsigned_int }, 0, 0, 0, 0 }, { CMD_CALLFROM, SCRIPT_COMMAND, 0, 1, {0}, { p_string }, 0, 0, 0, 0 }, { CMD_CALLTO, SCRIPT_COMMAND | QUEUE_COMMAND, 0, 1, {0}, { p_string }, 0, 0, 0, 0 }, { CMD_CLEAR_MISSING, SCRIPT_COMMAND, 0, 1, {0}, { p_string }, 0, 0, 0, 0 }, { CMD_CLEAR_RXQ, SCRIPT_COMMAND, 0, 0, {0}, { p_null }, 0, 0, 0, 0 }, { CMD_CLEAR_TXQ, SCRIPT_COMMAND | QUEUE_COMMAND, 0, 0, {0}, { p_null }, 0, 0, 0, 0 }, { CMD_COMP, SCRIPT_COMMAND | QUEUE_COMMAND, 0, 1, {0}, { p_string }, 0, 0, 0, 0 }, { CMD_EVENT_FOREVER, SCRIPT_COMMAND, 0, 1, {0}, { p_string }, 0, 0, 0, 0 }, { CMD_EVENT_TIMED, SCRIPT_COMMAND, 0, 1, {0}, { p_string }, 0, 0, 0, 0 }, { CMD_EVENT_TIMES, SCRIPT_COMMAND, 0, 1, {0}, { p_string }, 0, 0, 0, 0 }, { CMD_EVENT_TYPE, SCRIPT_COMMAND, 0, 1, {0}, { p_string }, 0, 0, 0, 0 }, { CMD_EVENT, SCRIPT_COMMAND, 0, 1, {0}, { p_string }, 0, 0, 0, 0 }, { CMD_FILE, SCRIPT_COMMAND | QUEUE_COMMAND, 0, 2, {0}, { p_filename, p_string }, 0, 0, 0, 0 }, { CMD_HAMCAST_MODEM, SCRIPT_COMMAND, 0, 2, {0}, { p_unsigned_int, p_string }, 0, 0, 0, 0 }, { CMD_HAMCAST, SCRIPT_COMMAND, 0, 1, {0}, { p_string }, 0, 0, 0, 0 }, { CMD_HDR_REPEAT, SCRIPT_COMMAND, 0, 1, {0}, { p_unsigned_int }, 0, 0, 0, 0 }, { CMD_HEADER_MODEM, SCRIPT_COMMAND, 0, 1, {0}, { p_string }, 0, 0, 0, 0 }, { CMD_HEADER, SCRIPT_COMMAND, 0, 1, {0}, { p_string }, 0, 0, 0, 0 }, { CMD_INFO, SCRIPT_COMMAND, 0, 1, {0}, { p_string }, 0, 0, 0, 0 }, { CMD_INHIBIT_HEADER, SCRIPT_COMMAND, 0, 1, {0}, { p_string }, 0, 0, 0, 0 }, { CMD_INTERVAL, SCRIPT_COMMAND, 0, 1, {0}, { p_string }, 0, 0, 0, 0 }, { CMD_LOAD_QUEUE, SCRIPT_COMMAND | QUEUE_COMMAND, 0, 2, {0}, { p_string, p_string }, 0, 0, 0, 0 }, { CMD_LOAD_TXDIR, SCRIPT_COMMAND | QUEUE_COMMAND, 0, 1, {0}, { p_string, p_string }, 0, 0, 0, 0 }, { CMD_MODEM, SCRIPT_COMMAND, 0, 1, {0}, { p_string }, 0, 0, 0, 0 }, { CMD_PATH, SCRIPT_COMMAND | QUEUE_COMMAND, 0, 1, {0}, { p_path }, 0, 0, 0, 0 }, { CMD_PROTO, SCRIPT_COMMAND | QUEUE_COMMAND, 0, 1, {0}, { p_string }, 0, 0, 0, 0 }, { CMD_QUEUE_FILEPATH, SCRIPT_COMMAND | QUEUE_COMMAND, 0, 1, {0}, { p_string }, 0, 0, 0, 0 }, { CMD_RESET, SCRIPT_COMMAND, 0, 1, {0}, { p_string }, 0, 0, 0, 0 }, { CMD_RX_INTERVAL, SCRIPT_COMMAND, 0, 1, {0}, { p_unsigned_int }, 0, 0, 0, 0 }, { CMD_SYNC_WITH, SCRIPT_COMMAND, 0, 2, {0}, { p_string, p_string }, 0, 0, 0, 0 }, { CMD_TX_INTERVAL, SCRIPT_COMMAND, 0, 1, {0}, { p_float }, 0, 0, 0, 0 }, { CMD_TX_REPORT, SCRIPT_COMMAND, 0, 1, {0}, { p_string }, 0, 0, 0, 0 }, { CMD_UNPROTO_MARKERS, SCRIPT_COMMAND, 0, 1, {0}, { p_string }, 0, 0, 0, 0 }, { CMD_WARN_USER, SCRIPT_COMMAND, 0, 1, {0}, { p_string }, 0, 0, 0, 0 }, { CMD_XMIT_REPEAT, SCRIPT_COMMAND, 0, 1, {0}, { p_unsigned_int }, 0, 0, 0, 0 } }; /** ************************************************************** * \brief Assign a list of valid parameters for verification checks. * \param array An Array of pointers to each element. * \param array_count Number of entries in the array. * \return the array count or '0' if error. * \par Note: * This array is limited to the first parameter of the command * used in it's comparison. *****************************************************************/ int ScriptParsing::assign_valid_parameters(const char *command, const char **array, const int array_count) { if(!array || array_count < 1 || !command) return 0; int index = 0; int count = 0; SCRIPT_COMMANDS * cmd_sc = search_command(command); if(!cmd_sc) { return 0; } for(index = 0; index < array_count; index++) { if(*array[index]) count++; } if(count != array_count) return 0; cmd_sc->valid_values = array; cmd_sc->valid_value_count = array_count; return array_count; } /** ************************************************************** * \brief Return true state if string is matched. * \param state Referenced value to assign results to. * \param string Pointer to the data string. * \param true_state Pointer to the data to match with. * \return SCRIPT_CODES error code. *****************************************************************/ inline SCRIPT_CODES ScriptParsing::test_on_off_state(bool &state, char *string, char *true_state=(char *)"ON") { if(!string || !true_state) { return script_function_parameter_error; } bool flag = false; if(strncmp(string, true_state, MAX_PARAMETER_LENGTH) == 0) flag = true; state = flag; return script_no_errors; } /** ************************************************************** * \brief Validate if file is located in the specified location. * \param filename Pointer to a series of charcters * \return SCRIPT_CODES error code. *****************************************************************/ SCRIPT_CODES ScriptParsing::check_filename(char *filename, char *full_name_path=0, size_t limit=0, int path_flag=SCRIPT_COMMAND) { char *filename_path = (char *)0; char *path = (char *)0; SCRIPT_CODES error = script_no_errors; std::string user_path = ""; if(!filename) { return script_function_parameter_error; } filename_path = new char[FILENAME_MAX + 1]; if(!filename_path) { return script_memory_allocation_error; } memset(filename_path, 0, (FILENAME_MAX + 1)); path = new char[FILENAME_MAX + 1]; if(!path) { delete [] filename_path; return script_memory_allocation_error; } memset(path, 0, (FILENAME_MAX + 1)); if(path_flag == QUEUE_COMMAND) { user_path.assign(this->queue_path()); } else { user_path.assign(this->path()); } if(user_path.empty()) { if (!get_current_dir(path, FILENAME_MAX)) strncpy(path, user_path.c_str(), FILENAME_MAX); } else { strncpy(path, user_path.c_str(), FILENAME_MAX); } size_t size = strnlen(path, FILENAME_MAX); if(size > 1) { if(path[size - 1] != PATH_CHAR_SEPERATOR) { strncat(path, PATH_SEPERATOR, FILENAME_MAX); } } strncpy(filename_path, path, FILENAME_MAX); strncat(filename_path, filename, FILENAME_MAX); #ifdef TESTING printf(" filename = %s\n", filename); printf(" path = %s\n", path); printf("filename_path = %s\n", filename_path); #endif FILE *fd = (FILE *)0; fd = fopen(filename_path, "r"); if(!fd) { error = script_file_not_found; } else { fclose(fd); if(full_name_path && limit > 0) strncpy(full_name_path, filename_path, limit); } delete [] filename_path; delete [] path; return error; } /** ************************************************************** * \brief Validate if path is present. * \param path The path to verify. * \return SCRIPT_CODES error code. *****************************************************************/ SCRIPT_CODES ScriptParsing::check_path(const char *path) { if(!path) { return script_function_parameter_error; } struct stat st; memset(&st, 0, sizeof(struct stat)); if(stat(path, &st) == 0) { if(st.st_mode & S_IFDIR) return script_no_errors; } return script_path_not_found; } /** ************************************************************** * \brief Validate if the parameter is a value. * \param value The string in question. * \param p format verification. * \return SCRIPT_CODES error code. *****************************************************************/ SCRIPT_CODES ScriptParsing::check_numbers(char *value, paramter_types p) { SCRIPT_CODES error = script_no_errors; size_t length = 0; size_t index = 0; int data_count = 0; int signed_value = 0; int decimal_point = 0; if(!value) return script_function_parameter_error; length = strnlen(value, MAX_PARAMETER_LENGTH); if(length < 1) return script_parameter_error; // Skip any leading white spaces. for(index = 0; index < length; index++) { if(value[index] > ' ') break; } if((index >= length)) return script_parameter_error; switch(p) { case p_int: case p_long: if(value[0] == '-' || value[0] == '+') { index++; signed_value++; } case p_unsigned_int: case p_unsigned_long: for(; index< length; index++) { if(isdigit(value[index])) data_count++; else break; } break; if(data_count) return script_no_errors; case p_float: case p_double: if(value[0] == '-' || value[0] == '+') { index++; signed_value++; } for(; index< length; index++) { if(isdigit(value[index])) data_count++; if(value[index] == '.') decimal_point++; if(decimal_point > 1) return script_parameter_error; } if(data_count) return script_no_errors; break; default:; } return error; } /** ************************************************************** * \brief Validate the script parameter(s) are of the expected format. * \param cmd Matching command data structure. * \param p A table of expected parameters types (null terminated). * \param p_count the number of 'p[]' items in the table (includes null termination). * \return SCRIPT_CODES error code. *****************************************************************/ SCRIPT_CODES ScriptParsing::check_parameters(struct script_cmds *cmd) { SCRIPT_CODES error = script_no_errors; int count = 0; int index = 0; size_t size = 0; if(!cmd) return script_function_parameter_error; count = cmd->argc; if(count < 1) return script_no_errors; for(index = 0; index < count; index++) { if(!cmd->args[index]) { return script_args_eol; } if(cmd->param_check[index] == p_null) { size = 0; } else { size = strnlen(cmd->args[index], MAX_COMMAND_LENGTH); } switch(cmd->param_check[index]) { case p_null: error = script_param_check_eol; break; case p_char: if(size > 1) error = script_paramter_exceeds_length; break; case p_int: case p_long: case p_unsigned_int: case p_unsigned_long: case p_float: case p_double: error = check_numbers(cmd->args[index], cmd->param_check[index]); break; case p_string: if(size < 1) error = script_parameter_error; break; case p_path: error = check_path(cmd->args[index]); break; case p_filename: error = check_filename(cmd->args[index]); break; } if(error != script_no_errors) break; } return error; } /** ************************************************************** * \brief Search the content of SCRIPT_COMMANDS structure table * for the specified command. * \param command The command to search for. * \return Pointer to the matching SCRIPT_COMMANDS entry. Null if * not found. *****************************************************************/ SCRIPT_COMMANDS * ScriptParsing::search_command(const char *command) { char *cmd_buffer = (char *)0; int diff = 0; SCRIPT_COMMANDS * found = (SCRIPT_COMMANDS *) 0; size_t count = _script_command_table_count; size_t index = 0; if(!command) return found; cmd_buffer = new char [MAX_COMMAND_LENGTH]; if(!cmd_buffer) { LOG_INFO("cmd_buffer allocation error near line %d", __LINE__); return found; } memset(cmd_buffer, 0, MAX_COMMAND_LENGTH); strncpy(cmd_buffer, command, MAX_COMMAND_LENGTH-1); to_uppercase(cmd_buffer, (int) MAX_COMMAND_LENGTH); trim(cmd_buffer, (int) MAX_COMMAND_LENGTH); for(index = 0; index < count; index++) { diff = strncmp(cmd_buffer, _script_command_table[index].command, MAX_COMMAND_LENGTH); if(diff == 0) { found = &_script_command_table[index]; break; } } cmd_buffer[0] = 0; delete [] cmd_buffer; return found; } /** ************************************************************** * \brief Convert string to uppercase characters.
* \par str Pointer to data. * \par limit data buffer size * \return void *****************************************************************/ void ScriptParsing::to_uppercase(char *str, int limit) { if(!str || limit < 1) return; int character = 0; int count = 0; int index = 0; count = (int) strnlen(str, limit); for(index = 0; index < count; index++) { character = str[index]; if(character == 0) break; character = (char) toupper(character); str[index] = character; } } /** ************************************************************** * \brief Convert string to uppercase characters.
* \par str String storage passed by reference. * \return void *****************************************************************/ void ScriptParsing::to_uppercase(std::string &str) { int character = 0; int count = 0; int index = 0; count = (int) str.length(); for(index = 0; index < count; index++) { character = str[index]; if(character == 0) break; character = (char) toupper(character); str[index] = character; } } /** ************************************************************** * \brief Assign Call back function to a given script command.
* \param scriptCommand Script command string
* \param cb Pointer to call back function. int (*cb)(ScriptParsing *sp, SCRIPT_COMMANDS *sc) *****************************************************************/ int ScriptParsing::assign_callback(const char *scriptCommand, int (*cb)(ScriptParsing *sp, SCRIPT_COMMANDS *sc)) { char *cmd_buffer = (char *)0; int diff = 0; size_t count = _script_command_table_count; size_t index = 0; if(!scriptCommand || !cb) return 0; cmd_buffer = new char[MAX_COMMAND_LENGTH]; if(!cmd_buffer) { LOG_INFO("cmd_buffer allocation error near line %d", __LINE__); return 0; } memset(cmd_buffer, 0, MAX_COMMAND_LENGTH); strncpy(cmd_buffer, scriptCommand, MAX_COMMAND_LENGTH-1); to_uppercase(cmd_buffer, (int) MAX_COMMAND_LENGTH); trim(cmd_buffer, (int) MAX_COMMAND_LENGTH); for(index = 0; index < count; index++) { diff = strncmp(cmd_buffer, _script_command_table[index].command, MAX_COMMAND_LENGTH); if(diff == 0) { if(_script_command_table[index].cb) LOG_INFO("Over writing call back funcion for \"%s\"", cmd_buffer); _script_command_table[index].cb = cb; break; } } cmd_buffer[0] = 0; delete [] cmd_buffer; return 0; } /** ************************************************************** * \brief Assign func to func array checking array bounds. * \param pos Position in the indexed array * \param func The function (member) to assign * \param limit Array count limit * \return void (nothing) *****************************************************************/ void ScriptParsing::assign_func(size_t pos, calling_func func, size_t limit) { if(pos < limit) { _script_command_table[pos].func = func; _script_command_table[pos].command_length = strnlen(_script_command_table[pos].command, MAX_COMMAND_LENGTH); } } /** ************************************************************** * \brief Initialize callable members. * \return void (nothing) *****************************************************************/ void ScriptParsing::defaults(bool all) { if(all) { _call_from = ""; _call_to = ""; } _clear_missing = false; _event = false; _event_forever = false; _hamcast = false; _hamcast_modem_1_enable = false; _hamcast_modem_2_enable = false; _hamcast_modem_3_enable = false; _hamcast_modem_4_enable = false; _inhibit_header = false; _interval = false; _proto = true; _sync_with_flamp = false; _sync_with_fldigi = false; _sync_with_prior = false; _tx_report = false; _warn_user = false; } /** ************************************************************** * \brief Initialize callable members. * \return void (nothing) *****************************************************************/ void ScriptParsing::initialize_function_members(void) { // Ensure this is in the same sequence as the structure it's assigned to. int index = 0; assign_func(index++, &ScriptParsing::sc_auto_load_queue, _script_command_table_total_count); assign_func(index++, &ScriptParsing::sc_base_encode, _script_command_table_total_count); assign_func(index++, &ScriptParsing::sc_block_count, _script_command_table_total_count); assign_func(index++, &ScriptParsing::sc_call_from, _script_command_table_total_count); assign_func(index++, &ScriptParsing::sc_call_to, _script_command_table_total_count); assign_func(index++, &ScriptParsing::sc_clear_missing, _script_command_table_total_count); assign_func(index++, &ScriptParsing::sc_clear_rxq, _script_command_table_total_count); assign_func(index++, &ScriptParsing::sc_clear_txq, _script_command_table_total_count); assign_func(index++, &ScriptParsing::sc_compression, _script_command_table_total_count); assign_func(index++, &ScriptParsing::sc_event_forever, _script_command_table_total_count); assign_func(index++, &ScriptParsing::sc_event_timed, _script_command_table_total_count); assign_func(index++, &ScriptParsing::sc_event_times, _script_command_table_total_count); assign_func(index++, &ScriptParsing::sc_event_type, _script_command_table_total_count); assign_func(index++, &ScriptParsing::sc_event, _script_command_table_total_count); assign_func(index++, &ScriptParsing::sc_file, _script_command_table_total_count); assign_func(index++, &ScriptParsing::sc_hamcast_modem, _script_command_table_total_count); assign_func(index++, &ScriptParsing::sc_hamcast, _script_command_table_total_count); assign_func(index++, &ScriptParsing::sc_hdr_repeat, _script_command_table_total_count); assign_func(index++, &ScriptParsing::sc_header_modem, _script_command_table_total_count); assign_func(index++, &ScriptParsing::sc_header, _script_command_table_total_count); assign_func(index++, &ScriptParsing::sc_info, _script_command_table_total_count); assign_func(index++, &ScriptParsing::sc_inhibit_header, _script_command_table_total_count); assign_func(index++, &ScriptParsing::sc_interval, _script_command_table_total_count); assign_func(index++, &ScriptParsing::sc_load_queue, _script_command_table_total_count); assign_func(index++, &ScriptParsing::sc_load_txdir, _script_command_table_total_count); assign_func(index++, &ScriptParsing::sc_modem, _script_command_table_total_count); assign_func(index++, &ScriptParsing::sc_path, _script_command_table_total_count); assign_func(index++, &ScriptParsing::sc_proto, _script_command_table_total_count); assign_func(index++, &ScriptParsing::sc_queue_filepath, _script_command_table_total_count); assign_func(index++, &ScriptParsing::sc_reset, _script_command_table_total_count); assign_func(index++, &ScriptParsing::sc_rx_interval, _script_command_table_total_count); assign_func(index++, &ScriptParsing::sc_sync_with, _script_command_table_total_count); assign_func(index++, &ScriptParsing::sc_tx_interval, _script_command_table_total_count); assign_func(index++, &ScriptParsing::sc_tx_report, _script_command_table_total_count); assign_func(index++, &ScriptParsing::sc_unproto_makers, _script_command_table_total_count); assign_func(index++, &ScriptParsing::sc_warn_user, _script_command_table_total_count); assign_func(index++, &ScriptParsing::sc_xmit_repeat, _script_command_table_total_count); } /** ************************************************************** * \brief Constructor: Copy and initialize function arrays.
*****************************************************************/ ScriptParsing::ScriptParsing() { size_t count = 0; // Initialize class variables. _auto_load_queue = false; _base = 0; _blocks = 0; _call_from = ""; _call_to = ""; _clear_missing = false; _clear_rxq = false; _clear_txq = false; _comp = false; _desc = ""; _envent_times = ""; _event = false; _event_forever = false; _event_type = 0; _file = ""; _file_type = SCRIPT_COMMAND; _hamcast = false; _hamcast_modem_1 = ""; _hamcast_modem_1_enable = false; _hamcast_modem_2 = ""; _hamcast_modem_2_enable = false; _hamcast_modem_3 = ""; _hamcast_modem_3_enable = false; _hamcast_modem_4 = ""; _hamcast_modem_4_enable = false; _hdr_repeat = 0; _info = ""; _inhibit_header = false; _interval = false; _modem = ""; _path = ""; _proto = true; _queue_filename = ""; _queue_path = ""; _reset = 0; _rx_interval = 0; _sync_with_flamp = false; _sync_with_fldigi = false; _sync_with_prior = false; _tx_interval = 0; _tx_report = false; _warn_user = false; _xmit_repeat = false; _sub_script_count = 0; _parent = (ScriptParsing *)0; _script_command_table = (SCRIPT_COMMANDS *)0; _script_command_table_count = 0; _script_command_table_total_count = 0; count = sizeof(default_script_command_table)/sizeof(SCRIPT_COMMANDS); _script_command_table = new SCRIPT_COMMANDS[count + 1]; if(!_script_command_table) { return; } _script_command_table_count = count; _script_command_table_total_count = count + 1; memset(_script_command_table, 0, sizeof(SCRIPT_COMMANDS) * _script_command_table_total_count); memcpy(_script_command_table, default_script_command_table, sizeof(default_script_command_table)); memset(line_buffer, 0, sizeof(line_buffer)); initialize_function_members(); } /** ************************************************************** * \brief Copy environment to the sub ScriptParsing class * \param src Source Class pointer to copy from. *****************************************************************/ int ScriptParsing::CopyScriptParsingEnv(ScriptParsing *src) { if(!src || (src == this)) return -1; #if 0 // Do not copy these variables. desc(src->desc()); file(src->file()); load_queue(src->load_queue()); #endif // 0 auto_load_queue(src->auto_load_queue()); base(src->base()); blocks(src->blocks()); call_from(src->call_from()); call_to(src->call_to()); clear_missing(src->clear_missing()); clear_rxq(src->clear_rxq()); clear_txq(src->clear_txq()); comp(src->comp()); event_forever(src->event_forever()); event_times(src->event_times()); event_type(src->event_type()); event(src->event()); hamcast_modem_1_enable(src->hamcast_modem_1_enable()); hamcast_modem_1(src->hamcast_modem_1()); hamcast_modem_2_enable(src->hamcast_modem_2_enable()); hamcast_modem_2(src->hamcast_modem_2()); hamcast_modem_3_enable(src->hamcast_modem_3_enable()); hamcast_modem_3(src->hamcast_modem_3()); hamcast_modem_4_enable(src->hamcast_modem_4_enable()); hamcast_modem_4(src->hamcast_modem_4()); hamcast(src->hamcast()); hdr_repeat(src->hdr_repeat()); info(src->info()); inhibit_header(src->inhibit_header()); interval(src->interval()); modem(src->modem()); path(src->path()); proto(src->proto()); reset(src->reset()); rx_interval(src->rx_interval()); sync_with_flamp(src->sync_with_flamp()); sync_with_fldigi(src->sync_with_fldigi()); sync_with_prior(src->sync_with_prior()); tx_interval(src->tx_interval()); tx_report(src->tx_report()); warn_user(src->warn_user()); xmit_repeat(src->xmit_repeat()); parent(src); script_command_table_count(src->script_command_table_count()); script_command_table_total_count(src->script_command_table_total_count()); sub_script_count(src->sub_script_count() + 1); SCRIPT_COMMANDS * dst_table = script_command_table(); SCRIPT_COMMANDS * src_table = src->script_command_table(); size_t index = 0; size_t count = script_command_table_count(); for(index = 0; index < count; index++) { dst_table[index].cb = src_table[index].cb; dst_table[index].valid_value_count = src_table[index].valid_value_count; dst_table[index].valid_values = src_table[index].valid_values; } initialize_function_members(); return 0; } /** ************************************************************** * \brief Enable/Disable Auto load of TX queue during timed event.
* \param cmd Pointer to matching struct script_cmds script * command. * \return SCRIPT_CODES error see \ref script_codes * \par Script Command:
* \"AUTO LOAD QUEUE:\\"
* \par Script Parameters:
* ON = Enable
* OFF = Disable
*****************************************************************/ SCRIPT_CODES ScriptParsing::sc_auto_load_queue(struct script_cmds *cmd) { SCRIPT_CODES error = script_invalid_parameter; bool state = false; if(!cmd) return script_function_parameter_error; if(cmd->argc && cmd->args[0]) { error = test_on_off_state(state, cmd->args[0]); if(error == script_no_errors) this->auto_load_queue(state); } return error; } /** ************************************************************** * \brief Set the base encoding type.
* \param cmd Pointer to matching struct script_cmds script * command. * \return SCRIPT_CODES error see \ref script_codes * \par Script Command:
* \"BASE:\<64|128|256\>\"
* \par Script Parameters:
* 64 = Base64
* 128 = Base128
* 256 = Base256
*****************************************************************/ SCRIPT_CODES ScriptParsing::sc_base_encode(struct script_cmds *cmd) { if(!cmd) return script_function_parameter_error; int value = 0; if(cmd->argc && cmd->args[0]) { value = atoi(cmd->args[0]); switch(value) { case 64: case 128: case 256: break; default: LOG_INFO("%s Valid Parameters: 64, 128, or 256.", cmd->command); return script_invalid_parameter; } this->base(value); } return script_no_errors; } /** ************************************************************** * \brief Set the block count. * \param cmd Pointer to matching struct script_cmds script * command. * \return SCRIPT_CODES error see \ref script_codes * \par Script Command:
* \"Blocks:\\"
* \par Script Parameters:
* value = 16, 32, 48, ..., 2048
*****************************************************************/ SCRIPT_CODES ScriptParsing::sc_block_count(struct script_cmds *cmd) { if(!cmd) return script_function_parameter_error; int value = 0; int modulus = 0; if(cmd->argc && cmd->args[0]) { value = atoi(cmd->args[0]); modulus = value % 16; if(modulus == 0) { this->blocks(value); } else { LOG_INFO("%s Parameters are modulus 16 values (16, 32,..., 2048).", cmd->command); return script_invalid_parameter; } } return script_no_errors; } /** ************************************************************** * \brief Set the transmitting stations callsign. * \param cmd Pointer to matching struct script_cmds script * command. * \return SCRIPT_CODES error see \ref script_codes * \par Script Command:
* \"CALLFROM:\\"
* \par Script Parameters:
* string = ham radio operator call sign
*****************************************************************/ SCRIPT_CODES ScriptParsing::sc_call_from(struct script_cmds *cmd) { if(!cmd) return script_function_parameter_error; if(cmd->argc && cmd->args[0]) { std::string value = ""; value.assign(cmd->args[0]); if(!value.empty()) this->call_from(value); else return script_invalid_parameter; } return script_no_errors; } /** ************************************************************** * \brief Set the receiving station(s) callsign. * \param cmd Pointer to matching struct script_cmds script * command. * \return SCRIPT_CODES error see \ref script_codes * \par Script Command:
* \"CALLTO:\\"
* \par Script Parameters:
* string = ham radio operator call sign *****************************************************************/ SCRIPT_CODES ScriptParsing::sc_call_to(struct script_cmds *cmd) { if(!cmd) return script_function_parameter_error; if(cmd->argc && cmd->args[0]) { std::string value = ""; value.assign(cmd->args[0]); if(!value.empty()) this->call_to(value); else return script_invalid_parameter; } return script_no_errors; } /** ************************************************************** * \brief Set flag to clear received missing block on a fill * retransmission. * \param cmd Pointer to matching struct script_cmds script * command. * \return SCRIPT_CODES error see \ref script_codes * \par Script Command:
* \"CLEAR MISSING:\\"
* \par Script Parameters:
* ON = Enable
* OFF = Disable
*****************************************************************/ SCRIPT_CODES ScriptParsing::sc_clear_missing(struct script_cmds *cmd) { SCRIPT_CODES error = script_invalid_parameter; bool state = false; if(!cmd) return script_function_parameter_error; if(cmd->argc && cmd->args[0]) { error = test_on_off_state(state, cmd->args[0]); if(error == script_no_errors) this->clear_missing(state); } return error; } /** ************************************************************** * \brief Remove all files in the receive queue. * \param cmd Pointer to matching struct script_cmds script * command. \return SCRIPT_CODES error see \ref script_codes * \par Script Command:
* \"CLEAR RXQ:\"
* \par Script Parameters:
* None
*****************************************************************/ SCRIPT_CODES ScriptParsing::sc_clear_rxq(struct script_cmds *cmd) { return script_no_errors; } /** ************************************************************** * \brief Remove all files in the transmit queue. * \param cmd Pointer to matching struct script_cmds script * command. \return SCRIPT_CODES error see \ref script_codes * \par Script Command:
* \"CLEAR TXQ:\"
* \par Script Parameters:
* None
*****************************************************************/ SCRIPT_CODES ScriptParsing::sc_clear_txq(struct script_cmds *cmd) { return script_no_errors; } /** ************************************************************** * \brief Enable/Disable file compression on transmitted file. * \param cmd Pointer to matching struct script_cmds script * command. \return SCRIPT_CODES error see \ref script_codes * \par Script Command:
* \"COMP:\\"
* \par Script Parameters:
* ON = Enable
* OFF = Disable
*****************************************************************/ SCRIPT_CODES ScriptParsing::sc_compression(struct script_cmds *cmd) { SCRIPT_CODES error = script_invalid_parameter; bool state = false; if(!cmd) return script_function_parameter_error; if(cmd->argc && cmd->args[0]) { error = test_on_off_state(state, cmd->args[0]); if(error == script_no_errors) this->comp(state); } return error; } /** ************************************************************** * \brief Set the event type used when events are enabled. * \param cmd Pointer to matching struct script_cmds script * command. * \return SCRIPT_CODES error see \ref script_codes * \par Script Command:
* \"EVENT TYPE:\\"
* \par Script Parameters:
* \"5 min\" = Transmit every 5 minutes
* \"15 min\" = Transmit every 15 minutes
* \"30 min\" = Transmit every 30 minutes
* \"Hourly\" = Transmit every hour
* \"Even hours\" = Transmit every even hour
* \"Odd hours\" = Transmit every odd hour
* \"Repeated at\" = Transmit at specific time intervals repeatedly
* \"One time at\" = Transmit at specific time intervals once
* \"Continuous at\" = Transmit between specific time intervals repeatedly
*****************************************************************/ SCRIPT_CODES ScriptParsing::sc_event_type(struct script_cmds *cmd) { if(!cmd) return script_function_parameter_error; static const char *valid_values[] = { (char *) "5 MIN", (char *) "15 MIN", (char *) "30 MIN", (char *) "HOURLY", (char *) "EVEN HOURS", (char *) "ODD HOURS", (char *) "REPEATED AT", (char *) "ONE TIME AT", (char *) "CONTINUOUS AT" }; static const int event_ref[] = { et_5_min, et_15_min, et_30_min, et_hourly, et_even_hours, et_odd_hours, et_repeat_at, et_one_time_at, et_continious_at }; int match = -1; SCRIPT_CODES error = script_invalid_parameter; size_t count = (sizeof(valid_values)/sizeof(char *)); size_t index = 0; std::string value = ""; if(cmd->argc && cmd->args[0]) { value.assign(cmd->args[0]); if(value.empty()) return script_invalid_parameter; to_uppercase(value); for(index = 0; index < count; index++) { match = strncmp(value.c_str(), valid_values[index], MAX_PARAMETER_LENGTH); if(match == 0) { this->event_type(event_ref[index]); return script_no_errors; } } } return error; } /** ************************************************************** * \brief Assign event times * \param cmd Pointer to matching struct script_cmds script * command. * \return SCRIPT_CODES error see \ref script_codes * \par Script Command * XMIT TIMES: (Continuous at) or * XMIT TIMES:,,... (all other event types) * All times are in 0000 through 2359 Hr (zulu/utc) format *****************************************************************/ SCRIPT_CODES ScriptParsing::sc_event_times(struct script_cmds *cmd) { if(!cmd) return script_function_parameter_error; char *cPtr = (char *)0; size_t count = cmd->argc; size_t hits = 0; size_t index = 0; size_t j = 0; size_t size = 0; size_t valid_data = 0; std::string valid_string = ""; if(!count) return script_parameter_error; valid_string.clear(); for(index = 0; index < count; index++) { cPtr = cmd->args[index]; if(!cPtr) break; size = strnlen(cPtr, MAX_PARAMETER_LENGTH); hits = 0; for(j = 0; j < size; j++) { if(!*cPtr) break; if(isdigit(*cPtr) || *cPtr == '-' || *cPtr == ' ') hits++; cPtr++; } if(hits == size) { valid_data++; valid_string.append(cmd->args[index]).append(" "); } } if(valid_data != count) return script_incorrectly_assigned_value; event_times(valid_string); return script_no_errors; } /** ************************************************************** * \brief Enable timed event to occur. * \param cmd Pointer to matching struct script_cmds script * command. * \return SCRIPT_CODES error see @ref script_codes * \par Script Command:
* \"EVENT TIMED:\\"
* \par Script Parameters:
* ON = Enable
* OFF = Disable
*****************************************************************/ SCRIPT_CODES ScriptParsing::sc_event_timed(struct script_cmds *cmd) { SCRIPT_CODES error = script_invalid_parameter; bool state = false; if(!cmd) return script_function_parameter_error; if(cmd->argc && cmd->args[0]) { error = test_on_off_state(state, cmd->args[0]); if(error == script_no_errors) this->event_timed(state); } return error; } /** ************************************************************** * \brief Enable event transmission. * \param cmd Pointer to matching struct script_cmds script * command. * \return SCRIPT_CODES error see @ref script_codes * \par Script Command:
* \"EVENT:\\"
* \par Script Parameters:
* ON = Enable
* OFF = Disable
*****************************************************************/ SCRIPT_CODES ScriptParsing::sc_event(struct script_cmds *cmd) { SCRIPT_CODES error = script_invalid_parameter; bool state = false; if(!cmd) return script_function_parameter_error; if(cmd->argc && cmd->args[0]) { error = test_on_off_state(state, cmd->args[0]); if(error == script_no_errors) this->event(state); } return error; } /** ************************************************************** * \brief Enable forever timed event to occur. * \param cmd Pointer to matching struct script_cmds script * command. * \return SCRIPT_CODES error see @ref script_codes * \par Script Command:
* \"EVENT FOREVER:\\"
* \par Script Parameters:
* ON = Enable
* OFF = Disable
* \par Note: * Requires event flag to be enabled. See ScriptParsing::sc_event() *****************************************************************/ SCRIPT_CODES ScriptParsing::sc_event_forever(struct script_cmds *cmd) { SCRIPT_CODES error = script_invalid_parameter; bool state = false; if(!cmd) return script_function_parameter_error; if(cmd->argc && cmd->args[0]) { error = test_on_off_state(state, cmd->args[0]); if(error == script_no_errors) this->event_forever(state); } return error; } /** ************************************************************** * \brief Varify and set file name / description parameters. * \param cmd Pointer to matching struct script_cmds script * command. * \return SCRIPT_CODES error see \ref script_codes * \par Script Command:
* \"FILE:\"
*****************************************************************/ SCRIPT_CODES ScriptParsing::sc_file(struct script_cmds *cmd) { if(!cmd) return script_function_parameter_error; char *buffer = (char *)0; SCRIPT_CODES error = script_no_errors; std::string value = ""; if(cmd->argc > 1) { buffer = new char[FILENAME_MAX]; if(!buffer) return script_memory_allocation_error; memset(buffer, 0, FILENAME_MAX); error = check_filename(cmd->args[0], buffer, FILENAME_MAX-1); if(error != script_no_errors) return error; value.assign(buffer); delete [] buffer; if(value.empty()) return script_parameter_error; this->file(value); value.assign(cmd->args[1]); if(value.size()) this->desc(value); else this->desc(""); } return script_no_errors; } /** ************************************************************** * \brief Assign modem type to hamcast position x * \param cmd Pointer to matching struct script_cmds script * command. * \return SCRIPT_CODES error see \ref script_codes * \par Script Command:
* \"HAMCAST MODEM:,\"
* \par Script Parameters:
* pos = A value of 1, 2, 3, or 4 * modem_id_string = MFSK32 (for example) *****************************************************************/ SCRIPT_CODES ScriptParsing::sc_hamcast_modem(struct script_cmds *cmd) { SCRIPT_CODES error = script_no_errors; if(!cmd) return script_function_parameter_error; bool flag = false; int diff = 0; int index = 0; int off_diff = 0; int on_diff = 0; int pos = 0; size_t size = 0; std::string value = ""; if(cmd->argc > 1) { if(cmd->args[0]) pos = atoi(cmd->args[0]); if(pos < 1 || pos > 4) { LOG_INFO("Parameter 1 out of range. (1, 2, 3, or 4)"); return script_invalid_parameter; } if(cmd->args[1]) { value.assign(cmd->args[1]); if(value.empty()) return script_invalid_parameter; to_uppercase(value); on_diff = strncmp(value.c_str(), "ON", MAX_PARAMETER_LENGTH); off_diff = strncmp(value.c_str(), "OFF", MAX_PARAMETER_LENGTH); if(on_diff == 0 || off_diff == 0) { if(on_diff == 0) flag = true; else flag = false; switch(pos) { case 1: this->hamcast_modem_1_enable(flag); break; case 2: this->hamcast_modem_2_enable(flag); break; case 3: this->hamcast_modem_3_enable(flag); break; case 4: this->hamcast_modem_4_enable(flag); break; } return script_no_errors; } if(cmd->valid_values && cmd->valid_value_count) { for(index = 0; index < cmd->valid_value_count; index++) { diff = strncmp(cmd->args[1], cmd->valid_values[index], MAX_PARAMETER_LENGTH); if(diff == 0) { switch(pos) { case 1: this->hamcast_modem_1(value); break; case 2: this->hamcast_modem_2(value); break; case 3: this->hamcast_modem_3(value); break; case 4: this->hamcast_modem_4(value); break; } return script_no_errors; } } LOG_INFO("Non-matching/unavailable modem ID string (%s).", value.c_str()); return script_invalid_parameter; } size = (int) strnlen(cmd->args[1], MAX_PARAMETER_LENGTH); if(size < 4) { error = script_invalid_parameter; } else { switch(pos) { case 1: this->hamcast_modem_1(value); break; case 2: this->hamcast_modem_2(value); break; case 3: this->hamcast_modem_3(value); break; case 4: this->hamcast_modem_4(value); break; } } } } return error; } /** ************************************************************** * \brief Enable hamcast events * \param cmd Pointer to matching struct script_cmds script * command. * \return SCRIPT_CODES error see \ref script_codes * \par Script Command:
* \"HAMCAST:\\"
* \par Script Parameters:
* ON = Enable
* OFF = Disable
*****************************************************************/ SCRIPT_CODES ScriptParsing::sc_hamcast(struct script_cmds *cmd) { SCRIPT_CODES error = script_invalid_parameter; bool state = false; if(!cmd) return script_function_parameter_error; if(cmd->argc && cmd->args[0]) { error = test_on_off_state(state, cmd->args[0]); if(error == script_no_errors) this->hamcast(state); } return error; } /** ************************************************************** * \brief Enable/Disable Header modem use.
* \param cmd Pointer to matching struct script_cmds script * command. * \return SCRIPT_CODES error see \ref script_codes * \par Script Command:
* \"HEADER:\\"
* \par Script Parameters:
* ON = Enable
* OFF = Disable
*****************************************************************/ SCRIPT_CODES ScriptParsing::sc_header(struct script_cmds *cmd) { SCRIPT_CODES error = script_invalid_parameter; bool state = false; if(!cmd) return script_function_parameter_error; if(cmd->argc && cmd->args[0]) { error = test_on_off_state(state, cmd->args[0]); if(error == script_no_errors) this->auto_load_queue(state); } return error; } /** ************************************************************** * \brief Process and test modem parameters for validity. * \param cmd Pointer to matching struct script_cmds script * command. * \return SCRIPT_CODES error see \ref script_codes * \par "Script Command:"
* \"HEADER MODEM:\\"
* Example:\"HEADER MODEM:BPSK250\"

*****************************************************************/ SCRIPT_CODES ScriptParsing::sc_header_modem(struct script_cmds *cmd) { SCRIPT_CODES error = script_no_errors; if(!cmd) return script_function_parameter_error; int diff = 0; int index = 0; std::string value = ""; if(cmd->argc > 0 && cmd->args[0]) { value.assign(cmd->args[0]); if(value.empty()) return script_invalid_parameter; to_uppercase(value); if(strncmp(value.c_str(), "ON", MAX_PARAMETER_LENGTH) == 0) { header_modem_enable(true); return script_no_errors; } if(strncmp(value.c_str(), "OFF", MAX_PARAMETER_LENGTH) == 0) { header_modem_enable(false); return script_no_errors; } if(cmd->valid_values && cmd->valid_value_count) { for(index = 0; index < cmd->valid_value_count; index++) { diff = strncmp(cmd->args[0], cmd->valid_values[index], MAX_PARAMETER_LENGTH); if(diff == 0) { header_modem(cmd->args[0]); return script_no_errors; } } LOG_INFO("Non-matching/unavailable modem ID string (%s).", value.c_str()); return script_invalid_parameter; } } return error; } /** ************************************************************** * \brief Set the header repeat count * \param cmd Pointer to matching struct script_cmds script * command. * \return SCRIPT_CODES error see \ref script_codes * \par Script Command:
* \"HDR REPEAT:\"
* \par Script Parameters:
* number = 1,2,3,...,10
*****************************************************************/ SCRIPT_CODES ScriptParsing::sc_hdr_repeat(struct script_cmds *cmd) { if(!cmd) return script_function_parameter_error; int value = 0; if(cmd->argc && cmd->args[0]) { value = atoi(cmd->args[0]); if(value < 1) value = 1; if(value > 10) value = 10; this->hdr_repeat(value); } return script_no_errors; } /** ************************************************************** * \brief Assign INFO field * \param cmd Pointer to matching struct script_cmds script * command. * \return SCRIPT_CODES error see \ref script_codes * \par Script Command:
* \"INFO:\"
* \par Script Parameters:
* string = Byte value 32 to byte value 255
*****************************************************************/ SCRIPT_CODES ScriptParsing::sc_info(struct script_cmds *cmd) { if(!cmd) return script_function_parameter_error; if(cmd->argc && cmd->args[0]) { std::string value = ""; value.assign(cmd->args[0]); if(value.empty()) return script_incorrectly_assigned_value; this->info(value); } return script_no_errors; } /** ************************************************************** * \brief Enable/Disable Header modem use. * \param cmd Pointer to matching struct script_cmds script * command. * \return SCRIPT_CODES error see \ref script_codes * \par Script Command:
* \"INHIBIT HEADER:\\"
* \par Script Parameters:
* ON = Enable
* OFF = Disable
*****************************************************************/ SCRIPT_CODES ScriptParsing::sc_inhibit_header(struct script_cmds *cmd) { SCRIPT_CODES error = script_invalid_parameter; bool state = false; if(!cmd) return script_function_parameter_error; if(cmd->argc && cmd->args[0]) { error = test_on_off_state(state, cmd->args[0]); if(error == script_no_errors) this->inhibit_header(state); } return error; } /** ************************************************************** * \brief Enable/Disable interval timer. * \param cmd Pointer to matching struct script_cmds script * command. * \return SCRIPT_CODES error see \ref script_codes * \par Script Command:
* \"INTERVAL:\\"
* \par Script Parameters:
* ON = Enable
* OFF = Disable
*****************************************************************/ SCRIPT_CODES ScriptParsing::sc_interval(struct script_cmds *cmd) { SCRIPT_CODES error = script_invalid_parameter; bool state = false; if(!cmd) return script_function_parameter_error; if(cmd->argc && cmd->args[0]) { error = test_on_off_state(state, cmd->args[0]); if(error == script_no_errors) this->interval(state); } return error; } /** ************************************************************** * \brief Load Queue script execution. * \param cmd Pointer to matching struct script_cmds script * command. * \return SCRIPT_CODES error see \ref script_codes * \par Script Commands: * LOAD QUEUE:FILE,
* LOAD QUEUE:PATH,
* \par Parameters * FILE = Indicates next prarmeter is a file name of the queue load script.
* PATH = Indicates next prarmeter is a path to the file name.
* \par Note(s): * This command is recursive for a maximum of MAX_SUB_SCRIPTS times. * Queue scripts use a subset of availble commands see default_script_command_table[] * int flags field for details. The parent ScriptParsing enviroment is * duplicated to the newly created subscript. Any modification to the subscript * environment will not effect the parent. *****************************************************************/ SCRIPT_CODES ScriptParsing::sc_load_queue(struct script_cmds *cmd) { char *buffer = (char *)0; SCRIPT_CODES error = script_no_errors; std::string value = ""; if(sub_script_count() >= MAX_SUB_SCRIPTS) return script_max_sub_script_reached; if(!cmd) return script_function_parameter_error; if(cmd->argc > 1 && cmd->args[0] && cmd->args[1]) { value.assign(cmd->args[0]); if(value.empty()) return script_invalid_parameter; to_uppercase(value); if(strncmp(value.c_str(), "PATH", 4) == 0) { value.assign(cmd->args[1]); if(value.empty()) return script_invalid_parameter; error = check_path(cmd->args[1]); if(error != script_no_errors) return error; this->queue_path(value); return script_no_errors; } if(strncmp(value.c_str(), "FILE", 4) == 0) { value.assign(cmd->args[1]); if(value.empty()) return script_invalid_parameter; buffer = new char[FILENAME_MAX]; if(!buffer) return script_memory_allocation_error; memset(buffer, 0, FILENAME_MAX); error = check_filename(cmd->args[1], buffer, FILENAME_MAX-1, QUEUE_COMMAND); if(error != script_no_errors) return error; this->queue_filename(value); ScriptParsing *sp = new ScriptParsing; if(!sp) { delete [] buffer; return script_subscript_exec_fail; } if(sp->CopyScriptParsingEnv(this)) { delete [] buffer; return script_subscript_exec_fail; } sp->file_type(QUEUE_COMMAND); error = sp->parse_commands(buffer); delete [] buffer; #ifdef TESTING printf("Modem:%s\n", this->modem().c_str()); #endif // TESTING return error; } } return script_invalid_parameter; } /** ************************************************************** * \brief Flag the queue loader to load from the tx directory * \param cmd Pointer to matching struct script_cmds script * command. * \return SCRIPT_CODES error see \ref script_codes * \par Script Command:
* \"LOAD TXDIR:\\"
* \par Script Parameters:
* ON = Enable
* OFF = Disable
*****************************************************************/ SCRIPT_CODES ScriptParsing::sc_load_txdir(struct script_cmds *cmd) { SCRIPT_CODES error = script_invalid_parameter; bool state = false; if(!cmd) return script_function_parameter_error; if(cmd->argc && cmd->args[0]) { error = test_on_off_state(state, cmd->args[0]); if(error == script_no_errors) this->load_txdir(state); } return error; } /** ************************************************************** * \brief Process and test modem parameters for validity. * \param cmd Pointer to matching struct script_cmds script * command. * \return SCRIPT_CODES error see \ref script_codes * \par "Script Command:"
* \"MODEM:\\" Example:\"MODEM:BPSK250\"
*****************************************************************/ SCRIPT_CODES ScriptParsing::sc_modem(struct script_cmds *cmd) { if(!cmd) return script_function_parameter_error; std::string value = ""; if(cmd->argc) { value.assign(cmd->args[0]); if(value.empty()) return script_parameter_error; if(cmd->valid_values && cmd->valid_value_count) { int index = 0; int diff = 0; for(index = 0; index < cmd->valid_value_count; index++) { diff = strncmp(cmd->args[0], cmd->valid_values[index], MAX_PARAMETER_LENGTH); if(diff == 0) { this->modem(value); return script_no_errors; } } LOG_INFO("Non-matching/available modem ID string used (%s).", value.c_str()); return script_invalid_parameter; } this->modem(value); } return script_no_errors; } /** ************************************************************** * \brief Base path for file access that follows. * \param cmd Pointer to matching struct script_cmds script * command. * \return SCRIPT_CODES error see \ref script_codes * \par "Script Command:"
* \"PATH:\\" Example:\"PATH:/usr/local\"
*****************************************************************/ SCRIPT_CODES ScriptParsing::sc_path(struct script_cmds *cmd) { if(!cmd) return script_function_parameter_error; SCRIPT_CODES error = script_invalid_parameter; std::string value = ""; if(cmd->argc) { value.assign(cmd->args[0]); if(value.empty()) return script_parameter_error; error = check_path(value.c_str()); if(error == script_no_errors) { this->path(value); } } return error; } /** ************************************************************** * \brief Enable/Disable AMP2 protocol in the transmitted data. * \param cmd Pointer to matching struct script_cmds script * command. * \return SCRIPT_CODES error see \ref script_codes * \par Script Command:
* \"PROTO:\\"
* \par Script Parameters:
* ON = Enable
* OFF = Disable
*****************************************************************/ SCRIPT_CODES ScriptParsing::sc_proto(struct script_cmds *cmd) { SCRIPT_CODES error = script_invalid_parameter; bool state = false; if(!cmd) return script_function_parameter_error; if(cmd->argc && cmd->args[0]) { error = test_on_off_state(state, cmd->args[0]); if(error == script_no_errors) this->proto(state); } return error; } /** ************************************************************** * \brief Enable/Disable unproto makers. * \param cmd Pointer to matching struct script_cmds script * command. * \return SCRIPT_CODES error see \ref script_codes * \par Script Command:
* \"UNPROTO MARKERS:\\"
* \par Script Parameters:
* ON = Enable
* OFF = Disable
*****************************************************************/ SCRIPT_CODES ScriptParsing::sc_unproto_makers(struct script_cmds *cmd) { SCRIPT_CODES error = script_invalid_parameter; bool state = false; if(!cmd) return script_function_parameter_error; if(cmd->argc && cmd->args[0]) { error = test_on_off_state(state, cmd->args[0]); if(error == script_no_errors) this->unproto_markers(state); } return error; } /** ************************************************************** * \brief Event queue loading path (full path and file name) * \param cmd Pointer to matching struct script_cmds script * command. * \return SCRIPT_CODES error see \ref script_codes * \par Script Command:
* \"QUEUE FILEPATH:\\"
*****************************************************************/ SCRIPT_CODES ScriptParsing::sc_queue_filepath(struct script_cmds *cmd) { if((cmd->argc > 0) && !cmd->args[0]) return script_invalid_parameter; FILE *fd = fopen(cmd->args[0], "r"); if(fd) { fclose(fd); queue_filepath(cmd->args[0]); return script_no_errors; } return script_file_not_found; } /** ************************************************************** * \brief Reset program parameters * \param cmd Pointer to matching struct script_cmds script * command. * \return SCRIPT_CODES error see \ref script_codes * \par Script Command:
* \"RESET:\\"
* \par Script Parameters:
* ALL = Complete reset of all variables
* PARTIAL = Parital reset of variables.
* \par NOTE: * The resting of the data is handled by the callback function. *****************************************************************/ SCRIPT_CODES ScriptParsing::sc_reset(struct script_cmds *cmd) { SCRIPT_CODES error = script_invalid_parameter; if(!cmd) return script_function_parameter_error; if(cmd->argc && cmd->args[0]) { int diff = 0; std::string value; value.assign(cmd->args[0]); if(value.empty()) return script_invalid_parameter; to_uppercase(value); diff = strncmp(value.c_str(), "PARTIAL", MAX_PARAMETER_LENGTH); if(diff == 0) { this->reset(RESET_PARTIAL); return script_no_errors; } diff = strncmp(value.c_str(), "ALL", MAX_PARAMETER_LENGTH); if(diff == 0) { this->reset(RESET_ALL); return script_no_errors; } } return error; } /** ************************************************************** * \brief Set the receive interval time (seconds) * \param cmd Pointer to matching struct script_cmds script * command. * \return SCRIPT_CODES error see \ref script_codes * \par Script Command:
* \"RX INTERVAL:\\"
* Value range 1-120 *****************************************************************/ SCRIPT_CODES ScriptParsing::sc_rx_interval(struct script_cmds *cmd) { if(!cmd) return script_function_parameter_error; int value = 0; if(cmd->argc && cmd->args[0]) { value = atoi(cmd->args[0]); if(value < 1) value = 1; if(value > 120) value = 120; this->rx_interval(value); } return script_no_errors; } /** ************************************************************** * \brief Modem sync method between FLAMP and FLDIGI * \param cmd Pointer to matching struct script_cmds script * command. * \return SCRIPT_CODES error see \ref script_codes * \par Script Command:
* \"SYNC WITH:\,\\"
* \par Script Parameters:
* FLAMP = FLDIGI Sync's with FLAMP
* FLDIGI = FLAMP Sync's with FLDIGI
* PRIOR = Set FLDIGI to FLAMP's modem prior to transmitting data * ON = Enable * OFF = Disable *****************************************************************/ SCRIPT_CODES ScriptParsing::sc_sync_with(struct script_cmds *cmd) { SCRIPT_CODES error = script_invalid_parameter; bool state = false; char *valid_values[] = { (char *) "FLAMP", (char *) "FLDIGI", (char *) "PRIOR" }; if(!cmd) return script_function_parameter_error; if(cmd->argc && cmd->args[0]) { int diff = 0; std::string value; value.assign(cmd->args[0]); if(value.empty()) return script_invalid_parameter; to_uppercase(value); for(size_t index = 0; index < sizeof(valid_values)/sizeof(char *); index++) { diff = strncmp(value.c_str(), valid_values[index], MAX_PARAMETER_LENGTH); if(diff == 0) { error = test_on_off_state(state, cmd->args[1]); if(error == script_no_errors) { switch(index) { case 0: this->sync_with_flamp(state); break; case 1: this->sync_with_fldigi(state); break; case 2: this->sync_with_prior(state); break; } } break; } } } return error; } /** ************************************************************** * \brief Set the transmit interval in minutes * \param cmd Pointer to matching struct script_cmds script * command. * \return SCRIPT_CODES error see \ref script_codes * \par Script Command:
* \"TX INTERVAL:\\"
* \par Script Parameters:
* Value range 1 to 8
*****************************************************************/ SCRIPT_CODES ScriptParsing::sc_tx_interval(struct script_cmds *cmd) { if(!cmd) return script_function_parameter_error; float value = 0; if(cmd->argc && cmd->args[0]) { value = atof(cmd->args[0]); if(value < 1) value = 1; if(value > 8) value = 8; this->tx_interval(value); } return script_no_errors; } /** ************************************************************** * \brief Enable/Diable transmit on report. * \param cmd Pointer to matching struct script_cmds script * command. * \return SCRIPT_CODES error see \ref script_codes * \par Script Command:
* \"TX REPORT:\\"
* \par Script Parameters:
* ON = Enable
* OFF = Disable
*****************************************************************/ SCRIPT_CODES ScriptParsing::sc_tx_report(struct script_cmds *cmd) { SCRIPT_CODES error = script_invalid_parameter; bool state = false; if(!cmd) return script_function_parameter_error; if(cmd->argc && cmd->args[0]) { error = test_on_off_state(state, cmd->args[0]); if(error == script_no_errors) this->tx_report(state); } return error; } /** ************************************************************** * \brief * \param cmd Pointer to matching struct script_cmds script * command. * \return SCRIPT_CODES error see \ref script_codes * \par Script Command:
* \"WARN USER:\\"
* \par Script Parameters:
* ON = Enable
* OFF = Disable
*****************************************************************/ SCRIPT_CODES ScriptParsing::sc_warn_user(struct script_cmds *cmd) { SCRIPT_CODES error = script_invalid_parameter; bool state = false; if(!cmd) return script_function_parameter_error; if(cmd->argc && cmd->args[0]) { error = test_on_off_state(state, cmd->args[0]); if(error == script_no_errors) this->warn_user(state); } return error; } /** ************************************************************** * \brief Set the number of times transmited data is repeated. * \param cmd Pointer to matching struct script_cmds script * command. * \return SCRIPT_CODES error see \ref script_codes * \par Script Command:
* \"XMIT REPEAT:\\"
* \par Script Parameters:
* count = number of transmit repeats
* Value range 1 - 100 *****************************************************************/ SCRIPT_CODES ScriptParsing::sc_xmit_repeat(struct script_cmds *cmd) { if(!cmd) return script_function_parameter_error; int value = 0; if(cmd->argc && cmd->args[0]) { value = atoi(cmd->args[0]); if(value < 1) value = 1; if(value > 100) value = 100; this->xmit_repeat(value); } return script_no_errors; } /** ************************************************************** * \brief Used for initialization of the function vector table. * \param cmd Pointer to matching struct script_cmds script * command. * \return SCRIPT_CODES error see \ref script_codes *****************************************************************/ SCRIPT_CODES ScriptParsing::sc_dummy(struct script_cmds *cmd) { return script_no_errors; } /** ************************************************************** * \brief Convert error numbers into human readable form. * \param error_no Error number to convert. * \param line_number The offending line number in the script file. * \param cmd The script command is question. * \return SCRIPT_CODES error see \ref script_codes *****************************************************************/ char * ScriptParsing::script_error_string(SCRIPT_CODES error_no, int line_number, char *cmd) { char *es = (char *) ""; memset(error_buffer, 0, sizeof(error_buffer)); memset(error_cmd_buffer, 0, sizeof(error_cmd_buffer)); memset(error_string, 0, sizeof(error_string)); if(cmd) { strncpy(error_cmd_buffer, cmd, sizeof(error_cmd_buffer)-1); } switch(error_no) { case script_command_not_found: es = (char *) "Command Not Found"; break; case script_non_script_file: es = (char *) "Not a script file/tag not found"; break; case script_parameter_error: es = (char *) "Invalid parameter"; break; case script_function_parameter_error: es = (char *) "Invalid function parameter (internal non-script error)"; break; case script_mismatched_quotes: es = (char *) "Missing paired quotes (\")"; break; case script_general_error: es = (char *) "General Error"; break; case script_no_errors: es = (char *) "No Errors"; break; case script_char_match_not_found: es = (char *) "Character searched not found"; break; case script_end_of_line_reached: es = (char *) "End of line reached"; break; case script_file_not_found: es = (char *) "File not found"; break; case script_path_not_found: es = (char *) "Directory path not found"; break; case script_args_eol: es = (char *) "Unexpected end of parameter (args[]) list found"; break; case script_param_check_eol: es = (char *) "Unexpected end of parameter check list found"; break; case script_paramter_exceeds_length: es = (char *) "Character count in args[] parameter exceeds expectations"; break; case script_memory_allocation_error: es = (char *) "Memory Allocation Error (internal non-script error)"; break; case script_incorrectly_assigned_value: es = (char *) "Passed parameter is not of the expected type."; break; case script_invalid_parameter: es = (char *) "Parameter is not valid."; break; case script_command_seperator_missing: es = (char *) "Command missing ':'."; break; case script_max_sub_script_reached: es = (char *) "Maximum open subscripts reached."; break; case script_subscript_exec_fail: es = (char *) "Subscript execution fail (internal)."; break; default: es = (char *) "Undefined error"; } snprintf(error_buffer, sizeof(error_buffer)-1, "Line: %d Error:%d %s (%s)", line_number, error_no, es, error_cmd_buffer); return error_buffer; } /** ************************************************************** * \brief Search for first occurrence of a non white space * \param data Data pointer to search. * \param limit Number of bytes in the data buffer. * \param error returned error code. * \return Pointer to character if found. Otherwise, return null * \par Note:
* The searched condition is ignored if the expected content is * encapsulated in quotes \(\"\"\). *****************************************************************/ char * ScriptParsing::skip_white_spaces(char * data, char * limit, SCRIPT_CODES &error) { char *cPtr = (char *) 0; if(!data || !limit) { error = script_function_parameter_error; return (char *)0; } for(cPtr = data; cPtr < limit; cPtr++) { if(*cPtr > ' ') { error = script_no_errors; return cPtr; } } error = script_end_of_line_reached; return (char *)0; // End of line reached. } /** ************************************************************** * \brief Search for the first occurrence on a non number. * \param data Data pointer to search. * \param limit Number of bytes in the data buffer. * \param error returned error code. * \return Pointer to character if found. Otherwise, return null * \par Note:
* The searched condition is ignored if the expected content is * encapsulated in quotes \(\"\"\). *****************************************************************/ char * ScriptParsing::skip_numbers(char * data, char * limit, SCRIPT_CODES &error) { char *cPtr = (char *) 0; int q_flag = 0; if(!data || !limit) { error = script_function_parameter_error; return (char *)0; } for(cPtr = data; cPtr < limit; cPtr++) { if(*cPtr == '"') // Check for encapsulated strings ("") q_flag++; if((q_flag & 0x1)) // Continue if string is encapsulated continue; if(!isdigit(*cPtr)) { error = script_no_errors; return cPtr; } } if(q_flag & 0x1) { error = script_mismatched_quotes; } else { error = script_end_of_line_reached; } return (char *)0; // End of line reached. } /** ************************************************************** * \brief Skip characters until either a number or white space is * found. * \param data Data pointer to search. * \param limit Number of bytes in the data buffer. * \param error returned error code. * \return Pointer to character if found. Otherwise, return null * \par Note:
* The searched condition is ignored if the expected content is * encapsulated in quotes \(\"\"\). *****************************************************************/ char * ScriptParsing::skip_characters(char * data, char * limit, SCRIPT_CODES &error) { char *cPtr = (char *) 0; int q_flag = 0; if(!data || !limit) { error = script_function_parameter_error; return (char *)0; } for(cPtr = data; cPtr < limit; cPtr++) { if(*cPtr == '"') // Check for encapsulated strings ("") q_flag++; if((q_flag & 0x1)) // Continue if string is encapsulated continue; if(isdigit(*cPtr) || *cPtr <= ' ') { error = script_no_errors; return cPtr; } } if(q_flag & 0x1) { error = script_mismatched_quotes; } else { error = script_end_of_line_reached; } return (char *)0; // End of line reached. } /** ************************************************************** * \brief Search for the first occurrence of a white space. * \param data Data pointer to search. * \param limit Number of bytes in the data buffer. * \param error returned error code. * \return Pointer to character if found. Otherwise, return null * \par Note:
* The searched condition is ignored if the expected content is * encapsulated in quotes \(\"\"\). *****************************************************************/ char * ScriptParsing::skip_alpha_numbers(char * data, char * limit, SCRIPT_CODES &error) { char *cPtr = (char *) 0; int q_flag = 0; if(!data || !limit) { error = script_function_parameter_error; return (char *)0; } for(cPtr = data; cPtr < limit; cPtr++) { if(*cPtr == '"') // Check for encapsulated strings ("") q_flag++; if((q_flag & 0x1)) // Continue if string is encapsulated continue; if(*cPtr <= ' ') { error = script_no_errors; return cPtr; } } if(q_flag & 0x1) { error = script_mismatched_quotes; } else { error = script_end_of_line_reached; } return (char *)0; // End of line reached. } /** ************************************************************** * \brief Search for first occurrence of 'character' * \param c Character to search for * \param data Pointer to Data to search for character in. * \param limit Number of bytes in the data buffer. * \param error returned error code. * \return Pointer to character if found. Otherwise, return null * \par Note:
* The searched condition is ignored if the expected content is * encapsulated in quotes \(\"\"\). *****************************************************************/ char * ScriptParsing::skip_to_character(char c, char * data, char * limit, SCRIPT_CODES &error) { char *cPtr = (char *) 0; int q_flag = 0; if(!data || !limit) { error = script_function_parameter_error; return (char *)0; } for(cPtr = data; cPtr < limit; cPtr++) { if(*cPtr == '"') // Check for encapsulated strings ("") q_flag++; if((q_flag & 0x1)) // Continue if string is encapsulated continue; if(*cPtr == c) { // Match found. Return pointer to it's location error = script_no_errors; return cPtr; } } if(q_flag & 0x1) { error = script_mismatched_quotes; } else { error = script_end_of_line_reached; } return (char *)0; // End of line reached. } /** ************************************************************** * \brief Replace CR, LF, and '#' with '0' (by value) * \param data Search data pointer * \param limit data buffer size * \return void (none) * \par Note:
* The searched condition is ignored if the remark character \(#\) * is encapsulated in quotes \(\"\"\). *****************************************************************/ SCRIPT_CODES ScriptParsing::remove_crlf_comments(char *data, char *limit, size_t &count) { char *cPtr = (char *) 0; int q_flag = 0; SCRIPT_CODES error = script_no_errors; if(!data || !limit) return script_function_parameter_error; count = 0; for(cPtr = data; cPtr < limit; cPtr++) { if(*cPtr == '\r' || *cPtr == '\n') { *cPtr = 0; return script_no_errors; } if(*cPtr == '"') q_flag++; if((q_flag & 0x1)) continue; if(*cPtr == '#') { *cPtr = 0; break; } if(*cPtr > ' ') count++; } // Remove trailing white spaces. while(cPtr >= data) { if(*cPtr <= ' ') *cPtr = 0; else break; cPtr--; } if(q_flag & 0x1) { error = script_mismatched_quotes; } else { error = script_end_of_line_reached; } return error; } /** ************************************************************** * \brief Copy memory from address to address to the source buffer. * \param buffer Destination buffer * \param sPtr Start of the copy Address * \param ePtr End of the copy Address * \param limit Destination buffer size * command. * \return SCRIPT_CODES error see \ref script_codes *****************************************************************/ SCRIPT_CODES ScriptParsing::copy_command(char *buffer, char *sPtr, char *ePtr, size_t limit) { if(!buffer || !sPtr || !ePtr || limit < 1) { return script_function_parameter_error; } char *dPtr = buffer; size_t index = 0; for(index = 0; index < limit; index++) { *dPtr++ = toupper(*sPtr++); if(sPtr >= ePtr) break; } return script_no_errors; } /** ************************************************************** * \brief Remove leading/trailing white spaces and quotes. * \param buffer Destination buffer * \param limit passed buffer size * \return void *****************************************************************/ void ScriptParsing::trim(char *buffer, size_t limit) { char *s = (char *)0; char *e = (char *)0; char *dst = (char *)0; size_t count = 0; if(!buffer || limit < 1) { return; } for(count = 0; count < limit; count++) if(buffer[count] == 0) break; if(count < 1) return; s = buffer; e = &buffer[count-1]; for(size_t i = 0; i < count; i++) { if((*s <= ' ') || (*s == '"')) s++; else break; } while(e > s) { if((*e <= ' ') || (*e == '"')) *e = 0; else break; e--; } dst = buffer; for(; s <= e; s++) { *dst++ = *s; } *dst = 0; } /** ************************************************************** * \brief Parse the parameters and seperate into individual components. * \param s char pointer to the start of the string. * \param e char pointer to the end of the string. * \param matching_command pointer to the data strucure of the matching * command. See \ref SCRIPT_COMMANDS * \return SCRIPT_CODES error see \ref script_codes *****************************************************************/ SCRIPT_CODES ScriptParsing::parse_parameters(char *s, char *e, SCRIPT_COMMANDS *matching_command) { char *c = s; char *d = (char *)0; int index = 0; int parameter_count = matching_command->argc; int count = 0; long tmp = 0; SCRIPT_CODES error = script_no_errors; // Clear the old pointers. for(index = 0; index < MAX_CMD_PARAMETERS; index++) { matching_command->args[index] = (char *)0; } if(parameter_count > 0) { count = parameter_count - 1; for(index = 0; index < count; index++) { c = skip_white_spaces(c, e, error); if(error != script_no_errors) return script_parameter_error; d = skip_to_character(',', c, e, error); if(error != script_no_errors) return script_parameter_error; *d = 0; tmp = (long) (d - c); if(tmp > 0) trim(c, (size_t)(tmp)); matching_command->args[index] = c; c = d + 1; } c = skip_white_spaces(c, e, error); if(error) return error; d = skip_alpha_numbers(c, e, error); if(error) return error; *d = 0; tmp = (long) (d - c); if(tmp > 0) trim(c, (size_t)(tmp)); matching_command->args[index] = c; } #ifdef TESTING for(int i = 0; i < parameter_count; i++) if(matching_command->args[i]) printf("parameters %d (%s)\n", i, matching_command->args[i]); #endif error = check_parameters(matching_command); if(error != script_no_errors) return error; if(matching_command->func) error = (this->*matching_command->func)(matching_command); if(error) return error; return script_no_errors; } /** ************************************************************** * \brief Execute callback function. * \param cb_data Pointer for making a copy of the data to prevent * exterior alteration of source information. * \return 0 = No error
\< 0 = Error
*****************************************************************/ int ScriptParsing::call_callback(SCRIPT_COMMANDS *cb_data) { int argc = 0; int error = 0; int index = 0; SCRIPT_COMMANDS *tmp = (SCRIPT_COMMANDS *)0; size_t count = 0; if(!cb_data || !cb_data->cb) return -1; argc = cb_data->argc; tmp = new SCRIPT_COMMANDS; if(!tmp) return -1; memset(tmp, 0, sizeof(SCRIPT_COMMANDS)); for(index = 0; index < argc; index++) { if(cb_data->args[index]) { count = strnlen(cb_data->args[index], MAX_PARAMETER_LENGTH-1); tmp->args[index] = new char[count+1]; if(tmp->args[index]) { memset(tmp->args[index], 0, count+1); strncpy(tmp->args[index], cb_data->args[index], count); } else { error = -1; break; } } else break; } if(error > -1) { // Fill SCRIPT_COMMANDS (tmp) struct with useful data. tmp->flags = cb_data->flags; tmp->command_length = cb_data->command_length; tmp->argc = cb_data->argc; strncpy(tmp->command, cb_data->command, MAX_COMMAND_LENGTH); // Initialize with do nothing functions tmp->func = &ScriptParsing::sc_dummy; tmp->cb = callback_dummy; error = (*cb_data->cb)(this, tmp); } if(tmp) { for(index = 0; index < argc; index++) { if(tmp->args[index]) { delete [] tmp->args[index]; } } delete tmp; } return error; } /** ************************************************************** * \brief Parse a single line of data from the script file being read. * \param data Pointer the the script scring in question * \param buffer_size buffer size of the data pointer. * command. * \return SCRIPT_CODES error see \ref script_codes *****************************************************************/ SCRIPT_CODES ScriptParsing::parse_single_command(char *data, size_t buffer_size) { char *buffer = (char *)0; char *cPtr = (char *)0; char *endPtr = (char *)0; char *ePtr = (char *)0; int allocated_buffer_size = 128; int callback_error = 0; size_t cmd_size = 0; size_t cmp_results = 0; size_t index = 0; size_t size = 0; SCRIPT_CODES error = script_no_errors; cPtr = data; endPtr = &data[buffer_size]; cPtr = skip_white_spaces(cPtr, endPtr, error); if(error != script_no_errors) return error; ePtr = skip_to_character(':', cPtr, endPtr, error); if(error != script_no_errors) return script_command_seperator_missing; buffer = new char [allocated_buffer_size]; if(!buffer) { LOG_INFO("Buffer allocation Error near File: %s Line %d", __FILE__, __LINE__); return script_memory_allocation_error; } memset(buffer, 0, allocated_buffer_size); error = copy_command(buffer, cPtr, ePtr, allocated_buffer_size-1); if(error != script_no_errors) { buffer[0] = 0; delete [] buffer; return error; } int str_count = str_cnt(buffer, allocated_buffer_size); trim(buffer, str_count); for(index = 0; index < _script_command_table_count; index++) { size = strnlen(_script_command_table[index].command, MAX_COMMAND_LENGTH); cmd_size = strnlen(buffer, MAX_COMMAND_LENGTH); cmp_results = memcmp(buffer, _script_command_table[index].command, size); if(cmp_results == 0 && (cmd_size == size)) { if(file_type() & _script_command_table[index].flags) { error = parse_parameters(++ePtr, endPtr, &_script_command_table[index]); if(error) { buffer[0] = 0; delete [] buffer; return error; } if(_script_command_table[index].cb) { callback_error = call_callback(&_script_command_table[index]); if(callback_error < 0) LOG_INFO("Call back for script command %s reported an Error", _script_command_table[index].command); } } else { LOG_INFO("Command %s ignored, not supported in current file type:", buffer); } break; } } buffer[0] = 0; delete [] buffer; return script_no_errors; } /** ************************************************************** * \brief Script entry point for parsing the script file. * \param file_name_path path and file name for the script to parse. * \return SCRIPT_CODES error see \ref script_codes *****************************************************************/ SCRIPT_CODES ScriptParsing::parse_commands(char *file_name_path) { bool log_error = false; char *cPtr = (char *)0; FILE *fd = (FILE *)0; int line_number = 0; SCRIPT_CODES error_code = script_no_errors; size_t count = 0; size_t tmp = 0; if(!file_name_path) { LOG_INFO("Invalid function parameter 'char *file_name_path' (null)"); return script_general_error; } fd = fopen(file_name_path, "r"); if(!fd) { LOG_INFO("Unable to open file %s", file_name_path); return script_general_error; } memset(line_buffer, 0, sizeof(line_buffer)); line_number++; char *retval = fgets(line_buffer, sizeof(line_buffer) - 1, fd); tmp = strlen(SCRIPT_FILE_TAG); line_buffer[tmp] = 0; tmp = strncmp(SCRIPT_FILE_TAG, line_buffer, tmp); if(!retval || tmp) { cPtr = script_error_string(script_non_script_file, line_number, line_buffer); LOG_INFO("%s", cPtr); fclose(fd); return script_non_script_file; } while(1) { if(ferror(fd) || feof(fd)) break; memset(line_buffer, 0, sizeof(line_buffer)); if(fgets(line_buffer, sizeof(line_buffer) - 1, fd)) line_number++; #ifdef TESTING printf("Reading: %s", line_buffer); #endif error_code = remove_crlf_comments(line_buffer, &line_buffer[sizeof(line_buffer)], count); if(count < 1) { continue; } #ifdef TESTING printf("remove_crlf_comments(%s)\n", line_buffer); #endif if(error_code >= script_no_errors) error_code = parse_single_command(line_buffer, sizeof(line_buffer) - 1); if(error_code != script_no_errors) { LOG_INFO("%s", script_error_string(error_code, line_number, line_buffer)); log_error = true; } } fclose(fd); if(log_error) { return script_general_error; } return script_no_errors; } /** ************************************************************** * \brief Destructors *****************************************************************/ ScriptParsing::~ScriptParsing() { if(_script_command_table) delete [] _script_command_table; } /** ************************************************************** * \brief Dummy callback function for initialization of * function pointers. * \param sp The calling ScriptParsing Class * \param sc Command data structure pointer to the matching script * command. * \return 0 = No error
\< 0 = Error
*****************************************************************/ int callback_dummy(ScriptParsing *sp, struct script_cmds *sc) { return 0; } /** ******************************************************** * \brief Determine the length of the string with a count * limitation. * \return signed integer. The number of characters in the * array not to excede count limit. ***********************************************************/ int ScriptParsing::str_cnt(char * str, int count_limit) { if(!str || (count_limit < 1)) return 0; int value = 0; for(int index = 0; index < count_limit; index++) { if(str[index] == 0) break; value++; } return value; } flamp-2.2.12/src/utils/time_table_dat.cxx0000664000175000017500000104242114517740574015252 00000000000000/********************************************** * Software Generated - Do Not Modify **********************************************/ typedef struct { char *mode_name; float scale; float overhead; float table[256]; } MODE_TIME_TABLE; static MODE_TIME_TABLE mode_time_table[] = { { (char *) "DOMX16", 1.0, 1.856000, { 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.128000, 0.192000, 0.192000, 0.192000, 0.192000, 0.128000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.064000, 0.128000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.128000, 0.192000, 0.192000, 0.192000, 0.192000, 0.128000, 0.128000, 0.128000, 0.192000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.192000, 0.192000, 0.192000, 0.128000, 0.192000, 0.128000, 0.192000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.064000, 0.128000, 0.128000, 0.128000, 0.064000, 0.128000, 0.128000, 0.128000, 0.064000, 0.128000, 0.128000, 0.128000, 0.128000, 0.064000, 0.064000, 0.128000, 0.128000, 0.064000, 0.128000, 0.064000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000 } }, { (char *) "DOMX22", 1.0, 1.346757, { 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.092880, 0.139320, 0.139320, 0.139320, 0.139320, 0.092880, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.046440, 0.092880, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.092880, 0.139320, 0.139320, 0.139320, 0.139320, 0.092880, 0.092880, 0.092880, 0.139320, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.139320, 0.139320, 0.139320, 0.092880, 0.139320, 0.092880, 0.139320, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.046440, 0.092880, 0.092880, 0.092880, 0.046440, 0.092880, 0.092880, 0.092880, 0.046440, 0.092880, 0.092880, 0.092880, 0.092880, 0.046440, 0.046440, 0.092880, 0.092880, 0.046440, 0.092880, 0.046440, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320 } }, { (char *) "DOMX44", 1.0, 0.673379, { 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.046440, 0.069660, 0.069660, 0.069660, 0.069660, 0.046440, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.023220, 0.046440, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.046440, 0.069660, 0.069660, 0.069660, 0.069660, 0.046440, 0.046440, 0.046440, 0.069660, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.069660, 0.069660, 0.069660, 0.046440, 0.069660, 0.046440, 0.069660, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.023220, 0.046440, 0.046440, 0.046440, 0.023220, 0.046440, 0.046440, 0.046440, 0.023220, 0.046440, 0.046440, 0.046440, 0.046440, 0.023220, 0.023220, 0.046440, 0.046440, 0.023220, 0.046440, 0.023220, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660 } }, { (char *) "DOMX88", 1.0, 0.336689, { 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.023220, 0.034830, 0.034830, 0.034830, 0.034830, 0.023220, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.011610, 0.023220, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.023220, 0.034830, 0.034830, 0.034830, 0.034830, 0.023220, 0.023220, 0.023220, 0.034830, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.034830, 0.034830, 0.034830, 0.023220, 0.034830, 0.023220, 0.034830, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.011610, 0.023220, 0.023220, 0.023220, 0.011610, 0.023220, 0.023220, 0.023220, 0.011610, 0.023220, 0.023220, 0.023220, 0.023220, 0.011610, 0.011610, 0.023220, 0.023220, 0.011610, 0.023220, 0.011610, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830 } }, { (char *) "MFSK16", 1.0, 6.336000, { 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.256000, 0.352000, 0.352000, 0.352000, 0.352000, 0.256000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.384000, 0.384000, 0.096000, 0.288000, 0.288000, 0.320000, 0.320000, 0.320000, 0.320000, 0.288000, 0.288000, 0.288000, 0.320000, 0.288000, 0.256000, 0.288000, 0.288000, 0.288000, 0.256000, 0.256000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.320000, 0.288000, 0.320000, 0.288000, 0.320000, 0.256000, 0.288000, 0.256000, 0.256000, 0.256000, 0.256000, 0.288000, 0.288000, 0.256000, 0.288000, 0.288000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.288000, 0.256000, 0.256000, 0.256000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.160000, 0.224000, 0.192000, 0.192000, 0.128000, 0.224000, 0.224000, 0.192000, 0.160000, 0.256000, 0.224000, 0.192000, 0.224000, 0.160000, 0.160000, 0.224000, 0.224000, 0.192000, 0.192000, 0.128000, 0.192000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.320000, 0.320000, 0.320000, 0.320000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000 } }, { (char *) "MFSK32", 1.0, 3.168000, { 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.128000, 0.176000, 0.176000, 0.176000, 0.176000, 0.128000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.192000, 0.192000, 0.048000, 0.144000, 0.144000, 0.160000, 0.160000, 0.160000, 0.160000, 0.144000, 0.144000, 0.144000, 0.160000, 0.144000, 0.128000, 0.144000, 0.144000, 0.144000, 0.128000, 0.128000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.160000, 0.144000, 0.160000, 0.144000, 0.160000, 0.128000, 0.144000, 0.128000, 0.128000, 0.128000, 0.128000, 0.144000, 0.144000, 0.128000, 0.144000, 0.144000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.144000, 0.128000, 0.128000, 0.128000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.080000, 0.112000, 0.096000, 0.096000, 0.064000, 0.112000, 0.112000, 0.096000, 0.080000, 0.128000, 0.112000, 0.096000, 0.112000, 0.080000, 0.080000, 0.112000, 0.112000, 0.096000, 0.096000, 0.064000, 0.096000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.160000, 0.160000, 0.160000, 0.160000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000 } }, { (char *) "MFSK31", 1.0, 4.214000, { 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.170625, 0.234625, 0.234625, 0.234625, 0.234625, 0.170625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.256000, 0.256000, 0.064000, 0.192000, 0.192000, 0.213250, 0.213250, 0.213250, 0.213250, 0.192000, 0.192000, 0.192000, 0.213250, 0.192000, 0.170625, 0.192000, 0.192000, 0.192000, 0.170625, 0.170625, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.213250, 0.192000, 0.213250, 0.192000, 0.213250, 0.170625, 0.192000, 0.170625, 0.170625, 0.170625, 0.170625, 0.192000, 0.192000, 0.170625, 0.192000, 0.192000, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.192000, 0.170625, 0.170625, 0.170625, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.106625, 0.149250, 0.128000, 0.128000, 0.085250, 0.149250, 0.149250, 0.128000, 0.106625, 0.170625, 0.149250, 0.128000, 0.149250, 0.106625, 0.106625, 0.149250, 0.149250, 0.128000, 0.128000, 0.085250, 0.128000, 0.149250, 0.149250, 0.149250, 0.149250, 0.149250, 0.213250, 0.213250, 0.213250, 0.213250, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625 } }, { (char *) "MFSK64", 1.0, 2.352000, { 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.064000, 0.088000, 0.088000, 0.088000, 0.088000, 0.064000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.096000, 0.096000, 0.024000, 0.072000, 0.072000, 0.080000, 0.080000, 0.080000, 0.080000, 0.072000, 0.072000, 0.072000, 0.080000, 0.072000, 0.064000, 0.072000, 0.072000, 0.072000, 0.064000, 0.064000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.080000, 0.072000, 0.080000, 0.072000, 0.080000, 0.064000, 0.072000, 0.064000, 0.064000, 0.064000, 0.064000, 0.072000, 0.072000, 0.064000, 0.072000, 0.072000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.072000, 0.064000, 0.064000, 0.064000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.040000, 0.056000, 0.048000, 0.048000, 0.032000, 0.056000, 0.056000, 0.048000, 0.040000, 0.064000, 0.056000, 0.048000, 0.056000, 0.040000, 0.040000, 0.056000, 0.056000, 0.048000, 0.048000, 0.032000, 0.048000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.080000, 0.080000, 0.080000, 0.080000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000 } }, { (char *) "MFSK128", 1.0, 1.360000, { 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.032000, 0.044000, 0.044000, 0.044000, 0.044000, 0.032000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.048000, 0.048000, 0.012000, 0.036000, 0.036000, 0.040000, 0.040000, 0.040000, 0.040000, 0.036000, 0.036000, 0.036000, 0.040000, 0.036000, 0.032000, 0.036000, 0.036000, 0.036000, 0.032000, 0.032000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.040000, 0.036000, 0.040000, 0.036000, 0.040000, 0.032000, 0.036000, 0.032000, 0.032000, 0.032000, 0.032000, 0.036000, 0.036000, 0.032000, 0.036000, 0.036000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.036000, 0.032000, 0.032000, 0.032000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.020000, 0.028000, 0.024000, 0.024000, 0.016000, 0.028000, 0.028000, 0.024000, 0.020000, 0.032000, 0.028000, 0.024000, 0.028000, 0.020000, 0.020000, 0.028000, 0.028000, 0.024000, 0.024000, 0.016000, 0.024000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.040000, 0.040000, 0.040000, 0.040000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000 } }, { (char *) "MFSK64L", 1.0, 20.432000, { 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.064000, 0.088000, 0.088000, 0.088000, 0.088000, 0.064000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.096000, 0.096000, 0.024000, 0.072000, 0.072000, 0.080000, 0.080000, 0.080000, 0.080000, 0.072000, 0.072000, 0.072000, 0.080000, 0.072000, 0.064000, 0.072000, 0.072000, 0.072000, 0.064000, 0.064000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.080000, 0.072000, 0.080000, 0.072000, 0.080000, 0.064000, 0.072000, 0.064000, 0.064000, 0.064000, 0.064000, 0.072000, 0.072000, 0.064000, 0.072000, 0.072000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.072000, 0.064000, 0.064000, 0.064000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.040000, 0.056000, 0.048000, 0.048000, 0.032000, 0.056000, 0.056000, 0.048000, 0.040000, 0.064000, 0.056000, 0.048000, 0.056000, 0.040000, 0.040000, 0.056000, 0.056000, 0.048000, 0.048000, 0.032000, 0.048000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.080000, 0.080000, 0.080000, 0.080000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000 } }, { (char *) "MFSK128L", 1.0, 20.216000, { 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.032000, 0.044000, 0.044000, 0.044000, 0.044000, 0.032000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.048000, 0.048000, 0.012000, 0.036000, 0.036000, 0.040000, 0.040000, 0.040000, 0.040000, 0.036000, 0.036000, 0.036000, 0.040000, 0.036000, 0.032000, 0.036000, 0.036000, 0.036000, 0.032000, 0.032000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.040000, 0.036000, 0.040000, 0.036000, 0.040000, 0.032000, 0.036000, 0.032000, 0.032000, 0.032000, 0.032000, 0.036000, 0.036000, 0.032000, 0.036000, 0.036000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.036000, 0.032000, 0.032000, 0.032000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.020000, 0.028000, 0.024000, 0.024000, 0.016000, 0.028000, 0.028000, 0.024000, 0.020000, 0.032000, 0.028000, 0.024000, 0.028000, 0.020000, 0.020000, 0.028000, 0.028000, 0.024000, 0.024000, 0.016000, 0.024000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.040000, 0.040000, 0.040000, 0.040000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000 } }, { (char *) "MT63-500S", 1.0, 10.368000, { 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000 } }, { (char *) "MT63-500L", 1.0, 16.768000, { 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000 } }, { (char *) "MT63-1KS", 1.0, 7.168000, { 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000 } }, { (char *) "MT63-1KL", 1.0, 10.368000, { 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000 } }, { (char *) "MT63-2KS", 1.0, 5.568000, { 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000 } }, { (char *) "MT63-2KL", 1.0, 7.168000, { 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000 } }, { (char *) "BPSK31", 1.0, 2.048000, { 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.320000, 0.224000, 0.384000, 0.384000, 0.224000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.096000, 0.352000, 0.352000, 0.352000, 0.352000, 0.384000, 0.384000, 0.352000, 0.320000, 0.320000, 0.352000, 0.352000, 0.288000, 0.256000, 0.288000, 0.352000, 0.320000, 0.320000, 0.320000, 0.320000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.320000, 0.352000, 0.352000, 0.288000, 0.352000, 0.384000, 0.384000, 0.288000, 0.320000, 0.320000, 0.320000, 0.288000, 0.320000, 0.320000, 0.352000, 0.288000, 0.352000, 0.352000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.352000, 0.320000, 0.288000, 0.288000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.384000, 0.352000, 0.352000, 0.352000, 0.384000, 0.352000, 0.384000, 0.192000, 0.288000, 0.256000, 0.256000, 0.128000, 0.256000, 0.288000, 0.256000, 0.192000, 0.352000, 0.320000, 0.224000, 0.256000, 0.192000, 0.160000, 0.256000, 0.352000, 0.224000, 0.224000, 0.160000, 0.256000, 0.288000, 0.288000, 0.320000, 0.288000, 0.352000, 0.384000, 0.352000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000 } }, { (char *) "BPSK63", 1.0, 2.048000, { 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.160000, 0.112000, 0.192000, 0.192000, 0.112000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.048000, 0.176000, 0.176000, 0.176000, 0.176000, 0.192000, 0.192000, 0.176000, 0.160000, 0.160000, 0.176000, 0.176000, 0.144000, 0.128000, 0.144000, 0.176000, 0.160000, 0.160000, 0.160000, 0.160000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.160000, 0.176000, 0.176000, 0.144000, 0.176000, 0.192000, 0.192000, 0.144000, 0.160000, 0.160000, 0.160000, 0.144000, 0.160000, 0.160000, 0.176000, 0.144000, 0.176000, 0.176000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.176000, 0.160000, 0.144000, 0.144000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.192000, 0.176000, 0.176000, 0.176000, 0.192000, 0.176000, 0.192000, 0.096000, 0.144000, 0.128000, 0.128000, 0.064000, 0.128000, 0.144000, 0.128000, 0.096000, 0.176000, 0.160000, 0.112000, 0.128000, 0.096000, 0.080000, 0.128000, 0.176000, 0.112000, 0.112000, 0.080000, 0.128000, 0.144000, 0.144000, 0.160000, 0.144000, 0.176000, 0.192000, 0.176000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000 } }, { (char *) "BPSK63F", 1.0, 4.448000, { 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.256000, 0.352000, 0.352000, 0.352000, 0.352000, 0.256000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.384000, 0.384000, 0.096000, 0.288000, 0.288000, 0.320000, 0.320000, 0.320000, 0.320000, 0.288000, 0.288000, 0.288000, 0.320000, 0.288000, 0.256000, 0.288000, 0.288000, 0.288000, 0.256000, 0.256000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.320000, 0.288000, 0.320000, 0.288000, 0.320000, 0.256000, 0.288000, 0.256000, 0.256000, 0.256000, 0.256000, 0.288000, 0.288000, 0.256000, 0.288000, 0.288000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.288000, 0.256000, 0.256000, 0.256000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.160000, 0.224000, 0.192000, 0.192000, 0.128000, 0.224000, 0.224000, 0.192000, 0.160000, 0.256000, 0.224000, 0.192000, 0.224000, 0.160000, 0.160000, 0.224000, 0.224000, 0.192000, 0.192000, 0.128000, 0.192000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.320000, 0.320000, 0.320000, 0.320000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000 } }, { (char *) "BPSK125", 1.0, 2.048000, { 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.080000, 0.056000, 0.096000, 0.096000, 0.056000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.024000, 0.088000, 0.088000, 0.088000, 0.088000, 0.096000, 0.096000, 0.088000, 0.080000, 0.080000, 0.088000, 0.088000, 0.072000, 0.064000, 0.072000, 0.088000, 0.080000, 0.080000, 0.080000, 0.080000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.080000, 0.088000, 0.088000, 0.072000, 0.088000, 0.096000, 0.096000, 0.072000, 0.080000, 0.080000, 0.080000, 0.072000, 0.080000, 0.080000, 0.088000, 0.072000, 0.088000, 0.088000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.088000, 0.080000, 0.072000, 0.072000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.096000, 0.088000, 0.088000, 0.088000, 0.096000, 0.088000, 0.096000, 0.048000, 0.072000, 0.064000, 0.064000, 0.032000, 0.064000, 0.072000, 0.064000, 0.048000, 0.088000, 0.080000, 0.056000, 0.064000, 0.048000, 0.040000, 0.064000, 0.088000, 0.056000, 0.056000, 0.040000, 0.064000, 0.072000, 0.072000, 0.080000, 0.072000, 0.088000, 0.096000, 0.088000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000 } }, { (char *) "BPSK250", 1.0, 2.048000, { 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.040000, 0.028000, 0.048000, 0.048000, 0.028000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.012000, 0.044000, 0.044000, 0.044000, 0.044000, 0.048000, 0.048000, 0.044000, 0.040000, 0.040000, 0.044000, 0.044000, 0.036000, 0.032000, 0.036000, 0.044000, 0.040000, 0.040000, 0.040000, 0.040000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.040000, 0.044000, 0.044000, 0.036000, 0.044000, 0.048000, 0.048000, 0.036000, 0.040000, 0.040000, 0.040000, 0.036000, 0.040000, 0.040000, 0.044000, 0.036000, 0.044000, 0.044000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.044000, 0.040000, 0.036000, 0.036000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.048000, 0.044000, 0.044000, 0.044000, 0.048000, 0.044000, 0.048000, 0.024000, 0.036000, 0.032000, 0.032000, 0.016000, 0.032000, 0.036000, 0.032000, 0.024000, 0.044000, 0.040000, 0.028000, 0.032000, 0.024000, 0.020000, 0.032000, 0.044000, 0.028000, 0.028000, 0.020000, 0.032000, 0.036000, 0.036000, 0.040000, 0.036000, 0.044000, 0.048000, 0.044000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000 } }, { (char *) "BPSK500", 1.0, 2.048000, { 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.020000, 0.014000, 0.024000, 0.024000, 0.014000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.006000, 0.022000, 0.022000, 0.022000, 0.022000, 0.024000, 0.024000, 0.022000, 0.020000, 0.020000, 0.022000, 0.022000, 0.018000, 0.016000, 0.018000, 0.022000, 0.020000, 0.020000, 0.020000, 0.020000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.020000, 0.022000, 0.022000, 0.018000, 0.022000, 0.024000, 0.024000, 0.018000, 0.020000, 0.020000, 0.020000, 0.018000, 0.020000, 0.020000, 0.022000, 0.018000, 0.022000, 0.022000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.022000, 0.020000, 0.018000, 0.018000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.024000, 0.022000, 0.022000, 0.022000, 0.024000, 0.022000, 0.024000, 0.012000, 0.018000, 0.016000, 0.016000, 0.008000, 0.016000, 0.018000, 0.016000, 0.012000, 0.022000, 0.020000, 0.014000, 0.016000, 0.012000, 0.010000, 0.016000, 0.022000, 0.014000, 0.014000, 0.010000, 0.016000, 0.018000, 0.018000, 0.020000, 0.018000, 0.022000, 0.024000, 0.022000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000 } }, { (char *) "BPSK1000", 1.0, 0.256000, { 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.010000, 0.007000, 0.012000, 0.012000, 0.007000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.003000, 0.011000, 0.011000, 0.011000, 0.011000, 0.012000, 0.012000, 0.011000, 0.010000, 0.010000, 0.011000, 0.011000, 0.009000, 0.008000, 0.009000, 0.011000, 0.010000, 0.010000, 0.010000, 0.010000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.010000, 0.011000, 0.011000, 0.009000, 0.011000, 0.012000, 0.012000, 0.009000, 0.010000, 0.010000, 0.010000, 0.009000, 0.010000, 0.010000, 0.011000, 0.009000, 0.011000, 0.011000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.011000, 0.010000, 0.009000, 0.009000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.012000, 0.011000, 0.011000, 0.011000, 0.012000, 0.011000, 0.012000, 0.006000, 0.009000, 0.008000, 0.008000, 0.004000, 0.008000, 0.009000, 0.008000, 0.006000, 0.011000, 0.010000, 0.007000, 0.008000, 0.006000, 0.005000, 0.008000, 0.011000, 0.007000, 0.007000, 0.005000, 0.008000, 0.009000, 0.009000, 0.010000, 0.009000, 0.011000, 0.012000, 0.011000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000 } }, { (char *) "PSK125C12", 1.0, 0.170625, { 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.006625, 0.004625, 0.008000, 0.008000, 0.004625, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.002000, 0.007250, 0.007250, 0.007250, 0.007250, 0.008000, 0.008000, 0.007250, 0.006625, 0.006625, 0.007250, 0.007250, 0.006000, 0.005250, 0.006000, 0.007250, 0.006625, 0.006625, 0.006625, 0.006625, 0.007250, 0.007250, 0.007250, 0.007250, 0.007250, 0.007250, 0.006625, 0.007250, 0.007250, 0.006000, 0.007250, 0.008000, 0.008000, 0.006000, 0.006625, 0.006625, 0.006625, 0.006000, 0.006625, 0.006625, 0.007250, 0.006000, 0.007250, 0.007250, 0.006625, 0.006625, 0.006625, 0.006625, 0.006625, 0.007250, 0.006625, 0.006000, 0.006000, 0.007250, 0.007250, 0.007250, 0.007250, 0.007250, 0.008000, 0.007250, 0.007250, 0.007250, 0.008000, 0.007250, 0.008000, 0.004000, 0.006000, 0.005250, 0.005250, 0.002625, 0.005250, 0.006000, 0.005250, 0.004000, 0.007250, 0.006625, 0.004625, 0.005250, 0.004000, 0.003250, 0.005250, 0.007250, 0.004625, 0.004625, 0.003250, 0.005250, 0.006000, 0.006000, 0.006625, 0.006000, 0.007250, 0.008000, 0.007250, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250 } }, { (char *) "PSK250C6", 1.0, 0.682625, { 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.006625, 0.004625, 0.008000, 0.008000, 0.004625, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.002000, 0.007250, 0.007250, 0.007250, 0.007250, 0.008000, 0.008000, 0.007250, 0.006625, 0.006625, 0.007250, 0.007250, 0.006000, 0.005250, 0.006000, 0.007250, 0.006625, 0.006625, 0.006625, 0.006625, 0.007250, 0.007250, 0.007250, 0.007250, 0.007250, 0.007250, 0.006625, 0.007250, 0.007250, 0.006000, 0.007250, 0.008000, 0.008000, 0.006000, 0.006625, 0.006625, 0.006625, 0.006000, 0.006625, 0.006625, 0.007250, 0.006000, 0.007250, 0.007250, 0.006625, 0.006625, 0.006625, 0.006625, 0.006625, 0.007250, 0.006625, 0.006000, 0.006000, 0.007250, 0.007250, 0.007250, 0.007250, 0.007250, 0.008000, 0.007250, 0.007250, 0.007250, 0.008000, 0.007250, 0.008000, 0.004000, 0.006000, 0.005250, 0.005250, 0.002625, 0.005250, 0.006000, 0.005250, 0.004000, 0.007250, 0.006625, 0.004625, 0.005250, 0.004000, 0.003250, 0.005250, 0.007250, 0.004625, 0.004625, 0.003250, 0.005250, 0.006000, 0.006000, 0.006625, 0.006000, 0.007250, 0.008000, 0.007250, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250 } }, { (char *) "PSK500C2", 1.0, 1.024000, { 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.010000, 0.007000, 0.012000, 0.012000, 0.007000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.003000, 0.011000, 0.011000, 0.011000, 0.011000, 0.012000, 0.012000, 0.011000, 0.010000, 0.010000, 0.011000, 0.011000, 0.009000, 0.008000, 0.009000, 0.011000, 0.010000, 0.010000, 0.010000, 0.010000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.010000, 0.011000, 0.011000, 0.009000, 0.011000, 0.012000, 0.012000, 0.009000, 0.010000, 0.010000, 0.010000, 0.009000, 0.010000, 0.010000, 0.011000, 0.009000, 0.011000, 0.011000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.011000, 0.010000, 0.009000, 0.009000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.012000, 0.011000, 0.011000, 0.011000, 0.012000, 0.011000, 0.012000, 0.006000, 0.009000, 0.008000, 0.008000, 0.004000, 0.008000, 0.009000, 0.008000, 0.006000, 0.011000, 0.010000, 0.007000, 0.008000, 0.006000, 0.005000, 0.008000, 0.011000, 0.007000, 0.007000, 0.005000, 0.008000, 0.009000, 0.009000, 0.010000, 0.009000, 0.011000, 0.012000, 0.011000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000 } }, { (char *) "PSK500C4", 1.0, 0.512000, { 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.005000, 0.003500, 0.006000, 0.006000, 0.003500, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.001500, 0.005500, 0.005500, 0.005500, 0.005500, 0.006000, 0.006000, 0.005500, 0.005000, 0.005000, 0.005500, 0.005500, 0.004500, 0.004000, 0.004500, 0.005500, 0.005000, 0.005000, 0.005000, 0.005000, 0.005500, 0.005500, 0.005500, 0.005500, 0.005500, 0.005500, 0.005000, 0.005500, 0.005500, 0.004500, 0.005500, 0.006000, 0.006000, 0.004500, 0.005000, 0.005000, 0.005000, 0.004500, 0.005000, 0.005000, 0.005500, 0.004500, 0.005500, 0.005500, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005500, 0.005000, 0.004500, 0.004500, 0.005500, 0.005500, 0.005500, 0.005500, 0.005500, 0.006000, 0.005500, 0.005500, 0.005500, 0.006000, 0.005500, 0.006000, 0.003000, 0.004500, 0.004000, 0.004000, 0.002000, 0.004000, 0.004500, 0.004000, 0.003000, 0.005500, 0.005000, 0.003500, 0.004000, 0.003000, 0.002500, 0.004000, 0.005500, 0.003500, 0.003500, 0.002500, 0.004000, 0.004500, 0.004500, 0.005000, 0.004500, 0.005500, 0.006000, 0.005500, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000 } }, { (char *) "PSK800C2", 1.0, 0.640000, { 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.006250, 0.004375, 0.007500, 0.007500, 0.004375, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.001875, 0.006875, 0.006875, 0.006875, 0.006875, 0.007500, 0.007500, 0.006875, 0.006250, 0.006250, 0.006875, 0.006875, 0.005625, 0.005000, 0.005625, 0.006875, 0.006250, 0.006250, 0.006250, 0.006250, 0.006875, 0.006875, 0.006875, 0.006875, 0.006875, 0.006875, 0.006250, 0.006875, 0.006875, 0.005625, 0.006875, 0.007500, 0.007500, 0.005625, 0.006250, 0.006250, 0.006250, 0.005625, 0.006250, 0.006250, 0.006875, 0.005625, 0.006875, 0.006875, 0.006250, 0.006250, 0.006250, 0.006250, 0.006250, 0.006875, 0.006250, 0.005625, 0.005625, 0.006875, 0.006875, 0.006875, 0.006875, 0.006875, 0.007500, 0.006875, 0.006875, 0.006875, 0.007500, 0.006875, 0.007500, 0.003750, 0.005625, 0.005000, 0.005000, 0.002500, 0.005000, 0.005625, 0.005000, 0.003750, 0.006875, 0.006250, 0.004375, 0.005000, 0.003750, 0.003125, 0.005000, 0.006875, 0.004375, 0.004375, 0.003125, 0.005000, 0.005625, 0.005625, 0.006250, 0.005625, 0.006875, 0.007500, 0.006875, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750 } }, { (char *) "PSK1000C2", 1.0, 1.024000, { 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.005000, 0.003500, 0.006000, 0.006000, 0.003500, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.001500, 0.005500, 0.005500, 0.005500, 0.005500, 0.006000, 0.006000, 0.005500, 0.005000, 0.005000, 0.005500, 0.005500, 0.004500, 0.004000, 0.004500, 0.005500, 0.005000, 0.005000, 0.005000, 0.005000, 0.005500, 0.005500, 0.005500, 0.005500, 0.005500, 0.005500, 0.005000, 0.005500, 0.005500, 0.004500, 0.005500, 0.006000, 0.006000, 0.004500, 0.005000, 0.005000, 0.005000, 0.004500, 0.005000, 0.005000, 0.005500, 0.004500, 0.005500, 0.005500, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005500, 0.005000, 0.004500, 0.004500, 0.005500, 0.005500, 0.005500, 0.005500, 0.005500, 0.006000, 0.005500, 0.005500, 0.005500, 0.006000, 0.005500, 0.006000, 0.003000, 0.004500, 0.004000, 0.004000, 0.002000, 0.004000, 0.004500, 0.004000, 0.003000, 0.005500, 0.005000, 0.003500, 0.004000, 0.003000, 0.002500, 0.004000, 0.005500, 0.003500, 0.003500, 0.002500, 0.004000, 0.004500, 0.004500, 0.005000, 0.004500, 0.005500, 0.006000, 0.005500, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000 } }, { (char *) "QPSK31", 1.0, 2.048000, { 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.320000, 0.224000, 0.384000, 0.384000, 0.224000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.096000, 0.352000, 0.352000, 0.352000, 0.352000, 0.384000, 0.384000, 0.352000, 0.320000, 0.320000, 0.352000, 0.352000, 0.288000, 0.256000, 0.288000, 0.352000, 0.320000, 0.320000, 0.320000, 0.320000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.320000, 0.352000, 0.352000, 0.288000, 0.352000, 0.384000, 0.384000, 0.288000, 0.320000, 0.320000, 0.320000, 0.288000, 0.320000, 0.320000, 0.352000, 0.288000, 0.352000, 0.352000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.352000, 0.320000, 0.288000, 0.288000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.384000, 0.352000, 0.352000, 0.352000, 0.384000, 0.352000, 0.384000, 0.192000, 0.288000, 0.256000, 0.256000, 0.128000, 0.256000, 0.288000, 0.256000, 0.192000, 0.352000, 0.320000, 0.224000, 0.256000, 0.192000, 0.160000, 0.256000, 0.352000, 0.224000, 0.224000, 0.160000, 0.256000, 0.288000, 0.288000, 0.320000, 0.288000, 0.352000, 0.384000, 0.352000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000 } }, { (char *) "QPSK63", 1.0, 2.048000, { 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.160000, 0.112000, 0.192000, 0.192000, 0.112000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.048000, 0.176000, 0.176000, 0.176000, 0.176000, 0.192000, 0.192000, 0.176000, 0.160000, 0.160000, 0.176000, 0.176000, 0.144000, 0.128000, 0.144000, 0.176000, 0.160000, 0.160000, 0.160000, 0.160000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.160000, 0.176000, 0.176000, 0.144000, 0.176000, 0.192000, 0.192000, 0.144000, 0.160000, 0.160000, 0.160000, 0.144000, 0.160000, 0.160000, 0.176000, 0.144000, 0.176000, 0.176000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.176000, 0.160000, 0.144000, 0.144000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.192000, 0.176000, 0.176000, 0.176000, 0.192000, 0.176000, 0.192000, 0.096000, 0.144000, 0.128000, 0.128000, 0.064000, 0.128000, 0.144000, 0.128000, 0.096000, 0.176000, 0.160000, 0.112000, 0.128000, 0.096000, 0.080000, 0.128000, 0.176000, 0.112000, 0.112000, 0.080000, 0.128000, 0.144000, 0.144000, 0.160000, 0.144000, 0.176000, 0.192000, 0.176000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000 } }, { (char *) "QPSK125", 1.0, 2.048000, { 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.080000, 0.056000, 0.096000, 0.096000, 0.056000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.024000, 0.088000, 0.088000, 0.088000, 0.088000, 0.096000, 0.096000, 0.088000, 0.080000, 0.080000, 0.088000, 0.088000, 0.072000, 0.064000, 0.072000, 0.088000, 0.080000, 0.080000, 0.080000, 0.080000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.080000, 0.088000, 0.088000, 0.072000, 0.088000, 0.096000, 0.096000, 0.072000, 0.080000, 0.080000, 0.080000, 0.072000, 0.080000, 0.080000, 0.088000, 0.072000, 0.088000, 0.088000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.088000, 0.080000, 0.072000, 0.072000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.096000, 0.088000, 0.088000, 0.088000, 0.096000, 0.088000, 0.096000, 0.048000, 0.072000, 0.064000, 0.064000, 0.032000, 0.064000, 0.072000, 0.064000, 0.048000, 0.088000, 0.080000, 0.056000, 0.064000, 0.048000, 0.040000, 0.064000, 0.088000, 0.056000, 0.056000, 0.040000, 0.064000, 0.072000, 0.072000, 0.080000, 0.072000, 0.088000, 0.096000, 0.088000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000 } }, { (char *) "QPSK250", 1.0, 2.048000, { 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.040000, 0.028000, 0.048000, 0.048000, 0.028000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.012000, 0.044000, 0.044000, 0.044000, 0.044000, 0.048000, 0.048000, 0.044000, 0.040000, 0.040000, 0.044000, 0.044000, 0.036000, 0.032000, 0.036000, 0.044000, 0.040000, 0.040000, 0.040000, 0.040000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.040000, 0.044000, 0.044000, 0.036000, 0.044000, 0.048000, 0.048000, 0.036000, 0.040000, 0.040000, 0.040000, 0.036000, 0.040000, 0.040000, 0.044000, 0.036000, 0.044000, 0.044000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.044000, 0.040000, 0.036000, 0.036000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.048000, 0.044000, 0.044000, 0.044000, 0.048000, 0.044000, 0.048000, 0.024000, 0.036000, 0.032000, 0.032000, 0.016000, 0.032000, 0.036000, 0.032000, 0.024000, 0.044000, 0.040000, 0.028000, 0.032000, 0.024000, 0.020000, 0.032000, 0.044000, 0.028000, 0.028000, 0.020000, 0.032000, 0.036000, 0.036000, 0.040000, 0.036000, 0.044000, 0.048000, 0.044000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000 } }, { (char *) "QPSK500", 1.0, 2.048000, { 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.020000, 0.014000, 0.024000, 0.024000, 0.014000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.006000, 0.022000, 0.022000, 0.022000, 0.022000, 0.024000, 0.024000, 0.022000, 0.020000, 0.020000, 0.022000, 0.022000, 0.018000, 0.016000, 0.018000, 0.022000, 0.020000, 0.020000, 0.020000, 0.020000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.020000, 0.022000, 0.022000, 0.018000, 0.022000, 0.024000, 0.024000, 0.018000, 0.020000, 0.020000, 0.020000, 0.018000, 0.020000, 0.020000, 0.022000, 0.018000, 0.022000, 0.022000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.022000, 0.020000, 0.018000, 0.018000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.024000, 0.022000, 0.022000, 0.022000, 0.024000, 0.022000, 0.024000, 0.012000, 0.018000, 0.016000, 0.016000, 0.008000, 0.016000, 0.018000, 0.016000, 0.012000, 0.022000, 0.020000, 0.014000, 0.016000, 0.012000, 0.010000, 0.016000, 0.022000, 0.014000, 0.014000, 0.010000, 0.016000, 0.018000, 0.018000, 0.020000, 0.018000, 0.022000, 0.024000, 0.022000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000 } }, { (char *) "8PSK125", 1.0, 2.040000, { 0.030000, 0.030000, 0.030000, 0.030000, 0.030000, 0.030000, 0.030000, 0.030000, 0.022000, 0.030000, 0.030000, 0.030000, 0.030000, 0.022000, 0.030000, 0.030000, 0.030000, 0.030000, 0.030000, 0.030000, 0.030000, 0.030000, 0.030000, 0.030000, 0.030000, 0.030000, 0.030000, 0.030000, 0.030000, 0.030000, 0.032500, 0.031500, 0.008000, 0.024500, 0.023500, 0.026500, 0.026500, 0.027000, 0.026500, 0.023500, 0.024000, 0.024500, 0.026500, 0.024500, 0.021000, 0.023500, 0.024000, 0.024500, 0.021000, 0.021000, 0.023500, 0.024000, 0.024500, 0.023500, 0.024000, 0.024500, 0.023500, 0.024000, 0.024500, 0.023500, 0.026500, 0.023500, 0.026500, 0.023500, 0.026500, 0.021000, 0.023500, 0.021000, 0.021000, 0.021000, 0.021000, 0.024000, 0.024500, 0.021000, 0.023500, 0.024000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.024500, 0.021000, 0.021000, 0.021000, 0.023500, 0.024000, 0.024500, 0.023500, 0.024000, 0.024500, 0.026500, 0.027000, 0.026500, 0.026500, 0.027000, 0.026500, 0.013000, 0.018500, 0.016500, 0.015500, 0.010500, 0.018500, 0.019000, 0.016000, 0.014000, 0.022000, 0.019000, 0.016000, 0.019000, 0.013000, 0.013000, 0.018500, 0.018500, 0.016500, 0.015500, 0.010500, 0.015500, 0.018500, 0.018500, 0.019000, 0.018500, 0.018500, 0.027000, 0.026500, 0.026500, 0.027000, 0.032000, 0.032500, 0.031500, 0.032000, 0.032500, 0.031500, 0.032000, 0.032500, 0.031500, 0.032000, 0.032500, 0.031500, 0.032000, 0.032500, 0.031500, 0.032000, 0.032500, 0.031500, 0.032000, 0.032500, 0.031500, 0.032000, 0.032500, 0.031500, 0.032000, 0.032500, 0.031500, 0.032000, 0.032500, 0.031500, 0.032000, 0.032500, 0.031500, 0.026500, 0.026500, 0.027000, 0.026500, 0.026500, 0.027000, 0.026500, 0.026500, 0.027000, 0.026500, 0.026500, 0.027000, 0.026500, 0.026500, 0.027000, 0.026500, 0.026500, 0.027000, 0.026500, 0.026500, 0.027000, 0.026500, 0.026500, 0.027000, 0.026500, 0.026500, 0.027000, 0.026500, 0.026500, 0.027000, 0.026500, 0.026500, 0.027000, 0.026500, 0.026500, 0.027000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000, 0.029000 } }, { (char *) "8PSK125FL", 1.0, 4.608000, { 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.042500, 0.058500, 0.059000, 0.058500, 0.058500, 0.043000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.064000, 0.064000, 0.016000, 0.048000, 0.048000, 0.053500, 0.053000, 0.053500, 0.053500, 0.048000, 0.048000, 0.048000, 0.053000, 0.048000, 0.043000, 0.048000, 0.048000, 0.048000, 0.042500, 0.042500, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.053500, 0.048000, 0.053500, 0.048000, 0.053000, 0.043000, 0.048000, 0.042500, 0.042500, 0.043000, 0.042500, 0.048000, 0.048000, 0.042500, 0.048000, 0.048000, 0.043000, 0.042500, 0.042500, 0.043000, 0.042500, 0.048000, 0.042500, 0.043000, 0.042500, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.053500, 0.053000, 0.053500, 0.053500, 0.053000, 0.053500, 0.026500, 0.037500, 0.032000, 0.032000, 0.021500, 0.037000, 0.037500, 0.032000, 0.026500, 0.043000, 0.037000, 0.032000, 0.037500, 0.026500, 0.027000, 0.037000, 0.037500, 0.032000, 0.032000, 0.021500, 0.032000, 0.037000, 0.037500, 0.037500, 0.037000, 0.037500, 0.053500, 0.053000, 0.053500, 0.053500, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.053000, 0.053500, 0.053500, 0.053000, 0.053500, 0.053500, 0.053000, 0.053500, 0.053500, 0.053000, 0.053500, 0.053500, 0.053000, 0.053500, 0.053500, 0.053000, 0.053500, 0.053500, 0.053000, 0.053500, 0.053500, 0.053000, 0.053500, 0.053500, 0.053000, 0.053500, 0.053500, 0.053000, 0.053500, 0.053500, 0.053000, 0.053500, 0.053500, 0.053000, 0.053500, 0.053500, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000 } }, { (char *) "8PSK125F", 1.0, 4.608000, { 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.042500, 0.058500, 0.059000, 0.058500, 0.058500, 0.043000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.064000, 0.064000, 0.016000, 0.048000, 0.048000, 0.053500, 0.053000, 0.053500, 0.053500, 0.048000, 0.048000, 0.048000, 0.053000, 0.048000, 0.043000, 0.048000, 0.048000, 0.048000, 0.042500, 0.042500, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.053500, 0.048000, 0.053500, 0.048000, 0.053000, 0.043000, 0.048000, 0.042500, 0.042500, 0.043000, 0.042500, 0.048000, 0.048000, 0.042500, 0.048000, 0.048000, 0.043000, 0.042500, 0.042500, 0.043000, 0.042500, 0.048000, 0.042500, 0.043000, 0.042500, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.053500, 0.053000, 0.053500, 0.053500, 0.053000, 0.053500, 0.026500, 0.037500, 0.032000, 0.032000, 0.021500, 0.037000, 0.037500, 0.032000, 0.026500, 0.043000, 0.037000, 0.032000, 0.037500, 0.026500, 0.027000, 0.037000, 0.037500, 0.032000, 0.032000, 0.021500, 0.032000, 0.037000, 0.037500, 0.037500, 0.037000, 0.037500, 0.053500, 0.053000, 0.053500, 0.053500, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.053000, 0.053500, 0.053500, 0.053000, 0.053500, 0.053500, 0.053000, 0.053500, 0.053500, 0.053000, 0.053500, 0.053500, 0.053000, 0.053500, 0.053500, 0.053000, 0.053500, 0.053500, 0.053000, 0.053500, 0.053500, 0.053000, 0.053500, 0.053500, 0.053000, 0.053500, 0.053500, 0.053000, 0.053500, 0.053500, 0.053000, 0.053500, 0.053500, 0.053000, 0.053500, 0.053500, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000, 0.058500, 0.058500, 0.059000 } }, { (char *) "8PSK250", 1.0, 1.600000, { 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.010500, 0.014500, 0.014500, 0.014500, 0.014500, 0.010500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.016000, 0.016250, 0.003750, 0.012000, 0.012250, 0.013250, 0.013500, 0.013250, 0.013250, 0.012250, 0.011750, 0.012000, 0.013500, 0.012000, 0.011000, 0.012250, 0.011750, 0.012000, 0.011000, 0.011000, 0.012250, 0.011750, 0.012000, 0.012250, 0.011750, 0.012000, 0.012250, 0.011750, 0.012000, 0.012250, 0.013250, 0.012250, 0.013250, 0.012250, 0.013250, 0.011000, 0.012250, 0.010500, 0.010500, 0.010500, 0.010500, 0.011750, 0.012000, 0.011000, 0.012250, 0.011750, 0.010500, 0.010500, 0.010500, 0.010500, 0.010500, 0.012000, 0.011000, 0.011000, 0.011000, 0.012250, 0.011750, 0.012000, 0.012250, 0.011750, 0.012000, 0.013500, 0.013250, 0.013250, 0.013500, 0.013250, 0.013250, 0.007000, 0.009500, 0.008000, 0.008250, 0.005250, 0.009500, 0.009250, 0.007750, 0.006500, 0.010500, 0.009250, 0.007750, 0.009250, 0.006500, 0.006500, 0.009250, 0.009500, 0.008000, 0.008250, 0.005250, 0.008250, 0.009250, 0.009500, 0.009250, 0.009250, 0.009500, 0.013250, 0.013250, 0.013500, 0.013250, 0.015750, 0.016000, 0.016250, 0.015750, 0.016000, 0.016250, 0.015750, 0.016000, 0.016250, 0.015750, 0.016000, 0.016250, 0.015750, 0.016000, 0.016250, 0.015750, 0.016000, 0.016250, 0.015750, 0.016000, 0.016250, 0.015750, 0.016000, 0.016250, 0.015750, 0.016000, 0.016250, 0.015750, 0.016000, 0.016250, 0.015750, 0.016000, 0.016250, 0.013250, 0.013500, 0.013250, 0.013250, 0.013500, 0.013250, 0.013250, 0.013500, 0.013250, 0.013250, 0.013500, 0.013250, 0.013250, 0.013500, 0.013250, 0.013250, 0.013500, 0.013250, 0.013250, 0.013500, 0.013250, 0.013250, 0.013500, 0.013250, 0.013250, 0.013500, 0.013250, 0.013250, 0.013500, 0.013250, 0.013250, 0.013500, 0.013250, 0.013250, 0.013500, 0.013250, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500, 0.014500 } }, { (char *) "8PSK250FL", 1.0, 3.256000, { 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.021500, 0.029250, 0.029250, 0.029500, 0.029250, 0.021250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.032000, 0.032250, 0.007750, 0.024000, 0.024250, 0.026500, 0.026500, 0.026500, 0.026500, 0.023750, 0.024000, 0.024250, 0.026500, 0.023750, 0.021250, 0.023750, 0.024000, 0.024250, 0.021250, 0.021500, 0.024000, 0.024250, 0.023750, 0.024000, 0.024250, 0.023750, 0.024000, 0.024250, 0.023750, 0.024000, 0.027000, 0.024250, 0.026500, 0.023750, 0.026500, 0.021250, 0.023750, 0.021250, 0.021250, 0.021500, 0.021250, 0.023750, 0.024000, 0.021500, 0.024000, 0.024250, 0.021250, 0.021500, 0.021250, 0.021250, 0.021500, 0.024000, 0.021500, 0.021250, 0.021250, 0.024250, 0.023750, 0.024000, 0.024250, 0.023750, 0.024000, 0.027000, 0.027000, 0.027000, 0.027000, 0.027000, 0.027000, 0.013500, 0.018500, 0.016000, 0.016250, 0.010500, 0.018500, 0.018500, 0.015750, 0.013250, 0.021250, 0.019000, 0.016250, 0.018500, 0.013250, 0.013500, 0.018500, 0.018500, 0.016000, 0.016250, 0.010500, 0.015750, 0.018500, 0.018500, 0.018500, 0.018500, 0.018500, 0.026500, 0.026500, 0.026500, 0.026500, 0.032000, 0.032250, 0.031750, 0.032000, 0.032250, 0.031750, 0.032000, 0.032250, 0.031750, 0.032000, 0.032250, 0.031750, 0.032000, 0.032250, 0.031750, 0.032000, 0.032250, 0.031750, 0.032000, 0.032250, 0.031750, 0.032000, 0.032250, 0.031750, 0.032000, 0.032250, 0.031750, 0.032000, 0.032250, 0.031750, 0.032000, 0.032250, 0.031750, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500 } }, { (char *) "8PSK250F", 1.0, 3.260000, { 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.021250, 0.029250, 0.029500, 0.029250, 0.029250, 0.021500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.031750, 0.032000, 0.008250, 0.023750, 0.024000, 0.027000, 0.027000, 0.027000, 0.027000, 0.024250, 0.023750, 0.024000, 0.027000, 0.024250, 0.021250, 0.024250, 0.023750, 0.024000, 0.021500, 0.021250, 0.023750, 0.024000, 0.024250, 0.023750, 0.024000, 0.024250, 0.023750, 0.024000, 0.024250, 0.023750, 0.026500, 0.024000, 0.027000, 0.024250, 0.026500, 0.021250, 0.024250, 0.021250, 0.021500, 0.021250, 0.021250, 0.024250, 0.023750, 0.021250, 0.023750, 0.024000, 0.021500, 0.021250, 0.021250, 0.021500, 0.021250, 0.023750, 0.021250, 0.021250, 0.021500, 0.024000, 0.024250, 0.023750, 0.024000, 0.024250, 0.023750, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.013250, 0.018500, 0.015750, 0.016000, 0.011000, 0.019000, 0.019000, 0.016250, 0.013250, 0.021500, 0.018500, 0.016000, 0.019000, 0.013500, 0.013250, 0.018500, 0.018500, 0.015750, 0.016000, 0.011000, 0.016250, 0.018500, 0.018500, 0.018500, 0.018500, 0.018500, 0.026500, 0.026500, 0.026500, 0.026500, 0.031750, 0.032000, 0.032250, 0.031750, 0.032000, 0.032250, 0.031750, 0.032000, 0.032250, 0.031750, 0.032000, 0.032250, 0.031750, 0.032000, 0.032250, 0.031750, 0.032000, 0.032250, 0.031750, 0.032000, 0.032250, 0.031750, 0.032000, 0.032250, 0.031750, 0.032000, 0.032250, 0.031750, 0.032000, 0.032250, 0.031750, 0.032000, 0.032250, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.026500, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250, 0.029250, 0.029500, 0.029250 } }, { (char *) "8PSK500", 1.0, 1.376000, { 0.007250, 0.007250, 0.007250, 0.007250, 0.007250, 0.007250, 0.007250, 0.007250, 0.005250, 0.007250, 0.007250, 0.007250, 0.007250, 0.005250, 0.007250, 0.007250, 0.007250, 0.007250, 0.007250, 0.007250, 0.007250, 0.007250, 0.007250, 0.007250, 0.007250, 0.007250, 0.007250, 0.007250, 0.007250, 0.007250, 0.007875, 0.008000, 0.002125, 0.005875, 0.006000, 0.006750, 0.006625, 0.006625, 0.006750, 0.006000, 0.006125, 0.005875, 0.006625, 0.005875, 0.005250, 0.006000, 0.006125, 0.005875, 0.005250, 0.005250, 0.006000, 0.006125, 0.005875, 0.006000, 0.006125, 0.005875, 0.006000, 0.006125, 0.005875, 0.006000, 0.006750, 0.006000, 0.006750, 0.006000, 0.006750, 0.005250, 0.006000, 0.005500, 0.005500, 0.005500, 0.005500, 0.006125, 0.005875, 0.005250, 0.006000, 0.006125, 0.005250, 0.005250, 0.005250, 0.005250, 0.005250, 0.005875, 0.005250, 0.005250, 0.005250, 0.006000, 0.006125, 0.005875, 0.006000, 0.006125, 0.005875, 0.006625, 0.006625, 0.006750, 0.006625, 0.006625, 0.006750, 0.003250, 0.004625, 0.003875, 0.004000, 0.002750, 0.004625, 0.004625, 0.004125, 0.003250, 0.005250, 0.004625, 0.004125, 0.004625, 0.003500, 0.003500, 0.004750, 0.004625, 0.003875, 0.004000, 0.002750, 0.004000, 0.004750, 0.004625, 0.004625, 0.004750, 0.004625, 0.006625, 0.006750, 0.006625, 0.006625, 0.008125, 0.007875, 0.008000, 0.008125, 0.007875, 0.008000, 0.008125, 0.007875, 0.008000, 0.008125, 0.007875, 0.008000, 0.008125, 0.007875, 0.008000, 0.008125, 0.007875, 0.008000, 0.008125, 0.007875, 0.008000, 0.008125, 0.007875, 0.008000, 0.008125, 0.007875, 0.008000, 0.008125, 0.007875, 0.008000, 0.008125, 0.007875, 0.008000, 0.006750, 0.006625, 0.006625, 0.006750, 0.006625, 0.006625, 0.006750, 0.006625, 0.006625, 0.006750, 0.006625, 0.006625, 0.006750, 0.006625, 0.006625, 0.006750, 0.006625, 0.006625, 0.006750, 0.006625, 0.006625, 0.006750, 0.006625, 0.006625, 0.006750, 0.006625, 0.006625, 0.006750, 0.006625, 0.006625, 0.006750, 0.006625, 0.006625, 0.006750, 0.006625, 0.006625, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500 } }, { (char *) "8PSK500F", 1.0, 2.042000, { 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.008125, 0.011125, 0.011125, 0.011125, 0.011125, 0.008125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.012125, 0.012125, 0.003125, 0.009125, 0.009125, 0.010125, 0.010125, 0.010125, 0.010125, 0.009125, 0.009125, 0.009125, 0.010125, 0.009125, 0.008125, 0.009125, 0.009125, 0.009125, 0.008125, 0.008125, 0.009125, 0.009125, 0.009125, 0.009125, 0.009125, 0.009125, 0.009125, 0.009125, 0.009125, 0.009125, 0.010125, 0.009125, 0.010125, 0.009125, 0.010125, 0.008125, 0.009125, 0.008125, 0.008125, 0.008125, 0.008125, 0.009125, 0.009125, 0.008125, 0.009125, 0.009125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.009125, 0.008125, 0.008125, 0.008125, 0.009125, 0.009125, 0.009125, 0.009125, 0.009125, 0.009125, 0.010125, 0.010125, 0.010125, 0.010125, 0.010125, 0.010125, 0.005125, 0.007125, 0.006125, 0.006125, 0.004125, 0.007125, 0.007125, 0.006125, 0.005125, 0.008125, 0.007125, 0.006125, 0.007125, 0.005125, 0.005125, 0.007125, 0.007125, 0.006125, 0.006125, 0.004125, 0.006125, 0.007125, 0.007125, 0.007125, 0.007125, 0.007125, 0.010125, 0.010125, 0.010125, 0.010125, 0.012125, 0.012125, 0.012125, 0.012125, 0.012125, 0.012125, 0.012125, 0.012125, 0.012125, 0.012125, 0.012125, 0.012125, 0.012125, 0.012125, 0.012125, 0.012125, 0.012125, 0.012125, 0.012125, 0.012125, 0.012125, 0.012125, 0.012125, 0.012125, 0.012125, 0.012125, 0.012125, 0.012125, 0.012125, 0.012125, 0.012125, 0.012125, 0.012125, 0.010125, 0.010125, 0.010125, 0.010125, 0.010125, 0.010125, 0.010125, 0.010125, 0.010125, 0.010125, 0.010125, 0.010125, 0.010125, 0.010125, 0.010125, 0.010125, 0.010125, 0.010125, 0.010125, 0.010125, 0.010125, 0.010125, 0.010125, 0.010125, 0.010125, 0.010125, 0.010125, 0.010125, 0.010125, 0.010125, 0.010125, 0.010125, 0.010125, 0.010125, 0.010125, 0.010125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125 } }, { (char *) "8PSK1000", 1.0, 1.263000, { 0.003750, 0.003750, 0.003750, 0.003750, 0.003750, 0.003750, 0.003750, 0.003750, 0.002750, 0.003750, 0.003750, 0.003750, 0.003750, 0.002750, 0.003750, 0.003750, 0.003750, 0.003750, 0.003750, 0.003750, 0.003750, 0.003750, 0.003750, 0.003750, 0.003750, 0.003750, 0.003750, 0.003750, 0.003750, 0.003750, 0.004063, 0.003938, 0.001000, 0.003063, 0.002938, 0.003312, 0.003312, 0.003375, 0.003312, 0.002938, 0.003000, 0.003063, 0.003312, 0.003063, 0.002625, 0.002938, 0.003000, 0.003063, 0.002625, 0.002625, 0.002938, 0.003000, 0.003063, 0.002938, 0.003000, 0.003063, 0.002938, 0.003000, 0.003063, 0.002938, 0.003312, 0.002938, 0.003312, 0.002938, 0.003312, 0.002625, 0.002938, 0.002625, 0.002625, 0.002625, 0.002625, 0.003000, 0.003063, 0.002625, 0.002938, 0.003000, 0.002750, 0.002750, 0.002750, 0.002750, 0.002750, 0.003063, 0.002625, 0.002625, 0.002625, 0.002938, 0.003000, 0.003063, 0.002938, 0.003000, 0.003063, 0.003312, 0.003375, 0.003312, 0.003312, 0.003375, 0.003312, 0.001625, 0.002312, 0.002063, 0.001937, 0.001313, 0.002312, 0.002375, 0.002000, 0.001750, 0.002750, 0.002375, 0.002000, 0.002375, 0.001625, 0.001625, 0.002312, 0.002312, 0.002063, 0.001937, 0.001313, 0.001937, 0.002312, 0.002312, 0.002375, 0.002312, 0.002312, 0.003375, 0.003312, 0.003312, 0.003375, 0.004000, 0.004063, 0.003938, 0.004000, 0.004063, 0.003938, 0.004000, 0.004063, 0.003938, 0.004000, 0.004063, 0.003938, 0.004000, 0.004063, 0.003938, 0.004000, 0.004063, 0.003938, 0.004000, 0.004063, 0.003938, 0.004000, 0.004063, 0.003938, 0.004000, 0.004063, 0.003938, 0.004000, 0.004063, 0.003938, 0.004000, 0.004063, 0.003938, 0.003312, 0.003312, 0.003375, 0.003312, 0.003312, 0.003375, 0.003312, 0.003312, 0.003375, 0.003312, 0.003312, 0.003375, 0.003312, 0.003312, 0.003375, 0.003312, 0.003312, 0.003375, 0.003312, 0.003312, 0.003375, 0.003312, 0.003312, 0.003375, 0.003312, 0.003312, 0.003375, 0.003312, 0.003312, 0.003375, 0.003312, 0.003312, 0.003375, 0.003312, 0.003312, 0.003375, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625 } }, { (char *) "8PSK1000F", 1.0, 1.817000, { 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.004063, 0.005562, 0.005562, 0.005562, 0.005562, 0.004063, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.006063, 0.006063, 0.001563, 0.004562, 0.004562, 0.005063, 0.005063, 0.005063, 0.005063, 0.004562, 0.004562, 0.004562, 0.005063, 0.004562, 0.004063, 0.004562, 0.004562, 0.004562, 0.004063, 0.004063, 0.004562, 0.004562, 0.004562, 0.004562, 0.004562, 0.004562, 0.004562, 0.004562, 0.004562, 0.004562, 0.005063, 0.004562, 0.005063, 0.004562, 0.005063, 0.004063, 0.004562, 0.004063, 0.004063, 0.004063, 0.004063, 0.004562, 0.004562, 0.004063, 0.004562, 0.004562, 0.004063, 0.004063, 0.004063, 0.004063, 0.004063, 0.004562, 0.004063, 0.004063, 0.004063, 0.004562, 0.004562, 0.004562, 0.004562, 0.004562, 0.004562, 0.005063, 0.005063, 0.005063, 0.005063, 0.005063, 0.005063, 0.002563, 0.003563, 0.003063, 0.003063, 0.002063, 0.003563, 0.003563, 0.003063, 0.002563, 0.004063, 0.003563, 0.003063, 0.003563, 0.002563, 0.002563, 0.003563, 0.003563, 0.003063, 0.003063, 0.002063, 0.003063, 0.003563, 0.003563, 0.003563, 0.003563, 0.003563, 0.005063, 0.005063, 0.005063, 0.005063, 0.006063, 0.006063, 0.006063, 0.006063, 0.006063, 0.006063, 0.006063, 0.006063, 0.006063, 0.006063, 0.006063, 0.006063, 0.006063, 0.006063, 0.006063, 0.006063, 0.006063, 0.006063, 0.006063, 0.006063, 0.006063, 0.006063, 0.006063, 0.006063, 0.006063, 0.006063, 0.006063, 0.006063, 0.006063, 0.006063, 0.006063, 0.006063, 0.006063, 0.005063, 0.005063, 0.005063, 0.005063, 0.005063, 0.005063, 0.005063, 0.005063, 0.005063, 0.005063, 0.005063, 0.005063, 0.005063, 0.005063, 0.005063, 0.005063, 0.005063, 0.005063, 0.005063, 0.005063, 0.005063, 0.005063, 0.005063, 0.005063, 0.005063, 0.005063, 0.005063, 0.005063, 0.005063, 0.005063, 0.005063, 0.005063, 0.005063, 0.005063, 0.005063, 0.005063, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562, 0.005562 } }, { (char *) "8PSK1200F", 1.0, 2.578500, { 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.003250, 0.004437, 0.004437, 0.004437, 0.004437, 0.003250, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004875, 0.004875, 0.001187, 0.003625, 0.003625, 0.004063, 0.004063, 0.004063, 0.004063, 0.003625, 0.003625, 0.003625, 0.004063, 0.003625, 0.003250, 0.003625, 0.003625, 0.003625, 0.003250, 0.003250, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.004063, 0.003625, 0.004063, 0.003625, 0.004063, 0.003250, 0.003625, 0.003250, 0.003250, 0.003250, 0.003250, 0.003625, 0.003625, 0.003250, 0.003625, 0.003625, 0.003250, 0.003250, 0.003250, 0.003250, 0.003250, 0.003625, 0.003250, 0.003250, 0.003250, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.003625, 0.004063, 0.004063, 0.004063, 0.004063, 0.004063, 0.004063, 0.002000, 0.002812, 0.002437, 0.002437, 0.001625, 0.002812, 0.002812, 0.002437, 0.002000, 0.003250, 0.002812, 0.002437, 0.002812, 0.002000, 0.002000, 0.002812, 0.002812, 0.002437, 0.002437, 0.001625, 0.002437, 0.002812, 0.002812, 0.002812, 0.002812, 0.002812, 0.004063, 0.004063, 0.004063, 0.004063, 0.004875, 0.004875, 0.004875, 0.004875, 0.004875, 0.004875, 0.004875, 0.004875, 0.004875, 0.004875, 0.004875, 0.004875, 0.004875, 0.004875, 0.004875, 0.004875, 0.004875, 0.004875, 0.004875, 0.004875, 0.004875, 0.004875, 0.004875, 0.004875, 0.004875, 0.004875, 0.004875, 0.004875, 0.004875, 0.004875, 0.004875, 0.004875, 0.004875, 0.004063, 0.004063, 0.004063, 0.004063, 0.004063, 0.004063, 0.004063, 0.004063, 0.004063, 0.004063, 0.004063, 0.004063, 0.004063, 0.004063, 0.004063, 0.004063, 0.004063, 0.004063, 0.004063, 0.004063, 0.004063, 0.004063, 0.004063, 0.004063, 0.004063, 0.004063, 0.004063, 0.004063, 0.004063, 0.004063, 0.004063, 0.004063, 0.004063, 0.004063, 0.004063, 0.004063, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437 } }, { (char *) "OFDM500F", 1.0, 9.052000, { 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000 } }, { (char *) "OFDM750F", 1.0, 7.152000, { 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.018625, 0.018625, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.021313, 0.021313, 0.021313, 0.018625, 0.018625, 0.021313, 0.021313, 0.021313, 0.021313, 0.018625, 0.018625, 0.018625, 0.018625, 0.018625, 0.018625, 0.018625, 0.018625, 0.018625, 0.018625, 0.018625, 0.018625, 0.018625, 0.018625, 0.021313, 0.021313, 0.018625, 0.021313, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.018625, 0.018625, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.018625, 0.018625, 0.018625, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.018625, 0.018625, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.018625, 0.018625, 0.021313, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.021313, 0.021313, 0.021313, 0.021313, 0.021313, 0.021313, 0.021313, 0.021313, 0.021313, 0.021313, 0.021313, 0.021313, 0.021313, 0.021313, 0.021313, 0.021313, 0.021313, 0.021313, 0.021313, 0.021313, 0.021313, 0.021313, 0.021313, 0.021313, 0.021313, 0.021313, 0.021313, 0.021313, 0.021313, 0.021313, 0.021313, 0.021313, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313, 0.018625, 0.018625, 0.021313 } }, { (char *) "OFDM2000F", 1.0, 2.671000, { 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.006000, 0.006000, 0.005000, 0.006000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.006000, 0.005000, 0.006000, 0.006000, 0.005000, 0.005000, 0.006000, 0.005000, 0.006000, 0.006000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.006000, 0.005000, 0.005000, 0.006000, 0.006000, 0.006000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.006000, 0.005000, 0.005000, 0.006000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.006000, 0.006000, 0.006000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.005000, 0.006000, 0.006000, 0.006000, 0.006000, 0.005000, 0.006000, 0.006000, 0.005000, 0.005000, 0.006000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000, 0.005000, 0.006000 } }, { (char *) "OFDM2000", 1.0, 1.647000, { 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.003000, 0.004000, 0.003000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.003000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.004000, 0.003000, 0.004000, 0.003000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.003000, 0.003000, 0.003000, 0.003000, 0.003000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.003000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000, 0.004000, 0.003000, 0.004000 } }, { (char *) "OFDM3500", 1.0, 0.940562, { 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.001687, 0.001687, 0.001687, 0.001687, 0.002250, 0.002250, 0.001687, 0.001687, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.002250, 0.001687, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.002250, 0.002250, 0.001687, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.001687, 0.001687, 0.001687, 0.001687, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.001687, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.001687, 0.001687, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250, 0.001687, 0.002250, 0.002250 } }, { (char *) "OLIVIA-4/125", 1.0, 4.192000, { 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000, 2.048000 } }, { (char *) "OLIVIA-4/250", 1.0, 3.152000, { 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000 } }, { (char *) "OLIVIA-4/500", 1.0, 2.632000, { 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000 } }, { (char *) "OLIVIA-4/1K", 1.0, 2.372000, { 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000 } }, { (char *) "OLIVIA-4/2K", 1.0, 2.242000, { 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000 } }, { (char *) "OLIVIA-8/125", 1.0, 4.908000, { 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625 } }, { (char *) "OLIVIA-8/250", 1.0, 3.510000, { 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250 } }, { (char *) "OLIVIA-8/500", 1.0, 2.812000, { 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625 } }, { (char *) "OLIVIA-8/1K", 1.0, 2.462000, { 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250 } }, { (char *) "OLIVIA-8/2K", 1.0, 2.288000, { 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.085250, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625 } }, { (char *) "OLIVIA-16/500", 1.0, 4.192000, { 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000 } }, { (char *) "OLIVIA-16/1K", 1.0, 3.152000, { 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000 } }, { (char *) "OLIVIA-16/2K", 1.0, 2.632000, { 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000 } }, { (char *) "OLIVIA-32/1K", 1.0, 4.876000, { 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625 } }, { (char *) "OLIVIA-32/2K", 1.0, 3.494000, { 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250 } }, { (char *) "OLIVIA-64/500", 1.0, 13.164000, { 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625, 2.730625 } }, { (char *) "OLIVIA-64/1K", 1.0, 7.638000, { 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250 } }, { (char *) "OLIVIA-64/2K", 1.0, 4.876000, { 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625 } }, { (char *) "THOR16", 1.0, 4.480000, { 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.256000, 0.352000, 0.352000, 0.352000, 0.352000, 0.256000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.384000, 0.384000, 0.096000, 0.288000, 0.288000, 0.320000, 0.320000, 0.320000, 0.320000, 0.288000, 0.288000, 0.288000, 0.320000, 0.288000, 0.256000, 0.288000, 0.288000, 0.288000, 0.256000, 0.256000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.320000, 0.288000, 0.320000, 0.288000, 0.320000, 0.256000, 0.288000, 0.256000, 0.256000, 0.256000, 0.256000, 0.288000, 0.288000, 0.256000, 0.288000, 0.288000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.288000, 0.256000, 0.256000, 0.256000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.160000, 0.224000, 0.192000, 0.192000, 0.128000, 0.224000, 0.224000, 0.192000, 0.160000, 0.256000, 0.224000, 0.192000, 0.224000, 0.160000, 0.160000, 0.224000, 0.224000, 0.192000, 0.192000, 0.128000, 0.192000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.320000, 0.320000, 0.320000, 0.320000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000 } }, { (char *) "THOR22", 1.0, 3.250794, { 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.185760, 0.255420, 0.255420, 0.255420, 0.255420, 0.185760, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.278639, 0.278639, 0.069660, 0.208980, 0.208980, 0.232200, 0.232200, 0.232200, 0.232200, 0.208980, 0.208980, 0.208980, 0.232200, 0.208980, 0.185760, 0.208980, 0.208980, 0.208980, 0.185760, 0.185760, 0.208980, 0.208980, 0.208980, 0.208980, 0.208980, 0.208980, 0.208980, 0.208980, 0.208980, 0.208980, 0.232200, 0.208980, 0.232200, 0.208980, 0.232200, 0.185760, 0.208980, 0.185760, 0.185760, 0.185760, 0.185760, 0.208980, 0.208980, 0.185760, 0.208980, 0.208980, 0.185760, 0.185760, 0.185760, 0.185760, 0.185760, 0.208980, 0.185760, 0.185760, 0.185760, 0.208980, 0.208980, 0.208980, 0.208980, 0.208980, 0.208980, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.116100, 0.162540, 0.139320, 0.139320, 0.092880, 0.162540, 0.162540, 0.139320, 0.116100, 0.185760, 0.162540, 0.139320, 0.162540, 0.116100, 0.116100, 0.162540, 0.162540, 0.139320, 0.139320, 0.092880, 0.139320, 0.162540, 0.162540, 0.162540, 0.162540, 0.162540, 0.232200, 0.232200, 0.232200, 0.232200, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420 } }, { (char *) "THOR32", 1.0, 2.240000, { 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.128000, 0.176000, 0.176000, 0.176000, 0.176000, 0.128000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.192000, 0.192000, 0.048000, 0.144000, 0.144000, 0.160000, 0.160000, 0.160000, 0.160000, 0.144000, 0.144000, 0.144000, 0.160000, 0.144000, 0.128000, 0.144000, 0.144000, 0.144000, 0.128000, 0.128000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.160000, 0.144000, 0.160000, 0.144000, 0.160000, 0.128000, 0.144000, 0.128000, 0.128000, 0.128000, 0.128000, 0.144000, 0.144000, 0.128000, 0.144000, 0.144000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.144000, 0.128000, 0.128000, 0.128000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.080000, 0.112000, 0.096000, 0.096000, 0.064000, 0.112000, 0.112000, 0.096000, 0.080000, 0.128000, 0.112000, 0.096000, 0.112000, 0.080000, 0.080000, 0.112000, 0.112000, 0.096000, 0.096000, 0.064000, 0.096000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.160000, 0.160000, 0.160000, 0.160000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000 } }, { (char *) "THOR44", 1.0, 1.625397, { 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.092880, 0.127710, 0.127710, 0.127710, 0.127710, 0.092880, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.139320, 0.139320, 0.034830, 0.104490, 0.104490, 0.116100, 0.116100, 0.116100, 0.116100, 0.104490, 0.104490, 0.104490, 0.116100, 0.104490, 0.092880, 0.104490, 0.104490, 0.104490, 0.092880, 0.092880, 0.104490, 0.104490, 0.104490, 0.104490, 0.104490, 0.104490, 0.104490, 0.104490, 0.104490, 0.104490, 0.116100, 0.104490, 0.116100, 0.104490, 0.116100, 0.092880, 0.104490, 0.092880, 0.092880, 0.092880, 0.092880, 0.104490, 0.104490, 0.092880, 0.104490, 0.104490, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.104490, 0.092880, 0.092880, 0.092880, 0.104490, 0.104490, 0.104490, 0.104490, 0.104490, 0.104490, 0.116100, 0.116100, 0.116100, 0.116100, 0.116100, 0.116100, 0.058050, 0.081270, 0.069660, 0.069660, 0.046440, 0.081270, 0.081270, 0.069660, 0.058050, 0.092880, 0.081270, 0.069660, 0.081270, 0.058050, 0.058050, 0.081270, 0.081270, 0.069660, 0.069660, 0.046440, 0.069660, 0.081270, 0.081270, 0.081270, 0.081270, 0.081270, 0.116100, 0.116100, 0.116100, 0.116100, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.116100, 0.116100, 0.116100, 0.116100, 0.116100, 0.116100, 0.116100, 0.116100, 0.116100, 0.116100, 0.116100, 0.116100, 0.116100, 0.116100, 0.116100, 0.116100, 0.116100, 0.116100, 0.116100, 0.116100, 0.116100, 0.116100, 0.116100, 0.116100, 0.116100, 0.116100, 0.116100, 0.116100, 0.116100, 0.116100, 0.116100, 0.116100, 0.116100, 0.116100, 0.116100, 0.116100, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710, 0.127710 } }, { (char *) "THOR56", 1.0, 1.268750, { 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.072500, 0.099687, 0.099687, 0.099687, 0.099687, 0.072500, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.108750, 0.108750, 0.027187, 0.081562, 0.081562, 0.090625, 0.090625, 0.090625, 0.090625, 0.081562, 0.081562, 0.081562, 0.090625, 0.081562, 0.072500, 0.081562, 0.081562, 0.081562, 0.072500, 0.072500, 0.081562, 0.081562, 0.081562, 0.081562, 0.081562, 0.081562, 0.081562, 0.081562, 0.081562, 0.081562, 0.090625, 0.081562, 0.090625, 0.081562, 0.090625, 0.072500, 0.081562, 0.072500, 0.072500, 0.072500, 0.072500, 0.081562, 0.081562, 0.072500, 0.081562, 0.081562, 0.072500, 0.072500, 0.072500, 0.072500, 0.072500, 0.081562, 0.072500, 0.072500, 0.072500, 0.081562, 0.081562, 0.081562, 0.081562, 0.081562, 0.081562, 0.090625, 0.090625, 0.090625, 0.090625, 0.090625, 0.090625, 0.045312, 0.063437, 0.054375, 0.054375, 0.036250, 0.063437, 0.063437, 0.054375, 0.045312, 0.072500, 0.063437, 0.054375, 0.063437, 0.045312, 0.045312, 0.063437, 0.063437, 0.054375, 0.054375, 0.036250, 0.054375, 0.063437, 0.063437, 0.063437, 0.063437, 0.063437, 0.090625, 0.090625, 0.090625, 0.090625, 0.108750, 0.108750, 0.108750, 0.108750, 0.108750, 0.108750, 0.108750, 0.108750, 0.108750, 0.108750, 0.108750, 0.108750, 0.108750, 0.108750, 0.108750, 0.108750, 0.108750, 0.108750, 0.108750, 0.108750, 0.108750, 0.108750, 0.108750, 0.108750, 0.108750, 0.108750, 0.108750, 0.108750, 0.108750, 0.108750, 0.108750, 0.108750, 0.108750, 0.090625, 0.090625, 0.090625, 0.090625, 0.090625, 0.090625, 0.090625, 0.090625, 0.090625, 0.090625, 0.090625, 0.090625, 0.090625, 0.090625, 0.090625, 0.090625, 0.090625, 0.090625, 0.090625, 0.090625, 0.090625, 0.090625, 0.090625, 0.090625, 0.090625, 0.090625, 0.090625, 0.090625, 0.090625, 0.090625, 0.090625, 0.090625, 0.090625, 0.090625, 0.090625, 0.090625, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687, 0.099687 } }, { (char *) "THOR25x4", 1.0, 10.720000, { 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.160000, 0.220000, 0.220000, 0.220000, 0.220000, 0.160000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.240000, 0.240000, 0.060000, 0.180000, 0.180000, 0.200000, 0.200000, 0.200000, 0.200000, 0.180000, 0.180000, 0.180000, 0.200000, 0.180000, 0.160000, 0.180000, 0.180000, 0.180000, 0.160000, 0.160000, 0.180000, 0.180000, 0.180000, 0.180000, 0.180000, 0.180000, 0.180000, 0.180000, 0.180000, 0.180000, 0.200000, 0.180000, 0.200000, 0.180000, 0.200000, 0.160000, 0.180000, 0.160000, 0.160000, 0.160000, 0.160000, 0.180000, 0.180000, 0.160000, 0.180000, 0.180000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.180000, 0.160000, 0.160000, 0.160000, 0.180000, 0.180000, 0.180000, 0.180000, 0.180000, 0.180000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.100000, 0.140000, 0.120000, 0.120000, 0.080000, 0.140000, 0.140000, 0.120000, 0.100000, 0.160000, 0.140000, 0.120000, 0.140000, 0.100000, 0.100000, 0.140000, 0.140000, 0.120000, 0.120000, 0.080000, 0.120000, 0.140000, 0.140000, 0.140000, 0.140000, 0.140000, 0.200000, 0.200000, 0.200000, 0.200000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000 } }, { (char *) "THOR50x1", 1.0, 5.360000, { 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.080000, 0.110000, 0.110000, 0.110000, 0.110000, 0.080000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.120000, 0.120000, 0.030000, 0.090000, 0.090000, 0.100000, 0.100000, 0.100000, 0.100000, 0.090000, 0.090000, 0.090000, 0.100000, 0.090000, 0.080000, 0.090000, 0.090000, 0.090000, 0.080000, 0.080000, 0.090000, 0.090000, 0.090000, 0.090000, 0.090000, 0.090000, 0.090000, 0.090000, 0.090000, 0.090000, 0.100000, 0.090000, 0.100000, 0.090000, 0.100000, 0.080000, 0.090000, 0.080000, 0.080000, 0.080000, 0.080000, 0.090000, 0.090000, 0.080000, 0.090000, 0.090000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.090000, 0.080000, 0.080000, 0.080000, 0.090000, 0.090000, 0.090000, 0.090000, 0.090000, 0.090000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.050000, 0.070000, 0.060000, 0.060000, 0.040000, 0.070000, 0.070000, 0.060000, 0.050000, 0.080000, 0.070000, 0.060000, 0.070000, 0.050000, 0.050000, 0.070000, 0.070000, 0.060000, 0.060000, 0.040000, 0.060000, 0.070000, 0.070000, 0.070000, 0.070000, 0.070000, 0.100000, 0.100000, 0.100000, 0.100000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000 } }, { (char *) "THOR50x2", 1.0, 5.360000, { 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.080000, 0.110000, 0.110000, 0.110000, 0.110000, 0.080000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.120000, 0.120000, 0.030000, 0.090000, 0.090000, 0.100000, 0.100000, 0.100000, 0.100000, 0.090000, 0.090000, 0.090000, 0.100000, 0.090000, 0.080000, 0.090000, 0.090000, 0.090000, 0.080000, 0.080000, 0.090000, 0.090000, 0.090000, 0.090000, 0.090000, 0.090000, 0.090000, 0.090000, 0.090000, 0.090000, 0.100000, 0.090000, 0.100000, 0.090000, 0.100000, 0.080000, 0.090000, 0.080000, 0.080000, 0.080000, 0.080000, 0.090000, 0.090000, 0.080000, 0.090000, 0.090000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.090000, 0.080000, 0.080000, 0.080000, 0.090000, 0.090000, 0.090000, 0.090000, 0.090000, 0.090000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.050000, 0.070000, 0.060000, 0.060000, 0.040000, 0.070000, 0.070000, 0.060000, 0.050000, 0.080000, 0.070000, 0.060000, 0.070000, 0.050000, 0.050000, 0.070000, 0.070000, 0.060000, 0.060000, 0.040000, 0.060000, 0.070000, 0.070000, 0.070000, 0.070000, 0.070000, 0.100000, 0.100000, 0.100000, 0.100000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000 } }, { (char *) "THOR100", 1.0, 2.680000, { 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.040000, 0.055000, 0.055000, 0.055000, 0.055000, 0.040000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.060000, 0.060000, 0.015000, 0.045000, 0.045000, 0.050000, 0.050000, 0.050000, 0.050000, 0.045000, 0.045000, 0.045000, 0.050000, 0.045000, 0.040000, 0.045000, 0.045000, 0.045000, 0.040000, 0.040000, 0.045000, 0.045000, 0.045000, 0.045000, 0.045000, 0.045000, 0.045000, 0.045000, 0.045000, 0.045000, 0.050000, 0.045000, 0.050000, 0.045000, 0.050000, 0.040000, 0.045000, 0.040000, 0.040000, 0.040000, 0.040000, 0.045000, 0.045000, 0.040000, 0.045000, 0.045000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.045000, 0.040000, 0.040000, 0.040000, 0.045000, 0.045000, 0.045000, 0.045000, 0.045000, 0.045000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.025000, 0.035000, 0.030000, 0.030000, 0.020000, 0.035000, 0.035000, 0.030000, 0.025000, 0.040000, 0.035000, 0.030000, 0.035000, 0.025000, 0.025000, 0.035000, 0.035000, 0.030000, 0.030000, 0.020000, 0.030000, 0.035000, 0.035000, 0.035000, 0.035000, 0.035000, 0.050000, 0.050000, 0.050000, 0.050000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000 } }, { (char *) "PSK125R", 1.0, 4.272000, { 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.128000, 0.176000, 0.176000, 0.176000, 0.176000, 0.128000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.192000, 0.192000, 0.048000, 0.144000, 0.144000, 0.160000, 0.160000, 0.160000, 0.160000, 0.144000, 0.144000, 0.144000, 0.160000, 0.144000, 0.128000, 0.144000, 0.144000, 0.144000, 0.128000, 0.128000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.160000, 0.144000, 0.160000, 0.144000, 0.160000, 0.128000, 0.144000, 0.128000, 0.128000, 0.128000, 0.128000, 0.144000, 0.144000, 0.128000, 0.144000, 0.144000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.144000, 0.128000, 0.128000, 0.128000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.080000, 0.112000, 0.096000, 0.096000, 0.064000, 0.112000, 0.112000, 0.096000, 0.080000, 0.128000, 0.112000, 0.096000, 0.112000, 0.080000, 0.080000, 0.112000, 0.112000, 0.096000, 0.096000, 0.064000, 0.096000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.160000, 0.160000, 0.160000, 0.160000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000 } }, { (char *) "PSK250R", 1.0, 4.184000, { 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.064000, 0.088000, 0.088000, 0.088000, 0.088000, 0.064000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.096000, 0.096000, 0.024000, 0.072000, 0.072000, 0.080000, 0.080000, 0.080000, 0.080000, 0.072000, 0.072000, 0.072000, 0.080000, 0.072000, 0.064000, 0.072000, 0.072000, 0.072000, 0.064000, 0.064000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.080000, 0.072000, 0.080000, 0.072000, 0.080000, 0.064000, 0.072000, 0.064000, 0.064000, 0.064000, 0.064000, 0.072000, 0.072000, 0.064000, 0.072000, 0.072000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.072000, 0.064000, 0.064000, 0.064000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.040000, 0.056000, 0.048000, 0.048000, 0.032000, 0.056000, 0.056000, 0.048000, 0.040000, 0.064000, 0.056000, 0.048000, 0.056000, 0.040000, 0.040000, 0.056000, 0.056000, 0.048000, 0.048000, 0.032000, 0.048000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.080000, 0.080000, 0.080000, 0.080000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000 } }, { (char *) "PSK500R", 1.0, 4.140000, { 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.032000, 0.044000, 0.044000, 0.044000, 0.044000, 0.032000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.048000, 0.048000, 0.012000, 0.036000, 0.036000, 0.040000, 0.040000, 0.040000, 0.040000, 0.036000, 0.036000, 0.036000, 0.040000, 0.036000, 0.032000, 0.036000, 0.036000, 0.036000, 0.032000, 0.032000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.040000, 0.036000, 0.040000, 0.036000, 0.040000, 0.032000, 0.036000, 0.032000, 0.032000, 0.032000, 0.032000, 0.036000, 0.036000, 0.032000, 0.036000, 0.036000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.036000, 0.032000, 0.032000, 0.032000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.020000, 0.028000, 0.024000, 0.024000, 0.016000, 0.028000, 0.028000, 0.024000, 0.020000, 0.032000, 0.028000, 0.024000, 0.028000, 0.020000, 0.020000, 0.028000, 0.028000, 0.024000, 0.024000, 0.016000, 0.024000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.040000, 0.040000, 0.040000, 0.040000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000 } }, { (char *) "PSK1000R", 1.0, 2.070000, { 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.016000, 0.022000, 0.022000, 0.022000, 0.022000, 0.016000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.024000, 0.024000, 0.006000, 0.018000, 0.018000, 0.020000, 0.020000, 0.020000, 0.020000, 0.018000, 0.018000, 0.018000, 0.020000, 0.018000, 0.016000, 0.018000, 0.018000, 0.018000, 0.016000, 0.016000, 0.018000, 0.018000, 0.018000, 0.018000, 0.018000, 0.018000, 0.018000, 0.018000, 0.018000, 0.018000, 0.020000, 0.018000, 0.020000, 0.018000, 0.020000, 0.016000, 0.018000, 0.016000, 0.016000, 0.016000, 0.016000, 0.018000, 0.018000, 0.016000, 0.018000, 0.018000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.018000, 0.016000, 0.016000, 0.016000, 0.018000, 0.018000, 0.018000, 0.018000, 0.018000, 0.018000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.010000, 0.014000, 0.012000, 0.012000, 0.008000, 0.014000, 0.014000, 0.012000, 0.010000, 0.016000, 0.014000, 0.012000, 0.014000, 0.010000, 0.010000, 0.014000, 0.014000, 0.012000, 0.012000, 0.008000, 0.012000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.020000, 0.020000, 0.020000, 0.020000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000 } }, { (char *) "PSK63RC4", 1.0, 2.136000, { 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.064000, 0.088000, 0.088000, 0.088000, 0.088000, 0.064000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.096000, 0.096000, 0.024000, 0.072000, 0.072000, 0.080000, 0.080000, 0.080000, 0.080000, 0.072000, 0.072000, 0.072000, 0.080000, 0.072000, 0.064000, 0.072000, 0.072000, 0.072000, 0.064000, 0.064000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.080000, 0.072000, 0.080000, 0.072000, 0.080000, 0.064000, 0.072000, 0.064000, 0.064000, 0.064000, 0.064000, 0.072000, 0.072000, 0.064000, 0.072000, 0.072000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.072000, 0.064000, 0.064000, 0.064000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.040000, 0.056000, 0.048000, 0.048000, 0.032000, 0.056000, 0.056000, 0.048000, 0.040000, 0.064000, 0.056000, 0.048000, 0.056000, 0.040000, 0.040000, 0.056000, 0.056000, 0.048000, 0.048000, 0.032000, 0.048000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.080000, 0.080000, 0.080000, 0.080000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000 } }, { (char *) "PSK63RC5", 1.0, 6.643125, { 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.051125, 0.070375, 0.070375, 0.070375, 0.070375, 0.051125, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.076750, 0.076750, 0.019125, 0.057500, 0.057500, 0.064000, 0.064000, 0.064000, 0.064000, 0.057500, 0.057500, 0.057500, 0.064000, 0.057500, 0.051125, 0.057500, 0.057500, 0.057500, 0.051125, 0.051125, 0.057500, 0.057500, 0.057500, 0.057500, 0.057500, 0.057500, 0.057500, 0.057500, 0.057500, 0.057500, 0.064000, 0.057500, 0.064000, 0.057500, 0.064000, 0.051125, 0.057500, 0.051125, 0.051125, 0.051125, 0.051125, 0.057500, 0.057500, 0.051125, 0.057500, 0.057500, 0.051125, 0.051125, 0.051125, 0.051125, 0.051125, 0.057500, 0.051125, 0.051125, 0.051125, 0.057500, 0.057500, 0.057500, 0.057500, 0.057500, 0.057500, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.032000, 0.044750, 0.038375, 0.038375, 0.025500, 0.044750, 0.044750, 0.038375, 0.032000, 0.051125, 0.044750, 0.038375, 0.044750, 0.032000, 0.032000, 0.044750, 0.044750, 0.038375, 0.038375, 0.025500, 0.038375, 0.044750, 0.044750, 0.044750, 0.044750, 0.044750, 0.064000, 0.064000, 0.064000, 0.064000, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375 } }, { (char *) "PSK63RC10", 1.0, 3.321500, { 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.025500, 0.035125, 0.035125, 0.035125, 0.035125, 0.025500, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.038375, 0.038375, 0.009500, 0.028750, 0.028750, 0.032000, 0.032000, 0.032000, 0.032000, 0.028750, 0.028750, 0.028750, 0.032000, 0.028750, 0.025500, 0.028750, 0.028750, 0.028750, 0.025500, 0.025500, 0.028750, 0.028750, 0.028750, 0.028750, 0.028750, 0.028750, 0.028750, 0.028750, 0.028750, 0.028750, 0.032000, 0.028750, 0.032000, 0.028750, 0.032000, 0.025500, 0.028750, 0.025500, 0.025500, 0.025500, 0.025500, 0.028750, 0.028750, 0.025500, 0.028750, 0.028750, 0.025500, 0.025500, 0.025500, 0.025500, 0.025500, 0.028750, 0.025500, 0.025500, 0.025500, 0.028750, 0.028750, 0.028750, 0.028750, 0.028750, 0.028750, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.016000, 0.022375, 0.019125, 0.019125, 0.012750, 0.022375, 0.022375, 0.019125, 0.016000, 0.025500, 0.022375, 0.019125, 0.022375, 0.016000, 0.016000, 0.022375, 0.022375, 0.019125, 0.019125, 0.012750, 0.019125, 0.022375, 0.022375, 0.022375, 0.022375, 0.022375, 0.032000, 0.032000, 0.032000, 0.032000, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125 } }, { (char *) "PSK63RC20", 1.0, 1.668750, { 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.012750, 0.017500, 0.017500, 0.017500, 0.017500, 0.012750, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.019125, 0.019125, 0.004750, 0.014375, 0.014375, 0.016000, 0.016000, 0.016000, 0.016000, 0.014375, 0.014375, 0.014375, 0.016000, 0.014375, 0.012750, 0.014375, 0.014375, 0.014375, 0.012750, 0.012750, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.016000, 0.014375, 0.016000, 0.014375, 0.016000, 0.012750, 0.014375, 0.012750, 0.012750, 0.012750, 0.012750, 0.014375, 0.014375, 0.012750, 0.014375, 0.014375, 0.012750, 0.012750, 0.012750, 0.012750, 0.012750, 0.014375, 0.012750, 0.012750, 0.012750, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.008000, 0.011125, 0.009500, 0.009500, 0.006375, 0.011125, 0.011125, 0.009500, 0.008000, 0.012750, 0.011125, 0.009500, 0.011125, 0.008000, 0.008000, 0.011125, 0.011125, 0.009500, 0.009500, 0.006375, 0.009500, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.016000, 0.016000, 0.016000, 0.016000, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500 } }, { (char *) "PSK63RC32", 1.0, 1.035000, { 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.008000, 0.011000, 0.011000, 0.011000, 0.011000, 0.008000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.012000, 0.012000, 0.003000, 0.009000, 0.009000, 0.010000, 0.010000, 0.010000, 0.010000, 0.009000, 0.009000, 0.009000, 0.010000, 0.009000, 0.008000, 0.009000, 0.009000, 0.009000, 0.008000, 0.008000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.010000, 0.009000, 0.010000, 0.009000, 0.010000, 0.008000, 0.009000, 0.008000, 0.008000, 0.008000, 0.008000, 0.009000, 0.009000, 0.008000, 0.009000, 0.009000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.009000, 0.008000, 0.008000, 0.008000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.005000, 0.007000, 0.006000, 0.006000, 0.004000, 0.007000, 0.007000, 0.006000, 0.005000, 0.008000, 0.007000, 0.006000, 0.007000, 0.005000, 0.005000, 0.007000, 0.007000, 0.006000, 0.006000, 0.004000, 0.006000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.010000, 0.010000, 0.010000, 0.010000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000 } }, { (char *) "PSK125RC4", 1.0, 4.140000, { 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.032000, 0.044000, 0.044000, 0.044000, 0.044000, 0.032000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.048000, 0.048000, 0.012000, 0.036000, 0.036000, 0.040000, 0.040000, 0.040000, 0.040000, 0.036000, 0.036000, 0.036000, 0.040000, 0.036000, 0.032000, 0.036000, 0.036000, 0.036000, 0.032000, 0.032000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.040000, 0.036000, 0.040000, 0.036000, 0.040000, 0.032000, 0.036000, 0.032000, 0.032000, 0.032000, 0.032000, 0.036000, 0.036000, 0.032000, 0.036000, 0.036000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.036000, 0.032000, 0.032000, 0.032000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.020000, 0.028000, 0.024000, 0.024000, 0.016000, 0.028000, 0.028000, 0.024000, 0.020000, 0.032000, 0.028000, 0.024000, 0.028000, 0.020000, 0.020000, 0.028000, 0.028000, 0.024000, 0.024000, 0.016000, 0.024000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.040000, 0.040000, 0.040000, 0.040000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000 } }, { (char *) "PSK125RC5", 1.0, 3.321500, { 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.025500, 0.035125, 0.035125, 0.035125, 0.035125, 0.025500, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.038375, 0.038375, 0.009500, 0.028750, 0.028750, 0.032000, 0.032000, 0.032000, 0.032000, 0.028750, 0.028750, 0.028750, 0.032000, 0.028750, 0.025500, 0.028750, 0.028750, 0.028750, 0.025500, 0.025500, 0.028750, 0.028750, 0.028750, 0.028750, 0.028750, 0.028750, 0.028750, 0.028750, 0.028750, 0.028750, 0.032000, 0.028750, 0.032000, 0.028750, 0.032000, 0.025500, 0.028750, 0.025500, 0.025500, 0.025500, 0.025500, 0.028750, 0.028750, 0.025500, 0.028750, 0.028750, 0.025500, 0.025500, 0.025500, 0.025500, 0.025500, 0.028750, 0.025500, 0.025500, 0.025500, 0.028750, 0.028750, 0.028750, 0.028750, 0.028750, 0.028750, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.016000, 0.022375, 0.019125, 0.019125, 0.012750, 0.022375, 0.022375, 0.019125, 0.016000, 0.025500, 0.022375, 0.019125, 0.022375, 0.016000, 0.016000, 0.022375, 0.022375, 0.019125, 0.019125, 0.012750, 0.019125, 0.022375, 0.022375, 0.022375, 0.022375, 0.022375, 0.032000, 0.032000, 0.032000, 0.032000, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125 } }, { (char *) "PSK125RC10", 1.0, 1.660750, { 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.012750, 0.017500, 0.017500, 0.017500, 0.017500, 0.012750, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.019125, 0.019125, 0.004750, 0.014375, 0.014375, 0.016000, 0.016000, 0.016000, 0.016000, 0.014375, 0.014375, 0.014375, 0.016000, 0.014375, 0.012750, 0.014375, 0.014375, 0.014375, 0.012750, 0.012750, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.016000, 0.014375, 0.016000, 0.014375, 0.016000, 0.012750, 0.014375, 0.012750, 0.012750, 0.012750, 0.012750, 0.014375, 0.014375, 0.012750, 0.014375, 0.014375, 0.012750, 0.012750, 0.012750, 0.012750, 0.012750, 0.014375, 0.012750, 0.012750, 0.012750, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.008000, 0.011125, 0.009500, 0.009500, 0.006375, 0.011125, 0.011125, 0.009500, 0.008000, 0.012750, 0.011125, 0.009500, 0.011125, 0.008000, 0.008000, 0.011125, 0.011125, 0.009500, 0.009500, 0.006375, 0.009500, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.016000, 0.016000, 0.016000, 0.016000, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500 } }, { (char *) "PSK125RC12", 1.0, 1.385250, { 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.010625, 0.014625, 0.014625, 0.014625, 0.014625, 0.010625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.016000, 0.016000, 0.004000, 0.012000, 0.012000, 0.013250, 0.013250, 0.013250, 0.013250, 0.012000, 0.012000, 0.012000, 0.013250, 0.012000, 0.010625, 0.012000, 0.012000, 0.012000, 0.010625, 0.010625, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.013250, 0.012000, 0.013250, 0.012000, 0.013250, 0.010625, 0.012000, 0.010625, 0.010625, 0.010625, 0.010625, 0.012000, 0.012000, 0.010625, 0.012000, 0.012000, 0.010625, 0.010625, 0.010625, 0.010625, 0.010625, 0.012000, 0.010625, 0.010625, 0.010625, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.006625, 0.009250, 0.008000, 0.008000, 0.005250, 0.009250, 0.009250, 0.008000, 0.006625, 0.010625, 0.009250, 0.008000, 0.009250, 0.006625, 0.006625, 0.009250, 0.009250, 0.008000, 0.008000, 0.005250, 0.008000, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.013250, 0.013250, 0.013250, 0.013250, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625 } }, { (char *) "PSK125RC16", 1.0, 1.035000, { 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.008000, 0.011000, 0.011000, 0.011000, 0.011000, 0.008000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.012000, 0.012000, 0.003000, 0.009000, 0.009000, 0.010000, 0.010000, 0.010000, 0.010000, 0.009000, 0.009000, 0.009000, 0.010000, 0.009000, 0.008000, 0.009000, 0.009000, 0.009000, 0.008000, 0.008000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.010000, 0.009000, 0.010000, 0.009000, 0.010000, 0.008000, 0.009000, 0.008000, 0.008000, 0.008000, 0.008000, 0.009000, 0.009000, 0.008000, 0.009000, 0.009000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.009000, 0.008000, 0.008000, 0.008000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.005000, 0.007000, 0.006000, 0.006000, 0.004000, 0.007000, 0.007000, 0.006000, 0.005000, 0.008000, 0.007000, 0.006000, 0.007000, 0.005000, 0.005000, 0.007000, 0.007000, 0.006000, 0.006000, 0.004000, 0.006000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.010000, 0.010000, 0.010000, 0.010000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000 } }, { (char *) "PSK250RC2", 1.0, 4.140000, { 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.032000, 0.044000, 0.044000, 0.044000, 0.044000, 0.032000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.048000, 0.048000, 0.012000, 0.036000, 0.036000, 0.040000, 0.040000, 0.040000, 0.040000, 0.036000, 0.036000, 0.036000, 0.040000, 0.036000, 0.032000, 0.036000, 0.036000, 0.036000, 0.032000, 0.032000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.040000, 0.036000, 0.040000, 0.036000, 0.040000, 0.032000, 0.036000, 0.032000, 0.032000, 0.032000, 0.032000, 0.036000, 0.036000, 0.032000, 0.036000, 0.036000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.036000, 0.032000, 0.032000, 0.032000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.020000, 0.028000, 0.024000, 0.024000, 0.016000, 0.028000, 0.028000, 0.024000, 0.020000, 0.032000, 0.028000, 0.024000, 0.028000, 0.020000, 0.020000, 0.028000, 0.028000, 0.024000, 0.024000, 0.016000, 0.024000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.040000, 0.040000, 0.040000, 0.040000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000 } }, { (char *) "PSK250RC3", 1.0, 2.761250, { 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.021250, 0.029250, 0.029250, 0.029250, 0.029250, 0.021250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.032000, 0.032000, 0.008000, 0.024000, 0.024000, 0.026625, 0.026625, 0.026625, 0.026625, 0.024000, 0.024000, 0.024000, 0.026625, 0.024000, 0.021250, 0.024000, 0.024000, 0.024000, 0.021250, 0.021250, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.026625, 0.024000, 0.026625, 0.024000, 0.026625, 0.021250, 0.024000, 0.021250, 0.021250, 0.021250, 0.021250, 0.024000, 0.024000, 0.021250, 0.024000, 0.024000, 0.021250, 0.021250, 0.021250, 0.021250, 0.021250, 0.024000, 0.021250, 0.021250, 0.021250, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.013250, 0.018625, 0.016000, 0.016000, 0.010625, 0.018625, 0.018625, 0.016000, 0.013250, 0.021250, 0.018625, 0.016000, 0.018625, 0.013250, 0.013250, 0.018625, 0.018625, 0.016000, 0.016000, 0.010625, 0.016000, 0.018625, 0.018625, 0.018625, 0.018625, 0.018625, 0.026625, 0.026625, 0.026625, 0.026625, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250 } }, { (char *) "PSK250RC5", 1.0, 3.296000, { 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.012750, 0.017500, 0.017500, 0.017500, 0.017500, 0.012750, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.019125, 0.019125, 0.004750, 0.014375, 0.014375, 0.016000, 0.016000, 0.016000, 0.016000, 0.014375, 0.014375, 0.014375, 0.016000, 0.014375, 0.012750, 0.014375, 0.014375, 0.014375, 0.012750, 0.012750, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.016000, 0.014375, 0.016000, 0.014375, 0.016000, 0.012750, 0.014375, 0.012750, 0.012750, 0.012750, 0.012750, 0.014375, 0.014375, 0.012750, 0.014375, 0.014375, 0.012750, 0.012750, 0.012750, 0.012750, 0.012750, 0.014375, 0.012750, 0.012750, 0.012750, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.008000, 0.011125, 0.009500, 0.009500, 0.006375, 0.011125, 0.011125, 0.009500, 0.008000, 0.012750, 0.011125, 0.009500, 0.011125, 0.008000, 0.008000, 0.011125, 0.011125, 0.009500, 0.009500, 0.006375, 0.009500, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.016000, 0.016000, 0.016000, 0.016000, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500 } }, { (char *) "PSK250RC6", 1.0, 2.748000, { 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.010625, 0.014625, 0.014625, 0.014625, 0.014625, 0.010625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.016000, 0.016000, 0.004000, 0.012000, 0.012000, 0.013250, 0.013250, 0.013250, 0.013250, 0.012000, 0.012000, 0.012000, 0.013250, 0.012000, 0.010625, 0.012000, 0.012000, 0.012000, 0.010625, 0.010625, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.013250, 0.012000, 0.013250, 0.012000, 0.013250, 0.010625, 0.012000, 0.010625, 0.010625, 0.010625, 0.010625, 0.012000, 0.012000, 0.010625, 0.012000, 0.012000, 0.010625, 0.010625, 0.010625, 0.010625, 0.010625, 0.012000, 0.010625, 0.010625, 0.010625, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.006625, 0.009250, 0.008000, 0.008000, 0.005250, 0.009250, 0.009250, 0.008000, 0.006625, 0.010625, 0.009250, 0.008000, 0.009250, 0.006625, 0.006625, 0.009250, 0.009250, 0.008000, 0.008000, 0.005250, 0.008000, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.013250, 0.013250, 0.013250, 0.013250, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625 } }, { (char *) "PSK250RC7", 1.0, 2.358750, { 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.009125, 0.012500, 0.012500, 0.012500, 0.012500, 0.009125, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.013625, 0.013625, 0.003375, 0.010250, 0.010250, 0.011375, 0.011375, 0.011375, 0.011375, 0.010250, 0.010250, 0.010250, 0.011375, 0.010250, 0.009125, 0.010250, 0.010250, 0.010250, 0.009125, 0.009125, 0.010250, 0.010250, 0.010250, 0.010250, 0.010250, 0.010250, 0.010250, 0.010250, 0.010250, 0.010250, 0.011375, 0.010250, 0.011375, 0.010250, 0.011375, 0.009125, 0.010250, 0.009125, 0.009125, 0.009125, 0.009125, 0.010250, 0.010250, 0.009125, 0.010250, 0.010250, 0.009125, 0.009125, 0.009125, 0.009125, 0.009125, 0.010250, 0.009125, 0.009125, 0.009125, 0.010250, 0.010250, 0.010250, 0.010250, 0.010250, 0.010250, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.005625, 0.008000, 0.006750, 0.006750, 0.004500, 0.008000, 0.008000, 0.006750, 0.005625, 0.009125, 0.008000, 0.006750, 0.008000, 0.005625, 0.005625, 0.008000, 0.008000, 0.006750, 0.006750, 0.004500, 0.006750, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.011375, 0.011375, 0.011375, 0.011375, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500 } }, { (char *) "PSK500RC2", 1.0, 4.118000, { 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.016000, 0.022000, 0.022000, 0.022000, 0.022000, 0.016000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.024000, 0.024000, 0.006000, 0.018000, 0.018000, 0.020000, 0.020000, 0.020000, 0.020000, 0.018000, 0.018000, 0.018000, 0.020000, 0.018000, 0.016000, 0.018000, 0.018000, 0.018000, 0.016000, 0.016000, 0.018000, 0.018000, 0.018000, 0.018000, 0.018000, 0.018000, 0.018000, 0.018000, 0.018000, 0.018000, 0.020000, 0.018000, 0.020000, 0.018000, 0.020000, 0.016000, 0.018000, 0.016000, 0.016000, 0.016000, 0.016000, 0.018000, 0.018000, 0.016000, 0.018000, 0.018000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.018000, 0.016000, 0.016000, 0.016000, 0.018000, 0.018000, 0.018000, 0.018000, 0.018000, 0.018000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.010000, 0.014000, 0.012000, 0.012000, 0.008000, 0.014000, 0.014000, 0.012000, 0.010000, 0.016000, 0.014000, 0.012000, 0.014000, 0.010000, 0.010000, 0.014000, 0.014000, 0.012000, 0.012000, 0.008000, 0.012000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.020000, 0.020000, 0.020000, 0.020000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000 } }, { (char *) "PSK500RC3", 1.0, 2.747250, { 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.010625, 0.014625, 0.014625, 0.014625, 0.014625, 0.010625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.016000, 0.016000, 0.004000, 0.012000, 0.012000, 0.013250, 0.013250, 0.013250, 0.013250, 0.012000, 0.012000, 0.012000, 0.013250, 0.012000, 0.010625, 0.012000, 0.012000, 0.012000, 0.010625, 0.010625, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.013250, 0.012000, 0.013250, 0.012000, 0.013250, 0.010625, 0.012000, 0.010625, 0.010625, 0.010625, 0.010625, 0.012000, 0.012000, 0.010625, 0.012000, 0.012000, 0.010625, 0.010625, 0.010625, 0.010625, 0.010625, 0.012000, 0.010625, 0.010625, 0.010625, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.006625, 0.009250, 0.008000, 0.008000, 0.005250, 0.009250, 0.009250, 0.008000, 0.006625, 0.010625, 0.009250, 0.008000, 0.009250, 0.006625, 0.006625, 0.009250, 0.009250, 0.008000, 0.008000, 0.005250, 0.008000, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.013250, 0.013250, 0.013250, 0.013250, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625 } }, { (char *) "PSK500RC4", 1.0, 2.059000, { 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.008000, 0.011000, 0.011000, 0.011000, 0.011000, 0.008000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.012000, 0.012000, 0.003000, 0.009000, 0.009000, 0.010000, 0.010000, 0.010000, 0.010000, 0.009000, 0.009000, 0.009000, 0.010000, 0.009000, 0.008000, 0.009000, 0.009000, 0.009000, 0.008000, 0.008000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.010000, 0.009000, 0.010000, 0.009000, 0.010000, 0.008000, 0.009000, 0.008000, 0.008000, 0.008000, 0.008000, 0.009000, 0.009000, 0.008000, 0.009000, 0.009000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.009000, 0.008000, 0.008000, 0.008000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.005000, 0.007000, 0.006000, 0.006000, 0.004000, 0.007000, 0.007000, 0.006000, 0.005000, 0.008000, 0.007000, 0.006000, 0.007000, 0.005000, 0.005000, 0.007000, 0.007000, 0.006000, 0.006000, 0.004000, 0.006000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.010000, 0.010000, 0.010000, 0.010000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000 } }, { (char *) "PSK800RC2", 1.0, 2.573750, { 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.010000, 0.013750, 0.013750, 0.013750, 0.013750, 0.010000, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.015000, 0.015000, 0.003750, 0.011250, 0.011250, 0.012500, 0.012500, 0.012500, 0.012500, 0.011250, 0.011250, 0.011250, 0.012500, 0.011250, 0.010000, 0.011250, 0.011250, 0.011250, 0.010000, 0.010000, 0.011250, 0.011250, 0.011250, 0.011250, 0.011250, 0.011250, 0.011250, 0.011250, 0.011250, 0.011250, 0.012500, 0.011250, 0.012500, 0.011250, 0.012500, 0.010000, 0.011250, 0.010000, 0.010000, 0.010000, 0.010000, 0.011250, 0.011250, 0.010000, 0.011250, 0.011250, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.011250, 0.010000, 0.010000, 0.010000, 0.011250, 0.011250, 0.011250, 0.011250, 0.011250, 0.011250, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.006250, 0.008750, 0.007500, 0.007500, 0.005000, 0.008750, 0.008750, 0.007500, 0.006250, 0.010000, 0.008750, 0.007500, 0.008750, 0.006250, 0.006250, 0.008750, 0.008750, 0.007500, 0.007500, 0.005000, 0.007500, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.012500, 0.012500, 0.012500, 0.012500, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750 } }, { (char *) "PSK1000RC2", 1.0, 2.059000, { 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.008000, 0.011000, 0.011000, 0.011000, 0.011000, 0.008000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.012000, 0.012000, 0.003000, 0.009000, 0.009000, 0.010000, 0.010000, 0.010000, 0.010000, 0.009000, 0.009000, 0.009000, 0.010000, 0.009000, 0.008000, 0.009000, 0.009000, 0.009000, 0.008000, 0.008000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.010000, 0.009000, 0.010000, 0.009000, 0.010000, 0.008000, 0.009000, 0.008000, 0.008000, 0.008000, 0.008000, 0.009000, 0.009000, 0.008000, 0.009000, 0.009000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.009000, 0.008000, 0.008000, 0.008000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.005000, 0.007000, 0.006000, 0.006000, 0.004000, 0.007000, 0.007000, 0.006000, 0.005000, 0.008000, 0.007000, 0.006000, 0.007000, 0.005000, 0.005000, 0.007000, 0.007000, 0.006000, 0.006000, 0.004000, 0.006000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.010000, 0.010000, 0.010000, 0.010000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000 } } }; flamp-2.2.12/src/ui/0000775000175000017500000000000014607053767011123 500000000000000flamp-2.2.12/src/ui/dialogs.cxx0000664000175000017500000013647514605333064013216 00000000000000// generated by Fast Light User Interface Designer (fluid) version 1.0308 #include "dialogs.h" extern void init_encoders(); extern void init_cbo_modes(); extern void init_cbo_events(); extern void cb_rx_queue(Fl_Browser*, void*); Fl_Double_Window *dialog_flamp=(Fl_Double_Window *)0; Fl_Menu_Bar *mnubar=(Fl_Menu_Bar *)0; Fl_Menu_Item menu_mnubar[] = { {" &File", 0, 0, 0, 64, (uchar)FL_NORMAL_LABEL, 0, 14, 0}, {"&Folders", 0, (Fl_Callback*)cb_mnu_folders, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0}, {"Load Relay Files", 0, (Fl_Callback*)cb_mnu_load_relay, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0}, {"Save Relay Files", 0, (Fl_Callback*)cb_mnu_save_relay, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0}, {"E&xit", 0, (Fl_Callback*)cb_mnuExit, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0}, {0,0,0,0,0,0,0,0,0}, {"&Script", 0, 0, 0, 64, (uchar)FL_NORMAL_LABEL, 0, 14, 0}, {"&Execute script", 0, (Fl_Callback*)cb_mnu_scripts, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0}, {0,0,0,0,0,0,0,0,0}, {" &Help", 0, 0, 0, 64, (uchar)FL_NORMAL_LABEL, 0, 14, 0}, {"&Debug log", 0, (Fl_Callback*)cb_mnuEventLog, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0}, {"On line help", 0, (Fl_Callback*)cb_mnuOnLineHelp, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0}, {"Command line parameters", 0, (Fl_Callback*)cb_mnuCmdLineParams, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0}, {"About", 0, (Fl_Callback*)cb_mnuAbout, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0}, {0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0} }; Fl_Tabs *tabs=(Fl_Tabs *)0; Fl_Group *Rx_tab=(Fl_Group *)0; Fl_Output *txt_rx_filename=(Fl_Output *)0; Fl_Output *txt_rx_datetime=(Fl_Output *)0; Fl_Button *btn_save_file=(Fl_Button *)0; Fl_Output *txt_rx_descrip=(Fl_Output *)0; Fl_Button *btn_rx_remove=(Fl_Button *)0; Fl_Output *txt_rx_callinfo=(Fl_Output *)0; Fl_Output *txt_rx_filesize=(Fl_Output *)0; Fl_Output *txt_rx_numblocks=(Fl_Output *)0; Fl_Output *txt_rx_blocksize=(Fl_Output *)0; Fl_Button *btn_rxq_to_txq=(Fl_Button *)0; Fl_Button *btn_copy_missing=(Fl_Button *)0; Fl_Output *txt_rx_missing_blocks=(Fl_Output *)0; Fl_BlockMap *rx_progress=(Fl_BlockMap *)0; FTextView *txt_rx_output=(FTextView *)0; Fl_Button *btn_send_relay=(Fl_Button *)0; Fl_Button *btn_parse_relay_blocks=(Fl_Button *)0; Fl_Input2 *txt_relay_selected_blocks=(Fl_Input2 *)0; Fl_Browser *rx_queue=(Fl_Browser *)0; Fl_Counter *cnt_repeat_relay_data=(Fl_Counter *)0; Fl_Counter *cnt_repeat_relay_header=(Fl_Counter *)0; Fl_Output *txt_transfer_relay_size_time=(Fl_Output *)0; Fl_Group *Tx_tab=(Fl_Group *)0; Fl_Input2 *txt_tx_send_to=(Fl_Input2 *)0; Fl_Output *txt_tx_filename=(Fl_Output *)0; Fl_Input2 *txt_tx_descrip=(Fl_Input2 *)0; Fl_Counter *cnt_blocksize=(Fl_Counter *)0; Fl_Counter *cnt_repeat_nbr=(Fl_Counter *)0; Fl_Counter *cnt_repeat_header=(Fl_Counter *)0; Fl_Output *txt_tx_numblocks=(Fl_Output *)0; Fl_ComboBox *encoders=(Fl_ComboBox *)0; Fl_ComboBox *cbo_modes=(Fl_ComboBox *)0; Fl_Output *txt_transfer_size_time=(Fl_Output *)0; Fl_Check_Button *btn_use_compression=(Fl_Check_Button *)0; Fl_Check_Button *btn_enable_tx_unproto=(Fl_Check_Button *)0; Fl_Input2 *txt_tx_selected_blocks=(Fl_Input2 *)0; Fl_Button *btn_send_file=(Fl_Button *)0; Fl_Button *btn_send_queue=(Fl_Button *)0; Fl_Button *btn_remove_file=(Fl_Button *)0; Fl_Button *btn_open_file=(Fl_Button *)0; Fl_Input *drop_file=(Fl_Input *)0; Fl_Button *btn_parse_blocks=(Fl_Button *)0; Fl_Browser *tx_queue=(Fl_Browser *)0; Fl_Group *Events_tab=(Fl_Group *)0; Fl_Tabs *event_tabs=(Fl_Tabs *)0; Fl_Group *Timed_Events_tab=(Fl_Group *)0; Fl_Check_Button *btn_repeat_at_times=(Fl_Check_Button *)0; Fl_ComboBox *cbo_repeat_every=(Fl_ComboBox *)0; Fl_Input2 *txt_repeat_times=(Fl_Input2 *)0; Fl_Check_Button *btn_auto_load_queue=(Fl_Check_Button *)0; Fl_Check_Button *btn_load_from_tx_folder=(Fl_Check_Button *)0; Fl_Button *btn_manual_load_queue=(Fl_Button *)0; Fl_Input2 *txt_auto_load_queue_path=(Fl_Input2 *)0; Fl_Check_Button *btn_repeat_forever=(Fl_Check_Button *)0; Fl_Output *outTimeValue=(Fl_Output *)0; Fl_Light_Button *do_events=(Fl_Light_Button *)0; Fl_Group *Hamcast_Events_tab=(Fl_Group *)0; Fl_Check_Button *btn_hamcast_mode_cycle=(Fl_Check_Button *)0; Fl_Output *txt_hamcast_select_total_time=(Fl_Output *)0; Fl_Check_Button *btn_hamcast_mode_enable_1=(Fl_Check_Button *)0; Fl_Output *txt_hamcast_select_1_time=(Fl_Output *)0; Fl_ComboBox *cbo_hamcast_mode_selection_1=(Fl_ComboBox *)0; Fl_Check_Button *btn_hamcast_mode_enable_2=(Fl_Check_Button *)0; Fl_Output *txt_hamcast_select_2_time=(Fl_Output *)0; Fl_ComboBox *cbo_hamcast_mode_selection_2=(Fl_ComboBox *)0; Fl_Check_Button *btn_hamcast_mode_enable_3=(Fl_Check_Button *)0; Fl_Output *txt_hamcast_select_3_time=(Fl_Output *)0; Fl_ComboBox *cbo_hamcast_mode_selection_3=(Fl_ComboBox *)0; Fl_Check_Button *btn_hamcast_mode_enable_4=(Fl_Check_Button *)0; Fl_Output *txt_hamcast_select_4_time=(Fl_Output *)0; Fl_ComboBox *cbo_hamcast_mode_selection_4=(Fl_ComboBox *)0; Fl_Group *Config_tab=(Fl_Group *)0; Fl_Input2 *txt_tx_mycall=(Fl_Input2 *)0; Fl_Input2 *txt_tx_myinfo=(Fl_Input2 *)0; Fl_Check_Button *btn_sync_mode_flamp_fldigi=(Fl_Check_Button *)0; Fl_Check_Button *btn_sync_mode_fldigi_flamp=(Fl_Check_Button *)0; Fl_Check_Button *btn_fldigi_xmt_mode_change=(Fl_Check_Button *)0; Fl_Check_Button *btn_enable_tx_on_report=(Fl_Check_Button *)0; Fl_Check_Button *btn_enable_delete_warning=(Fl_Check_Button *)0; Fl_Check_Button *btn_clear_tosend_on_tx_blocks=(Fl_Check_Button *)0; Fl_Check_Button *btn_disable_header_modem_on_block_fills=(Fl_Check_Button *)0; Fl_Check_Button *btn_enable_unproto_markers=(Fl_Check_Button *)0; Fl_Check_Button *btn_auto_rx_save_local_time=(Fl_Check_Button *)0; Fl_Check_Button *btn_enable_header_modem=(Fl_Check_Button *)0; Fl_ComboBox *cbo_header_modes=(Fl_ComboBox *)0; Fl_Check_Button *btn_enable_txrx_interval=(Fl_Check_Button *)0; Fl_Counter *cnt_tx_interval_mins=(Fl_Counter *)0; Fl_Counter *cnt_rx_interval_secs=(Fl_Counter *)0; Fl_Output *txt_tx_interval=(Fl_Output *)0; Fl_Check_Button *btn_relay_retain_data=(Fl_Check_Button *)0; static void cb_btn_relay_retain_data(Fl_Check_Button* o, void*) { progStatus.relay_retain_data = o->value(); } Fl_Check_Button *btn_auto_rx_save=(Fl_Check_Button *)0; static void cb_btn_auto_rx_save(Fl_Check_Button* o, void*) { progStatus.auto_rx_save = o->value(); } Fl_Group *box_not_connected=(Fl_Group *)0; Fl_Group *box_connected=(Fl_Group *)0; Fl_Double_Window* flamp_dialog() { { dialog_flamp = new Fl_Double_Window(505, 524, "FLAMP"); { mnubar = new Fl_Menu_Bar(0, 0, 505, 24); mnubar->menu(menu_mnubar); } // Fl_Menu_Bar* mnubar { tabs = new Fl_Tabs(0, 24, 520, 500); tabs->selection_color((Fl_Color)246); tabs->callback((Fl_Callback*)cb_tab); tabs->when(FL_WHEN_CHANGED); { Rx_tab = new Fl_Group(0, 48, 515, 476, "Receive"); Rx_tab->hide(); { txt_rx_filename = new Fl_Output(100, 54, 400, 20, "Output:"); } // Fl_Output* txt_rx_filename { txt_rx_datetime = new Fl_Output(100, 78, 295, 20, "Date time:"); } // Fl_Output* txt_rx_datetime { btn_save_file = new Fl_Button(420, 78, 80, 20, "Save"); btn_save_file->callback((Fl_Callback*)cb_btn_save_file); } // Fl_Button* btn_save_file { txt_rx_descrip = new Fl_Output(100, 104, 295, 20, "Description:"); } // Fl_Output* txt_rx_descrip { btn_rx_remove = new Fl_Button(420, 104, 80, 20, "Remove"); btn_rx_remove->callback((Fl_Callback*)cb_btn_rx_remove); } // Fl_Button* btn_rx_remove { txt_rx_callinfo = new Fl_Output(100, 130, 400, 20, "Call/info:"); } // Fl_Output* txt_rx_callinfo { txt_rx_filesize = new Fl_Output(100, 156, 50, 20, "# bytes:"); } // Fl_Output* txt_rx_filesize { txt_rx_numblocks = new Fl_Output(222, 156, 50, 20, "Nbr blks:"); } // Fl_Output* txt_rx_numblocks { txt_rx_blocksize = new Fl_Output(345, 156, 50, 20, "Blk size:"); } // Fl_Output* txt_rx_blocksize { btn_rxq_to_txq = new Fl_Button(420, 156, 80, 20, "To TxQ"); btn_rxq_to_txq->callback((Fl_Callback*)cb_btn_transfer_file_txQ); } // Fl_Button* btn_rxq_to_txq { btn_copy_missing = new Fl_Button(420, 182, 80, 20, "Report"); btn_copy_missing->callback((Fl_Callback*)cb_btn_copy_missing); } // Fl_Button* btn_copy_missing { txt_rx_missing_blocks = new Fl_Output(100, 182, 295, 20, "Missing:"); } // Fl_Output* txt_rx_missing_blocks { rx_progress = new Fl_BlockMap(100, 208, 400, 20, "Blocks:"); rx_progress->box(FL_DOWN_BOX); rx_progress->color(FL_BACKGROUND2_COLOR); rx_progress->selection_color(FL_SELECTION_COLOR); rx_progress->labeltype(FL_NORMAL_LABEL); rx_progress->labelfont(0); rx_progress->labelsize(14); rx_progress->labelcolor(FL_FOREGROUND_COLOR); rx_progress->align(Fl_Align(FL_ALIGN_LEFT)); rx_progress->when(FL_WHEN_RELEASE); } // Fl_BlockMap* rx_progress { txt_rx_output = new FTextView(4, 238, 496, 80, "Data"); txt_rx_output->box(FL_DOWN_FRAME); txt_rx_output->color(FL_BACKGROUND2_COLOR); txt_rx_output->selection_color(FL_SELECTION_COLOR); txt_rx_output->labeltype(FL_NORMAL_LABEL); txt_rx_output->labelfont(0); txt_rx_output->labelsize(14); txt_rx_output->labelcolor(FL_FOREGROUND_COLOR); txt_rx_output->align(Fl_Align(FL_ALIGN_TOP_LEFT)); txt_rx_output->when(FL_WHEN_RELEASE); } // FTextView* txt_rx_output { btn_send_relay = new Fl_Button(5, 325, 80, 20, "Relay"); btn_send_relay->callback((Fl_Callback*)cb_btn_send_relay); } // Fl_Button* btn_send_relay { btn_parse_relay_blocks = new Fl_Button(5, 355, 80, 20, "Fetch"); btn_parse_relay_blocks->callback((Fl_Callback*)cb_btn_parse_relay_blocks); } // Fl_Button* btn_parse_relay_blocks { txt_relay_selected_blocks = new Fl_Input2(145, 355, 355, 20, "blocks:"); txt_relay_selected_blocks->box(FL_DOWN_BOX); txt_relay_selected_blocks->color(FL_BACKGROUND2_COLOR); txt_relay_selected_blocks->selection_color(FL_SELECTION_COLOR); txt_relay_selected_blocks->labeltype(FL_NORMAL_LABEL); txt_relay_selected_blocks->labelfont(0); txt_relay_selected_blocks->labelsize(14); txt_relay_selected_blocks->labelcolor(FL_FOREGROUND_COLOR); txt_relay_selected_blocks->callback((Fl_Callback*)cb_txt_relay_selected_blocks); txt_relay_selected_blocks->align(Fl_Align(FL_ALIGN_LEFT)); txt_relay_selected_blocks->when(FL_WHEN_CHANGED); } // Fl_Input2* txt_relay_selected_blocks { rx_queue = new Fl_Browser(4, 395, 496, 125, "Receive Queue"); rx_queue->type(2); rx_queue->callback((Fl_Callback*)cb_rx_queue); rx_queue->align(Fl_Align(FL_ALIGN_TOP_LEFT)); } // Fl_Browser* rx_queue { cnt_repeat_relay_data = new Fl_Counter(275, 325, 57, 20, "Data Rpt"); cnt_repeat_relay_data->tooltip("_(\"Repeat transmission specified # times\")"); cnt_repeat_relay_data->type(1); cnt_repeat_relay_data->box(FL_UP_BOX); cnt_repeat_relay_data->color(FL_BACKGROUND_COLOR); cnt_repeat_relay_data->selection_color(FL_INACTIVE_COLOR); cnt_repeat_relay_data->labeltype(FL_NORMAL_LABEL); cnt_repeat_relay_data->labelfont(0); cnt_repeat_relay_data->labelsize(14); cnt_repeat_relay_data->labelcolor(FL_FOREGROUND_COLOR); cnt_repeat_relay_data->minimum(1); cnt_repeat_relay_data->maximum(10); cnt_repeat_relay_data->step(1); cnt_repeat_relay_data->value(1); cnt_repeat_relay_data->callback((Fl_Callback*)cb_cnt_repeat_relay_data); cnt_repeat_relay_data->align(Fl_Align(FL_ALIGN_LEFT)); cnt_repeat_relay_data->when(FL_WHEN_CHANGED); } // Fl_Counter* cnt_repeat_relay_data { cnt_repeat_relay_header = new Fl_Counter(147, 325, 58, 20, "Hdr Rpt"); cnt_repeat_relay_header->tooltip("_(\"Maximum size of each data block\")"); cnt_repeat_relay_header->type(1); cnt_repeat_relay_header->box(FL_UP_BOX); cnt_repeat_relay_header->color(FL_BACKGROUND_COLOR); cnt_repeat_relay_header->selection_color(FL_INACTIVE_COLOR); cnt_repeat_relay_header->labeltype(FL_NORMAL_LABEL); cnt_repeat_relay_header->labelfont(0); cnt_repeat_relay_header->labelsize(14); cnt_repeat_relay_header->labelcolor(FL_FOREGROUND_COLOR); cnt_repeat_relay_header->minimum(1); cnt_repeat_relay_header->maximum(10); cnt_repeat_relay_header->step(1); cnt_repeat_relay_header->value(1); cnt_repeat_relay_header->callback((Fl_Callback*)cb_cnt_repeat_relay_header); cnt_repeat_relay_header->align(Fl_Align(FL_ALIGN_LEFT)); cnt_repeat_relay_header->when(FL_WHEN_CHANGED); } // Fl_Counter* cnt_repeat_relay_header { txt_transfer_relay_size_time = new Fl_Output(345, 325, 155, 20); txt_transfer_relay_size_time->tooltip("_(\"Transfer size / time\")"); } // Fl_Output* txt_transfer_relay_size_time tab_pointers[rx_tab_idx] = Rx_tab; Rx_tab->end(); } // Fl_Group* Rx_tab { Tx_tab = new Fl_Group(0, 48, 505, 476, "Transmit"); { Fl_Input2* o = txt_tx_send_to = new Fl_Input2(70, 59, 430, 20, "Send to:"); txt_tx_send_to->tooltip("_(\"QST (or blank) / Enumerated callsigns\")"); txt_tx_send_to->box(FL_DOWN_BOX); txt_tx_send_to->color(FL_BACKGROUND2_COLOR); txt_tx_send_to->selection_color(FL_SELECTION_COLOR); txt_tx_send_to->labeltype(FL_NORMAL_LABEL); txt_tx_send_to->labelfont(0); txt_tx_send_to->labelsize(14); txt_tx_send_to->labelcolor(FL_FOREGROUND_COLOR); txt_tx_send_to->callback((Fl_Callback*)cb_tx_send_to); txt_tx_send_to->align(Fl_Align(FL_ALIGN_LEFT)); txt_tx_send_to->when(FL_WHEN_RELEASE); o->value("QST"); } // Fl_Input2* txt_tx_send_to { txt_tx_filename = new Fl_Output(70, 87, 430, 20, "File:"); } // Fl_Output* txt_tx_filename { Fl_Input2* o = txt_tx_descrip = new Fl_Input2(70, 115, 430, 20, "Descrip:"); txt_tx_descrip->tooltip("_(\"Short description of file contents\")"); txt_tx_descrip->box(FL_DOWN_BOX); txt_tx_descrip->color(FL_BACKGROUND2_COLOR); txt_tx_descrip->selection_color(FL_SELECTION_COLOR); txt_tx_descrip->labeltype(FL_NORMAL_LABEL); txt_tx_descrip->labelfont(0); txt_tx_descrip->labelsize(14); txt_tx_descrip->labelcolor(FL_FOREGROUND_COLOR); txt_tx_descrip->callback((Fl_Callback*)cb_tx_descrip); txt_tx_descrip->align(Fl_Align(FL_ALIGN_LEFT)); txt_tx_descrip->when(FL_WHEN_RELEASE); o->value("QST"); } // Fl_Input2* txt_tx_descrip { Fl_Counter* o = cnt_blocksize = new Fl_Counter(58, 139, 68, 20, "Blk size"); cnt_blocksize->tooltip("_(\"Maximum size of each data block\")"); cnt_blocksize->type(1); cnt_blocksize->box(FL_UP_BOX); cnt_blocksize->color(FL_BACKGROUND_COLOR); cnt_blocksize->selection_color(FL_INACTIVE_COLOR); cnt_blocksize->labeltype(FL_NORMAL_LABEL); cnt_blocksize->labelfont(0); cnt_blocksize->labelsize(14); cnt_blocksize->labelcolor(FL_FOREGROUND_COLOR); cnt_blocksize->minimum(16); cnt_blocksize->maximum(2048); cnt_blocksize->step(1); cnt_blocksize->value(64); cnt_blocksize->callback((Fl_Callback*)cb_cnt_blocksize); cnt_blocksize->align(Fl_Align(FL_ALIGN_LEFT)); cnt_blocksize->when(FL_WHEN_CHANGED); o->minimum(CNT_BLOCK_SIZE_MINIMUM); o->maximum(CNT_BLOCK_SIZE_MAXIMUM); o->step(CNT_BLOCK_SIZE_STEP_RATE); } // Fl_Counter* cnt_blocksize { cnt_repeat_nbr = new Fl_Counter(192, 139, 68, 20, "Xmt Rpt"); cnt_repeat_nbr->tooltip("_(\"Repeat transmission specified # times\")"); cnt_repeat_nbr->type(1); cnt_repeat_nbr->box(FL_UP_BOX); cnt_repeat_nbr->color(FL_BACKGROUND_COLOR); cnt_repeat_nbr->selection_color(FL_INACTIVE_COLOR); cnt_repeat_nbr->labeltype(FL_NORMAL_LABEL); cnt_repeat_nbr->labelfont(0); cnt_repeat_nbr->labelsize(14); cnt_repeat_nbr->labelcolor(FL_FOREGROUND_COLOR); cnt_repeat_nbr->minimum(1); cnt_repeat_nbr->maximum(999); cnt_repeat_nbr->step(1); cnt_repeat_nbr->value(1); cnt_repeat_nbr->callback((Fl_Callback*)cb_cnt_repeat_nbr); cnt_repeat_nbr->align(Fl_Align(FL_ALIGN_LEFT)); cnt_repeat_nbr->when(FL_WHEN_CHANGED); } // Fl_Counter* cnt_repeat_nbr { cnt_repeat_header = new Fl_Counter(327, 139, 68, 20, "Hdr Rpt"); cnt_repeat_header->tooltip("_(\"Maximum size of each data block\")"); cnt_repeat_header->type(1); cnt_repeat_header->box(FL_UP_BOX); cnt_repeat_header->color(FL_BACKGROUND_COLOR); cnt_repeat_header->selection_color(FL_INACTIVE_COLOR); cnt_repeat_header->labeltype(FL_NORMAL_LABEL); cnt_repeat_header->labelfont(0); cnt_repeat_header->labelsize(14); cnt_repeat_header->labelcolor(FL_FOREGROUND_COLOR); cnt_repeat_header->minimum(1); cnt_repeat_header->maximum(10); cnt_repeat_header->step(1); cnt_repeat_header->value(1); cnt_repeat_header->callback((Fl_Callback*)cb_repeat_header); cnt_repeat_header->align(Fl_Align(FL_ALIGN_LEFT)); cnt_repeat_header->when(FL_WHEN_CHANGED); } // Fl_Counter* cnt_repeat_header { txt_tx_numblocks = new Fl_Output(444, 139, 56, 20, "# Blks"); txt_tx_numblocks->tooltip("_(\"Transfer size in blocks\")"); } // Fl_Output* txt_tx_numblocks { encoders = new Fl_ComboBox(20, 171, 85, 20); encoders->tooltip("_(\"Encode after compression\")"); encoders->box(FL_BORDER_BOX); encoders->color(FL_BACKGROUND_COLOR); encoders->selection_color(FL_BACKGROUND_COLOR); encoders->labeltype(FL_NORMAL_LABEL); encoders->labelfont(0); encoders->labelsize(14); encoders->labelcolor(FL_FOREGROUND_COLOR); encoders->callback((Fl_Callback*)cb_use_encoder); encoders->align(Fl_Align(FL_ALIGN_TOP)); encoders->when(FL_WHEN_RELEASE); encoders->end(); } // Fl_ComboBox* encoders { cbo_modes = new Fl_ComboBox(110, 171, 150, 20); cbo_modes->tooltip("_(\"fldigi modem type\")"); cbo_modes->box(FL_BORDER_BOX); cbo_modes->color(FL_BACKGROUND_COLOR); cbo_modes->selection_color(FL_BACKGROUND_COLOR); cbo_modes->labeltype(FL_NORMAL_LABEL); cbo_modes->labelfont(0); cbo_modes->labelsize(14); cbo_modes->labelcolor(FL_FOREGROUND_COLOR); cbo_modes->callback((Fl_Callback*)cb_cbo_modes); cbo_modes->align(Fl_Align(FL_ALIGN_TOP)); cbo_modes->when(FL_WHEN_RELEASE); cbo_modes->end(); } // Fl_ComboBox* cbo_modes { txt_transfer_size_time = new Fl_Output(270, 171, 230, 20); txt_transfer_size_time->tooltip("_(\"Transfer size / time\")"); } // Fl_Output* txt_transfer_size_time { Fl_Check_Button* o = btn_use_compression = new Fl_Check_Button(20, 196, 70, 20, "Comp"); btn_use_compression->tooltip("_(\"Data will be sent compressed\")"); btn_use_compression->down_box(FL_DOWN_BOX); btn_use_compression->callback((Fl_Callback*)cb_use_compression); o->value(progStatus.use_compression); } // Fl_Check_Button* btn_use_compression { Fl_Check_Button* o = btn_enable_tx_unproto = new Fl_Check_Button(109, 196, 211, 20, "Transmit unproto (plain text, 7 bit ASCII)"); btn_enable_tx_unproto->down_box(FL_DOWN_BOX); btn_enable_tx_unproto->callback((Fl_Callback*)cb_enable_tx_unproto); o->value(progStatus.enable_tx_unproto); } // Fl_Check_Button* btn_enable_tx_unproto { txt_tx_selected_blocks = new Fl_Input2(70, 220, 345, 20, "blocks"); txt_tx_selected_blocks->tooltip("_(\"Clear for all\\nComma separated block #s\")"); txt_tx_selected_blocks->box(FL_DOWN_BOX); txt_tx_selected_blocks->color(FL_BACKGROUND2_COLOR); txt_tx_selected_blocks->selection_color(FL_SELECTION_COLOR); txt_tx_selected_blocks->labeltype(FL_NORMAL_LABEL); txt_tx_selected_blocks->labelfont(0); txt_tx_selected_blocks->labelsize(14); txt_tx_selected_blocks->labelcolor(FL_FOREGROUND_COLOR); txt_tx_selected_blocks->callback((Fl_Callback*)cb_selected_blocks); txt_tx_selected_blocks->align(Fl_Align(FL_ALIGN_LEFT)); txt_tx_selected_blocks->when(FL_WHEN_CHANGED); } // Fl_Input2* txt_tx_selected_blocks { btn_send_file = new Fl_Button(30, 250, 80, 20, "Xmit"); btn_send_file->tooltip("_(\"Fetch & parse fldigi block reports\")"); btn_send_file->callback((Fl_Callback*)cb_btn_send_file); } // Fl_Button* btn_send_file { btn_send_queue = new Fl_Button(120, 250, 80, 20, "Xmt All"); btn_send_queue->tooltip("_(\"Fetch & parse fldigi block reports\")"); btn_send_queue->callback((Fl_Callback*)cb_btn_send_queue); } // Fl_Button* btn_send_queue { btn_remove_file = new Fl_Button(210, 250, 80, 20, "Remove"); btn_remove_file->tooltip("_(\"Fetch & parse fldigi block reports\")"); btn_remove_file->callback((Fl_Callback*)cb_btn_tx_remove_file); } // Fl_Button* btn_remove_file { btn_open_file = new Fl_Button(300, 250, 80, 20, "Add"); btn_open_file->tooltip("_(\"Fetch & parse fldigi block reports\")"); btn_open_file->callback((Fl_Callback*)cb_btn_open_file); } // Fl_Button* btn_open_file { Fl_Input* o = drop_file = new Fl_Input(426, 196, 74, 45); drop_file->tooltip("_(\"drag and drop tx queue files here ...\")"); drop_file->box(FL_BORDER_BOX); drop_file->selection_color(FL_BACKGROUND2_COLOR); drop_file->labelcolor((Fl_Color)1); drop_file->textsize(16); drop_file->textcolor((Fl_Color)1); drop_file->callback((Fl_Callback*)cb_drop_file); drop_file->align(Fl_Align(FL_ALIGN_TEXT_OVER_IMAGE|FL_ALIGN_INSIDE)); drop_file->when(FL_WHEN_CHANGED); o->value(" DnD"); o->color(fl_rgb_color(244, 255, 255)); o->cursor_color(fl_rgb_color(244, 255, 255)); o->labelcolor(fl_rgb_color(200, 0, 0)); } // Fl_Input* drop_file { btn_parse_blocks = new Fl_Button(390, 249, 80, 21, "Fetch"); btn_parse_blocks->tooltip("_(\"Fetch & parse fldigi block reports\")"); btn_parse_blocks->callback((Fl_Callback*)cb_btn_parse_blocks); } // Fl_Button* btn_parse_blocks { tx_queue = new Fl_Browser(5, 290, 495, 225, "Transmit Queue"); tx_queue->type(2); tx_queue->callback((Fl_Callback*)cb_tx_queue); tx_queue->align(Fl_Align(FL_ALIGN_TOP_LEFT)); } // Fl_Browser* tx_queue tab_pointers[tx_tab_idx] = Tx_tab; Tx_tab->end(); } // Fl_Group* Tx_tab { Events_tab = new Fl_Group(0, 48, 505, 476, "Events"); Events_tab->hide(); { event_tabs = new Fl_Tabs(0, 48, 505, 476); event_tabs->selection_color((Fl_Color)246); event_tabs->when(FL_WHEN_ENTER_KEY); { Timed_Events_tab = new Fl_Group(0, 72, 505, 452, "Timed"); { Fl_Output* o = new Fl_Output(5, 76, 495, 92); o->type(12); o->box(FL_BORDER_BOX); o->value(" Timed / Continuous events :\n\ Each transmission is identical to a 'Xmt All' (The entire\n\ queue is transmitted). The unproto 'QST (calls) de URCALL'\n\ and the program identifier 'FLAMP 2.x.x' are\n\ included."); o->color(fl_rgb_color(255,250,205)); } // Fl_Output* o { Fl_Group* o = new Fl_Group(5, 192, 495, 150, "Timed Events"); o->box(FL_ENGRAVED_BOX); o->align(Fl_Align(FL_ALIGN_TOP_LEFT)); { Fl_Check_Button* o = btn_repeat_at_times = new Fl_Check_Button(10, 200, 184, 20, "Scheduled times of TX"); btn_repeat_at_times->down_box(FL_DOWN_BOX); btn_repeat_at_times->callback((Fl_Callback*)cb_repeat_at_times); o->value(progStatus.repeat_at_times); } // Fl_Check_Button* btn_repeat_at_times { cbo_repeat_every = new Fl_ComboBox(250, 199, 140, 20, "Interval"); cbo_repeat_every->tooltip("_(\"fldigi modem type\")"); cbo_repeat_every->box(FL_NO_BOX); cbo_repeat_every->color(FL_BACKGROUND_COLOR); cbo_repeat_every->selection_color(FL_BACKGROUND_COLOR); cbo_repeat_every->labeltype(FL_NORMAL_LABEL); cbo_repeat_every->labelfont(0); cbo_repeat_every->labelsize(14); cbo_repeat_every->labelcolor(FL_FOREGROUND_COLOR); cbo_repeat_every->callback((Fl_Callback*)cb_repeat_every); cbo_repeat_every->align(Fl_Align(FL_ALIGN_RIGHT)); cbo_repeat_every->when(FL_WHEN_RELEASE); cbo_repeat_every->end(); } // Fl_ComboBox* cbo_repeat_every { Fl_Input2* o = txt_repeat_times = new Fl_Input2(10, 244, 480, 20, "Xmt times (HHMM)"); txt_repeat_times->tooltip("_(\"Space/comma delimited times\")"); txt_repeat_times->box(FL_DOWN_BOX); txt_repeat_times->color(FL_BACKGROUND2_COLOR); txt_repeat_times->selection_color(FL_SELECTION_COLOR); txt_repeat_times->labeltype(FL_NORMAL_LABEL); txt_repeat_times->labelfont(0); txt_repeat_times->labelsize(14); txt_repeat_times->labelcolor(FL_FOREGROUND_COLOR); txt_repeat_times->callback((Fl_Callback*)cb_repeat_times); txt_repeat_times->align(Fl_Align(FL_ALIGN_TOP_LEFT)); txt_repeat_times->when(FL_WHEN_RELEASE); o->value(progStatus.repeat_times.c_str()); } // Fl_Input2* txt_repeat_times { Fl_Check_Button* o = btn_auto_load_queue = new Fl_Check_Button(10, 274, 184, 20, "Auto Load TX Queue"); btn_auto_load_queue->down_box(FL_DOWN_BOX); btn_auto_load_queue->callback((Fl_Callback*)cb_repeat_at_times); o->value(progStatus.repeat_at_times); } // Fl_Check_Button* btn_auto_load_queue { Fl_Check_Button* o = btn_load_from_tx_folder = new Fl_Check_Button(215, 274, 184, 20, "Load from TX Dir."); btn_load_from_tx_folder->down_box(FL_DOWN_BOX); btn_load_from_tx_folder->callback((Fl_Callback*)cb_load_from_tx_folder); o->value(progStatus.load_from_tx_folder); } // Fl_Check_Button* btn_load_from_tx_folder { btn_manual_load_queue = new Fl_Button(381, 274, 100, 20, "Load Queue"); btn_manual_load_queue->tooltip("_(\"Load queue with a file list\")"); btn_manual_load_queue->callback((Fl_Callback*)cb_manual_load_que); } // Fl_Button* btn_manual_load_queue { Fl_Input2* o = txt_auto_load_queue_path = new Fl_Input2(10, 315, 480, 20, "Path to Load Queue File List"); txt_auto_load_queue_path->tooltip("_(\"Space/comma delimited times\")"); txt_auto_load_queue_path->box(FL_DOWN_BOX); txt_auto_load_queue_path->color(FL_BACKGROUND2_COLOR); txt_auto_load_queue_path->selection_color(FL_SELECTION_COLOR); txt_auto_load_queue_path->labeltype(FL_NORMAL_LABEL); txt_auto_load_queue_path->labelfont(0); txt_auto_load_queue_path->labelsize(14); txt_auto_load_queue_path->labelcolor(FL_FOREGROUND_COLOR); txt_auto_load_queue_path->callback((Fl_Callback*)cb_auto_load_queue_path); txt_auto_load_queue_path->align(Fl_Align(FL_ALIGN_TOP_LEFT)); txt_auto_load_queue_path->when(FL_WHEN_CHANGED); o->value(progStatus.auto_load_queue_path.c_str()); } // Fl_Input2* txt_auto_load_queue_path o->end(); } // Fl_Group* o { Fl_Group* o = new Fl_Group(5, 369, 495, 50, "Continuous repeat"); o->box(FL_ENGRAVED_BOX); o->align(Fl_Align(FL_ALIGN_TOP_LEFT)); { Fl_Check_Button* o = btn_repeat_forever = new Fl_Check_Button(10, 383, 184, 20, "Continuous repeat of transmission"); btn_repeat_forever->down_box(FL_DOWN_BOX); btn_repeat_forever->callback((Fl_Callback*)cb_repeat_forever); o->value(progStatus.repeat_forever); } // Fl_Check_Button* btn_repeat_forever o->end(); } // Fl_Group* o { Fl_Output* o = outTimeValue = new Fl_Output(25, 429, 70, 24); o->color(fl_rgb_color(255, 250, 205)); } // Fl_Output* outTimeValue { do_events = new Fl_Light_Button(110, 430, 120, 20, "Start Events"); do_events->callback((Fl_Callback*)cb_do_events); } // Fl_Light_Button* do_events Timed_Events_tab->end(); } // Fl_Group* Timed_Events_tab { Hamcast_Events_tab = new Fl_Group(0, 72, 505, 452, "Hamcast"); Hamcast_Events_tab->hide(); { Fl_Group* o = new Fl_Group(4, 94, 496, 151, "Hamcast modem rotation / Queue Transmit Time (on Timed Events)"); o->box(FL_ENGRAVED_BOX); { Fl_Check_Button* o = btn_hamcast_mode_cycle = new Fl_Check_Button(16, 106, 70, 15, "Enable modem rotation"); btn_hamcast_mode_cycle->down_box(FL_DOWN_BOX); btn_hamcast_mode_cycle->callback((Fl_Callback*)cb_hamcast_mode_cycle); o->value(progStatus.hamcast_mode_cycle); } // Fl_Check_Button* btn_hamcast_mode_cycle { txt_hamcast_select_total_time = new Fl_Output(377, 106, 100, 20, "Total Time:"); txt_hamcast_select_total_time->tooltip("Transfer time"); } // Fl_Output* txt_hamcast_select_total_time { Fl_Check_Button* o = btn_hamcast_mode_enable_1 = new Fl_Check_Button(16, 133, 70, 15, "Enable modem 1"); btn_hamcast_mode_enable_1->down_box(FL_DOWN_BOX); btn_hamcast_mode_enable_1->callback((Fl_Callback*)cb_hamcast_mode_enable_1); o->value(progStatus.hamcast_mode_enable_1); } // Fl_Check_Button* btn_hamcast_mode_enable_1 { txt_hamcast_select_1_time = new Fl_Output(377, 130, 100, 20, "Time:"); txt_hamcast_select_1_time->tooltip("Transfer time"); } // Fl_Output* txt_hamcast_select_1_time { cbo_hamcast_mode_selection_1 = new Fl_ComboBox(162, 130, 133, 20); cbo_hamcast_mode_selection_1->tooltip("_(\"fldigi modem type\")"); cbo_hamcast_mode_selection_1->box(FL_NO_BOX); cbo_hamcast_mode_selection_1->color(FL_BACKGROUND_COLOR); cbo_hamcast_mode_selection_1->selection_color(FL_BACKGROUND_COLOR); cbo_hamcast_mode_selection_1->labeltype(FL_NORMAL_LABEL); cbo_hamcast_mode_selection_1->labelfont(0); cbo_hamcast_mode_selection_1->labelsize(14); cbo_hamcast_mode_selection_1->labelcolor(FL_FOREGROUND_COLOR); cbo_hamcast_mode_selection_1->callback((Fl_Callback*)cb_hamcast_mode_selection_1); cbo_hamcast_mode_selection_1->align(Fl_Align(FL_ALIGN_TOP)); cbo_hamcast_mode_selection_1->when(FL_WHEN_RELEASE); cbo_hamcast_mode_selection_1->end(); } // Fl_ComboBox* cbo_hamcast_mode_selection_1 { Fl_Check_Button* o = btn_hamcast_mode_enable_2 = new Fl_Check_Button(16, 161, 70, 15, "Enable modem 2"); btn_hamcast_mode_enable_2->down_box(FL_DOWN_BOX); btn_hamcast_mode_enable_2->callback((Fl_Callback*)cb_hamcast_mode_enable_2); o->value(progStatus.hamcast_mode_enable_2); } // Fl_Check_Button* btn_hamcast_mode_enable_2 { txt_hamcast_select_2_time = new Fl_Output(377, 159, 100, 20, "Time:"); txt_hamcast_select_2_time->tooltip("Transfer time"); } // Fl_Output* txt_hamcast_select_2_time { cbo_hamcast_mode_selection_2 = new Fl_ComboBox(162, 158, 133, 20); cbo_hamcast_mode_selection_2->tooltip("_(\"fldigi modem type\")"); cbo_hamcast_mode_selection_2->box(FL_NO_BOX); cbo_hamcast_mode_selection_2->color(FL_BACKGROUND_COLOR); cbo_hamcast_mode_selection_2->selection_color(FL_BACKGROUND_COLOR); cbo_hamcast_mode_selection_2->labeltype(FL_NORMAL_LABEL); cbo_hamcast_mode_selection_2->labelfont(0); cbo_hamcast_mode_selection_2->labelsize(14); cbo_hamcast_mode_selection_2->labelcolor(FL_FOREGROUND_COLOR); cbo_hamcast_mode_selection_2->callback((Fl_Callback*)cb_hamcast_mode_selection_2); cbo_hamcast_mode_selection_2->align(Fl_Align(FL_ALIGN_TOP)); cbo_hamcast_mode_selection_2->when(FL_WHEN_RELEASE); cbo_hamcast_mode_selection_2->end(); } // Fl_ComboBox* cbo_hamcast_mode_selection_2 { Fl_Check_Button* o = btn_hamcast_mode_enable_3 = new Fl_Check_Button(16, 189, 70, 15, "Enable modem 3"); btn_hamcast_mode_enable_3->down_box(FL_DOWN_BOX); btn_hamcast_mode_enable_3->callback((Fl_Callback*)cb_hamcast_mode_enable_3); o->value(progStatus.hamcast_mode_enable_3); } // Fl_Check_Button* btn_hamcast_mode_enable_3 { txt_hamcast_select_3_time = new Fl_Output(377, 188, 100, 20, "Time:"); txt_hamcast_select_3_time->tooltip("Transfer time"); } // Fl_Output* txt_hamcast_select_3_time { cbo_hamcast_mode_selection_3 = new Fl_ComboBox(162, 186, 133, 20); cbo_hamcast_mode_selection_3->tooltip("_(\"fldigi modem type\")"); cbo_hamcast_mode_selection_3->box(FL_NO_BOX); cbo_hamcast_mode_selection_3->color(FL_BACKGROUND_COLOR); cbo_hamcast_mode_selection_3->selection_color(FL_BACKGROUND_COLOR); cbo_hamcast_mode_selection_3->labeltype(FL_NORMAL_LABEL); cbo_hamcast_mode_selection_3->labelfont(0); cbo_hamcast_mode_selection_3->labelsize(14); cbo_hamcast_mode_selection_3->labelcolor(FL_FOREGROUND_COLOR); cbo_hamcast_mode_selection_3->callback((Fl_Callback*)cb_hamcast_mode_selection_3); cbo_hamcast_mode_selection_3->align(Fl_Align(FL_ALIGN_TOP)); cbo_hamcast_mode_selection_3->when(FL_WHEN_RELEASE); cbo_hamcast_mode_selection_3->end(); } // Fl_ComboBox* cbo_hamcast_mode_selection_3 { Fl_Check_Button* o = btn_hamcast_mode_enable_4 = new Fl_Check_Button(16, 217, 70, 15, "Enable modem 4"); btn_hamcast_mode_enable_4->down_box(FL_DOWN_BOX); btn_hamcast_mode_enable_4->callback((Fl_Callback*)cb_hamcast_mode_enable_4); o->value(progStatus.hamcast_mode_enable_4); } // Fl_Check_Button* btn_hamcast_mode_enable_4 { txt_hamcast_select_4_time = new Fl_Output(377, 217, 100, 20, "Time:"); txt_hamcast_select_4_time->tooltip("Transfer time"); } // Fl_Output* txt_hamcast_select_4_time { cbo_hamcast_mode_selection_4 = new Fl_ComboBox(162, 214, 133, 20); cbo_hamcast_mode_selection_4->tooltip("_(\"fldigi modem type\")"); cbo_hamcast_mode_selection_4->box(FL_NO_BOX); cbo_hamcast_mode_selection_4->color(FL_BACKGROUND_COLOR); cbo_hamcast_mode_selection_4->selection_color(FL_BACKGROUND_COLOR); cbo_hamcast_mode_selection_4->labeltype(FL_NORMAL_LABEL); cbo_hamcast_mode_selection_4->labelfont(0); cbo_hamcast_mode_selection_4->labelsize(14); cbo_hamcast_mode_selection_4->labelcolor(FL_FOREGROUND_COLOR); cbo_hamcast_mode_selection_4->callback((Fl_Callback*)cb_hamcast_mode_selection_4); cbo_hamcast_mode_selection_4->align(Fl_Align(FL_ALIGN_TOP)); cbo_hamcast_mode_selection_4->when(FL_WHEN_RELEASE); cbo_hamcast_mode_selection_4->end(); } // Fl_ComboBox* cbo_hamcast_mode_selection_4 o->end(); } // Fl_Group* o Hamcast_Events_tab->end(); } // Fl_Group* Hamcast_Events_tab event_tabs->end(); } // Fl_Tabs* event_tabs tab_pointers[events_tab_idx] = Events_tab; Events_tab->end(); } // Fl_Group* Events_tab { Config_tab = new Fl_Group(0, 48, 505, 476, "Configure"); Config_tab->hide(); { txt_tx_mycall = new Fl_Input2(65, 60, 150, 20, "Callsign"); txt_tx_mycall->tooltip("_(\"Callsign of transmitting station\")"); txt_tx_mycall->box(FL_DOWN_BOX); txt_tx_mycall->color(FL_BACKGROUND2_COLOR); txt_tx_mycall->selection_color(FL_SELECTION_COLOR); txt_tx_mycall->labeltype(FL_NORMAL_LABEL); txt_tx_mycall->labelfont(0); txt_tx_mycall->labelsize(14); txt_tx_mycall->labelcolor(FL_FOREGROUND_COLOR); txt_tx_mycall->callback((Fl_Callback*)cb_tx_mycall); txt_tx_mycall->align(Fl_Align(FL_ALIGN_LEFT)); txt_tx_mycall->when(FL_WHEN_CHANGED); } // Fl_Input2* txt_tx_mycall { txt_tx_myinfo = new Fl_Input2(65, 91, 425, 20, "Info"); txt_tx_myinfo->tooltip("_(\"QTH etc. of transmitting station\")"); txt_tx_myinfo->box(FL_DOWN_BOX); txt_tx_myinfo->color(FL_BACKGROUND2_COLOR); txt_tx_myinfo->selection_color(FL_SELECTION_COLOR); txt_tx_myinfo->labeltype(FL_NORMAL_LABEL); txt_tx_myinfo->labelfont(0); txt_tx_myinfo->labelsize(14); txt_tx_myinfo->labelcolor(FL_FOREGROUND_COLOR); txt_tx_myinfo->callback((Fl_Callback*)cb_tx_myinfo); txt_tx_myinfo->align(Fl_Align(FL_ALIGN_LEFT)); txt_tx_myinfo->when(FL_WHEN_CHANGED); } // Fl_Input2* txt_tx_myinfo { Fl_Check_Button* o = btn_sync_mode_flamp_fldigi = new Fl_Check_Button(65, 120, 265, 15, "Auto sync fldigi to flamp mode selector"); btn_sync_mode_flamp_fldigi->down_box(FL_DOWN_BOX); btn_sync_mode_flamp_fldigi->callback((Fl_Callback*)cb_sync_mode_flamp_fldigi); o->value(progStatus.sync_mode_flamp_fldigi); } // Fl_Check_Button* btn_sync_mode_flamp_fldigi { Fl_Check_Button* o = btn_sync_mode_fldigi_flamp = new Fl_Check_Button(65, 145, 265, 15, "Auto sync flamp to fldigi mode selector"); btn_sync_mode_fldigi_flamp->down_box(FL_DOWN_BOX); btn_sync_mode_fldigi_flamp->callback((Fl_Callback*)cb_sync_mode_fldigi_flamp); o->value(progStatus.sync_mode_fldigi_flamp); } // Fl_Check_Button* btn_sync_mode_fldigi_flamp { Fl_Check_Button* o = btn_fldigi_xmt_mode_change = new Fl_Check_Button(65, 170, 270, 15, "Change fldigi mode just prior to transmit"); btn_fldigi_xmt_mode_change->down_box(FL_DOWN_BOX); btn_fldigi_xmt_mode_change->callback((Fl_Callback*)cb_fldigi_xmt_mode_change); o->value(progStatus.fldigi_xmt_mode_change); } // Fl_Check_Button* btn_fldigi_xmt_mode_change { Fl_Check_Button* o = btn_enable_tx_on_report = new Fl_Check_Button(65, 195, 150, 15, "Enable Tx on Report"); btn_enable_tx_on_report->down_box(FL_DOWN_BOX); btn_enable_tx_on_report->callback((Fl_Callback*)cb_enable_tx_on_report); o->value(progStatus.use_tx_on_report); } // Fl_Check_Button* btn_enable_tx_on_report { Fl_Check_Button* o = btn_enable_delete_warning = new Fl_Check_Button(65, 220, 295, 15, "Warn User when removing files from Queue"); btn_enable_delete_warning->down_box(FL_DOWN_BOX); btn_enable_delete_warning->callback((Fl_Callback*)cb_enable_delete_warning); o->value(progStatus.enable_delete_warning); } // Fl_Check_Button* btn_enable_delete_warning { Fl_Check_Button* o = btn_clear_tosend_on_tx_blocks = new Fl_Check_Button(65, 245, 340, 15, "Clear Missing Blocks on Non-Canceled Transmit(s)"); btn_clear_tosend_on_tx_blocks->down_box(FL_DOWN_BOX); btn_clear_tosend_on_tx_blocks->callback((Fl_Callback*)cb_clear_tosend_on_tx_blocks); o->value(progStatus.clear_tosend_on_tx_blocks); } // Fl_Check_Button* btn_clear_tosend_on_tx_blocks { Fl_Check_Button* o = btn_disable_header_modem_on_block_fills = new Fl_Check_Button(65, 270, 235, 15, "Inhibit header modem on block fills"); btn_disable_header_modem_on_block_fills->down_box(FL_DOWN_BOX); btn_disable_header_modem_on_block_fills->callback((Fl_Callback*)cb_disable_header_modem_on_block_fills); o->value(progStatus.disable_header_modem_on_block_fills); } // Fl_Check_Button* btn_disable_header_modem_on_block_fills { Fl_Check_Button* o = btn_enable_unproto_markers = new Fl_Check_Button(65, 295, 210, 15, "Mark start/end of unproto data"); btn_enable_unproto_markers->down_box(FL_DOWN_BOX); btn_enable_unproto_markers->callback((Fl_Callback*)cb_enable_unproto_markers); o->value(progStatus.enable_unproto_markers); } // Fl_Check_Button* btn_enable_unproto_markers { Fl_Check_Button* o = btn_auto_rx_save_local_time = new Fl_Check_Button(65, 320, 330, 15, "Auto save subfolders in local time, otherwise UTC"); btn_auto_rx_save_local_time->down_box(FL_DOWN_BOX); btn_auto_rx_save_local_time->callback((Fl_Callback*)cb_auto_rx_save_local_time); o->value(progStatus.auto_rx_save_local_time); } // Fl_Check_Button* btn_auto_rx_save_local_time { Fl_Check_Button* o = btn_enable_header_modem = new Fl_Check_Button(65, 390, 345, 20, "Enable header modem (Sync flamp to fldigi ignored)"); btn_enable_header_modem->down_box(FL_DOWN_BOX); btn_enable_header_modem->callback((Fl_Callback*)cb_enable_header_modem); o->value(progStatus.use_header_modem); } // Fl_Check_Button* btn_enable_header_modem { cbo_header_modes = new Fl_ComboBox(85, 415, 145, 20); cbo_header_modes->tooltip("_(\"fldigi modem type\")"); cbo_header_modes->box(FL_NO_BOX); cbo_header_modes->color(FL_BACKGROUND_COLOR); cbo_header_modes->selection_color(FL_BACKGROUND_COLOR); cbo_header_modes->labeltype(FL_NORMAL_LABEL); cbo_header_modes->labelfont(0); cbo_header_modes->labelsize(14); cbo_header_modes->labelcolor(FL_FOREGROUND_COLOR); cbo_header_modes->callback((Fl_Callback*)cb_header_modes); cbo_header_modes->align(Fl_Align(FL_ALIGN_TOP)); cbo_header_modes->when(FL_WHEN_RELEASE); cbo_header_modes->end(); } // Fl_ComboBox* cbo_header_modes { Fl_Check_Button* o = btn_enable_txrx_interval = new Fl_Check_Button(65, 440, 165, 15, "Enable TX/RX Interval"); btn_enable_txrx_interval->down_box(FL_DOWN_BOX); btn_enable_txrx_interval->callback((Fl_Callback*)cb_enable_txrx_interval); o->value(progStatus.use_txrx_interval); } // Fl_Check_Button* btn_enable_txrx_interval { Fl_Counter* o = cnt_tx_interval_mins = new Fl_Counter(85, 465, 100, 20, "Tx Duration Mins"); cnt_tx_interval_mins->tooltip("_(\"Transmit Duration in Minutes\")"); cnt_tx_interval_mins->box(FL_UP_BOX); cnt_tx_interval_mins->color(FL_BACKGROUND_COLOR); cnt_tx_interval_mins->selection_color(FL_INACTIVE_COLOR); cnt_tx_interval_mins->labeltype(FL_NORMAL_LABEL); cnt_tx_interval_mins->labelfont(0); cnt_tx_interval_mins->labelsize(14); cnt_tx_interval_mins->labelcolor(FL_FOREGROUND_COLOR); cnt_tx_interval_mins->minimum(1); cnt_tx_interval_mins->maximum(10); cnt_tx_interval_mins->step(0.01); cnt_tx_interval_mins->value(1); cnt_tx_interval_mins->callback((Fl_Callback*)cb_tx_interval_mins); cnt_tx_interval_mins->align(Fl_Align(FL_ALIGN_RIGHT)); cnt_tx_interval_mins->when(FL_WHEN_CHANGED); o->value(progStatus.tx_interval_minutes); } // Fl_Counter* cnt_tx_interval_mins { Fl_Counter* o = cnt_rx_interval_secs = new Fl_Counter(100, 490, 70, 20, "Rx Duration Secs"); cnt_rx_interval_secs->tooltip("_(\"Receive Duration in Seconds\")"); cnt_rx_interval_secs->type(1); cnt_rx_interval_secs->box(FL_UP_BOX); cnt_rx_interval_secs->color(FL_BACKGROUND_COLOR); cnt_rx_interval_secs->selection_color(FL_INACTIVE_COLOR); cnt_rx_interval_secs->labeltype(FL_NORMAL_LABEL); cnt_rx_interval_secs->labelfont(0); cnt_rx_interval_secs->labelsize(14); cnt_rx_interval_secs->labelcolor(FL_FOREGROUND_COLOR); cnt_rx_interval_secs->minimum(1); cnt_rx_interval_secs->maximum(30); cnt_rx_interval_secs->step(1); cnt_rx_interval_secs->value(1); cnt_rx_interval_secs->callback((Fl_Callback*)cb_rx_interval_secs); cnt_rx_interval_secs->align(Fl_Align(FL_ALIGN_RIGHT)); cnt_rx_interval_secs->when(FL_WHEN_CHANGED); o->value(progStatus.rx_interval_seconds); } // Fl_Counter* cnt_rx_interval_secs { txt_tx_interval = new Fl_Output(340, 465, 50, 20, "mm:ss"); txt_tx_interval->align(Fl_Align(FL_ALIGN_RIGHT)); } // Fl_Output* txt_tx_interval { Fl_Check_Button* o = btn_relay_retain_data = new Fl_Check_Button(65, 344, 240, 17, "Save Relay Data On Program Exit"); btn_relay_retain_data->down_box(FL_DOWN_BOX); btn_relay_retain_data->callback((Fl_Callback*)cb_btn_relay_retain_data); o->value(progStatus.relay_retain_data); } // Fl_Check_Button* btn_relay_retain_data { Fl_Check_Button* o = btn_auto_rx_save = new Fl_Check_Button(65, 369, 265, 17, "Auto save RX Data on 100% reception"); btn_auto_rx_save->down_box(FL_DOWN_BOX); btn_auto_rx_save->callback((Fl_Callback*)cb_btn_auto_rx_save); o->value(progStatus.auto_rx_save); } // Fl_Check_Button* btn_auto_rx_save tab_pointers[config_tab_idx] = Config_tab; Config_tab->end(); } // Fl_Group* Config_tab tabs->end(); } // Fl_Tabs* tabs { box_not_connected = new Fl_Group(355, 28, 142, 18, "NOT CONNECTED"); box_not_connected->box(FL_FLAT_BOX); box_not_connected->color((Fl_Color)1); box_not_connected->labelcolor(FL_BACKGROUND2_COLOR); box_not_connected->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); box_not_connected->end(); } // Fl_Group* box_not_connected { box_connected = new Fl_Group(353, 28, 142, 18, "CONNECTED"); box_connected->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE)); box_connected->hide(); box_connected->end(); } // Fl_Group* box_connected dialog_flamp->end(); } // Fl_Double_Window* dialog_flamp init_encoders(); init_cbo_modes(); init_cbo_events(); return dialog_flamp; } flamp-2.2.12/src/xmlrpcpp/0000775000175000017500000000000014607053767012353 500000000000000flamp-2.2.12/src/xmlrpcpp/XmlRpcMutex.cpp0000664000175000017500000000342414463050061015212 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #if defined(XMLRPC_THREADS) #include #include "XmlRpcMutex.h" #if defined(_WINDOWS) # define WIN32_LEAN_AND_MEAN # include #else # include #endif using namespace XmlRpc; //! Destructor. XmlRpcMutex::~XmlRpcMutex() { if (_pMutex) { #if defined(_WINDOWS) ::CloseHandle((HANDLE)_pMutex); #else ::pthread_mutex_destroy((pthread_mutex_t*)_pMutex); delete _pMutex; #endif _pMutex = 0; } } //! Wait for the mutex to be available and then acquire the lock. void XmlRpcMutex::acquire() { #if defined(_WINDOWS) if ( ! _pMutex) _pMutex = ::CreateMutex(0, TRUE, 0); else ::WaitForSingleObject(_pMutex, INFINITE); #else if ( ! _pMutex) { _pMutex = new pthread_mutex_t; ::pthread_mutex_init((pthread_mutex_t*)_pMutex, 0); } ::pthread_mutex_lock((pthread_mutex_t*)_pMutex); #endif } //! Release the mutex. void XmlRpcMutex::release() { if (_pMutex) #if defined(_WINDOWS) ::ReleaseMutex(_pMutex); #else ::pthread_mutex_unlock((pthread_mutex_t*)_pMutex); #endif } #endif // XMLRPC_THREADS flamp-2.2.12/src/xmlrpcpp/XmlRpcBase64.h0000664000175000017500000002106214507650001014576 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #if !defined(__BASE64_H_INCLUDED__) #define __BASE64_H_INCLUDED__ 1 #include // Corrects forward declarations issue c++11 #include // Corrects forward declarations issue c++11 #include static int _xmlrpc_base64Chars[]= {'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z', 'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z', '0','1','2','3','4','5','6','7','8','9', '+','/' }; #define _0000_0011 0x03 #define _1111_1100 0xFC #define _1111_0000 0xF0 #define _0011_0000 0x30 #define _0011_1100 0x3C #define _0000_1111 0x0F #define _1100_0000 0xC0 #define _0011_1111 0x3F #define _EQUAL_CHAR (-1) #define _UNKNOWN_CHAR (-2) #define _IOS_FAILBIT std::ios_base::failbit #define _IOS_EOFBIT std::ios_base::eofbit #define _IOS_BADBIT std::ios_base::badbit #define _IOS_GOODBIT std::ios_base::goodbit // TEMPLATE CLASS xmlrpc_base64_put template > class xmlrpc_base64 { public: typedef unsigned char byte_t; typedef _E char_type; typedef _Tr traits_type; // xmlrpc_base64 requires max line length <= 72 characters // you can fill end of line // it may be crlf, crlfsp, noline or other class like it struct crlf { template _OI operator()(_OI _To) const{ *_To = _Tr::to_char_type('\r'); ++_To; *_To = _Tr::to_char_type('\n'); ++_To; return (_To); } }; struct crlfsp { template _OI operator()(_OI _To) const{ *_To = _Tr::to_char_type('\r'); ++_To; *_To = _Tr::to_char_type('\n'); ++_To; *_To = _Tr::to_char_type(' '); ++_To; return (_To); } }; struct noline { template _OI operator()(_OI _To) const{ return (_To); } }; struct three2four { void zero() { _data[0] = 0; _data[1] = 0; _data[2] = 0; } byte_t get_0() const { return _data[0]; } byte_t get_1() const { return _data[1]; } byte_t get_2() const { return _data[2]; } void set_0(byte_t _ch) { _data[0] = _ch; } void set_1(byte_t _ch) { _data[1] = _ch; } void set_2(byte_t _ch) { _data[2] = _ch; } // 0000 0000 1111 1111 2222 2222 // xxxx xxxx xxxx xxxx xxxx xxxx // 0000 0011 1111 2222 2233 3333 int b64_0() const {return (_data[0] & _1111_1100) >> 2;} int b64_1() const {return ((_data[0] & _0000_0011) << 4) + ((_data[1] & _1111_0000)>>4);} int b64_2() const {return ((_data[1] & _0000_1111) << 2) + ((_data[2] & _1100_0000)>>6);} int b64_3() const {return (_data[2] & _0011_1111);} void b64_0(int _ch) {_data[0] = ((_ch & _0011_1111) << 2) | (_0000_0011 & _data[0]);} void b64_1(int _ch) { _data[0] = ((_ch & _0011_0000) >> 4) | (_1111_1100 & _data[0]); _data[1] = ((_ch & _0000_1111) << 4) | (_0000_1111 & _data[1]); } void b64_2(int _ch) { _data[1] = ((_ch & _0011_1100) >> 2) | (_1111_0000 & _data[1]); _data[2] = ((_ch & _0000_0011) << 6) | (_0011_1111 & _data[2]); } void b64_3(int _ch){ _data[2] = (_ch & _0011_1111) | (_1100_0000 & _data[2]);} private: byte_t _data[3]; }; template _II put(_II _First, _II _Last, _OI _To, _State& _St, _Endline _Endl) const { three2four _3to4; int line_octets = 0; while(_First != _Last) { _3to4.zero(); // áåð¸ì ïî 3 ñèìâîëà _3to4.set_0(*_First); _First++; if(_First == _Last) { *_To = _Tr::to_char_type(_xmlrpc_base64Chars[_3to4.b64_0()]); ++_To; *_To = _Tr::to_char_type(_xmlrpc_base64Chars[_3to4.b64_1()]); ++_To; *_To = _Tr::to_char_type('='); ++_To; *_To = _Tr::to_char_type('='); ++_To; goto __end; } _3to4.set_1(*_First); _First++; if(_First == _Last) { *_To = _Tr::to_char_type(_xmlrpc_base64Chars[_3to4.b64_0()]); ++_To; *_To = _Tr::to_char_type(_xmlrpc_base64Chars[_3to4.b64_1()]); ++_To; *_To = _Tr::to_char_type(_xmlrpc_base64Chars[_3to4.b64_2()]); ++_To; *_To = _Tr::to_char_type('='); ++_To; goto __end; } _3to4.set_2(*_First); _First++; *_To = _Tr::to_char_type(_xmlrpc_base64Chars[_3to4.b64_0()]); ++_To; *_To = _Tr::to_char_type(_xmlrpc_base64Chars[_3to4.b64_1()]); ++_To; *_To = _Tr::to_char_type(_xmlrpc_base64Chars[_3to4.b64_2()]); ++_To; *_To = _Tr::to_char_type(_xmlrpc_base64Chars[_3to4.b64_3()]); ++_To; if(line_octets == 17) // xmlrpc_base64 ïîçâîëÿåò äëèíó ñòðîêè íå áîëåå 72 ñèìâîëîâ { //_To = _Endl(_To); *_To = '\n'; ++_To; line_octets = 0; } else ++line_octets; } __end: ; return (_First); } template _II get(_II _First, _II _Last, _OI _To, _State& _St) const { three2four _3to4; int _Char; while(_First != _Last) { // Take octet _3to4.zero(); // -- 0 -- // Search next valid char... while((_Char = _getCharType(*_First)) < 0 && _Char == _UNKNOWN_CHAR) { if(++_First == _Last) { _St |= _IOS_FAILBIT|_IOS_EOFBIT; return _First; // unexpected EOF } } if(_Char == _EQUAL_CHAR){ // Error! First character in octet can't be '=' _St |= _IOS_FAILBIT; return _First; } else _3to4.b64_0(_Char); // -- 1 -- // Search next valid char... while(++_First != _Last) if((_Char = _getCharType(*_First)) != _UNKNOWN_CHAR) break; if(_First == _Last) { _St |= _IOS_FAILBIT|_IOS_EOFBIT; // unexpected EOF return _First; } if(_Char == _EQUAL_CHAR){ // Error! Second character in octet can't be '=' _St |= _IOS_FAILBIT; return _First; } else _3to4.b64_1(_Char); // -- 2 -- // Search next valid char... while(++_First != _Last) if((_Char = _getCharType(*_First)) != _UNKNOWN_CHAR) break; if(_First == _Last) { // Error! Unexpected EOF. Must be '=' or xmlrpc_base64 character _St |= _IOS_FAILBIT|_IOS_EOFBIT; return _First; } if(_Char == _EQUAL_CHAR){ // OK! _3to4.b64_2(0); _3to4.b64_3(0); // chek for EOF if(++_First == _Last) { // Error! Unexpected EOF. Must be '='. Ignore it. //_St |= _IOS_BADBIT|_IOS_EOFBIT; _St |= _IOS_EOFBIT; } else if(_getCharType(*_First) != _EQUAL_CHAR) { // Error! Must be '='. Ignore it. //_St |= _IOS_BADBIT; } else ++_First; // Skip '=' // write 1 byte to output *_To = (byte_t) _3to4.get_0(); return _First; } else _3to4.b64_2(_Char); // -- 3 -- // Search next valid char... while(++_First != _Last) if((_Char = _getCharType(*_First)) != _UNKNOWN_CHAR) break; if(_First == _Last) { // Unexpected EOF. It's error. But ignore it. //_St |= _IOS_FAILBIT|_IOS_EOFBIT; _St |= _IOS_EOFBIT; return _First; } if(_Char == _EQUAL_CHAR) { // OK! _3to4.b64_3(0); // write to output 2 bytes *_To = (byte_t) _3to4.get_0(); *_To = (byte_t) _3to4.get_1(); ++_First; // set position to next character return _First; } else _3to4.b64_3(_Char); // write to output 3 bytes *_To = (byte_t) _3to4.get_0(); *_To = (byte_t) _3to4.get_1(); *_To = (byte_t) _3to4.get_2(); ++_First; } // while(_First != _Last) return (_First); } protected: int _getCharType(int _Ch) const { if(_xmlrpc_base64Chars[62] == _Ch) return 62; if(_xmlrpc_base64Chars[63] == _Ch) return 63; if((_xmlrpc_base64Chars[0] <= _Ch) && (_xmlrpc_base64Chars[25] >= _Ch)) return _Ch - _xmlrpc_base64Chars[0]; if((_xmlrpc_base64Chars[26] <= _Ch) && (_xmlrpc_base64Chars[51] >= _Ch)) return _Ch - _xmlrpc_base64Chars[26] + 26; if((_xmlrpc_base64Chars[52] <= _Ch) && (_xmlrpc_base64Chars[61] >= _Ch)) return _Ch - _xmlrpc_base64Chars[52] + 52; if(_Ch == _Tr::to_int_type('=')) return _EQUAL_CHAR; return _UNKNOWN_CHAR; } }; #endif flamp-2.2.12/src/xmlrpcpp/XmlRpcSocket.h0000644000175000017500000000537214463050061015007 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _XMLRPCSOCKET_H_ #define _XMLRPCSOCKET_H_ #if defined(_MSC_VER) # pragma warning(disable:4786) // identifier was truncated in debug info #endif #include namespace XmlRpc { //! A platform-independent socket API. class XmlRpcSocket { public: // On windows, a socket is an unsigned int large enough to hold a ptr // This should match the definition of SOCKET in winsock2.h #if defined(_WINDOWS) # if defined(_WIN64) typedef unsigned __int64 Socket; # else typedef unsigned int Socket; # endif #else typedef int Socket; #endif //! An invalid socket constant. static const Socket Invalid = (Socket) -1; //! Creates a stream (TCP) socket. Returns XmlRpcSocket::Invalid on failure. static Socket socket(); //! Closes a socket. static void close(Socket socket); //! Sets a stream (TCP) socket to perform non-blocking IO. Returns false on failure. static bool setNonBlocking(Socket socket); // The next four methods are appropriate for servers. //! Allow the port the specified socket is bound to to be re-bound immediately so //! server re-starts are not delayed. Returns false on failure. static bool setReuseAddr(Socket socket); //! Bind to a specified port static bool bind(Socket socket, int port); //! Set socket in listen mode static bool listen(Socket socket, int backlog); //! Accept a client connection request static Socket accept(Socket socket); //! Connect a socket to a server (from a client) static bool connect(Socket socket, std::string& host, int port); //! Get the port of a bound socket static int getPort(Socket socket); //! Returns true if the last error was not a fatal one (eg, EWOULDBLOCK) static bool nonFatalError(); //! Returns last errno static int getError(); //! Returns message corresponding to last error static std::string getErrorMsg(); //! Returns message corresponding to error static std::string getErrorMsg(int error); }; } // namespace XmlRpc #endif flamp-2.2.12/src/xmlrpcpp/XmlRpcServerConnection.h0000644000175000017500000000541114463050061017037 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _XMLRPCSERVERCONNECTION_H_ #define _XMLRPCSERVERCONNECTION_H_ #if defined(_MSC_VER) # pragma warning(disable:4786) // identifier was truncated in debug info #endif #include #include "XmlRpcValue.h" #include "XmlRpcSource.h" namespace XmlRpc { // The server waits for client connections and provides support for executing methods class XmlRpcServer; class XmlRpcServerMethod; //! A class to handle XML RPC requests from a particular client class XmlRpcServerConnection : public XmlRpcSource { public: //! Constructor XmlRpcServerConnection(XmlRpcSocket::Socket fd, XmlRpcServer* server, bool deleteOnClose = false); //! Destructor virtual ~XmlRpcServerConnection(); // XmlRpcSource interface implementation //! Handle IO on the client connection socket. //! @param eventType Type of IO event that occurred. @see XmlRpcDispatch::EventType. virtual unsigned handleEvent(unsigned eventType); protected: //! Reads the http header bool readHeader(); //! Reads the request (based on the content-length header value) bool readRequest(); //! Executes the request and writes the resulting response bool writeResponse(); //! Helper method to execute the client request virtual void executeRequest(); //! The XmlRpc server that accepted this connection XmlRpcServer* _server; //! Possible IO states for the connection enum ServerConnectionState { READ_HEADER, READ_REQUEST, WRITE_RESPONSE }; //! Current IO state for the connection ServerConnectionState _connectionState; //! Request headers std::string _header; //! Number of bytes expected in the request body (parsed from header) int _contentLength; //! Request body std::string _request; //! Response std::string _response; //! Number of bytes of the response written so far int _bytesWritten; //! Whether to keep the current client connection open for further requests bool _keepAlive; }; } // namespace XmlRpc #endif // _XMLRPCSERVERCONNECTION_H_ flamp-2.2.12/src/xmlrpcpp/XmlRpcValue.cpp0000664000175000017500000005041014507650001015160 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include "XmlRpcValue.h" #include "XmlRpcException.h" #include "XmlRpcUtil.h" #include "XmlRpcBase64.h" #include #include #include #include #include namespace XmlRpc { static const char VALUE_TAG[] = "value"; static const char NIL_TAG[] = "nil"; static const char BOOLEAN_TAG[] = "boolean"; static const char DOUBLE_TAG[] = "double"; static const char INT_TAG[] = "int"; static const char I4_TAG[] = "i4"; static const char STRING_TAG[] = "string"; static const char DATETIME_TAG[] = "dateTime.iso8601"; static const char BASE64_TAG[] = "base64"; static const char ARRAY_TAG[] = "array"; static const char DATA_TAG[] = "data"; static const char STRUCT_TAG[] = "struct"; static const char MEMBER_TAG[] = "member"; static const char NAME_TAG[] = "name"; // Format strings std::string XmlRpcValue::_doubleFormat("%f"); // Clean up void XmlRpcValue::invalidate() { switch (_type) { case TypeString: delete _value.asString; break; case TypeDateTime: delete _value.asTime; break; case TypeBase64: delete _value.asBinary; break; case TypeArray: delete _value.asArray; break; case TypeStruct: delete _value.asStruct; break; default: break; } _type = TypeInvalid; _value.asBinary = 0; } // Type checking void XmlRpcValue::assertType(Type t) const { if (_type != t) { throw XmlRpcException("type error"); } } void XmlRpcValue::assertType(Type t) { if (_type == TypeInvalid) { _type = t; switch (_type) { // Ensure there is a valid value for the type case TypeString: _value.asString = new std::string(); break; case TypeDateTime: _value.asTime = new struct tm(); break; case TypeBase64: _value.asBinary = new BinaryData(); break; case TypeArray: _value.asArray = new ValueArray(); break; case TypeStruct: _value.asStruct = new ValueStruct(); break; default: _value.asBinary = 0; break; } } else if (_type != t) { throw XmlRpcException("type error"); } } void XmlRpcValue::assertArray(int size) const { if (_type != TypeArray) throw XmlRpcException("type error: expected an array"); else if (int(_value.asArray->size()) < size) throw XmlRpcException("range error: array index too large"); } void XmlRpcValue::assertArray(int size) { if (_type == TypeInvalid) { _type = TypeArray; _value.asArray = new ValueArray(size); } else if (_type == TypeArray) { if (int(_value.asArray->size()) < size) _value.asArray->resize(size); } else throw XmlRpcException("type error: expected an array"); } void XmlRpcValue::assertStruct() { if (_type == TypeInvalid) { _type = TypeStruct; _value.asStruct = new ValueStruct(); } else if (_type != TypeStruct) throw XmlRpcException("type error: expected a struct"); } // Operators XmlRpcValue& XmlRpcValue::operator=(XmlRpcValue const& rhs) { if (this != &rhs) { invalidate(); _type = rhs._type; switch (_type) { case TypeBoolean: _value.asBool = rhs._value.asBool; break; case TypeInt: _value.asInt = rhs._value.asInt; break; case TypeDouble: _value.asDouble = rhs._value.asDouble; break; case TypeDateTime: _value.asTime = new struct tm(*rhs._value.asTime); break; case TypeString: _value.asString = new std::string(*rhs._value.asString); break; case TypeBase64: _value.asBinary = new BinaryData(*rhs._value.asBinary); break; case TypeArray: _value.asArray = new ValueArray(*rhs._value.asArray); break; case TypeStruct: _value.asStruct = new ValueStruct(*rhs._value.asStruct); break; default: _value.asBinary = 0; break; } } return *this; } // Predicate for tm equality static bool tmEq(struct tm const& t1, struct tm const& t2) { return t1.tm_sec == t2.tm_sec && t1.tm_min == t2.tm_min && t1.tm_hour == t2.tm_hour && t1.tm_mday == t2.tm_mday && t1.tm_mon == t2.tm_mon && t1.tm_year == t2.tm_year; } bool XmlRpcValue::operator==(XmlRpcValue const& other) const { if (_type != other._type) return false; switch (_type) { case TypeBoolean: return ( !_value.asBool && !other._value.asBool) || ( _value.asBool && other._value.asBool); case TypeInt: return _value.asInt == other._value.asInt; case TypeDouble: return _value.asDouble == other._value.asDouble; case TypeDateTime: return tmEq(*_value.asTime, *other._value.asTime); case TypeString: return *_value.asString == *other._value.asString; case TypeBase64: return *_value.asBinary == *other._value.asBinary; case TypeArray: return *_value.asArray == *other._value.asArray; // The map<>::operator== requires the definition of value< for kcc case TypeStruct: //return *_value.asStruct == *other._value.asStruct; { if (_value.asStruct->size() != other._value.asStruct->size()) return false; ValueStruct::const_iterator it1=_value.asStruct->begin(); ValueStruct::const_iterator it2=other._value.asStruct->begin(); while (it1 != _value.asStruct->end()) { const XmlRpcValue& v1 = it1->second; const XmlRpcValue& v2 = it2->second; if ( ! (v1 == v2)) return false; it1++; it2++; } return true; } default: break; } return true; // Both invalid values ... } bool XmlRpcValue::operator!=(XmlRpcValue const& other) const { return !(*this == other); } // Works for strings, binary data, arrays, and structs. int XmlRpcValue::size() const { switch (_type) { case TypeString: return int(_value.asString->size()); case TypeBase64: return int(_value.asBinary->size()); case TypeArray: return int(_value.asArray->size()); case TypeStruct: return int(_value.asStruct->size()); default: break; } throw XmlRpcException("type error"); } // Checks for existence of struct member bool XmlRpcValue::hasMember(const std::string& name) const { return _type == TypeStruct && _value.asStruct->find(name) != _value.asStruct->end(); } // Set the value from xml. The chars at *offset into valueXml // should be the start of a tag. Destroys any existing value. bool XmlRpcValue::fromXml(std::string const& valueXml, int* offset) { int savedOffset = *offset; invalidate(); bool emptyTag; if ( ! XmlRpcUtil::nextTagIs(VALUE_TAG, valueXml, offset, &emptyTag)) return false; // Not a value, offset not updated // No value? Pretend its an empty string... if (emptyTag) { *this = ""; return true; } // No type tag? Assume string // bool result = true; bool result = false; int valueOffset = *offset; if (XmlRpcUtil::nextTagIsEnd(VALUE_TAG, valueXml, offset)) { result = true; return stringFromXml(valueXml, &valueOffset); } else if (XmlRpcUtil::nextTagIs(NIL_TAG, valueXml, offset, &emptyTag)) { _type = TypeNil; result = true; } else if (XmlRpcUtil::nextTagIs(BOOLEAN_TAG, valueXml, offset, &emptyTag)) { if (emptyTag) { *this = false; result = true; } else result = boolFromXml(valueXml, offset) && XmlRpcUtil::nextTagIsEnd(BOOLEAN_TAG, valueXml, offset); } else if (XmlRpcUtil::nextTagIs(I4_TAG, valueXml, offset, &emptyTag)) { if (emptyTag) { *this = 0; result = true; } else result = intFromXml(valueXml, offset) && XmlRpcUtil::nextTagIsEnd(I4_TAG, valueXml, offset); } else if (XmlRpcUtil::nextTagIs(INT_TAG, valueXml, offset, &emptyTag)) { if (emptyTag) { *this = 0; result = true; } else result = intFromXml(valueXml, offset) && XmlRpcUtil::nextTagIsEnd(INT_TAG, valueXml, offset); } else if (XmlRpcUtil::nextTagIs(DOUBLE_TAG, valueXml, offset, &emptyTag)) { if (emptyTag) { *this = 0.0; result = true; } else result = doubleFromXml(valueXml, offset) && XmlRpcUtil::nextTagIsEnd(DOUBLE_TAG, valueXml, offset); } else if (XmlRpcUtil::nextTagIs(STRING_TAG, valueXml, offset, &emptyTag)) { if (emptyTag) { *this = ""; result = true; } else result = stringFromXml(valueXml, offset) && XmlRpcUtil::nextTagIsEnd(STRING_TAG, valueXml, offset); } else if (XmlRpcUtil::nextTagIs(DATETIME_TAG, valueXml, offset, &emptyTag)) { if (emptyTag) result = false; else result = timeFromXml(valueXml, offset) && XmlRpcUtil::nextTagIsEnd(DATETIME_TAG, valueXml, offset); } else if (XmlRpcUtil::nextTagIs(BASE64_TAG, valueXml, offset, &emptyTag)) { if (emptyTag) result = binaryFromXml("", 0); else result = binaryFromXml(valueXml, offset) && XmlRpcUtil::nextTagIsEnd(BASE64_TAG, valueXml, offset); } else if (XmlRpcUtil::nextTagIs(ARRAY_TAG, valueXml, offset, &emptyTag)) { if (emptyTag) result = false; else result = arrayFromXml(valueXml, offset) && XmlRpcUtil::nextTagIsEnd(ARRAY_TAG, valueXml, offset); } else if (XmlRpcUtil::nextTagIs(STRUCT_TAG, valueXml, offset, &emptyTag)) { if (emptyTag) result = false; else result = structFromXml(valueXml, offset) && XmlRpcUtil::nextTagIsEnd(STRUCT_TAG, valueXml, offset); } // Unrecognized tag after or no if ( ! result || ! XmlRpcUtil::nextTagIsEnd(VALUE_TAG, valueXml, offset)) { *offset = savedOffset; return false; } return true; } // Encode the Value in xml std::string XmlRpcValue::toXml() const { switch (_type) { case TypeNil: return nilToXml(); case TypeBoolean: return boolToXml(); case TypeInt: return intToXml(); case TypeDouble: return doubleToXml(); case TypeString: return stringToXml(); case TypeDateTime: return timeToXml(); case TypeBase64: return binaryToXml(); case TypeArray: return arrayToXml(); case TypeStruct: return structToXml(); default: break; } return std::string(); // Invalid value } // Boolean bool XmlRpcValue::boolFromXml(std::string const& valueXml, int* offset) { const char* valueStart = valueXml.c_str() + *offset; char* valueEnd; long ivalue = strtol(valueStart, &valueEnd, 10); if (valueEnd == valueStart || (ivalue != 0 && ivalue != 1)) return false; _type = TypeBoolean; _value.asBool = (ivalue == 1); *offset += int(valueEnd - valueStart); return true; } std::string XmlRpcValue::nilToXml() const { return ""; } std::string XmlRpcValue::boolToXml() const { static std::string booleanTrueXml("1"); static std::string booleanFalseXml("0"); return _value.asBool ? booleanTrueXml : booleanFalseXml; } // Int bool XmlRpcValue::intFromXml(std::string const& valueXml, int* offset) { const char* valueStart = valueXml.c_str() + *offset; char* valueEnd; long ivalue = strtol(valueStart, &valueEnd, 10); if (valueEnd == valueStart) return false; _type = TypeInt; _value.asInt = int(ivalue); *offset += int(valueEnd - valueStart); return true; } std::string XmlRpcValue::intToXml() const { char buf[256]; snprintf(buf, sizeof(buf)-1, "%d", _value.asInt); buf[sizeof(buf)-1] = 0; return std::string(buf); } // Double bool XmlRpcValue::doubleFromXml(std::string const& valueXml, int* offset) { const char* valueStart = valueXml.c_str() + *offset; char* valueEnd; double dvalue = strtod(valueStart, &valueEnd); if (valueEnd == valueStart) return false; _type = TypeDouble; _value.asDouble = dvalue; *offset += int(valueEnd - valueStart); return true; } std::string XmlRpcValue::doubleToXml() const { char fmtbuf[256], buf[256]; snprintf(fmtbuf, sizeof(fmtbuf)-1, "%s", getDoubleFormat().c_str()); fmtbuf[sizeof(fmtbuf)-1] = 0; snprintf(buf, sizeof(buf)-1, fmtbuf, _value.asDouble); buf[sizeof(buf)-1] = 0; return std::string(buf); } // String bool XmlRpcValue::stringFromXml(std::string const& valueXml, int* offset) { size_t valueEnd = valueXml.find('<', *offset); if (valueEnd == std::string::npos) return false; // No end tag; _type = TypeString; _value.asString = new std::string(XmlRpcUtil::xmlDecode(valueXml.substr(*offset, valueEnd-*offset))); *offset += int(_value.asString->length()); return true; } std::string XmlRpcValue::stringToXml() const { return std::string("") + XmlRpcUtil::xmlEncode(*_value.asString) + std::string(""); } // DateTime (stored as a struct tm) bool XmlRpcValue::timeFromXml(std::string const& valueXml, int* offset) { size_t valueEnd = valueXml.find('<', *offset); if (valueEnd == std::string::npos) return false; // No end tag; std::string stime = valueXml.substr(*offset, valueEnd-*offset); struct tm t; if (sscanf(stime.c_str(),"%4d%2d%2dT%2d:%2d:%2d",&t.tm_year,&t.tm_mon,&t.tm_mday,&t.tm_hour,&t.tm_min,&t.tm_sec) != 6) return false; t.tm_isdst = -1; _type = TypeDateTime; _value.asTime = new struct tm(t); *offset += int(stime.length()); return true; } std::string XmlRpcValue::timeToXml() const { struct tm* t = _value.asTime; char buf[50]; memset(buf, 0, 50); snprintf(buf, sizeof(buf)-1, "%04d%02d%02dT%02d:%02d:%02d", 1900+t->tm_year,1+t->tm_mon,t->tm_mday,t->tm_hour,t->tm_min,t->tm_sec); return std::string("") + buf + std::string(""); } // Base64 bool XmlRpcValue::binaryFromXml(std::string const& valueXml, int* offset) { size_t valueEnd = valueXml.find('<', *offset); if (valueEnd == std::string::npos) return false; // No end tag; _type = TypeBase64; std::string asString = valueXml.substr(*offset, valueEnd-*offset); _value.asBinary = new BinaryData(); // check whether base64 encodings can contain chars xml encodes... // convert from base64 to binary int iostatus = 0; xmlrpc_base64 decoder; std::back_insert_iterator ins = std::back_inserter(*(_value.asBinary)); decoder.get(asString.begin(), asString.end(), ins, iostatus); *offset += int(asString.length()); return true; } std::string XmlRpcValue::binaryToXml() const { // convert to base64 std::vector base64data; int iostatus = 0; xmlrpc_base64 encoder; std::back_insert_iterator > ins = std::back_inserter(base64data); encoder.put(_value.asBinary->begin(), _value.asBinary->end(), ins, iostatus, xmlrpc_base64<>::crlf()); // Wrap with xml std::string xml = ""; xml.append(base64data.begin(), base64data.end()); xml += ""; return xml; } // Array bool XmlRpcValue::arrayFromXml(std::string const& valueXml, int* offset) { bool emptyTag; if ( ! XmlRpcUtil::nextTagIs(DATA_TAG, valueXml, offset, &emptyTag)) return false; _type = TypeArray; _value.asArray = new ValueArray; if ( ! emptyTag) { XmlRpcValue v; while (v.fromXml(valueXml, offset)) _value.asArray->push_back(v); // copy... // Skip the trailing
(void) XmlRpcUtil::nextTagIsEnd(DATA_TAG, valueXml, offset); } return true; } // In general, its preferable to generate the xml of each element of the // array as it is needed rather than glomming up one big string. std::string XmlRpcValue::arrayToXml() const { std::string xml = ""; int s = int(_value.asArray->size()); for (int i=0; iat(i).toXml(); xml += ""; return xml; } // Struct bool XmlRpcValue::structFromXml(std::string const& valueXml, int* offset) { _type = TypeStruct; _value.asStruct = new ValueStruct; std::string name; bool emptyTag; while (XmlRpcUtil::nextTagIs(MEMBER_TAG, valueXml, offset, &emptyTag)) { if ( ! emptyTag) { if (XmlRpcUtil::parseTag(NAME_TAG, valueXml, offset, name)) { // value XmlRpcValue val(valueXml, offset); if ( ! val.valid()) { invalidate(); return false; } const std::pair p(name, val); _value.asStruct->insert(p); (void) XmlRpcUtil::nextTagIsEnd(MEMBER_TAG, valueXml, offset); } } } return true; } // In general, its preferable to generate the xml of each element // as it is needed rather than glomming up one big string. std::string XmlRpcValue::structToXml() const { std::string xml = ""; ValueStruct::const_iterator it; for (it=_value.asStruct->begin(); it!=_value.asStruct->end(); ++it) { xml += ""; xml += XmlRpcUtil::xmlEncode(it->first); xml += ""; xml += it->second.toXml(); xml += ""; } xml += ""; return xml; } // Write the value without xml encoding it std::ostream& XmlRpcValue::write(std::ostream& os) const { switch (_type) { default: break; case TypeBoolean: os << _value.asBool; break; case TypeInt: os << _value.asInt; break; case TypeDouble: os << _value.asDouble; break; case TypeString: os << *_value.asString; break; case TypeDateTime: { struct tm* t = _value.asTime; char buf[20]; snprintf(buf, sizeof(buf)-1, "%4d%02d%02dT%02d:%02d:%02d", t->tm_year,t->tm_mon,t->tm_mday,t->tm_hour,t->tm_min,t->tm_sec); buf[sizeof(buf)-1] = 0; os << buf; break; } case TypeBase64: { int iostatus = 0; std::ostreambuf_iterator out(os); xmlrpc_base64 encoder; encoder.put(_value.asBinary->begin(), _value.asBinary->end(), out, iostatus, xmlrpc_base64<>::crlf()); break; } case TypeArray: { int s = int(_value.asArray->size()); os << '{'; for (int i=0; i 0) os << ','; _value.asArray->at(i).write(os); } os << '}'; break; } case TypeStruct: { os << '['; ValueStruct::const_iterator it; for (it=_value.asStruct->begin(); it!=_value.asStruct->end(); ++it) { if (it!=_value.asStruct->begin()) os << ','; os << it->first << ':'; it->second.write(os); } os << ']'; break; } } return os; } } // namespace XmlRpc // ostream std::ostream& operator<<(std::ostream& os, XmlRpc::XmlRpcValue& v) { // If you want to output in xml format: //return os << v.toXml(); return v.write(os); } flamp-2.2.12/src/xmlrpcpp/XmlRpcServerMethod.cpp0000644000175000017500000000216214463050061016513 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include "XmlRpcServerMethod.h" #include "XmlRpcServer.h" namespace XmlRpc { XmlRpcServerMethod::XmlRpcServerMethod(std::string const& name, XmlRpcServer* server) { _name = name; _server = server; if (_server) _server->addMethod(this); } XmlRpcServerMethod::~XmlRpcServerMethod() { if (_server) _server->removeMethod(this); } } // namespace XmlRpc flamp-2.2.12/src/xmlrpcpp/XmlRpcSocket.cpp0000664000175000017500000001203514507650001015335 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include "XmlRpcSocket.h" #include "XmlRpcUtil.h" #if defined(_WINDOWS) # include # include //# pragma lib(WS2_32.lib) # define EINPROGRESS WSAEINPROGRESS # define EWOULDBLOCK WSAEWOULDBLOCK # define ETIMEDOUT WSAETIMEDOUT typedef int socklen_t; #include "compat.h" #else extern "C" { # include # include # include # include # include # include # include # include # include # include } #endif // _WINDOWS using namespace XmlRpc; // One-time initializations static bool initialized = false; static void initialize() { initialized = true; #if defined(_WINDOWS) { WORD wVersionRequested = MAKEWORD( WSA_MAJOR, WSA_MINOR ); WSADATA wsaData; WSAStartup(wVersionRequested, &wsaData); atexit((void(*)(void)) WSACleanup); } #else { // Ignore SIGPIPE (void) signal(SIGPIPE, SIG_IGN); } #endif // _WINDOWS } // These errors are not considered fatal for an IO operation; the operation will be re-tried. bool XmlRpcSocket::nonFatalError() { int err = XmlRpcSocket::getError(); return (err == EINPROGRESS || #if defined(EAGAIN) err == EAGAIN || #endif #if defined(EINTR) err == EINTR || #endif err == EWOULDBLOCK); } XmlRpcSocket::Socket XmlRpcSocket::socket() { if ( ! initialized) initialize(); return ::socket(AF_INET, SOCK_STREAM, 0); } void XmlRpcSocket::close(XmlRpcSocket::Socket fd) { XmlRpcUtil::log(4, "XmlRpcSocket::close: fd %d.", fd); #if defined(_WINDOWS) closesocket(fd); #else ::close(fd); #endif // _WINDOWS } bool XmlRpcSocket::setNonBlocking(XmlRpcSocket::Socket fd) { #if defined(_WINDOWS) unsigned long flag = 1; return (ioctlsocket(fd, FIONBIO, &flag) == 0); #else return (fcntl(fd, F_SETFL, O_NONBLOCK) == 0); #endif // _WINDOWS } bool XmlRpcSocket::setReuseAddr(XmlRpcSocket::Socket fd) { // Allow this port to be re-bound immediately so server re-starts are not delayed int sflag = 1; return (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (const char *)&sflag, sizeof(sflag)) == 0); } // Bind to a specified port bool XmlRpcSocket::bind(XmlRpcSocket::Socket fd, int port) { struct sockaddr_in saddr; memset(&saddr, 0, sizeof(saddr)); saddr.sin_family = AF_INET; saddr.sin_addr.s_addr = htonl(INADDR_ANY); saddr.sin_port = htons((u_short) port); return (::bind(fd, (struct sockaddr *)&saddr, sizeof(saddr)) == 0); } // Set socket in listen mode bool XmlRpcSocket::listen(XmlRpcSocket::Socket fd, int backlog) { return (::listen(fd, backlog) == 0); } XmlRpcSocket::Socket XmlRpcSocket::accept(XmlRpcSocket::Socket fd) { struct sockaddr_in addr; socklen_t addrlen = sizeof(addr); return ::accept(fd, (struct sockaddr*)&addr, &addrlen); } // Connect a socket to a server (from a client) bool XmlRpcSocket::connect(XmlRpcSocket::Socket fd, std::string& host, int port) { struct sockaddr_in saddr; memset(&saddr, 0, sizeof(saddr)); saddr.sin_family = AF_INET; struct hostent *hp = gethostbyname(host.c_str()); if (hp == 0) return false; saddr.sin_family = hp->h_addrtype; memcpy(&saddr.sin_addr, hp->h_addr, hp->h_length); saddr.sin_port = htons((u_short) port); // For asynch operation, this will return EWOULDBLOCK (windows) or // EINPROGRESS (linux) and we just need to wait for the socket to be writable... int result = ::connect(fd, (struct sockaddr *)&saddr, sizeof(saddr)); return result == 0 || nonFatalError(); } // Get the port of a bound socket int XmlRpcSocket::getPort(XmlRpcSocket::Socket socket) { struct sockaddr_in saddr; socklen_t saddr_len = sizeof(saddr); int port; int result = ::getsockname(socket, (sockaddr*) &saddr, &saddr_len); if (result != 0) { port = -1; } else { port = ntohs(saddr.sin_port); } return port; } // Returns last errno int XmlRpcSocket::getError() { #if defined(_WINDOWS) return WSAGetLastError(); #else return errno; #endif } // Returns message corresponding to last errno std::string XmlRpcSocket::getErrorMsg() { return getErrorMsg(getError()); } // Returns message corresponding to errno... well, it should anyway std::string XmlRpcSocket::getErrorMsg(int error) { char err[60]; snprintf(err,sizeof(err),"error %d", error); return std::string(err); } flamp-2.2.12/src/xmlrpcpp/XmlRpcClient.cpp0000664000175000017500000003700614507650001015330 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include #include #include "XmlRpcClient.h" #include "XmlRpcSocket.h" #include "XmlRpc.h" #include "XmlRpcBase64.h" // For HTTP authentication encoding #include #include #include #include #include using namespace XmlRpc; using namespace std; // Static data const char REQUEST_BEGIN[] = "\r\n"; const char REQUEST_BEGIN_METHODNAME[] = ""; const char REQUEST_END_METHODNAME[] = "\r\n"; const char PARAMS_TAG[] = ""; const char PARAMS_ETAG[] = ""; const char PARAM_TAG[] = ""; const char PARAM_ETAG[] = ""; const char REQUEST_END[] = "\r\n"; XmlRpcClient::XmlRpcClient(const char* host, int port, const char* uri/*=0*/) { XmlRpcUtil::log(1, "XmlRpcClient new client: host %s, port %d.", host, port); _host = host; _port = port; if (uri && *uri) _uri = uri; else _uri = "/RPC2"; _connectionState = NO_CONNECTION; _executing = false; _eof = false; // Default to keeping the connection open until an explicit close is done setKeepOpen(); } XmlRpcClient::XmlRpcClient(const char* host, int port, const char* login, const char* password, const char* uri/*=0*/) { XmlRpcUtil::log(1, "XmlRpcClient new client: host %s, port %d, login %s.", host, port, login); _host = host; _port = port; _login = login ? login : ""; _password = password ? password : ""; _uri = uri ? uri : "/RPC2"; _connectionState = NO_CONNECTION; _executing = false; _eof = false; // Default to keeping the connection open until an explicit close is done setKeepOpen(); } XmlRpcClient::~XmlRpcClient() { XmlRpcUtil::log(1, "XmlRpcClient dtor client: host %s, port %d.", _host.c_str(), _port); if (_connectionState != NO_CONNECTION) close(); } // Close the owned fd void XmlRpcClient::close() { XmlRpcUtil::log(4, "XmlRpcClient::close: fd %d.", getfd()); _connectionState = NO_CONNECTION; _disp.exit(); _disp.removeSource(this); XmlRpcSource::close(); } // Clear the referenced flag even if exceptions or errors occur. struct ClearFlagOnExit { ClearFlagOnExit(bool& flag) : _flag(flag) {} ~ClearFlagOnExit() { _flag = false; } bool& _flag; }; // Execute the named procedure on the remote server. // Params should be an array of the arguments for the method. // Returns true if the request was sent and a result received (although the result // might be a fault). bool XmlRpcClient::execute(const char* method, XmlRpcValue const& params, XmlRpcValue& result, double timeoutSeconds) { XmlRpcUtil::log(1, "XmlRpcClient::execute: method %s (_connectionState %d).", method, _connectionState); // This is not a thread-safe operation, if you want to do multithreading, use separate // clients for each thread. If you want to protect yourself from multiple threads // accessing the same client, replace this code with a real mutex. if (_executing) return false; _executing = true; ClearFlagOnExit cf(_executing); _sendAttempts = 0; _isFault = false; if ( ! setupConnection()) return false; if ( ! generateRequest(method, params)) return false; result.clear(); // Process until either a response is received or the timeout period passes _disp.work(timeoutSeconds); if (_connectionState != IDLE || ! parseResponse(result)) return false; XmlRpcUtil::log(1, "XmlRpcClient::execute: method %s completed.", method); _response.clear(); return true; } // XmlRpcSource interface implementation // Handle server responses. Called by the event dispatcher during execute. unsigned XmlRpcClient::handleEvent(unsigned eventType) { if (eventType == XmlRpcDispatch::Exception) { //if (XmlRpcSocket::nonFatalError()) // return (_connectionState == WRITE_REQUEST) // ? XmlRpcDispatch::WritableEvent : XmlRpcDispatch::ReadableEvent; if (_connectionState == WRITE_REQUEST && _bytesWritten == 0) XmlRpcUtil::error("Error in XmlRpcClient::handleEvent: could not connect to server (%s).", XmlRpcSocket::getErrorMsg().c_str()); else XmlRpcUtil::error("Error in XmlRpcClient::handleEvent (state %d): %s.", _connectionState, XmlRpcSocket::getErrorMsg().c_str()); return 0; } if (_connectionState == WRITE_REQUEST) if ( ! writeRequest()) return 0; if (_connectionState == READ_HEADER) if ( ! readHeader()) return 0; if (_connectionState == READ_RESPONSE) if ( ! readResponse()) return 0; // This should probably always ask for Exception events too return (_connectionState == WRITE_REQUEST) ? XmlRpcDispatch::WritableEvent : XmlRpcDispatch::ReadableEvent; } // Create the socket connection to the server if necessary bool XmlRpcClient::setupConnection() { // If an error occurred last time through, or if the server closed the connection, close our end if ((_connectionState != NO_CONNECTION && _connectionState != IDLE) || _eof) close(); _eof = false; if (_connectionState == NO_CONNECTION) if (! doConnect()) return false; // Prepare to write the request _connectionState = WRITE_REQUEST; _bytesWritten = 0; // Notify the dispatcher to listen on this source (calls handleEvent when the socket is writable) _disp.removeSource(this); // Make sure nothing is left over _disp.addSource(this, XmlRpcDispatch::WritableEvent | XmlRpcDispatch::Exception); return true; } // Connect to the xmlrpc server bool XmlRpcClient::doConnect() { XmlRpcSocket::Socket fd = XmlRpcSocket::socket(); if (fd == XmlRpcSocket::Invalid) { XmlRpcUtil::error("Error in XmlRpcClient::doConnect: Could not create socket (%s).", XmlRpcSocket::getErrorMsg().c_str()); return false; } XmlRpcUtil::log(3, "XmlRpcClient::doConnect: fd %d.", fd); this->setfd(fd); // Don't block on connect/reads/writes if ( ! XmlRpcSocket::setNonBlocking(fd)) { this->close(); XmlRpcUtil::error("Error in XmlRpcClient::doConnect: Could not set socket to non-blocking IO mode (%s).", XmlRpcSocket::getErrorMsg().c_str()); return false; } if ( ! XmlRpcSocket::connect(fd, _host, _port)) { this->close(); XmlRpcUtil::error("Error in XmlRpcClient::doConnect: Could not connect to server (%s).", XmlRpcSocket::getErrorMsg().c_str()); return false; } return XmlRpcSource::doConnect(); } // Encode the request to call the specified method with the specified parameters into xml std::string XmlRpc::pname = "N/A"; void XmlRpc::set_pname(std::string pn) { XmlRpc::pname = pn; }; bool XmlRpcClient::generateRequest(const char* methodName, XmlRpcValue const& params) { std::string body = REQUEST_BEGIN; if (XmlRpc::pname != "N/A") { char pid[100]; snprintf(pid, sizeof(pid), "%s %d", XmlRpc::pname.c_str(), getpid()); body.append("\r\n"); } body.append(REQUEST_BEGIN_METHODNAME); body.append(methodName); body.append(REQUEST_END_METHODNAME); // If params is an array, each element is a separate parameter if (params.valid()) { body += PARAMS_TAG; if (params.getType() == XmlRpcValue::TypeArray) { for (int i=0; i base64data; int iostatus = 0; xmlrpc_base64 encoder; std::back_insert_iterator > ins = std::back_inserter(base64data); std::string authBuf = _login + ":" + _password; encoder.put(authBuf.begin(), authBuf.end(), ins, iostatus, xmlrpc_base64<>::crlf()); header += "Authorization: Basic "; std::string authEnc(base64data.begin(), base64data.end()); // handle pesky linefeed characters string::size_type lf; while ( (lf = authEnc.find("\r")) != string::npos ) { authEnc.erase(lf, 1); } while ( (lf = authEnc.find("\n")) != string::npos ) { authEnc.erase(lf, 1); } header += authEnc; header += "\r\n"; } header += "Content-Type: text/xml\r\nContent-length: "; sprintf(buff,"%d\r\n\r\n", static_cast(body.size())); return header + buff; } bool XmlRpcClient::writeRequest() { if (_bytesWritten == 0) XmlRpcUtil::log(5, "XmlRpcClient::writeRequest (attempt %d):\n%s\n", _sendAttempts+1, _request.c_str()); // Try to write the request if ( ! nbWrite(_request, &_bytesWritten)) { XmlRpcUtil::error("Error in XmlRpcClient::writeRequest: write error (%s).",XmlRpcSocket::getErrorMsg().c_str()); return false; } XmlRpcUtil::log(3, "XmlRpcClient::writeRequest: wrote %d of %d bytes.", _bytesWritten, _request.length()); // Wait for the result if (_bytesWritten == int(_request.length())) { _header = ""; _response = ""; _connectionState = READ_HEADER; } return true; } // Read the header from the response bool XmlRpcClient::readHeader() { // Read available data if ( ! nbRead(_header, &_eof) || (_eof && _header.length() == 0)) { // If we haven't read any data yet and this is a keep-alive connection, the server may // have timed out, so we try one more time. if (getKeepOpen() && _header.length() == 0 && _sendAttempts++ == 0) { XmlRpcUtil::log(4, "XmlRpcClient::readHeader: re-trying connection"); XmlRpcSource::close(); _connectionState = NO_CONNECTION; _eof = false; return setupConnection(); } XmlRpcUtil::error("Error in XmlRpcClient::readHeader: error while reading header (%s) on fd %d.", XmlRpcSocket::getErrorMsg().c_str(), getfd()); return false; } XmlRpcUtil::log(4, "XmlRpcClient::readHeader: client has read %d bytes", _header.length()); return parseHeader(); } bool XmlRpcClient::parseHeader() { char const *hp = _header.c_str(); // Start of header char const *ep = hp + _header.length(); // End of string char const *bp = 0; // Start of body char const *lp = 0; // Start of content-length value std::string const CONTINUE100("100 Continue"); int nc100 = int(CONTINUE100.length()); for (char const *cp = hp; (bp == 0) && (cp < ep); ++cp) { if ((ep - cp > 16) && (strncasecmp(cp, "Content-length: ", 16) == 0)) { lp = cp + 16; } else if ((ep - cp > 4) && (strncmp(cp, "\r\n\r\n", 4) == 0)) { if (cp - hp > nc100 && strncmp(cp-CONTINUE100.length(), CONTINUE100.c_str(), CONTINUE100.length()) == 0) cp += 3; else bp = cp + 4; } else if ((ep - cp > 2) && (strncmp(cp, "\n\n", 2) == 0)) { if (cp - hp > nc100 && strncmp(cp-CONTINUE100.length(), CONTINUE100.c_str(), CONTINUE100.length()) == 0) ++ cp; else bp = cp + 2; } } // If we haven't gotten the entire header yet, return (keep reading) if (bp == 0) { if (_eof) // EOF in the middle of a response is an error { XmlRpcUtil::error("Error in XmlRpcClient::readHeader: EOF while reading header"); return false; // Close the connection } return true; // Keep reading } // Decode content length if (lp == 0) { XmlRpcUtil::error("Error XmlRpcClient::readHeader: No Content-length specified"); return false; // We could try to figure it out by parsing as we read, but for now... } _contentLength = atoi(lp); if (_contentLength <= 0) { XmlRpcUtil::error("Error in XmlRpcClient::readHeader: Invalid Content-length specified (%d).", _contentLength); return false; } XmlRpcUtil::log(4, "client read content length: %d", _contentLength); // Otherwise copy non-header data to response buffer and set state to read response. _response = bp; _header = ""; // should parse out any interesting bits from the header (connection, etc)... _connectionState = READ_RESPONSE; return true; // Continue monitoring this source } bool XmlRpcClient::readResponse() { // If we dont have the entire response yet, read available data if (int(_response.length()) < _contentLength) { if ( ! nbRead(_response, &_eof)) { XmlRpcUtil::error("Error in XmlRpcClient::readResponse: read error (%s).",XmlRpcSocket::getErrorMsg().c_str()); return false; } // If we haven't gotten the entire _response yet, return (keep reading) if (int(_response.length()) < _contentLength) { if (_eof) { XmlRpcUtil::error("Error in XmlRpcClient::readResponse: EOF while reading response"); return false; } return true; } } // Otherwise, parse and return the result XmlRpcUtil::log(3, "XmlRpcClient::readResponse (read %d bytes)", _response.length()); XmlRpcUtil::log(5, "response:\n%s", _response.c_str()); _connectionState = IDLE; return false; // Stop monitoring this source (causes return from work) } // Convert the response xml into a result value bool XmlRpcClient::parseResponse(XmlRpcValue& result) { std::string r; _response.swap(r); // Parse response xml into result bool emptyParam; int offset = 0; if ( ! XmlRpcUtil::findTag("methodResponse",r,&offset,&emptyParam) || emptyParam) { XmlRpcUtil::error("Error in XmlRpcClient::parseResponse: Invalid response - no methodResponse. Response:\n%s", r.c_str()); return false; } // Expect either ... or ... if (XmlRpcUtil::nextTagIs("params",r,&offset,&emptyParam) && XmlRpcUtil::nextTagIs("param",r,&offset,&emptyParam)) { if (emptyParam) { result = 0; // No result? } else if ( ! result.fromXml(r, &offset)) { XmlRpcUtil::error("Error in XmlRpcClient::parseResponse: Invalid response value. Response:\n%s", r.c_str()); return false; } } else if (XmlRpcUtil::nextTagIs("fault",r,&offset,&emptyParam)) { _isFault = true; if (emptyParam || ! result.fromXml(r, &offset)) { result = 0; // No result? return false; } } else { XmlRpcUtil::error("Error in XmlRpcClient::parseResponse: Invalid response - no param or fault tag. Response:\n%s", r.c_str()); return false; } return result.valid(); } flamp-2.2.12/src/xmlrpcpp/XmlRpcMutex.h0000664000175000017500000000334514463050061014661 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _XMLRPCMUTEX_H_ #define _XMLRPCMUTEX_H_ #if defined(_MSC_VER) # pragma warning(disable:4786) // identifier was truncated in debug info #endif namespace XmlRpc { //! A simple platform-independent mutex API implemented for posix and windows. class XmlRpcMutex { public: //! Construct a Mutex object. XmlRpcMutex() : _pMutex(0) {} //! Destroy a Mutex object. ~XmlRpcMutex(); //! Wait for the mutex to be available and then acquire the lock. void acquire(); //! Release the mutex. void release(); //! Utility class to acquire a mutex at construction and release it when destroyed. struct AutoLock { //! Acquire the mutex at construction AutoLock(XmlRpcMutex& m) : _m(m) { _m.acquire(); } //! Release at destruction ~AutoLock() { _m.release(); } //! The mutex being held XmlRpcMutex& _m; }; private: //! Native Mutex object void* _pMutex; }; // class XmlRpcMutex } // namespace XmlRpc #endif // _XMLRPCMUTEX_H_ flamp-2.2.12/src/xmlrpcpp/XmlRpcUtil.cpp0000664000175000017500000002000414463050061015016 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include "XmlRpcUtil.h" #include #include #include #include #include #include "XmlRpc.h" using namespace XmlRpc; //#define USE_WINDOWS_DEBUG // To make the error and log messages go to VC++ debug output #ifdef USE_WINDOWS_DEBUG #define WIN32_LEAN_AND_MEAN #include #endif // Version id const char XmlRpc::XMLRPC_VERSION[] = "XMLRPC++ 0.8"; // Default log verbosity: 0 for no messages through 5 (writes everything) int XmlRpcLogHandler::_verbosity = 0; // Default log handler static class DefaultLogHandler : public XmlRpcLogHandler { public: void log(int level, const char* msg) { #ifdef USE_WINDOWS_DEBUG if (level <= _verbosity) { OutputDebugString(msg); OutputDebugString("\n"); } #else if (level <= _verbosity) std::cout << msg << std::endl; #endif } } defaultLogHandler; // Message log singleton XmlRpcLogHandler* XmlRpcLogHandler::_logHandler = &defaultLogHandler; // Default error handler static class DefaultErrorHandler : public XmlRpcErrorHandler { public: void error(const char* msg) { #ifdef USE_WINDOWS_DEBUG // OutputDebugString(msg); OutputDebugString("\n"); #else // std::cerr << msg << std::endl; #endif } } defaultErrorHandler; // Error handler singleton XmlRpcErrorHandler* XmlRpcErrorHandler::_errorHandler = &defaultErrorHandler; // Easy API for log verbosity int XmlRpc::getVerbosity() { return XmlRpcLogHandler::getVerbosity(); } void XmlRpc::setVerbosity(int level) { XmlRpcLogHandler::setVerbosity(level); } void XmlRpcUtil::log(int level, const char* fmt, ...) { if (level <= XmlRpcLogHandler::getVerbosity()) { va_list va; char buf[1024]; va_start( va, fmt); vsnprintf(buf,sizeof(buf)-1,fmt,va); buf[sizeof(buf)-1] = 0; XmlRpcLogHandler::getLogHandler()->log(level, buf); } } void XmlRpcUtil::error(const char* fmt, ...) { va_list va; va_start(va, fmt); char buf[1024]; vsnprintf(buf,sizeof(buf)-1,fmt,va); buf[sizeof(buf)-1] = 0; XmlRpcErrorHandler::getErrorHandler()->error(buf); } // Returns true if the tag is parsed. No attributes are parsed. // Sets val to the contents between and , or an empty string if is found. // Updates offset to char after bool XmlRpcUtil::parseTag(const char* tag, std::string const& xml, int* offset, std::string &val) { size_t nxml = xml.length(); if (*offset >= int(nxml)) return false; // Find or /> bool lastSlash = false; while (istart < nxml && xml[istart] != '>') { lastSlash = (xml[istart] == '/'); ++ istart; } if (istart == nxml) return false; val.clear(); if (lastSlash) // { *offset = int(istart+1); // 1 after > } else // Find { std::string etag = ""; size_t iend = xml.find(etag, istart); if (iend == std::string::npos) return false; *offset = int(iend + etag.length()); ++ istart; val = xml.substr(istart, iend-istart); } return true; } // Returns true if the tag is found and updates offset to the char after the tag bool XmlRpcUtil::findTag(const char* tag, std::string const& xml, int* offset, bool* emptyTag) { size_t nxml = xml.length(); if (*offset >= int(nxml)) return false; std::string stag = "<"; stag += tag; size_t istart = xml.find(stag, *offset); if (istart == std::string::npos) return false; istart += stag.length(); // Advance istart past > or />, skips attribs bool lastSlash = false; while (istart < nxml && xml[istart] != '>') { lastSlash = (xml[istart] == '/'); ++ istart; } if (istart == nxml) return false; *emptyTag = lastSlash; *offset = int(istart+1); // char after > return true; } // Returns true if the or is found at the specified offset (modulo any whitespace) // and updates offset to the char after the tag. *emptyTag is set to true if is found, false otherwise bool XmlRpcUtil::nextTagIs(const char* tag, std::string const& xml, int* offset, bool *emptyTag) { if (*offset >= int(xml.length())) return false; const char* cp = xml.c_str() + *offset; int nc = 0; while (*cp && isspace(*cp)) { ++cp; ++nc; } int len = int(strlen(tag)); if (*cp == '<' && (strncmp(cp+1, tag, len) == 0)) { cp += len + 1; if (*cp == '>') // { *offset += nc + len + 2; *emptyTag = false; return true; } while (*cp && isspace(*cp)) { ++cp; ++nc; } if (*cp == '/' && *(cp + 1) == '>') // { *offset += nc + len + 3; *emptyTag = true; return true; } } return false; } // Returns true if the next tag found at the specified offset is // and updates offset to the char after the tag. bool XmlRpcUtil::nextTagIsEnd(const char* tag, std::string const& xml, int* offset) { if (*offset >= int(xml.length())) return false; const char* cp = xml.c_str() + *offset; int nc = 0; while (*cp && *cp != '<') { ++cp; ++nc; } int len = int(strlen(tag)); if (*cp == '<' && *(cp+1) == '/' && (strncmp(cp+2, tag, len) == 0) && *(cp + len + 2) == '>') { *offset += nc + len + 3; return true; } return false; } // xml encodings (xml-encoded entities are preceded with '&') static const char AMP = '&'; static const char rawEntity[] = { '<', '>', '&', '\'', '\"', 0 }; static const char* xmlEntity[] = { "lt;", "gt;", "amp;", "apos;", "quot;", 0 }; static const int xmlEntLen[] = { 3, 3, 4, 5, 5 }; // Replace xml-encoded entities with the raw text equivalents. std::string XmlRpcUtil::xmlDecode(const std::string& encoded) { std::string::size_type iAmp = encoded.find(AMP); if (iAmp == std::string::npos) return encoded; std::string decoded(encoded, 0, iAmp); std::string::size_type iSize = encoded.size(); decoded.reserve(iSize); const char* ens = encoded.c_str(); while (iAmp != iSize) { if (encoded[iAmp] == AMP && iAmp+1 < iSize) { int iEntity; for (iEntity=0; xmlEntity[iEntity] != 0; ++iEntity) //if (encoded.compare(iAmp+1, xmlEntLen[iEntity], xmlEntity[iEntity]) == 0) if (strncmp(ens+iAmp+1, xmlEntity[iEntity], xmlEntLen[iEntity]) == 0) { decoded += rawEntity[iEntity]; iAmp += xmlEntLen[iEntity]+1; break; } if (xmlEntity[iEntity] == 0) // unrecognized sequence decoded += encoded[iAmp++]; } else { decoded += encoded[iAmp++]; } } return decoded; } // Replace raw text with xml-encoded entities. std::string XmlRpcUtil::xmlEncode(const std::string& raw) { std::string::size_type iRep = raw.find_first_of(rawEntity); if (iRep == std::string::npos) return raw; std::string encoded(raw, 0, iRep); std::string::size_type iSize = raw.size(); while (iRep != iSize) { int iEntity; for (iEntity=0; rawEntity[iEntity] != 0; ++iEntity) if (raw[iRep] == rawEntity[iEntity]) { encoded += AMP; encoded += xmlEntity[iEntity]; break; } if (rawEntity[iEntity] == 0) encoded += raw[iRep]; ++iRep; } return encoded; } flamp-2.2.12/src/xmlrpcpp/XmlRpcValue.h0000644000175000017500000002721214463050061014630 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _XMLRPCVALUE_H_ #define _XMLRPCVALUE_H_ #if defined(_MSC_VER) # pragma warning(disable:4786) // identifier was truncated in debug info #endif #include #include #include #include namespace XmlRpc { enum xmlrpc_nil_t { nil }; //! A class to represent RPC arguments and results. //! Each XmlRpcValue object contains a typed value, //! where the type is determined by the initial value //! assigned to the object. // should probably refcount them... class XmlRpcValue { public: //! XmlRpcValue types enum Type { TypeInvalid, TypeNil, TypeBoolean, TypeInt, TypeUnsigned, TypeLongLong, TypeDouble, TypeString, TypeDateTime, TypeBase64, TypeArray, TypeStruct }; // Non-primitive types typedef std::vector BinaryData; typedef std::vector ValueArray; typedef std::map ValueStruct; // Constructors //! Construct an empty XmlRpcValue XmlRpcValue() : _type(TypeInvalid) { _value.asBinary = 0; } //! Construct an XmlRpcValue with a nil value XmlRpcValue(xmlrpc_nil_t value) : _type(TypeNil) { } //! Construct an XmlRpcValue with a bool value XmlRpcValue(bool value) : _type(TypeBoolean) { _value.asBool = value; } //! Construct an XmlRpcValue with an int value XmlRpcValue(int value) : _type(TypeInt) { _value.asInt = value; } XmlRpcValue(unsigned int value) : _type(TypeUnsigned) { _value.asUnsigned = value; } XmlRpcValue(long long value) : _type(TypeLongLong) { _value.asLongLong = value; } //! Construct an XmlRpcValue with a double value XmlRpcValue(double value) : _type(TypeDouble) { _value.asDouble = value; } //! Construct an XmlRpcValue with a string value XmlRpcValue(std::string const& value) : _type(TypeString) { _value.asString = new std::string(value); } //! Construct an XmlRpcValue with a string value. //! @param value A null-terminated (C) string. XmlRpcValue(const char* value) : _type(TypeString) { _value.asString = new std::string(value); } XmlRpcValue(BinaryData const& value) : _type(TypeBase64) { _value.asBinary = new BinaryData(value); } XmlRpcValue(ValueStruct const& value) : _type(TypeStruct) { _value.asStruct = new ValueStruct(value); } XmlRpcValue(ValueArray const& value) : _type(TypeArray) { _value.asArray = new ValueArray(value); } //! Construct an XmlRpcValue with a date/time value. //! @param value A pointer to a struct tm (see localtime) XmlRpcValue(struct tm* value) : _type(TypeDateTime) { _value.asTime = new struct tm(*value); } //! Construct an XmlRpcValue with a binary data value //! @param value A pointer to data //! @param nBytes The length of the data pointed to, in bytes XmlRpcValue(void* value, int nBytes) : _type(TypeBase64) { _value.asBinary = new BinaryData((char*)value, ((char*)value)+nBytes); } //! Construct from xml, beginning at *offset chars into the string, updates offset XmlRpcValue(std::string const& xml, int* offset) : _type(TypeInvalid) { if ( ! fromXml(xml,offset)) _type = TypeInvalid; } //! Copy constructor XmlRpcValue(XmlRpcValue const& rhs) : _type(TypeInvalid) { *this = rhs; } //! Destructor (make virtual if you want to subclass) /*virtual*/ ~XmlRpcValue() { invalidate(); } //! Erase the current value void clear() { invalidate(); } // Operators //! Assignment from one XmlRpcValue to this one. //! @param rhs The value in rhs is copied to this value. XmlRpcValue& operator=(XmlRpcValue const& rhs); //! Assign nil to this XmlRpcValue. XmlRpcValue& operator=(xmlrpc_nil_t const& rhs) { return operator=(XmlRpcValue(rhs)); } //! Assign a bool to this XmlRpcValue. XmlRpcValue& operator=(bool const& rhs) { return operator=(XmlRpcValue(rhs)); } //! Assign an int to this XmlRpcValue. XmlRpcValue& operator=(int const& rhs) { return operator=(XmlRpcValue(rhs)); } //! Assign a double to this XmlRpcValue. XmlRpcValue& operator=(double const& rhs) { return operator=(XmlRpcValue(rhs)); } //! Assign a string to this XmlRpcValue. XmlRpcValue& operator=(const char* rhs) { return operator=(XmlRpcValue(std::string(rhs))); } //! Tests two XmlRpcValues for equality bool operator==(XmlRpcValue const& other) const; //! Tests two XmlRpcValues for inequality bool operator!=(XmlRpcValue const& other) const; //! Treat an XmlRpcValue as a bool. //! Throws XmlRpcException if the value is initialized to //! a type that is not TypeBoolean. operator bool&() { assertType(TypeBoolean); return _value.asBool; } operator bool() const { assertType(TypeBoolean); return _value.asBool; } //! Treat an XmlRpcValue as an int. //! Throws XmlRpcException if the value is initialized to //! a type that is not TypeInt. operator int&() { assertType(TypeInt); return _value.asInt; } operator int() const { assertType(TypeInt); return _value.asInt; } operator unsigned int&() { assertType(TypeUnsigned); return _value.asUnsigned; } operator unsigned int() const { assertType(TypeUnsigned); return _value.asUnsigned; } operator long long&() { assertType(TypeLongLong); return _value.asLongLong; } operator long long() const { assertType(TypeLongLong); return _value.asLongLong; } //! Treat an XmlRpcValue as a double. //! Throws XmlRpcException if the value is initialized to //! a type that is not TypeDouble. operator double&() { assertType(TypeDouble); return _value.asDouble; } operator double() const { assertType(TypeDouble); return _value.asDouble; } //! Treat an XmlRpcValue as a string. //! Throws XmlRpcException if the value is initialized to //! a type that is not TypeString. operator std::string&() { assertType(TypeString); return *_value.asString; } operator std::string const&() const { assertType(TypeString); return *_value.asString; } //! Access the BinaryData value. //! Throws XmlRpcException if the value is initialized to //! a type that is not TypeBase64. operator BinaryData&() { assertType(TypeBase64); return *_value.asBinary; } operator BinaryData const&() const { assertType(TypeBase64); return *_value.asBinary; } //! Access the DateTime value. //! Throws XmlRpcException if the value is initialized to //! a type that is not TypeDateTime. operator struct tm&() { assertType(TypeDateTime); return *_value.asTime; } operator struct tm const&() const { assertType(TypeDateTime); return *_value.asTime; } //! Const array value accessor. //! Access the ith value of the array. //! Throws XmlRpcException if the value is not an array or if the index i is //! not a valid index for the array. XmlRpcValue const& operator[](int i) const { assertArray(i+1); return _value.asArray->at(i); } //! Array value accessor. //! Access the ith value of the array, growing the array if necessary. //! Throws XmlRpcException if the value is not an array. XmlRpcValue& operator[](int i) { assertArray(i+1); return _value.asArray->at(i); } //! Struct entry accessor. //! Returns the value associated with the given entry, creating one if necessary. XmlRpcValue& operator[](std::string const& k) { assertStruct(); return (*_value.asStruct)[k]; } //! Struct entry accessor. //! Returns the value associated with the given entry, creating one if necessary. XmlRpcValue& operator[](const char* k) { assertStruct(); std::string s(k); return (*_value.asStruct)[s]; } //! Access the struct value map. //! Can be used to iterate over the entries in the map to find all defined entries. operator ValueStruct const&() { assertStruct(); return *_value.asStruct; } operator ValueArray const&() const { assertType(TypeArray); return *_value.asArray; } // Accessors //! Return true if the value has been set to something. bool valid() const { return _type != TypeInvalid; } //! Return the type of the value stored. \see Type. Type const &getType() const { return _type; } //! Return the size for string, base64, array, and struct values. int size() const; //! Specify the size for array values. Array values will grow beyond this size if needed. void setSize(int size) { assertArray(size); } //! Check for the existence of a struct member by name. bool hasMember(const std::string& name) const; //! Decode xml. Destroys any existing value. bool fromXml(std::string const& valueXml, int* offset); //! Encode the Value in xml std::string toXml() const; //! Write the value (no xml encoding) std::ostream& write(std::ostream& os) const; // Formatting //! Return the format used to write double values. static std::string const& getDoubleFormat() { return _doubleFormat; } //! Specify the format used to write double values. static void setDoubleFormat(const char* f) { _doubleFormat = f; } protected: // Clean up void invalidate(); // Type checking. Non-const versions coerce to the desired type if currently un-typed. void assertType(Type t) const; void assertType(Type t); void assertArray(int size) const; void assertArray(int size); void assertStruct(); // XML decoding bool boolFromXml(std::string const& valueXml, int* offset); bool intFromXml(std::string const& valueXml, int* offset); bool doubleFromXml(std::string const& valueXml, int* offset); bool stringFromXml(std::string const& valueXml, int* offset); bool timeFromXml(std::string const& valueXml, int* offset); bool binaryFromXml(std::string const& valueXml, int* offset); bool arrayFromXml(std::string const& valueXml, int* offset); bool structFromXml(std::string const& valueXml, int* offset); // XML encoding std::string nilToXml() const; std::string boolToXml() const; std::string intToXml() const; std::string doubleToXml() const; std::string stringToXml() const; std::string timeToXml() const; std::string binaryToXml() const; std::string arrayToXml() const; std::string structToXml() const; // Format strings static std::string _doubleFormat; // Type tag and values Type _type; // At some point I will split off Arrays and Structs into // separate ref-counted objects for more efficient copying. union { bool asBool; int asInt; unsigned int asUnsigned; long long asLongLong; double asDouble; struct tm* asTime; std::string* asString; BinaryData* asBinary; ValueArray* asArray; ValueStruct* asStruct; } _value; }; } // namespace XmlRpc std::ostream& operator<<(std::ostream& os, XmlRpc::XmlRpcValue& v); #endif // _XMLRPCVALUE_H_ flamp-2.2.12/src/xmlrpcpp/XmlRpcDispatch.cpp0000664000175000017500000001527414463050061015655 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include "XmlRpcDispatch.h" #include "XmlRpcSource.h" #include "XmlRpcUtil.h" #include #include #if defined(__FreeBSD__) || defined(__OpenBSD__) # ifdef USE_FTIME # include # endif #else # include #endif // __FreeBSD__ #if defined(_WINDOWS) # include # define USE_FTIME # if defined(_MSC_VER) # define timeb _timeb # define ftime _ftime # endif #else # include #endif // _WINDOWS using namespace XmlRpc; XmlRpcDispatch::XmlRpcDispatch() { _endTime = -1.0; _doClear = false; _inWork = false; } XmlRpcDispatch::~XmlRpcDispatch() { } // Monitor this source for the specified events and call its event handler // when the event occurs void XmlRpcDispatch::addSource(XmlRpcSource* source, unsigned mask) { _sources.push_back(MonitoredSource(source, mask)); } // Stop monitoring this source. Does not close the source. void XmlRpcDispatch::removeSource(XmlRpcSource* source) { for (SourceList::iterator it=_sources.begin(); it!=_sources.end(); ++it) if (it->getSource() == source) { _sources.erase(it); break; } } // Modify the types of events to watch for on this source void XmlRpcDispatch::setSourceEvents(XmlRpcSource* source, unsigned eventMask) { for (SourceList::iterator it=_sources.begin(); it!=_sources.end(); ++it) if (it->getSource() == source) { it->getMask() = eventMask; break; } } // Watch current set of sources and process events void XmlRpcDispatch::work(double timeoutSeconds) { // Compute end time double timeNow = getTime(); _endTime = (timeoutSeconds < 0.0) ? -1.0 : (timeNow + timeoutSeconds); _doClear = false; _inWork = true; // Only work while there is something to monitor while (_sources.size() > 0) { // Wait for and dispatch events if ( ! waitForAndProcessEvents(timeoutSeconds)) { _inWork = false; return; } // Check whether to clear all sources if (_doClear) { SourceList sourcesToClose; _sources.swap(sourcesToClose); for (SourceList::iterator it=sourcesToClose.begin(); it!=sourcesToClose.end(); ++it) { XmlRpcSource *src = it->getSource(); src->close(); } _doClear = false; } // Check whether end time has passed or exit has been called if (_endTime == 0.0) // Exit { break; } else if (_endTime > 0.0) // Check for timeout { double t = getTime(); if (t > _endTime) break; // Decrement timeout by elapsed time timeoutSeconds -= (t - timeNow); if (timeoutSeconds < 0.0) timeoutSeconds = 0.0; // Shouldn't happen but its fp math... timeNow = t; } } _inWork = false; } // Exit from work routine. Presumably this will be called from // one of the source event handlers. void XmlRpcDispatch::exit() { _endTime = 0.0; // Return from work asap } // Clear all sources from the monitored sources list void XmlRpcDispatch::clear() { if (_inWork) { _doClear = true; // Finish reporting current events before clearing } else { SourceList sourcesToClose; _sources.swap(sourcesToClose); for (SourceList::iterator it=sourcesToClose.begin(); it!=sourcesToClose.end(); ++it) it->getSource()->close(); } } // Time utility- return time in seconds double XmlRpcDispatch::getTime() { #ifdef USE_FTIME struct timeb tbuff; ftime(&tbuff); return ((double) tbuff.time + ((double)tbuff.millitm / 1000.0) + ((double) tbuff.timezone * 60)); #else struct timeval tv; struct timezone tz; gettimeofday(&tv, &tz); return (tv.tv_sec + tv.tv_usec / 1000000.0); #endif /* USE_FTIME */ } // Wait for I/O on any source, timeout, or interrupt signal. bool XmlRpcDispatch::waitForAndProcessEvents(double timeoutSeconds) { // Construct the sets of descriptors we are interested in fd_set inFd, outFd, excFd; FD_ZERO(&inFd); FD_ZERO(&outFd); FD_ZERO(&excFd); XmlRpcSocket::Socket maxFd = 0; for (SourceList::iterator it=_sources.begin(); it!=_sources.end(); ++it) { XmlRpcSocket::Socket fd = it->getSource()->getfd(); if (it->getMask() & ReadableEvent) FD_SET(fd, &inFd); if (it->getMask() & WritableEvent) FD_SET(fd, &outFd); if (it->getMask() & Exception) FD_SET(fd, &excFd); if (it->getMask() && fd > maxFd) maxFd = fd; } // Check for events int nEvents; if (_endTime < 0.0) { nEvents = select(int(maxFd+1), &inFd, &outFd, &excFd, NULL); } else { struct timeval tv; tv.tv_sec = (int)floor(timeoutSeconds); tv.tv_usec = ((int)floor(1000000.0 * (timeoutSeconds-floor(timeoutSeconds)))) % 1000000; nEvents = select(int(maxFd+1), &inFd, &outFd, &excFd, &tv); } if (nEvents < 0 && errno != EINTR) { XmlRpcUtil::error("Error in XmlRpcDispatch::work: error in select (%d).", nEvents); return false; } // Process events. Copy source list to avoid invalidating iterator by removing sources. SourceList s(_sources); for (SourceList::iterator it=s.begin(); it != s.end(); ++it) { XmlRpcSource* src = it->getSource(); XmlRpcSocket::Socket fd = src->getfd(); if (fd <= maxFd) { // handleEvent is called once per event type signalled unsigned newMask = 0; int nset = 0; if (FD_ISSET(fd, &inFd)) { newMask |= src->handleEvent(ReadableEvent); ++nset; } if (FD_ISSET(fd, &outFd)) { newMask |= src->handleEvent(WritableEvent); ++nset; } if (FD_ISSET(fd, &excFd)) { newMask |= src->handleEvent(Exception); ++nset; } // Some event occurred if (nset) { // This bit is not terribly efficient if many connections are active... if (newMask) { setSourceEvents(src, newMask); } else // Stop monitoring this one { removeSource(src); if ( ! src->getKeepOpen()) src->close(); } } } } return true; } flamp-2.2.12/src/xmlrpcpp/XmlRpcServer.cpp0000664000175000017500000003451114507650001015356 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include "XmlRpcServer.h" #include "XmlRpcServerConnection.h" #include "XmlRpcServerMethod.h" #include "XmlRpcSocket.h" #include "XmlRpcUtil.h" #include "XmlRpcException.h" #include "XmlRpc.h" #include using namespace XmlRpc; std::string XmlRpc::request_str = ""; std::string XmlRpc::client_id = ""; // Static data const char XmlRpcServer::METHODNAME_TAG[] = "methodName"; const char XmlRpcServer::PARAMS_TAG[] = "params"; const char XmlRpcServer::PARAM_TAG[] = "param"; const std::string XmlRpcServer::METHODNAME = "methodName"; const std::string XmlRpcServer::PARAMS = "params"; const std::string XmlRpcServer::FAULTCODE = "faultCode"; const std::string XmlRpcServer::FAULTSTRING = "faultString"; XmlRpcServer::XmlRpcServer() { _introspectionEnabled = false; _listMethods = 0; _methodHelp = 0; } XmlRpcServer::~XmlRpcServer() { this->shutdown(); _methods.clear(); delete _listMethods; delete _methodHelp; } // Add a command to the RPC server void XmlRpcServer::addMethod(XmlRpcServerMethod* method) { _methods[method->name()] = method; } // Remove a command from the RPC server void XmlRpcServer::removeMethod(XmlRpcServerMethod* method) { MethodMap::iterator i = _methods.find(method->name()); if (i != _methods.end()) _methods.erase(i); } // Remove a command from the RPC server by name void XmlRpcServer::removeMethod(const std::string& methodName) { MethodMap::iterator i = _methods.find(methodName); if (i != _methods.end()) _methods.erase(i); } // Look up a method by name XmlRpcServerMethod* XmlRpcServer::findMethod(const std::string& name) const { MethodMap::const_iterator i = _methods.find(name); if (i == _methods.end()) return 0; return i->second; } // Create a socket, bind to the specified port, and // set it in listen mode to make it available for clients. bool XmlRpcServer::bindAndListen(int port, int backlog /*= 5*/) { XmlRpcSocket::Socket fd = XmlRpcSocket::socket(); if (XmlRpcSocket::Invalid == fd) { XmlRpcUtil::error("XmlRpcServer::bindAndListen: Could not create socket (%s).", XmlRpcSocket::getErrorMsg().c_str()); return false; } this->setfd(fd); // Don't block on reads/writes if ( ! XmlRpcSocket::setNonBlocking(fd)) { this->close(); XmlRpcUtil::error("XmlRpcServer::bindAndListen: Could not set socket to non-blocking input mode (%s).", XmlRpcSocket::getErrorMsg().c_str()); return false; } // Allow this port to be re-bound immediately so server re-starts are not delayed if ( ! XmlRpcSocket::setReuseAddr(fd)) { this->close(); XmlRpcUtil::error("XmlRpcServer::bindAndListen: Could not set SO_REUSEADDR socket option (%s).", XmlRpcSocket::getErrorMsg().c_str()); return false; } // Bind to the specified port on the default interface if ( ! XmlRpcSocket::bind(fd, port)) { this->close(); XmlRpcUtil::error("XmlRpcServer::bindAndListen: Could not bind to specified port (%s).", XmlRpcSocket::getErrorMsg().c_str()); return false; } // Set in listening mode if ( ! XmlRpcSocket::listen(fd, backlog)) { this->close(); XmlRpcUtil::error("XmlRpcServer::bindAndListen: Could not set socket in listening mode (%s).", XmlRpcSocket::getErrorMsg().c_str()); return false; } XmlRpcUtil::log(2, "XmlRpcServer::bindAndListen: server listening on port %d fd %d", port, fd); // Notify the dispatcher to listen on this source when we are in work() _disp.addSource(this, XmlRpcDispatch::ReadableEvent); return true; } // Get port number that this server is listening on int XmlRpcServer::getPort(void) const { return XmlRpcSocket::getPort(getfd()); } // Process client requests for the specified time (in seconds) void XmlRpcServer::work(double timeSeconds) { XmlRpcUtil::log(2, "XmlRpcServer::work: waiting for a connection"); _disp.work(timeSeconds); } // Handle input on the server socket by accepting the connection // and reading the rpc request. unsigned XmlRpcServer::handleEvent(unsigned mask) { acceptConnection(); return XmlRpcDispatch::ReadableEvent; // Continue to monitor this fd } // Accept a client connection request and create a connection to // handle method calls from the client. void XmlRpcServer::acceptConnection() { XmlRpcSocket::Socket s = XmlRpcSocket::accept(this->getfd()); XmlRpcUtil::log(2, "XmlRpcServer::acceptConnection: socket %d", s); if (XmlRpcSocket::Invalid == s) { //this->close(); XmlRpcUtil::error("XmlRpcServer::acceptConnection: Could not accept connection (%s).", XmlRpcSocket::getErrorMsg().c_str()); } else if ( ! XmlRpcSocket::setNonBlocking(s)) { XmlRpcSocket::close(s); XmlRpcUtil::error("XmlRpcServer::acceptConnection: Could not set socket to non-blocking input mode (%s).", XmlRpcSocket::getErrorMsg().c_str()); } else // Notify the dispatcher to listen for input on this source when we are in work() { XmlRpcUtil::log(2, "XmlRpcServer::acceptConnection: creating a connection"); XmlRpcServerConnection* c = this->createConnection(s); if (c) this->dispatchConnection(c); } } // Create a new connection object for processing requests from a specific client. XmlRpcServerConnection* XmlRpcServer::createConnection(XmlRpcSocket::Socket s) { // Specify that the connection object be deleted when it is closed return new XmlRpcServerConnection(s, this, true); } // Hand off a new connection to a dispatcher void XmlRpcServer::dispatchConnection(XmlRpcServerConnection* sc) { _disp.addSource(sc, XmlRpcDispatch::ReadableEvent); } // Remove a connection. Called by the connection when it closes down. void XmlRpcServer::removeConnection(XmlRpcServerConnection* sc) { _disp.removeSource(sc); } // Stop processing client requests void XmlRpcServer::exit() { _disp.exit(); } // Close the server socket file descriptor and stop monitoring connections void XmlRpcServer::shutdown() { // This closes and destroys all connections as well as closing this socket _disp.clear(); } // Introspection support static const std::string LIST_METHODS("system.listMethods"); static const std::string METHOD_HELP("system.methodHelp"); static const std::string MULTICALL("system.multicall"); // List all methods available on a server class ListMethods : public XmlRpcServerMethod { public: ListMethods(XmlRpcServer* s) : XmlRpcServerMethod(LIST_METHODS, s) {} void execute(XmlRpcValue& params, XmlRpcValue& result) { _server->listMethods(result); } std::string help() { return std::string("List all methods available on a server as an array of strings"); } }; // Retrieve the help string for a named method class MethodHelp : public XmlRpcServerMethod { public: MethodHelp(XmlRpcServer* s) : XmlRpcServerMethod(METHOD_HELP, s) {} void execute(XmlRpcValue& params, XmlRpcValue& result) { if (params[0].getType() != XmlRpcValue::TypeString) throw XmlRpcException(METHOD_HELP + ": Invalid argument type"); XmlRpcServerMethod* m = _server->findMethod(params[0]); if ( ! m) throw XmlRpcException(METHOD_HELP + ": Unknown method name"); result = m->help(); } std::string help() { return std::string("Retrieve the help string for a named method"); } }; // Specify whether introspection is enabled or not. Default is enabled. void XmlRpcServer::enableIntrospection(bool enabled) { if (_introspectionEnabled == enabled) return; _introspectionEnabled = enabled; if (enabled) { if ( ! _listMethods) { _listMethods = new ListMethods(this); _methodHelp = new MethodHelp(this); } else { addMethod(_listMethods); addMethod(_methodHelp); } } else { removeMethod(LIST_METHODS); removeMethod(METHOD_HELP); } } void XmlRpcServer::listMethods(XmlRpcValue& result) { int i = 0; result.setSize(int(_methods.size())+1); for (MethodMap::iterator it=_methods.begin(); it != _methods.end(); ++it) result[i++] = it->first; // Multicall support is built into XmlRpcServer::executeRequest result[i] = MULTICALL; } // Parse the request, run the method, generate a response string. std::string XmlRpcServer::executeRequest(std::string const& request) { XmlRpcValue params, resultValue; std::string methodName = parseRequest(request, params); XmlRpcUtil::log(2, "XmlRpcServer::executeRequest: server calling method '%s'", methodName.c_str()); std::string response; try { if ( ! executeMethod(methodName, params, resultValue) && ! executeMulticall(methodName, params, resultValue)) response = generateFaultResponse(methodName + ": unknown method name"); else response = generateResponse(resultValue.toXml()); } catch (const XmlRpcException& fault) { XmlRpcUtil::log(2, "XmlRpcServer::executeRequest: fault %s.", fault.getMessage().c_str()); response = generateFaultResponse(fault.getMessage(), fault.getCode()); } return response; } // Parse the method name and the argument values from the request. static std::string id_str = "execute(params, result); // Ensure a valid result value if ( ! result.valid()) result = std::string(); return true; } // Execute multiple calls and return the results in an array. bool XmlRpcServer::executeMulticall(const std::string& methodName, XmlRpcValue& params, XmlRpcValue& result) { if (methodName != MULTICALL) return false; // There ought to be 1 parameter, an array of structs if (params.size() != 1 || params[0].getType() != XmlRpcValue::TypeArray) throw XmlRpcException(MULTICALL + ": Invalid argument (expected an array)"); int nc = params[0].size(); result.setSize(nc); for (int i=0; i\r\n" "\r\n\t"; const char RESPONSE_2[] = "\r\n\r\n"; std::string body = RESPONSE_1 + resultXml + RESPONSE_2; std::string header = generateHeader(body); std::string response = header + body; XmlRpcUtil::log(5, "XmlRpcServer::generateResponse:\n%s\n", response.c_str()); return response; } // Prepend http headers std::string XmlRpcServer::generateHeader(std::string const& body) { std::string header = "HTTP/1.1 200 OK\r\n" "Server: "; header += XMLRPC_VERSION; header += "\r\n" "Content-Type: text/xml\r\n" "Content-length: "; char buffLen[40]; sprintf(buffLen,"%d\r\n\r\n", static_cast(body.size())); return header + buffLen; } std::string XmlRpcServer::generateFaultResponse(std::string const& errorMsg, int errorCode) { const char RESPONSE_1[] = "\r\n" "\r\n\t"; const char RESPONSE_2[] = "\r\n\r\n"; XmlRpcValue faultStruct; faultStruct[FAULTCODE] = errorCode; faultStruct[FAULTSTRING] = errorMsg; std::string body = RESPONSE_1 + faultStruct.toXml() + RESPONSE_2; std::string header = generateHeader(body); return header + body; } flamp-2.2.12/src/xmlrpcpp/XmlRpcServerMethod.h0000644000175000017500000000353514463050061016165 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _XMLRPCSERVERMETHOD_H_ #define _XMLRPCSERVERMETHOD_H_ #if defined(_MSC_VER) # pragma warning(disable:4786) // identifier was truncated in debug info #endif #include namespace XmlRpc { // Representation of a parameter or result value class XmlRpcValue; // The XmlRpcServer processes client requests to call RPCs class XmlRpcServer; //! Abstract class representing a single RPC method class XmlRpcServerMethod { public: //! Constructor XmlRpcServerMethod(std::string const& name, XmlRpcServer* server = 0); //! Destructor virtual ~XmlRpcServerMethod(); //! Returns the name of the method std::string& name() { return _name; } //! Execute the method. Subclasses must provide a definition for this method. virtual void execute(XmlRpcValue& params, XmlRpcValue& result) = 0; //! Returns a help string for the method. //! Subclasses should define this method if introspection is being used. virtual std::string help() { return std::string(); } protected: std::string _name; XmlRpcServer* _server; }; } // namespace XmlRpc #endif // _XMLRPCSERVERMETHOD_H_ flamp-2.2.12/src/xmlrpcpp/XmlRpcDispatch.h0000644000175000017500000000646214463050061015317 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _XMLRPCDISPATCH_H_ #define _XMLRPCDISPATCH_H_ #if defined(_MSC_VER) # pragma warning(disable:4786) // identifier was truncated in debug info #endif #include namespace XmlRpc { // An RPC source represents a file descriptor to monitor class XmlRpcSource; //! An object which monitors file descriptors for events and performs //! callbacks when interesting events happen. class XmlRpcDispatch { public: //! Constructor XmlRpcDispatch(); ~XmlRpcDispatch(); //! Values indicating the type of events a source is interested in enum EventType { ReadableEvent = 1, //!< data available to read WritableEvent = 2, //!< connected/data can be written without blocking Exception = 4 //!< uh oh }; //! Monitor this source for the event types specified by the event mask //! and call its event handler when any of the events occur. //! @param source The source to monitor //! @param eventMask Which event types to watch for. \see EventType void addSource(XmlRpcSource* source, unsigned eventMask); //! Stop monitoring this source. //! @param source The source to stop monitoring //! The source socket is not closed. void removeSource(XmlRpcSource* source); //! Modify the types of events to watch for on this source void setSourceEvents(XmlRpcSource* source, unsigned eventMask); //! Watch current set of sources and process events for the specified //! duration (in seconds, -1 implies wait forever, or until exit is called) void work(double timeSeconds); //! Exit from work routine void exit(); //! Clear all sources from the monitored sources list. Sources are closed. void clear(); protected: //! Wait for I/O on any source, timeout, or interrupt signal. bool waitForAndProcessEvents(double timeoutSeconds); //! Returns current time in seconds since something double getTime(); // A source to monitor and what to monitor it for struct MonitoredSource { MonitoredSource(XmlRpcSource* src, unsigned mask) : _src(src), _mask(mask) {} XmlRpcSource* getSource() const { return _src; } unsigned& getMask() { return _mask; } XmlRpcSource* _src; unsigned _mask; }; // A list of sources to monitor typedef std::vector< MonitoredSource > SourceList; // Sources being monitored SourceList _sources; // When work should stop (-1 implies wait forever, or until exit is called) double _endTime; bool _doClear; bool _inWork; }; } // namespace XmlRpc #endif // _XMLRPCDISPATCH_H_ flamp-2.2.12/src/xmlrpcpp/XmlRpc.h0000664000175000017500000000577614507650001013647 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _XMLRPC_H_ #define _XMLRPC_H_ #if defined(_MSC_VER) # pragma warning(disable:4786) // identifier was truncated in debug info #endif #include #include "XmlRpcClient.h" #include "XmlRpcException.h" #include "XmlRpcServer.h" #include "XmlRpcServerMethod.h" #include "XmlRpcValue.h" #include "XmlRpcUtil.h" namespace XmlRpc { //! An interface allowing custom handling of error message reporting. class XmlRpcErrorHandler { public: XmlRpcErrorHandler() {} virtual ~XmlRpcErrorHandler() {} //! Returns a pointer to the currently installed error handling object. static XmlRpcErrorHandler* getErrorHandler() { return _errorHandler; } //! Specifies the error handler. static void setErrorHandler(XmlRpcErrorHandler* eh) { _errorHandler = eh; } //! Report an error. Custom error handlers should define this method. virtual void error(const char* msg) = 0; protected: static XmlRpcErrorHandler* _errorHandler; }; //! An interface allowing custom handling of informational message reporting. class XmlRpcLogHandler { public: XmlRpcLogHandler() {} virtual ~XmlRpcLogHandler() {} //! Returns a pointer to the currently installed message reporting object. static XmlRpcLogHandler* getLogHandler() { return _logHandler; } //! Specifies the message handler. static void setLogHandler(XmlRpcLogHandler* lh) { _logHandler = lh; } //! Returns the level of verbosity of informational messages. 0 is no output, 5 is very verbose. static int getVerbosity() { return _verbosity; } //! Specify the level of verbosity of informational messages. 0 is no output, 5 is very verbose. static void setVerbosity(int v) { _verbosity = v; } //! Output a message. Custom error handlers should define this method. virtual void log(int level, const char* msg) = 0; protected: static XmlRpcLogHandler* _logHandler; static int _verbosity; }; //! Returns log message verbosity. This is short for XmlRpcLogHandler::getVerbosity() int getVerbosity(); //! Sets log message verbosity. This is short for XmlRpcLogHandler::setVerbosity(level) void setVerbosity(int level); //! Version identifier extern const char XMLRPC_VERSION[]; } // namespace XmlRpc #endif // _XMLRPC_H_ flamp-2.2.12/src/xmlrpcpp/XmlRpcServer.h0000664000175000017500000001276514507650001015032 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _XMLRPCSERVER_H_ #define _XMLRPCSERVER_H_ #if defined(_MSC_VER) # pragma warning(disable:4786) // identifier was truncated in debug info #endif #include #include #include "XmlRpcDispatch.h" #include "XmlRpcSource.h" namespace XmlRpc { extern std::string request_str; extern std::string client_id; // An abstract class supporting XML RPC methods class XmlRpcServerMethod; // Class representing connections to specific clients class XmlRpcServerConnection; // Class representing argument and result values class XmlRpcValue; //! A class to handle XML RPC requests class XmlRpcServer : public XmlRpcSource { public: //! Create a server object. XmlRpcServer(); //! Destructor. virtual ~XmlRpcServer(); //! Specify whether introspection is enabled or not. Default is not enabled. void enableIntrospection(bool enabled=true); //! Add a command to the RPC server void addMethod(XmlRpcServerMethod* method); //! Remove a command from the RPC server void removeMethod(XmlRpcServerMethod* method); //! Remove a command from the RPC server by name void removeMethod(const std::string& methodName); //! Look up a method by name XmlRpcServerMethod* findMethod(const std::string& name) const; //! Create a socket, bind to the specified port, and //! set it in listen mode to make it available for clients. //! @param port The port to bind and listen on (zero to choose an arbitrary port) bool bindAndListen(int port, int backlog = 5); //! Get the port number this server is listening on. int getPort(void) const; //! Process client requests for the specified time (in seconds) void work(double timeSeconds); //! Temporarily stop processing client requests and exit the work() method. void exit(); //! Close all connections with clients and the socket file descriptor void shutdown(); //! Introspection support void listMethods(XmlRpcValue& result); //! Parses the request xml, runs the method, generates the response (header+xml). //! Returns a fault response if an error occurs during method execution. virtual std::string executeRequest(std::string const& request); // XmlRpcSource interface implementation //! Handle client connection requests virtual unsigned handleEvent(unsigned eventType); //! Remove a connection from the dispatcher virtual void removeConnection(XmlRpcServerConnection*); protected: // Static data static const char METHODNAME_TAG[]; static const char PARAMS_TAG[]; static const char PARAM_TAG[]; static const std::string SYSTEM_MULTICALL; static const std::string METHODNAME; static const std::string PARAMS; static const std::string FAULTCODE; static const std::string FAULTSTRING; //! Accept a client connection request virtual void acceptConnection(); //! Create a new connection object for processing requests from a specific client. //! If the client is not authorized to connect, close the socket and return 0. virtual XmlRpcServerConnection* createConnection(XmlRpcSocket::Socket socket); //! Hand off a new connection object to a dispatcher. virtual void dispatchConnection(XmlRpcServerConnection* sc); //! Parse the methodName and parameters from the request. //! @returns the methodName std::string parseRequest(std::string const& request, XmlRpcValue& params); //! Execute a named method with the specified params. bool executeMethod(const std::string& methodName, XmlRpcValue& params, XmlRpcValue& result); //! Execute multiple calls and return the results in an array. //! System.multicall implementation bool executeMulticall(const std::string& methodName, XmlRpcValue& params, XmlRpcValue& result); //! Construct a response from the result XML. std::string generateResponse(std::string const& resultXml); //! Construct a fault response. std::string generateFaultResponse(std::string const& msg, int errorCode = -1); //! Return the appropriate headers for the response. std::string generateHeader(std::string const& body); //! Whether the introspection API is supported by this server bool _introspectionEnabled; //! Event dispatcher XmlRpcDispatch _disp; //! Collection of methods. This could be a set keyed on method name if we wanted... typedef std::map< std::string, XmlRpcServerMethod* > MethodMap; //! Registered RPC methods. MethodMap _methods; //! List all registered RPC methods (only available if introspection is enabled) XmlRpcServerMethod* _listMethods; //! Return help string for a specified method (only available if introspection is enabled) XmlRpcServerMethod* _methodHelp; }; } // namespace XmlRpc #endif //_XMLRPCSERVER_H_ flamp-2.2.12/src/xmlrpcpp/XmlRpcUtil.h0000644000175000017500000000565314463050061014476 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _XMLRPCUTIL_H_ #define _XMLRPCUTIL_H_ #if defined(_MSC_VER) # pragma warning(disable:4786) // identifier was truncated in debug info #endif #include #if defined(_MSC_VER) # define snprintf _snprintf # define vsnprintf _vsnprintf # define strcasecmp _stricmp # define strncasecmp _strnicmp #elif defined(__BORLANDC__) # define strcasecmp stricmp # define strncasecmp strnicmp #endif namespace XmlRpc { //! Utilities for XML parsing, encoding, and decoding and message handlers. class XmlRpcUtil { public: //! Parses the specified tag. No attributes are parsed, no validation is done. //! Sets val to the contents between and , or an empty string if is found. //! Returns true if the tag is parsed. Updates offset to char after static bool parseTag(const char* tag, std::string const& xml, int* offset, std::string &val); //! Returns true if the tag is found and updates offset to the char after the tag. //! If the tag is of the form , emptyTag is set to true. static bool findTag(const char* tag, std::string const& xml, int* offset, bool* emptyTag); //! Returns true if the tag is found at the specified offset (modulo any whitespace) //! and updates offset to the char after the tag. If an empty tag is found (eg, //! ), true is returned, offset is updated to be after the close of the tag, and //! emptyTag is set to true. static bool nextTagIs(const char* tag, std::string const& xml, int* offset, bool* emptyTag); //! Passes over the next tag found at the specified offset is , //! offset is updated to be after the close of the tag. //! Will skip over all characters until < is seen. static bool nextTagIsEnd(const char* tag, std::string const& xml, int* offset); //! Convert raw text to encoded xml. static std::string xmlEncode(const std::string& raw); //! Convert encoded xml to raw text static std::string xmlDecode(const std::string& encoded); //! Dump messages somewhere static void log(int level, const char* fmt, ...); //! Dump error messages somewhere static void error(const char* fmt, ...); }; } // namespace XmlRpc #endif // _XMLRPCUTIL_H_ flamp-2.2.12/src/xmlrpcpp/XmlRpcServerConnection.cpp0000664000175000017500000001575314463050061017406 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include "XmlRpcServerConnection.h" #include "XmlRpcDispatch.h" #include "XmlRpcServer.h" #include "XmlRpcSocket.h" #include "XmlRpcUtil.h" #include #include #include #include using namespace XmlRpc; // The server delegates handling client requests to a serverConnection object. XmlRpcServerConnection::XmlRpcServerConnection(XmlRpcSocket::Socket fd, XmlRpcServer* server, bool deleteOnClose /*= false*/) : XmlRpcSource(fd, deleteOnClose) { XmlRpcUtil::log(2,"XmlRpcServerConnection: new socket %d.", fd); _server = server; _connectionState = READ_HEADER; _keepAlive = true; } XmlRpcServerConnection::~XmlRpcServerConnection() { XmlRpcUtil::log(4,"XmlRpcServerConnection dtor."); _server->removeConnection(this); } // Handle input on the server socket by accepting the connection // and reading the rpc request. Return true to continue to monitor // the socket for events, false to remove it from the dispatcher. unsigned XmlRpcServerConnection::handleEvent(unsigned /*eventType*/) { if (_connectionState == READ_HEADER) if ( ! readHeader()) return 0; if (_connectionState == READ_REQUEST) if ( ! readRequest()) return 0; if (_connectionState == WRITE_RESPONSE) if ( ! writeResponse()) return 0; return (_connectionState == WRITE_RESPONSE) ? XmlRpcDispatch::WritableEvent : XmlRpcDispatch::ReadableEvent; } bool XmlRpcServerConnection::readHeader() { // Read available data bool eof; if ( ! nbRead(_header, &eof)) { // Its only an error if we already have read some data if (_header.length() > 0) XmlRpcUtil::error("XmlRpcServerConnection::readHeader: error while reading header (%s).",XmlRpcSocket::getErrorMsg().c_str()); return false; } XmlRpcUtil::log(4, "XmlRpcServerConnection::readHeader: read %d bytes.", _header.length()); char *hp = (char*)_header.c_str(); // Start of header char *ep = hp + _header.length(); // End of string char *bp = 0; // Start of body char *lp = 0; // Start of content-length value char *kp = 0; // Start of connection value for (char *cp = hp; (bp == 0) && (cp < ep); ++cp) { if ((ep - cp > 16) && (strncasecmp(cp, "Content-length: ", 16) == 0)) lp = cp + 16; else if ((ep - cp > 12) && (strncasecmp(cp, "Connection: ", 12) == 0)) kp = cp + 12; else if ((ep - cp > 4) && (strncmp(cp, "\r\n\r\n", 4) == 0)) bp = cp + 4; else if ((ep - cp > 2) && (strncmp(cp, "\n\n", 2) == 0)) bp = cp + 2; } // If we haven't gotten the entire header yet, return (keep reading) if (bp == 0) { // EOF in the middle of a request is an error, otherwise its ok if (eof) { XmlRpcUtil::log(4, "XmlRpcServerConnection::readHeader: EOF"); if (_header.length() > 0) XmlRpcUtil::error("XmlRpcServerConnection::readHeader: EOF while reading header"); return false; // Either way we close the connection } return true; // Keep reading } // Decode content length if (lp == 0) { XmlRpcUtil::error("XmlRpcServerConnection::readHeader: No Content-length specified"); return false; // We could try to figure it out by parsing as we read, but for now... } _contentLength = atoi(lp); if (_contentLength <= 0) { XmlRpcUtil::error("XmlRpcServerConnection::readHeader: Invalid Content-length specified (%d).", _contentLength); return false; } XmlRpcUtil::log(3, "XmlRpcServerConnection::readHeader: specified content length is %d.", _contentLength); // Otherwise copy non-header data to request buffer and set state to read request. _request = bp; // Parse out any interesting bits from the header (HTTP version, connection) _keepAlive = true; if (_header.find("HTTP/1.0") != std::string::npos) { if (kp == 0 || strncasecmp(kp, "keep-alive", 10) != 0) _keepAlive = false; // Default for HTTP 1.0 is to close the connection } else { if (kp != 0 && strncasecmp(kp, "close", 5) == 0) _keepAlive = false; } XmlRpcUtil::log(3, "KeepAlive: %d", _keepAlive); _header = ""; _connectionState = READ_REQUEST; return true; // Continue monitoring this source } bool XmlRpcServerConnection::readRequest() { // If we dont have the entire request yet, read available data if (int(_request.length()) < _contentLength) { bool eof; if ( ! nbRead(_request, &eof)) { XmlRpcUtil::error("XmlRpcServerConnection::readRequest: read error (%s).",XmlRpcSocket::getErrorMsg().c_str()); return false; } // If we haven't gotten the entire request yet, return (keep reading) if (int(_request.length()) < _contentLength) { if (eof) { XmlRpcUtil::error("XmlRpcServerConnection::readRequest: EOF while reading request"); return false; // Either way we close the connection } return true; } } // Otherwise, parse and dispatch the request XmlRpcUtil::log(3, "XmlRpcServerConnection::readRequest read %d bytes.", _request.length()); //XmlRpcUtil::log(5, "XmlRpcServerConnection::readRequest:\n%s\n", _request.c_str()); _connectionState = WRITE_RESPONSE; return true; // Continue monitoring this source } bool XmlRpcServerConnection::writeResponse() { if (_response.length() == 0) { executeRequest(); _bytesWritten = 0; if (_response.length() == 0) { XmlRpcUtil::error("XmlRpcServerConnection::writeResponse: empty response."); return false; } } // Try to write the response if ( ! nbWrite(_response, &_bytesWritten)) { XmlRpcUtil::error("XmlRpcServerConnection::writeResponse: write error (%s).",XmlRpcSocket::getErrorMsg().c_str()); return false; } XmlRpcUtil::log(3, "XmlRpcServerConnection::writeResponse: wrote %d of %d bytes.", _bytesWritten, _response.length()); // Prepare to read the next request if (_bytesWritten == int(_response.length())) { _header = ""; _request = ""; _response = ""; _connectionState = READ_HEADER; } return _keepAlive; // Continue monitoring this source if true } //! Helper method to execute the client request void XmlRpcServerConnection::executeRequest() { _response = _server->executeRequest(_request); } flamp-2.2.12/src/xmlrpcpp/XmlRpcSource.h0000644000175000017500000000642214463050061015014 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _XMLRPCSOURCE_H_ #define _XMLRPCSOURCE_H_ #if defined(_MSC_VER) # pragma warning(disable:4786) // identifier was truncated in debug info #endif #include "XmlRpcSocket.h" namespace XmlRpc { //! Proxy for Ssl data to avoid including headers here. struct SslProxy; //! An RPC source represents a file descriptor to monitor class XmlRpcSource { public: //! Constructor //! @param fd The socket file descriptor to monitor. //! @param deleteOnClose If true, the object deletes itself when close is called. XmlRpcSource(XmlRpcSocket::Socket fd = XmlRpcSocket::Invalid, bool deleteOnClose = false); //! Destructor virtual ~XmlRpcSource(); //! Return the file descriptor being monitored. XmlRpcSocket::Socket getfd() const { return _fd; } //! Specify the file descriptor to monitor. void setfd(XmlRpcSocket::Socket fd) { _fd = fd; } //! Return whether the file descriptor should be kept open if it is no longer monitored. bool getKeepOpen() const { return _keepOpen; } //! Specify whether the file descriptor should be kept open if it is no longer monitored. void setKeepOpen(bool b=true) { _keepOpen = b; } //! Return whether ssl is enabled. bool getSslEnabled() const { return _sslEnabled; } //! Specify whether to enable ssl. Use getSslEnabled() to verify that Ssl is available. void setSslEnabled(bool b=true); //! Close the owned fd. If deleteOnClose was specified at construction, the object is deleted. virtual void close(); //! Return true to continue monitoring this source virtual unsigned handleEvent(unsigned eventType) = 0; protected: // Execution processing helpers virtual bool doConnect(); //! Read text from the source. Returns false on error. bool nbRead(std::string& s, bool *eof); //! Write text to the source. Returns false on error. bool nbWrite(std::string const& s, int *bytesSoFar); private: // Socket. This is an int for linux/unix, and unsigned on win32, and unsigned __int64 on win64. // Casting to int/long/unsigned on win64 is a bad idea. XmlRpcSocket::Socket _fd; // In the server, a new source (XmlRpcServerConnection) is created // for each connected client. When each connection is closed, the // corresponding source object is deleted. bool _deleteOnClose; // In the client, keep connections open if you intend to make multiple calls. bool _keepOpen; // Enable use of SSL bool _sslEnabled; // SSL data SslProxy *_ssl; }; } // namespace XmlRpc #endif //_XMLRPCSOURCE_H_ flamp-2.2.12/src/xmlrpcpp/XmlRpcException.h0000644000175000017500000000313114463050061015504 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _XMLRPCEXCEPTION_H_ #define _XMLRPCEXCEPTION_H_ #if defined(_MSC_VER) # pragma warning(disable:4786) // identifier was truncated in debug info #endif #ifndef MAKEDEPEND # include #endif namespace XmlRpc { //! A class representing an error. //! If server methods throw this exception, a fault response is returned //! to the client. class XmlRpcException { public: //! Constructor //! @param message A descriptive error message //! @param code An integer error code XmlRpcException(const std::string& message, int code=-1) : _message(message), _code(code) {} //! Return the error message. const std::string& getMessage() const { return _message; } //! Return the error code. int getCode() const { return _code; } private: std::string _message; int _code; }; } #endif // _XMLRPCEXCEPTION_H_ flamp-2.2.12/src/xmlrpcpp/XmlRpcClient.h0000664000175000017500000001301114507650001014763 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _XMLRPCCLIENT_H_ #define _XMLRPCCLIENT_H_ #if defined(_MSC_VER) # pragma warning(disable:4786) // identifier was truncated in debug info #endif #include #include "XmlRpcDispatch.h" #include "XmlRpcSource.h" namespace XmlRpc { extern std::string pname; extern void set_pname(std::string pn); // Arguments and results are represented by XmlRpcValues class XmlRpcValue; //! A class to send XML RPC requests to a server and return the results. class XmlRpcClient : public XmlRpcSource { public: //! Construct a client to connect to the server at the specified host:port address //! @param host The name of the remote machine hosting the server, eg "myserver.mycompany.com" //! @param port The port on the remote machine where the server is listening //! @param uri An optional string to be sent as the URI in the HTTP GET header //! Note that the host is not a URL, do not prepend "http://" or other protocol specifiers. XmlRpcClient(const char* host, int port, const char* uri=0); //! Construct a client to connect to the server at the specified host:port address including HTTP authentication //! @param host The name of the remote machine hosting the server //! @param port The port on the remote machine where the server is listening //! @param login The username passed to the server //! @param pass The password passed to the server //! @param uri An optional string to be sent as the URI in the HTTP GET header XmlRpcClient(const char* host, int port, const char* login, const char* password, const char* uri=0); //! Destructor virtual ~XmlRpcClient(); //! Execute the named procedure on the remote server. //! @param method The name of the remote procedure to execute //! @param params An array of the arguments for the method //! @param result The result value to be returned to the client //! @param timeoutSeconds Seconds to wait for a response (defaults to forever) //! @return true if the request was sent and a result received //! (although the result might be a fault). //! //! Currently this is a synchronous (blocking) implementation (execute //! does not return until it receives a response or an error). Use isFault() //! to determine whether the result is a fault response. bool execute(const char* method, XmlRpcValue const& params, XmlRpcValue& result, double timeoutSeconds = -1); //! Returns true if the result of the last execute() was a fault response. bool isFault() const { return _isFault; } //! Return the host name of the server const char* const host() const { return _host.c_str(); } //! Return the port int port() const { return _port; } //! Return the URI const char* const uri() const { return _uri.c_str(); } // XmlRpcSource interface implementation //! Close the connection virtual void close(); //! Handle server responses. Called by the event dispatcher during execute. //! @param eventType The type of event that occurred. //! @see XmlRpcDispatch::EventType virtual unsigned handleEvent(unsigned eventType); protected: // Execution processing helpers virtual bool doConnect(); virtual bool setupConnection(); virtual bool generateRequest(const char* method, XmlRpcValue const& params); virtual std::string generateHeader(std::string const& body); virtual bool writeRequest(); virtual bool readHeader(); virtual bool parseHeader(); virtual bool readResponse(); virtual bool parseResponse(XmlRpcValue& result); // Possible IO states for the connection enum ClientConnectionState { NO_CONNECTION, CONNECTING, WRITE_REQUEST, READ_HEADER, READ_RESPONSE, IDLE }; ClientConnectionState _connectionState; // Server location std::string _host; std::string _uri; int _port; // Login information for HTTP authentication std::string _login; std::string _password; // The xml-encoded request, http header of response, and response xml std::string _request; std::string _header; std::string _response; // Number of times the client has attempted to send the request int _sendAttempts; // Number of bytes of the request that have been written to the socket so far int _bytesWritten; // True if we are currently executing a request. If you want to multithread, // each thread should have its own client. bool _executing; // True if the server closed the connection bool _eof; // True if a fault response was returned by the server bool _isFault; // Number of bytes expected in the response body (parsed from response header) int _contentLength; // Event dispatcher XmlRpcDispatch _disp; }; // class XmlRpcClient } // namespace XmlRpc #endif // _XMLRPCCLIENT_H_ flamp-2.2.12/src/xmlrpcpp/XmlRpcSource.cpp0000664000175000017500000001112114463050061015341 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include "XmlRpcSource.h" #include "XmlRpcUtil.h" #if defined(_WINDOWS) # include # include #else extern "C" { # include # include } #endif #if USE_OPENSSL # include # include # include # include # include #endif namespace XmlRpc { struct SslProxy { #if USE_OPENSSL SSL_CTX* _ssl_ctx; SSL_METHOD* _ssl_meth; SSL* _ssl_ssl; #endif }; XmlRpcSource::XmlRpcSource(XmlRpcSocket::Socket fd /*= -1*/, bool deleteOnClose /*= false*/) : _fd(fd) , _deleteOnClose(deleteOnClose) , _keepOpen(false) , _sslEnabled(false) , _ssl(0) { } XmlRpcSource::~XmlRpcSource() { delete _ssl; } void XmlRpcSource::setSslEnabled(bool b /*=true*/) { #if USE_OPENSSL _sslEnabled = b; #endif } bool XmlRpcSource::doConnect() { #if USE_OPENSSL // Perform SSL if needed if (_sslEnabled) { _ssl = new SslProxy; SSLeay_add_ssl_algorithms(); _ssl->_ssl_meth = SSLv23_client_method(); SSL_load_error_strings(); _ssl->_ssl_ctx = SSL_CTX_new(_ssl->_ssl_meth); _ssl->_ssl_ssl = SSL_new(_ssl->_ssl_ctx); SSL_set_fd(_ssl->_ssl_ssl, _fd); return SSL_connect(_ssl->_ssl_ssl) == 1; } #endif return true; } // Read available text from the specified socket. Returns false on error. bool XmlRpcSource::nbRead(std::string& s, bool *eof) { const int READ_SIZE = 4096; // Number of bytes to attempt to read at a time char readBuf[READ_SIZE]; bool wouldBlock = false; *eof = false; while ( ! wouldBlock && ! *eof) { int n; #if USE_OPENSSL // Perform SSL if needed if (_ssl && _ssl->_ssl_ssl) { n = SSL_read(_ssl->_ssl_ssl, readBuf, READ_SIZE-1); } else #endif #if defined(_WINDOWS) n = recv(_fd, readBuf, READ_SIZE-1, 0); #else n = read(_fd, readBuf, READ_SIZE-1); #endif XmlRpcUtil::log(5, "XmlRpcSocket::nbRead: read/recv returned %d.", n); if (n > 0) { readBuf[n] = 0; s.append(readBuf, n); } else if (n == 0) { *eof = true; } else if (XmlRpcSocket::nonFatalError()) { wouldBlock = true; } else { return false; // Error } } return true; } // Write text to the socket. Returns false on error. bool XmlRpcSource::nbWrite(std::string const& s, int *bytesSoFar) { int nToWrite = int(s.length()) - *bytesSoFar; const char *sp = s.c_str() + *bytesSoFar; bool wouldBlock = false; while ( nToWrite > 0 && ! wouldBlock ) { int n; #if USE_OPENSSL // Perform SSL if needed if (_ssl && _ssl->_ssl_ssl) { n = SSL_write(_ssl->_ssl_ssl, sp, nToWrite); } else #endif #if defined(_WINDOWS) n = send(_fd, sp, nToWrite, 0); #else n = write(_fd, sp, nToWrite); #endif XmlRpcUtil::log(5, "XmlRpcSocket::nbWrite: send/write returned %d.", n); if (n > 0) { sp += n; *bytesSoFar += n; nToWrite -= n; } else if (XmlRpcSocket::nonFatalError()) { wouldBlock = true; } else { return false; // Error } } return true; } void XmlRpcSource::close() { #if USE_OPENSSL if (_ssl && _ssl->_ssl_ssl) { SSL_shutdown(_ssl->_ssl_ssl); // Should close be called here ? ... SSL_free(_ssl->_ssl_ssl); SSL_CTX_free(_ssl->_ssl_ctx); delete _ssl; _ssl = 0; } #endif if ( (int)_fd != -1) { XmlRpcUtil::log(2,"XmlRpcSource::close: closing socket %d.", _fd); XmlRpcSocket::close(_fd); _fd = -1; } if (_deleteOnClose) { XmlRpcUtil::log(2,"XmlRpcSource::close: deleting this"); _deleteOnClose = false; delete this; } } } // namespace XmlRpc flamp-2.2.12/Makefile.am0000644000175000017500000000043214511253041011645 00000000000000ACLOCAL_AMFLAGS = -I m4 SUBDIRS = src if HAVE_FLUID flgen: (cd src && $(MAKE) $(AM_MAKEFLAGS) $@) endif if DARWIN appbundle: (cd src && $(MAKE) $(AM_MAKEFLAGS) $@) endif if HAVE_NSIS nsisinst: (cd src && $(MAKE) $(AM_MAKEFLAGS) $@) endif #EXTRA_DIST = build-aux/config.rpath flamp-2.2.12/build-aux/0000775000175000017500000000000014607053767011611 500000000000000flamp-2.2.12/build-aux/config.sub0000755000175000017500000010646014463050125013502 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2015 Free Software Foundation, Inc. timestamp='2015-08-20' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | ba \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | e2k | epiphany \ | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | visium \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; leon|leon[3-9]) basic_machine=sparc-$basic_machine ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | ba-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | e2k-* | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | riscv32-* | riscv64-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | visium-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; asmjs) basic_machine=asmjs-unknown ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; leon-*|leon[3-9]-*) basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze*) basic_machine=microblaze-xilinx ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i686-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; moxiebox) basic_machine=moxie-unknown os=-moxiebox ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i686-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* | -cloudabi* | -sortix* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; c8051-*) os=-elf ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: flamp-2.2.12/build-aux/missing0000755000175000017500000001533014463050125013111 00000000000000#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2013-10-28.13; # UTC # Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: flamp-2.2.12/build-aux/install-sh0000755000175000017500000003546314463050125013527 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2014-09-12.12; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. tab=' ' nl=' ' IFS=" $tab$nl" # Set DOITPROG to "echo" to test this script. doit=${DOITPROG-} doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) is_target_a_directory=always dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done # We allow the use of options -d and -T together, by making -d # take the precedence; this is for compatibility with GNU install. if test -n "$dir_arg"; then if test -n "$dst_arg"; then echo "$0: target directory not allowed when installing a directory." >&2 exit 1 fi fi if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then if test $# -gt 1 || test "$is_target_a_directory" = always; then if test ! -d "$dst_arg"; then echo "$0: $dst_arg: Is not a directory." >&2 exit 1 fi fi fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) # $RANDOM is not portable (e.g. dash); use it when possible to # lower collision chance tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 # As "mkdir -p" follows symlinks and we work in /tmp possibly; so # create the $tmpdir first (and fail if unsuccessful) to make sure # that nobody tries to guess the $tmpdir name. if (umask $mkdir_umask && $mkdirprog $mkdir_mode "$tmpdir" && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. test_tmpdir="$tmpdir/a" ls_ld_tmpdir=`ls -ld "$test_tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac oIFS=$IFS IFS=/ set -f set fnord $dstdir shift set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: flamp-2.2.12/build-aux/depcomp0000755000175000017500000005601614463050125013075 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2013-05-30.07; # UTC # Copyright (C) 1999-2014 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: flamp-2.2.12/build-aux/compile0000755000175000017500000001624514463050125013076 00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-10-14.11; # UTC # Copyright (C) 1999-2014 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: flamp-2.2.12/build-aux/config.guess0000755000175000017500000012475314463050125014044 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2015 Free Software Foundation, Inc. timestamp='2015-08-20' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # # Please send patches to . me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_SYSTEM}" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval $set_cc_for_build cat <<-EOF > $dummy.c #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` ;; esac # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ /sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || \ echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; earmv*) arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` machine=${arch}${endian}-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # Determine ABI tags. case "${UNAME_MACHINE_ARCH}" in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}${abi}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; *:Sortix:*:*) echo ${UNAME_MACHINE}-unknown-sortix exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/lslpp ] ; then IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; e2k:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; openrisc*:Linux:*:*) echo or1k-unknown-linux-${LIBC} exit ;; or32:Linux:*:* | or1k*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-${LIBC} exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-${LIBC} exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown eval $set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub # that puts up a graphical alert prompting to install # developer tools. Any system running Mac OS X 10.7 or # later (Darwin 11 and later) is required to have a 64-bit # processor. This is not true of the ARM version of Darwin # that Apple uses in portable devices. UNAME_PROCESSOR=x86_64 fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; esac cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: flamp-2.2.12/scripts/0000775000175000017500000000000014607053767011406 500000000000000flamp-2.2.12/scripts/buildmxe.sh0000775000175000017500000000053214507650001013455 00000000000000#!/bin/sh ./configure \ $PKGCFG \ --host=i686-w64-mingw32.static \ --with-ptw32=$PREFIX/i686-w64-mingw32.static \ --enable-static \ PTW32_LIBS="-lpthread -lpcreposix -lpcre" \ FLTK_CONFIG=$PREFIX/bin/i686-w64-mingw32.static-fltk-config make $PREFIX/bin/i686-w64-mingw32.static-strip src/flamp.exe make nsisinst mv src/*setup*exe . flamp-2.2.12/scripts/mknsisinst.sh0000755000175000017500000000162114463050062014046 00000000000000#!/bin/sh ### Script to create a win32 installer file ### 20090510 Stelios Bounanos M0GLD, Dave Freese W1HKJ ### change for the target application flamp_name=flamp flamp_bin=flamp.exe if [ $# -ne 2 ]; then echo "Syntax: $0 data-dir build-dir" >&2 exit 1 fi if [ -z "$PACKAGE_TARNAME" ]; then echo "E: \$PACKAGE_TARNAME undefined" exit 1 fi PWD=`pwd` data="${PWD}/$1" build="${PWD}/$2" # more sanity checks for d in "$data" "$build"; do test -d "$d" && continue echo "E: ${d}: not a directory" >&2 exit 1 done if ! test -w "$build"; then echo "E: ${build} is not writeable" >&2 exit 1 fi set -e def="-Dflamp_NAME=$flamp_name -Dflamp_BINARY=$flamp_bin -Dflamp_VERSION=$PACKAGE_VERSION" $MAKENSIS -V2 -NOCD -D"INSTALLER_FILE=$INSTALLER_FILE" -D"LICENSE_FILE=$data/../COPYING" \ -D"SUPPORT_URL=$PACKAGE_HOME" -D"UPDATES_URL=$PACKAGE_DL" $def "$data/win32/fl_app.nsi" flamp-2.2.12/scripts/mkappbundle.sh0000775000175000017500000000600214507650001014144 00000000000000#!/bin/sh ### Script to create the .app structure for osx ### 20180201 David Freese W1HKJ if [ $# -ne 2 ]; then echo "Syntax: $0 data-dir build-dir" >&2 exit 1 fi upcase1() { sed 'h; s/\(^.\).*/\1/; y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/; G; s/\n.//' } function copy_libs() { list="$1" while test "x$list" != "x"; do change="$list" list="" for obj in $change; do for lib in `otool -L $obj | \ sed -n 's!^.*[[:space:]]\([^[:space:]]*\.dylib\).*$!\1!p' | \ grep -Ev '^/(usr/lib|System)'`; do libfn="`basename $lib`" if ! test -f "Frameworks/$libfn"; then cp "$lib" "Frameworks/$libfn" install_name_tool -id "@executable_path/../Frameworks/$libfn" "Frameworks/$libfn" list="$list Frameworks/$libfn" fi install_name_tool -change "$lib" "@executable_path/../Frameworks/$libfn" "$obj" done done done } function bundle() { appname="${binary}-${appversion}.app" cd "$build" echo "creating ${build}/$bundle_dir/$appname" $mkinstalldirs "$bundle_dir/$appname/Contents/MacOS" "$bundle_dir/$appname/Contents/Resources" cd "$bundle_dir" $INSTALL_PROGRAM "${build}/$binary" "$appname/Contents/MacOS" test "x$NOSTRIP" = "x" && ${STRIP:-strip} -S "$appname/Contents/MacOS/$binary" $INSTALL_DATA "$icon" "$appname/Contents/Resources" echo "APPL${signature}" > "$appname/Contents/PkgInfo" sed -e "s!%%IDENTIFIER%%!${identifier}!g; s!%%NAME%%!${name}!g;\ s!%%SIGNATURE%%!${signature}!g; s!%%BINARY%%!${binary}!g;\ s!%%VERSION%%!${version}!g; s!%%ICON%%!${icon##*/}!g;" < "$plist" > "$appname/Contents/Info.plist" if grep '%%[A-Z]*%%' "$appname/Contents/Info.plist"; then echo "E: unsubstituted variables in $appname/Contents/Info.plist" >&2 exit 1 fi $mkinstalldirs "$appname/Contents/Frameworks" cd "$appname/Contents" copy_libs "MacOS/$binary" } #======================================================================= if [ -z "$PACKAGE_TARNAME" ]; then echo "E: \$PACKAGE_TARNAME undefined" exit 1 fi PWD=`pwd` data="${PWD}/$1" build="${PWD}/$2" bundle_dir="$APPBUNDLE" # more sanity checks for d in "$data" "$build"; do test -d "$d" && continue echo "E: ${d}: not a directory" >&2 exit 1 done if ! test -w "$build"; then echo "E: ${build} is not writeable" >&2 exit 1 fi plist="${data}/mac/Info.plist.in" flamp_icon="${data}/mac/flamp.icns" for f in "$plist" "$flamp_icon"; do test -r "$f" && continue echo "E: ${f}: not readable" >&2 exit 1 done set -e identifier="com.w1hkj.$PACKAGE_TARNAME" name=$(echo "$PACKAGE_TARNAME" | upcase1) # we'll use the first four consonants as the signature signature="$(echo $PACKAGE_TARNAME | sed 's/[aeiouAEIOU]//g; s/\(^....\).*/\1/')" signature="$PACKAGE_TARNAME" binary="$PACKAGE_TARNAME" icon="$flamp_icon" version="${flamp_VERSION_MAJOR}.${flamp_VERSION_MINOR}${flamp_VERSION_PATCH}" appversion="$flamp_VERSION" bundle cd "$build" echo "creating disk image" echo " source: " $bundle_dir echo " target: " ${APPBUNDLE}.dmg hdiutil create -ov -srcfolder "$bundle_dir" -format UDZO -tgtimagekey zlib-level=9 "${APPBUNDLE}.dmg" flamp-2.2.12/scripts/builddist.sh0000775000175000017500000000061614542637736013655 00000000000000autoreconf ./configure \ $PKGCFG \ --host=i686-w64-mingw32.static \ --with-ptw32=$PREFIX/i686-w64-mingw32.static \ --enable-static \ PTW32_LIBS="-lpthread -lpcreposix -lpcre" \ FLTK_CONFIG=$PREFIX/bin/i686-w64-mingw32.static-fltk-config make $PREFIX/bin/i686-w64-mingw32.static-strip src/flamp.exe make nsisinst mv src/*setup*exe . make clean ./configure make distcheck make clean flamp-2.2.12/Makefile.in0000664000175000017500000006357514607053732011714 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/build.m4 \ $(top_srcdir)/m4/debug.m4 $(top_srcdir)/m4/fltk.m4 \ $(top_srcdir)/m4/funcs.m4 $(top_srcdir)/m4/macosx.m4 \ $(top_srcdir)/m4/np-compat.m4 $(top_srcdir)/m4/opt.m4 \ $(top_srcdir)/m4/pkg-config.m4 $(top_srcdir)/m4/static.m4 \ $(top_srcdir)/m4/win32.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir distdir-am dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in \ $(top_srcdir)/build-aux/compile \ $(top_srcdir)/build-aux/config.guess \ $(top_srcdir)/build-aux/config.sub \ $(top_srcdir)/build-aux/install-sh \ $(top_srcdir)/build-aux/missing AUTHORS COPYING ChangeLog \ INSTALL README build-aux/compile build-aux/config.guess \ build-aux/config.sub build-aux/depcomp build-aux/install-sh \ build-aux/missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip # Exists only to be overridden by the user if desired. AM_DISTCHECK_DVI_TARGET = dvi distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AC_CONFIG_ARGS = @AC_CONFIG_ARGS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BFD_CFLAGS = @BFD_CFLAGS@ BFD_LIBS = @BFD_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ EXTRA_LIBS = @EXTRA_LIBS@ FLAMP_BUILD_CPPFLAGS = @FLAMP_BUILD_CPPFLAGS@ FLAMP_BUILD_CXXFLAGS = @FLAMP_BUILD_CXXFLAGS@ FLAMP_BUILD_LDADD = @FLAMP_BUILD_LDADD@ FLAMP_BUILD_LDFLAGS = @FLAMP_BUILD_LDFLAGS@ FLAMP_VERSION = @FLAMP_VERSION@ FLAMP_VERSION_MAJOR = @FLAMP_VERSION_MAJOR@ FLAMP_VERSION_MINOR = @FLAMP_VERSION_MINOR@ FLAMP_VERSION_PATCH = @FLAMP_VERSION_PATCH@ FLTK_CFLAGS = @FLTK_CFLAGS@ FLTK_CONFIG = @FLTK_CONFIG@ FLTK_LIBS = @FLTK_LIBS@ FLUID = @FLUID@ FLXMLRPC_CFLAGS = @FLXMLRPC_CFLAGS@ FLXMLRPC_LIBS = @FLXMLRPC_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAC_UNIVERSAL_CFLAGS = @MAC_UNIVERSAL_CFLAGS@ MAC_UNIVERSAL_LDFLAGS = @MAC_UNIVERSAL_LDFLAGS@ MAKEINFO = @MAKEINFO@ MAKENSIS = @MAKENSIS@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ OPT_CFLAGS = @OPT_CFLAGS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTW32_CFLAGS = @PTW32_CFLAGS@ PTW32_LIBS = @PTW32_LIBS@ RDYNAMIC = @RDYNAMIC@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ X_CFLAGS = @X_CFLAGS@ X_LIBS = @X_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 SUBDIRS = src all: all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-zstd: distdir tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ *.tar.zst*) \ zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ dist-zstd distcheck distclean distclean-generic distclean-tags \ distcleancheck distdir distuninstallcheck dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-am uninstall uninstall-am .PRECIOUS: Makefile @HAVE_FLUID_TRUE@flgen: @HAVE_FLUID_TRUE@ (cd src && $(MAKE) $(AM_MAKEFLAGS) $@) @DARWIN_TRUE@appbundle: @DARWIN_TRUE@ (cd src && $(MAKE) $(AM_MAKEFLAGS) $@) @HAVE_NSIS_TRUE@nsisinst: @HAVE_NSIS_TRUE@ (cd src && $(MAKE) $(AM_MAKEFLAGS) $@) #EXTRA_DIST = build-aux/config.rpath # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: flamp-2.2.12/aclocal.m40000664000175000017500000014713614607050316011476 00000000000000# generated automatically by aclocal 1.16.5 -*- Autoconf -*- # Copyright (C) 1996-2021 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],, [m4_warning([this file was generated for autoconf 2.71. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 12 (pkg-config-0.29.2) dnl Copyright © 2004 Scott James Remnant . dnl Copyright © 2012-2015 Dan Nicholson dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 2 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, but dnl WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU dnl General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA dnl 02111-1307, USA. dnl dnl As a special exception to the GNU General Public License, if you dnl distribute this file as part of a program that contains a dnl configuration script generated by Autoconf, you may include it under dnl the same distribution terms that you use for the rest of that dnl program. dnl PKG_PREREQ(MIN-VERSION) dnl ----------------------- dnl Since: 0.29 dnl dnl Verify that the version of the pkg-config macros are at least dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's dnl installed version of pkg-config, this checks the developer's version dnl of pkg.m4 when generating configure. dnl dnl To ensure that this macro is defined, also add: dnl m4_ifndef([PKG_PREREQ], dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) dnl dnl See the "Since" comment for each macro you use to see what version dnl of the macros you require. m4_defun([PKG_PREREQ], [m4_define([PKG_MACROS_VERSION], [0.29.2]) m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) ])dnl PKG_PREREQ dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) dnl ---------------------------------- dnl Since: 0.16 dnl dnl Search for the pkg-config tool and set the PKG_CONFIG variable to dnl first found in the path. Checks that the version of pkg-config found dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is dnl used since that's the first version where most current features of dnl pkg-config existed. AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])dnl PKG_PROG_PKG_CONFIG dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl ------------------------------------------------------------------- dnl Since: 0.18 dnl dnl Check to see whether a particular set of modules exists. Similar to dnl PKG_CHECK_MODULES(), but does not set variables or print errors. dnl dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) dnl only at the first occurence in configure.ac, so if the first place dnl it's called might be skipped (such as if it is within an "if", you dnl have to call PKG_CHECK_EXISTS manually AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) dnl --------------------------------------------- dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting dnl pkg_failed based on the result. m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])dnl _PKG_CONFIG dnl _PKG_SHORT_ERRORS_SUPPORTED dnl --------------------------- dnl Internal check to see if pkg-config supports short errors. AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])dnl _PKG_SHORT_ERRORS_SUPPORTED dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], dnl [ACTION-IF-NOT-FOUND]) dnl -------------------------------------------------------------- dnl Since: 0.4.0 dnl dnl Note that if there is a possibility the first call to dnl PKG_CHECK_MODULES might not happen, you should be sure to include an dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $2]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])dnl PKG_CHECK_MODULES dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], dnl [ACTION-IF-NOT-FOUND]) dnl --------------------------------------------------------------------- dnl Since: 0.29 dnl dnl Checks for existence of MODULES and gathers its build flags with dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags dnl and VARIABLE-PREFIX_LIBS from --libs. dnl dnl Note that if there is a possibility the first call to dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to dnl include an explicit call to PKG_PROG_PKG_CONFIG in your dnl configure.ac. AC_DEFUN([PKG_CHECK_MODULES_STATIC], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl _save_PKG_CONFIG=$PKG_CONFIG PKG_CONFIG="$PKG_CONFIG --static" PKG_CHECK_MODULES($@) PKG_CONFIG=$_save_PKG_CONFIG[]dnl ])dnl PKG_CHECK_MODULES_STATIC dnl PKG_INSTALLDIR([DIRECTORY]) dnl ------------------------- dnl Since: 0.27 dnl dnl Substitutes the variable pkgconfigdir as the location where a module dnl should install pkg-config .pc files. By default the directory is dnl $libdir/pkgconfig, but the default can be changed by passing dnl DIRECTORY. The user can override through the --with-pkgconfigdir dnl parameter. AC_DEFUN([PKG_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([pkgconfigdir], [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, [with_pkgconfigdir=]pkg_default) AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ])dnl PKG_INSTALLDIR dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) dnl -------------------------------- dnl Since: 0.27 dnl dnl Substitutes the variable noarch_pkgconfigdir as the location where a dnl module should install arch-independent pkg-config .pc files. By dnl default the directory is $datadir/pkgconfig, but the default can be dnl changed by passing DIRECTORY. The user can override through the dnl --with-noarch-pkgconfigdir parameter. AC_DEFUN([PKG_NOARCH_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([noarch-pkgconfigdir], [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, [with_noarch_pkgconfigdir=]pkg_default) AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ])dnl PKG_NOARCH_INSTALLDIR dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl ------------------------------------------- dnl Since: 0.28 dnl dnl Retrieves the value of the pkg-config variable for the given module. AC_DEFUN([PKG_CHECK_VAR], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl _PKG_CONFIG([$1], [variable="][$3]["], [$2]) AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_IF([$1], [""], [$5], [$4])dnl ])dnl PKG_CHECK_VAR # Copyright (C) 2002-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.16.5], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.16.5])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. # TODO: see whether this extra hack can be removed once we start # requiring Autoconf 2.70 or later. AS_CASE([$CONFIG_FILES], [*\'*], [eval set x "$CONFIG_FILES"], [*], [set x $CONFIG_FILES]) shift # Used to flag and report bootstrapping failures. am_rc=0 for am_mf do # Strip MF so we end up with the name of the file. am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ || continue am_dirpart=`AS_DIRNAME(["$am_mf"])` am_filepart=`AS_BASENAME(["$am_mf"])` AM_RUN_LOG([cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles]) || am_rc=$? done if test $am_rc -ne 0; then AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments for automatic dependency tracking. If GNU make was not used, consider re-running the configure script with MAKE="gmake" (or whatever is necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).]) fi AS_UNSET([am_dirpart]) AS_UNSET([am_filepart]) AS_UNSET([am_mf]) AS_UNSET([am_rc]) rm -f conftest-deps.mk } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking is enabled. # This creates each '.Po' and '.Plo' makefile fragment that we'll need in # order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl m4_ifdef([_$0_ALREADY_INIT], [m4_fatal([$0 expanded multiple times ]m4_defn([_$0_ALREADY_INIT]))], [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) # Variables for tags utilities; see am/tags.am if test -z "$CTAGS"; then CTAGS=ctags fi AC_SUBST([CTAGS]) if test -z "$ETAGS"; then ETAGS=etags fi AC_SUBST([ETAGS]) if test -z "$CSCOPE"; then CSCOPE=cscope fi AC_SUBST([CSCOPE]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAKE_INCLUDE() # ----------------- # Check whether make has an 'include' directive that can support all # the idioms we need for our automatic dependency tracking code. AC_DEFUN([AM_MAKE_INCLUDE], [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out .PHONY: am__doit END am__include="#" am__quote= # BSD make does it like this. echo '.include "confinc.mk" # ignored' > confmf.BSD # Other make implementations (GNU, Solaris 10, AIX) do it like this. echo 'include confinc.mk # ignored' > confmf.GNU _am_result=no for s in GNU BSD; do AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) AS_CASE([$?:`cat confinc.out 2>/dev/null`], ['0:this is the am__doit target'], [AS_CASE([$s], [BSD], [am__include='.include' am__quote='"'], [am__include='include' am__quote=''])]) if test "$am__include" != "#"; then _am_result="yes ($s style)" break fi done rm -f confinc.* confmf.* AC_MSG_RESULT([${_am_result}]) AC_SUBST([am__include])]) AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/build.m4]) m4_include([m4/debug.m4]) m4_include([m4/fltk.m4]) m4_include([m4/funcs.m4]) m4_include([m4/macosx.m4]) m4_include([m4/np-compat.m4]) m4_include([m4/opt.m4]) m4_include([m4/pkg-config.m4]) m4_include([m4/static.m4]) m4_include([m4/win32.m4]) flamp-2.2.12/INSTALL0000664000175000017500000000323214507650001010647 00000000000000Installation Instructions for flamp ************************************ To compile flamp you will need: * A recent C++ compiler. The GNU C++ compilers in the 4.x series are known to work. * Version 1.3.4 or later of the Fast Light Tool Kit (FLTK), with its development library and headers. FLTK's multi-threading support is required. * The samplerate (a.k.a. secret rabbit code) library. * The PNG library. * The libxft library. You should read and follow the instructions for building on various OS platforms that are on the fldigi wiki: http://www.w1hkj.com/doku/doku.php?id=howtos The simplest way to compile this package on Linux is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. flamp-2.2.12/README0000644000175000017500000000060614463050060010476 00000000000000FLAMP is a management tool for transferring files using Amp-3.0 protocol. The latest version can always be found at: http://www.w1hkj.com/ Join the linuxham, NBEMSham or win-fldigi Yahoo group for support, news and updates on W1HKJ software: http://groups.yahoo.com/group/linuxham/join http://groups.yahoo.com/group/NBEMSham/join http://groups.yahoo.com/group/win-fldigi/join flamp-2.2.12/AUTHORS0000644000175000017500000000021514463050062010664 00000000000000AUTHOR: Dave Freese CALLSIGN: W1HKJ EMAIL: w1hkj@w1hkj.com Author can be contacted on the linuxham yahoo group EMAIL: linuxham@yahoo.com flamp-2.2.12/data/0000775000175000017500000000000014607053767010630 500000000000000flamp-2.2.12/data/flamp.desktop0000644000175000017500000000031014463050062013213 00000000000000[Desktop Entry] Name=flamp GenericName=Amateur Multicast Protocol Client/Server Comment=Amateur Radio Communications Exec=flamp Icon=flamp Terminal=false Type=Application Categories=Network;HamRadio; flamp-2.2.12/data/win32/0000775000175000017500000000000014607053767011572 500000000000000flamp-2.2.12/data/win32/fl_app.nsi0000644000175000017500000001310514463050062013445 00000000000000# -*- conf -*- # NSIS installer script based on example2.nsi from the nsis-2.44 distribution. # Copyright (c) 2009 Stelios Bounanos, M0GLD. # Copyright (c) 2009 Dave Freese, W1HKJ # substitute your application name for instances of FLAMP # Variables !define FLAMP_DESCRIPTION "${FLAMP_NAME} ${FLAMP_VERSION}" !define FLAMP_STRING "${FLAMP_NAME}-${FLAMP_VERSION}" !define PRODUCT_BINARY "${FLAMP_BINARY}" !define PRODUCT_NAME "${FLAMP_NAME}" !define PRODUCT_VERSION "${FLAMP_VERSION}" !define PRODUCT_STRING "${FLAMP_STRING}" !define PRODUCT_DESCRIPTION "${FLAMP_DESCRIPTION}" # Compression options SetCompressor /SOLID lzma # This function is called before displaying the first installer page. # It aborts the installation if the Windows version is too old. !include WinVer.nsh Function .onInit ${IfNot} ${AtLeastWin2000} MessageBox MB_ICONSTOP "Sorry, your Windows version is too old.$\n${PRODUCT_NAME} requires Windows 2000 or later." Abort ${EndIf} FunctionEnd # The name of the installer Name "${PRODUCT_DESCRIPTION}" # The file to write OutFile ${INSTALLER_FILE} # The default installation directory InstallDir $PROGRAMFILES\${PRODUCT_STRING} # Registry key to check for directory (so if you install again, it will # overwrite the old one automatically) !define INSTALL_DIR_REG_KEY SOFTWARE\${PRODUCT_STRING} InstallDirRegKey HKLM "${INSTALL_DIR_REG_KEY}" "Install_Dir" # Request application privileges for Windows Vista RequestExecutionLevel admin # License LicenseText "${PRODUCT_NAME} is distributed under the GNU GPL as detailed \ below. You must abide by the terms of this license if you modify or \ redistribute the program." "Continue" LicenseData "${LICENSE_FILE}" SubCaption 0 ": License Information" # Other options BrandingText " " InstProgressFlags smooth VIAddVersionKey ProductName "${PRODUCT_NAME}" VIAddVersionKey ProductVersion "${PRODUCT_VERSION}" VIAddVersionKey FileVersion "${PRODUCT_VERSION}" VIAddVersionKey FileDescription "${FLAMP_DESCRIPTION} installer" VIAddVersionKey LegalCopyright "${PRODUCT_NAME} developers" VIAddVersionKey OriginalFilename "${INSTALLER_FILE}" VIProductVersion "3.0.0.0" WindowIcon off XPStyle on # Installer pages Page license Page components Page directory Page instfiles UninstPage uninstConfirm UninstPage instfiles # Registry uninstall path !define REG_UNINSTALL_PATH Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_STRING} # This is a hidden section and is always selected. It writes the uninstall # registry keys and uninstaller binary. Section -install # Set output path to the installation directory. SetOutPath $INSTDIR # Write the installation paths into the registry WriteRegStr HKLM "${INSTALL_DIR_REG_KEY}" "Install_Dir" "$INSTDIR" # Write the uninstall keys for Windows WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "DisplayName" "${PRODUCT_DESCRIPTION}" WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "DisplayVersion" "${PRODUCT_VERSION}" WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "DisplayIcon" '"$INSTDIR\${PRODUCT_BINARY}"' WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "HelpLink" "${SUPPORT_URL}" WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "Publisher" "FLAMP developers" WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "URLUpdateInfo" "${UPDATES_URL}" WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "UninstallString" '"$INSTDIR\uninstall.exe"' WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "QuietUninstallString" '"$INSTDIR\uninstall.exe" /S' WriteRegDWORD HKLM "${REG_UNINSTALL_PATH}" "NoModify" 1 WriteRegDWORD HKLM "${REG_UNINSTALL_PATH}" "NoRepair" 1 WriteUninstaller "uninstall.exe" SectionEnd #Var WANT_FLAMP Section "FLAMP" SectionIn RO SetOutPath $INSTDIR File "${FLAMP_BINARY}" SectionEnd # Start Menu path !define SM_PATH_BASE $SMPROGRAMS\${PRODUCT_NAME} !define SM_PATH ${SM_PATH_BASE}\${PRODUCT_STRING} # The following sections are optional Section "Start Menu Shortcuts" CreateDirectory "${SM_PATH}" CreateShortCut "${SM_PATH}\${FLAMP_NAME}.lnk" "$INSTDIR\${FLAMP_BINARY}" "" "$INSTDIR\${FLAMP_BINARY}" 0 CreateShortCut "${SM_PATH}\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 SectionEnd Section "Desktop Shortcuts" CreateShortCut "$DESKTOP\${FLAMP_DESCRIPTION}.lnk" "$INSTDIR\${FLAMP_BINARY}" "" \ "$INSTDIR\${FLAMP_BINARY}" 0 SectionEnd # This is unselected by default Section /o "Quick Launch Shortcuts" CreateShortCut "$QUICKLAUNCH\${FLAMP_DESCRIPTION}}.lnk" "$INSTDIR\${FLAMP_BINARY}" "" \ "$INSTDIR\${FLAMP_BINARY}" 0 SectionEnd # Uninstaller Section "Uninstall" # Remove registry keys DeleteRegKey HKLM "${REG_UNINSTALL_PATH}" DeleteRegKey HKLM "${INSTALL_DIR_REG_KEY}" # Remove files and uninstaller Delete /REBOOTOK $INSTDIR\${FLAMP_BINARY} Delete /REBOOTOK $INSTDIR\uninstall.exe # Remove shortcuts, if any Delete "${SM_PATH}\*.*" Delete "$DESKTOP\${FLAMP_DESCRIPTION}.lnk" Delete "$QUICKLAUNCH\${FLAMP_DESCRIPTION}.lnk" # Remove directories used RMDir "${SM_PATH}" RMDir "${SM_PATH_BASE}" RMDir "$INSTDIR" SectionEnd # Offer to reboot the machine if the reboot flag is nonzero. This flag is set by # commands that specify the /REBOOTOK switch if the BINARY_* files were in use # during uninstallation. Stupid Windows. Function un.onGUIEnd IfRebootFlag 0 noreboot MessageBox MB_YESNO|MB_ICONQUESTION \ "A reboot is required to finish removing ${PRODUCT_NAME}. Do you wish to reboot now?" IDNO noreboot Reboot noreboot: FunctionEnd # Tell the user if we could not reboot for some reason. Function un.onRebootFailed MessageBox MB_OK|MB_ICONSTOP "Reboot failed. Please reboot manually." /SD IDOK FunctionEnd flamp-2.2.12/data/win32/flamp.ico0000644000175000017500000003535614463050062013300 0000000000000000 ¨%6  ¨Þ% h†6(0` $%6 ˆÅ½ÿG´ýXµÿVµÿV·ÿW¬ô3‹¾$Àÿ»±üÿµÿþµÿÿµÿþ³ýÿ¼ÿï¡Ø| Ru'ž ›+–?˜P˜c™n™_˜K< ‚Ôÿ‡®÷ÿ¶úõµÿøµÿùµÿù¶ÿõ«ôÿËÿì m€40 „ Ú™ÐÒÇèÏûÑýÐÿÐÿÏÿÏÿÐýÓÿÆÆ ƒ©8º÷å°ÿÿ±ýþ²þÿ±ýÿ®ýþÂÿÿ¿ø¦9P 8Q$3Mn¨á€¬ò[ ‚RÐñ¾ÿ¼ýºþ¸þ¶þ¶þ¶þ·þ·ýÄÿª¢MKf Ñ’ƒÁÿ½ÂýÕÁýÏÐÿ¨ v_ Pt.: r£Èÿ‹ÉÿÞ´ùÿ¹ÿù¨äk l?Åáºÿºþ¸ÿ´ÿ´ÿµÿ¸ÿºÿµÿ»ÿÐß…†1‡L*ËC+¾?*Æ>2×D˜M k ' aGÂÿå°÷ÿ¯÷þ²ûû®öûµþÿ’Ñ}% SDžÐ†Ï y² t¢ qœ t¤ y¸‡Ñ¨á»ø¹ÿÉÿÊþ»ô¿íÂïÂùÔÿØÏ w)Ÿäf¾ÿõ°ùÿ±ùý¯÷ý¬óÿ©îý£åþ²úÿ s£o$,5,ƒª¥©j*/KLq yœªÖ¶ÿ¸ÿ¼ÿÀÿÂÿÂýÃÿØã yG p cµþÿ­óý¬ôýªîÿ¥éÿŸàþœÜÿ˜×íHf}KAKORÞÿüÿ¹PL;:J g”©ù¬ÿ±þ¶ÿ»ÿÀü¾ÿ×ë t8LÂ( *h!iÿ*&c' +¯ê»ÿö©îþ§ëþ ãÿšÚþ–Óÿ‘Íì+>d7ISW\YÐÿùÿ®W^]VL9?xó£þ©û±ü·ü¼ø¼ÿбK½R oÿº güâ bÿì hüè oÿÐC·‚8e j•?°ùà¢äÿÞý—Ôÿ‘Ìÿ3Ip8SUX\_]Ôÿýÿ²Y`]YWT: \‹«ÿ¬ÿ´ÿ¼ÿÁþÁÿÙõ dDSÐW iÿú_ùÿ büþ cÿÿ bûÿ ^÷ý jÿÿOλ fe®öÿšÚü™Øÿ€µÉ7INTY\^\Ôÿýÿ±X`\YVPIH _‚ p‚ z|‡w’r˜m³s U/ mü~_÷ÿ cÿú cÿú cþú cþú aüûaùÿ mø÷NmG³ýùœÜÿÝÿ€´³6AHNQUWTÒÿýÿ®QXURNIC:)5/02'7:;B/9 mÿ´ düý aýþ dÿÿ aûþ eüÿbÿÞ-ˆE…¼¥²ûÿ¤çû£æÿ›Úæ,>3&468;=9Ëÿýÿ 5>;966&)jNXäÜZéä^òâaúàdÿß dùß pÿá3€O( PÍ@ jÿb]òn iþjPðS ‰Ô–¯7­öµ¼þÿ®øþ¯÷ÿ¬óý¯öÿœÝ¨%7ÀÿüÿŽ EYæ¾^óÿ ^ñý ^õÿ_öÿ `øý ]ñÿ jÿÛ4 )Äþÿ°úû´þþ´þÿ´þÿ±ûý´þÿ°øœLl)¼ÿüÿ† 'feÿºcûÿ búú býý aýý cþý býû gÿÿgùn# Rr¸ù¶·ÿÿ´þüµÿý´ÿÿµÿÿ´þüµþÿ¿üÖÇÿU#U ¸ÿüÿ0€0\ß mÿØ bûÿ aúü büþ cþþ cÿý aüü eÿÿXô˜3„)Qw¶ú³¸ÿÿ°øý³üü¶ÿü´ýü¯÷ÿ³ýã™Ø/HOÊVA©9 Àÿýÿ1MÉ7I¾„SÑÄ nÿë búÿ Yúþ ]þÿ jÿÿ iÿÿ bþÿ ^ýþ lÿÿVñŽ3³ö %! ]‡¯ùmÈÿá¼üÿ¯úü´øÿ×ÿÇ5K,^þŒ fõÿ iÿüFýÿÿþ1~ü mÿý hýÿ eüþ dùÿhþàƒÿªyØ€CªrIªudÙ’rÿ»LÅXA– &$3-A bІ¹tÑÿç¡ÕÁ Pq#f Lç hÿÿ _õû bþýCÿÿÿÿ0yÿ dÿü ^óÿ iÿðO¯r %¶ Zû L™Y Fo Fj (›D?ö‹U"/*> Nk&€qÿ¢ mþÿ gÿý iüÿ jÿÿIÿÿÿÿ3ÿ kÿÿ kÿóVÎ=½ŽÂêÑÿâþáÿÑúÄÕÖPIi%=KmF± jÿ(G¸IMÄ„L·MÆÂ5îÿþÿ&`àNËÈNÃwÂ{ÑÿÉüÇüÄùÄúÇüÄÿÛè h-±ÿüÿ{æWÈùÍÿÉþÆÿÈÿÍýÆÿÝÈ k»ÿüÿ…£F»¾ÊûÖ÷Ñú¶êɈ .ºÿüÿƒKJ ¯# l,ºÿüÿ„ #·ÿüÿ~ Èÿüÿ™‘ÿþþÿüq—ÿýÿÿþþþt“ÿüþÿÿÿþýÿo•ÿýýÿÿÿÿþýþür—ÿûýýÿÿÿÿÿýýüÿqÿýüÿîðÿÿþæùþüýÿr™ÿüüÿû_µÿýÿ‚wÿþüþýr“ÿüüýþe¹ÿüÿƒŠÿýüýþtšÿüýþûf»ÿüÿ„ƒÿüüýÿr“ÿýüÿúcºÿüÿƒ…ÿýüþüsœÿüýýÿbºÿüÿƒÿüýüþu‘ÿýýýücºÿüÿƒƒÿüýýÿr›ÿüûÿø`ºÿüÿƒ„þýûþýu–ÿüÿÿÿf»ÿüÿ†…ÿþýüÿt˜ÿüüÿìO²ÿüÿ{sõÿýüÿu˜ÿüþýÿ´Sba````bYÑÿýÿ¯Xb````a_XÄÿýýÿýs™ÿüÿÿÿüüÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿþûýÿÿýýÿxšÿüþÿÿÿþÿýýýýýýýýýþÿÿþþýýýýýýýýýÿþÿÿÿüüÿt›ÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿýz‡ôççèèèèèèèèèèèèèèèèèèèèèèèèèèèèèèèèèèèèèæéîbÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÀÿÿýàƒÿÿððÿÿàxÿÿÀ>ÿ€~€?ÿþàÀÁþà€aþóÿ€aþÿÿ€Áþðÿ€þàÿ~À?ÿ€>€?ÿÀ>ÿðpÿÿüàÿÿÿÿÀÿÿÿðÿÿÿþÿÿÿþÿÿÿþÿÿÿÿþÿÿÿÿþÿÿÿÿþÿÿÿÿüÿÿÿÿøÿÿÿÿðÿÿÿÿàÿÿÿÿÀÿÿÿÿ€ÿÿÿ?ÿÿþÿÿü ÿÿøÿÿð>ÿÿà~ÿÿÀþÀÿÿþàÿþø?þþøüøðà( @ ŽË,ºÿ޳ü•·ÿ˜«ò| t¤2‹ j& _5 bF bD h6H V{ ÌÿÝ­ûÿ²þý¯ýü¹ÿÿ®ë©  Zƒ :J;Ö ÖøÐôÒüÑÿÐþÓÿËÞ "q¹xÈõñÁÿûÅÿù¾÷à„¶X a‹ ¢ælµôâµ÷µ+6$#ºÕÁÿ»ý·ÿ·ÿºþÀÿ»â vg^žYXÞrcäm4«Oc´'ªêÒ¼ÿÿ°÷ü²ùÿ«ïÏ(/!+ s PKKž Pš z©¦áÉÿÅù·ä½æÍÿËÁC ! C_4µÿì±øÿ¨íû¤çü£æÿz¬È$6T<0•÷ð|4 E=f‹Í·ÿ¶þ¹ûÄÿÆÑ5,v)KÀ`KÂg&g5 q¤=²ùÞ§ìÿœÜüšÙÿ \‚ª8K]U³ÿÿ›W[G@ r¸³ÿ·ý¿ûÏÿ»žB®p kÿû gþÿ gþý lÿÿCµ–/E£äåžàÿ„¼ß BLY^U°ÿÿ˜W_\KP l¢|Ÿ‰˜—˜–|  gý  fýÿ aûü bùý eÿÿOàÒ  šØÏ§ëÿˆ¿Í0EKPF©ÿÿHQLE8&c`*o],wR/M-}G,s I¹ffÿ› aõŸ`îy y´8•Óœ³üÿªðý¯öÿ `‰e%‘ÿÿp'<šx eÿÿ cýý fþü kÿÿ fñ±1šÈPÁÿÿ²ûý´þû³üÿ»ÿñ†½jC`}ÿÿW= K¾u eÿü `öý aúù `÷ÿ`ÿôDµ7 ‰Âb½ÿüµýÿ±úû´ùÿÅÿî ¯,8)+‘ÿÿAn1=Dµ’ jÿì eþÿ hÿþ kÿþ eÿÿcûò}ìI Á5´û·½úÿ½ÿâ Qs/RÙ oÿÿ2øÿÿB¦÷ oÿü jøÿ[ñ°{ôj;Ži4kcñr0Š$ *; ^‡H _~1_ø– müÿ pÿý5‡ÿÿþC©ÿ tÿüI¶S“8Ò«©Þ©ÖÌ‘† BNÍ*+pQ5‰q@¾ÿÿT±7€Q žØàÊÿÌýÐüÎÿÏ­uÿÿT1¢`½ÜÙöÆô¿¿£7ƒÿÿ^ 0 ^C5yÿÿT ¦ÿÿˆŒÿýþÿw‹ÿûÿþûÿvÿúÿÿÿþûÿxŽÿýôÕÿüÍùüÿxŒÿúÿ]sÿÿNuÿùÿwÿùÿr‚ÿÿ[„ÿùÿxÿúÿmÿÿZƒÿúÿxÿûÿnÿÿZ„ÿùÿxÿúÿjÿÿY~ÿûÿx‘ÿûÿo  ÿÿ\ „ÿûÿyÿûÿ÷ÏÙØØÙÕëÿÿåÖØØÙØÐúÿûÿy”ÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿ{‚ÿíïðððïïïïïïððððïïïïïïðððïðúmÿÿüÿÿøÿð ?ÿ˜ÿþ ü<ü‚>>ÿÌ>?ü>þ0ÿÿÿð ?ÿþÿÿ c #FF6208", ", c #FF6209", "' c #E75908", ") c #160800", "! c #592303", "~ c #F96108", "{ c #FFB414", "] c #FFB514", "^ c #FFB515", "/ c #FF6107", "( c #FFB415", "_ c #020000", ": c #0A0300", "< c #FEB415", "[ c #FE6309", "} c #FEB414", "| c #FDB315", "1 c #FD6208", "2 c #FEB315", "3 c #FDB415", "4 c #FDB414", "5 c #FCB315", "6 c #FBB215", "7 c #FAB114", "8 c #FA6109", "9 c #FB6208", "0 c #FB6209", "a c #FC6209", "b c #FD6109", "c c #FE6308", "d c #FCB314", "e c #F9B114", "f c #F8B014", "g c #F7AE14", "h c #F5AE14", "i c #F3AC13", "j c #F0AB13", "k c #F15D08", "l c #F35E08", "m c #F45F09", "n c #F66009", "o c #F86009", "p c #F96008", "q c #FC6109", "r c #FD6209", "s c #FE6209", "t c #F6AE14", "u c #F0AA14", "v c #ECA813", "w c #E9A513", "x c #E5A313", "y c #E55908", "z c #EC5B08", "A c #EF5C08", "B c #F25E09", "C c #F65F09", "D c #F96109", "E c #FB6109", "F c #F45E08", "G c #EEA913", "H c #EDA813", "I c #E7A412", "J c #E2A112", "K c #DC9D12", "L c #CA8F10", "M c #BD4906", "N c #C94E07", "O c #D15107", "P c #D95407", "Q c #E05707", "R c #E85907", "S c #EC5C08", "T c #F25E08", "U c #F45F08", "V c #F85F08", "W c #DF9E11", "X c #E8A513", "Y c #E1A012", "Z c #DB9B11", "` c #D59711", " . c #B07D0E", ".. c #FB6108", "+. c #F55F09", "@. c #E4A212", "#. c #E6A313", "$. c #DF9E12", "%. c #D89911", "&. c #D19411", "*. c #B27E0E", "=. c #F76008", "-. c #EBA713", ";. c #DE9E12", ">. c #D79811", ",. c #D09310", "'. c #C68C0F", "). c #9B0010", "!. c #A20012", "~. c #A80012", "{. c #AE0012", "]. c #B40014", "^. c #B80013", "/. c #BC0014", "(. c #C00015", "_. c #C20015", ":. c #C10014", "<. c #FE6208", "[. c #FC6107", "}. c #F0AA13", "|. c #ECA713", "1. c #E6A312", "2. c #E09F12", "3. c #D99A11", "4. c #D29511", "5. c #CB9011", "6. c #B07D0D", "7. c #8D000F", "8. c #9F0011", "9. c #A30011", "0. c #AA0012", "a. c #AF0012", "b. c #B90014", "c. c #BC0015", "d. c #C00014", "e. c #C30015", "f. c #F6AF13", "g. c #F4AD13", "h. c #E5A212", "i. c #D19511", "j. c #CC9010", "k. c #A9770D", "l. c #8D000E", "m. c #A40011", "n. c #AE0013", "o. c #B40013", "p. c #BF0015", "q. c #C20014", "r. c #F7AF13", "s. c #FAB115", "t. c #F7B014", "u. c #F2AB14", "v. c #EEA914", "w. c #E9A613", "x. c #E5A213", "y. c #D99A12", "z. c #D49611", "A. c #BE860F", "B. c #9B0011", "C. c #A50012", "D. c #AA0013", "E. c #B30014", "F. c #B70013", "G. c #BA0014", "H. c #BE0015", "I. c #C40016", "J. c #FCB214", "K. c #FBB315", "L. c #F3AD14", "M. c #E4A213", "N. c #B27D0D", "O. c #94000F", "P. c #AF0013", "Q. c #B20013", "R. c #B60014", "S. c #C50015", "T. c #C60015", "U. c #FDB314", "V. c #FBB214", "W. c #F9B014", "X. c #F7AF14", "Y. c #F1AB13", "Z. c #980010", "`. c #A60012", " + c #B30013", ".+ c #B70014", "++ c #BD0014", "@+ c #C40015", "#+ c #C70016", "$+ c #C70015", "%+ c #FEB314", "&+ c #AB0013", "*+ c #A50011", "=+ c #9E0011", "-+ c #970010", ";+ c #93000F", ">+ c #930010", ",+ c #9E0010", "'+ c #B90013", ")+ c #BD0015", "!+ c #C50016", "~+ c #C60016", "{+ c #B00013", "]+ c #AB0012", "^+ c #AD0013", "/+ c #B50014", "(+ c #BE0014", "_+ c #BB0014", ":+ c #B80014", "<+ c #B50013", "[+ c #B60013", "}+ c #FBB513", "|+ c #FDB515", "1+ c #FEB614", "2+ c #C10015", " . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . . . ", " . . . . . . . . . . . . . ", " . . . . . . . . . . . ", " . . . . . . . . . ", " . . . . . . . ", " . . . . . . ", " . . . . . . ", " . . . . . . ", " . . . . . . ", " . . . . . . ", " . . . . . . + @ @ @ @ @ # ", " . . . . . . @ @ + @ @ @ @ $ @ + ", " . . . . . . # @ @ @ @ @ @ @ @ + @ ", " % % & * = . . . . - ; & + @ # @ @ @ @ @ @ + @ ", " > & , & & & ' ) . . . . ! ~ % , + @ $ # @ $ @ @ @ ", " { { > & > & & ' ) . . . . ! ~ , & & # @ @ @ + + ", " ] ^ ] ] { / & , & ' ) . . . . ! ~ & & % , > ", " ] ^ ^ ] ^ ( ^ ( > % & * = . . . . - ; & > & & & % > > , > > % > > , ", " { ^ ] ^ ^ ^ ^ ^ ( { _ . . . . : & , % , , & & % & & , & & % > ", " ( ] ^ ^ < ^ ^ ^ ^ ] ^ { . . . . . . % & & % , & & & [ & & , % ", " ^ ] ^ ^ ^ ^ < < } < | . . . . . . 1 [ [ [ [ [ & & , % , % ", " } < 2 < < 3 4 5 6 6 7 . . . . . . 8 9 0 a a b [ [ [ c 1 ", " d d 6 e f g h i j . . . . . . k l m n o p 8 q a r ", " > > & , > [ s 1 i t i u v w x . . . . . . y * z A B C o D E ; ", " , & & > & [ r c q E F G H I J K L . . . . . . M N O P Q R S T U V ", " & > & & & [ [ q q ; o W X Y Z ` . . . . . . . ", " > & & & & [ [ r ..; +. @.#.$.%.&.*. . . . . . . ", " , % & s [ [ 1 E =. -.x ;.>.,.'. . . . . . . ).!.~.{.].^./.(._.:. ", " > % <.r [. }.|.1.2.3.4.5.6. . . . . . . 7.8.9.0.a.].b.c.d.e. ", " f f.g.u -.h.$.3.i.j.k. . . . . . . l.8.m.0.n.o.^./.p.q.q. ", " r.s.t.h u.v.w.x.;.y.z.A. . . . . . . B.C.D.a.E.F.G.H.(.q.I. ", " J.K.s.f t L.u v w M.$.3.N. . . . . . . O.0.P.Q.R.G.c.p._.e.S.T. ", " J.U.| 5 V.W.X.g.Y.G w Z.`.n. +.+G.++d.q.@+S.T.#+$+ ", " %+< < U.d 6 W.t {.&+*+=+-+;+>+Z.,+`.D.n.Q.R.'+)+p.:.@+!+~+$+$ $ $+ ", " ( ] < < 3 6 b.R. +{+n.&+]+]+]+^+P.Q./+b./.(+(+++ ", " ( } < d.p.++_+:+F.o.<+<+<+[+:+G./.H.G. }+|+1+ ", " T.!+e._._.2+(.p.H.H.H.(.(.2+_. W.5 3 < } ^ } ^ { ", " $+~+$+#+~+#+~+!+!+!+!+!+!+~+~+S. J.< } < ^ ^ < ^ { ^ ( ", " #+#+ < ^ ^ ^ ^ ^ ^ ^ ^ ^ ] ] ", " { ^ ] ( ^ ^ ^ { ^ ^ { ", " { ( ^ ^ ^ ^ ^ { { ", " "}; flamp-2.2.12/data/mac/0000775000175000017500000000000014607053767011370 500000000000000flamp-2.2.12/data/mac/Info.plist.in0000644000175000017500000000200714463050062013643 00000000000000 CFBundleInfoDictionaryVersion 6.0 CFBundleIdentifier %%IDENTIFIER%% CFBundleName %%NAME%% CFBundlePackageType APPL CFBundleSignature %%SIGNATURE%% CFBundleDevelopmentRegion English CFBundleExecutable %%BINARY%% CFBundleVersion %%VERSION%% CFBundleShortVersionString %%VERSION%% CFBundleLongVersionString %%VERSION%% CFBundleIconFile %%ICON%% NSAppleScriptEnabled No NSHumanReadableCopyright Copyright (c) 2009 Dave Freese W1HKJ flamp-2.2.12/data/mac/flamp.icns0000644000175000017500000001727714463050062013262 00000000000000icns¿is32±×„…C *'4a*.‚ÉÐ^P¶ÒÈÐüÀÀ| eýÿèM'+ƒðÿÿTÑÿÛ¯å$€E/®ÎfµÛ®¿Ò!!…±Q"ëÿ× ,#3g©É£,¡s”ÒÃůáïS=<9% ÿÿ… $‚;7ƒjQRYT+#H»Å­2 6emr$Rg_|£AK$FSJ†•¬Àž sJ5‹„*€xÈÅb÷„  ‚     ‚ ‚ €    …   s8mkyÿõúÿÿþùÿÿÿù÷ÿvŠÿÎhpšÿqjÕÿ|†ÿcAÿ/nÿz‡ÿi8ÿ'wÿ{†ÿ²ó«ÿz…ÿûÿz‹ÿ}=ÿ- #wÿRAûî7 ‡X~ÿþû°²§ ÔÿÊTÿJZÎÿГ枢ø9%jÿZE®¸CtÁˆ¹ügN†ÿyDsÊÔB »ÿÓ6ÓŸÖû°\5‡ÿîêšÂ¸ !3EâÚ8il32%ÿÿÿ¬„  ‰ /0^C5,ˆ‚ 1¢½ÙÆ¿£%„%#Íp‰@T€žØÊÌÐÎσ;(‡~Vøüÿ‡©ÿ¶“Ò©©Ì†2€5cÁûúÿsÙÿ¦ÿøñôŽñŠƒiÂÿýúùÿ¯A+Aµÿþ€ÿûìs€ =1QÈÿûþüÿ½`9=¾ÿöú÷ÿµs¹ÿõî´Óüðö‰šÿýþÿñýýûùÿàØë¿…cow}®ÿþþÿµEä༠„l|‰—– qvÀÂg¤ùìÜÙ‚r³·¿Ï»! _ÿøíçæ¬6‚- =‹·¶¹ÄÆ5´êÿ÷ùï/!sPKKPz¦ÉÅ·½ÍËC€6‹æô÷6$ºÁ»··ºÀ»vžÞä«c'… ƒJ;ÖÖÐÒÑÐÓËq¹õÿÿ÷¶… 2‹j_bbhH{ÿûþýÿ놀 8Ëÿüÿò¤qÿÿÿà „ BN+57…*^_%_mp5CtIƒ D´½½QRo2Boj[{;4c05 € D‰½µ±´Å81Djehkec}2€2šÁ²´³»†CƒKe`a``D,Ifa`y•³ª¯`€#•‡ K:J¯l,h€1£»ÊÖѶɠ_.Œ gi„4æÈÍÉÆÈÍÆÝk‹!i'=m±ÿ¸ÄÂÆ5`ËûÂÑÉÇÄÄÇÄÛh‹!/+>kW€ÿþÿüÿIÿÿÎO½ÂÑâáÑÄÖ[‰$3A²Š¹ÿÕq*fÃÿõþCyÿóÿ¯¶û™FF›ö"‹U‡&!އùÿüúøÿKþõÿF~ÿýüùþÿتªÙÿÅ–&ƒ8)wúÿøüÿý÷ýØHÊ©1ɾÑÿúúþÿÿþýÿñöž%#”rùÿþ€ÿþþüÿaUƒ €ßÿûúüþÿüÿô„@”‘)xîþú€þ ûþøl)€*#fÿûúýýþýÿùLŒ(ÍÿòþðÔ¯öþø÷óöÝ7…$EæóñõöøñÿÿüýÿûüÿˆH¼ûçæÚ>Šjäéòúÿùÿ€ü÷ÿÿþþüùømýÜÝ´ )/27:;B/€Ðÿùüÿû÷ÿÎöÚØµŽ!_pz‡’˜³U ½ÿüÿüÿ·e•ùäÞÔÌIŠ%\«¬´¼ÁÁÙdÂp(hÿc+WêÿîëãÚÓÍ>„??£©±·¼¼ÐO  þóôîéàÜ×fg©¬±¶»À¾×täÿùù÷óîåú£‚/Lyª¶¸¼ÀÂÂÃØy‰#±ÿ÷÷ûöþÑ%Sž†ytqty‡¨»¹ÉÊ»¿ÂÂÔØwˆ$:ˆ£ÿÿùÿä"lźº¸´´µ¸ºµ»Ð…‡Ë¾Æ×˜kv'‰Q3snáò)‚о¼º¸€¶··ÄªMf’ÿýýÿt:‹!Xc0 „ÚÐÇÏÑÐÐÏÏÐÓÆD©÷ÿýþýýÿøPŒ€ 'žÂ›–˜˜™™˜‚Mÿ÷úÿôÿ€@ƒ ¾ÿü€ÿýÿØu#“„6qÅÿý€ÿôQìCÿÿÿÿÿÿÿÿΧ™ ''‡– I%KFjGMLM&NN3Œ "*NI&qmgij3kkVŠ$$-ˆb†Ñ¡P#Lh_b0d^iO%ZL(?‡$c]¯È¼¯´×5,^fi1mhedhƒyCIdrL/A …*\Q¶¸°³¶´¯³™OA MISnbY]jib^lV³= €hR¸·´µ´µ´µ¿ÇE# ƒ 0\mbabccaeX3 ;9[Ͱ€´±´°L‚( 'ecbbacbgg8Pj]iP‰–­¼®¯¬¯œ%‡Y€^_`]j49mdadaeb-2…²¤£›,Š)XZ^addp3m_c aamN³œ€Si_bcb^jOf®š™€˜KogbhoC8j°¢—‘3Ž…L**i& 8¯»©§ š–‘+š pµ­¬ª¥Ÿœ˜Hœ Ÿ¾°±¯¬©£²s‰Œ ¥a°¯²®µ’ˆ‚Œ ._rÈÉ´¹¨‡ 1*+*2 Š 8$SM¨¬ˆ KÑÁÂÁÐvP‹>Eˆƒº°±²±®Â¿9Œ€ˆ2Ô®¶€µ¶«Ëm‰‹À±€µ³¼¡R%Pˆ½´µµ·¬8±4ÿÿÿÿÿÿÿÿ­€¥   ¢  ”ˆ ‘ €€     €  Œ   € €€  ‹  €€  ‰€€  3ˆ ƒ‡…   Šƒ     Ž   ƒ   ‚  ’„ ‚  ‘  ‚    Ž€‚ƒ €‰   ‰ „   ‹   €   €     … € ‘ … ‘€€  –…€ ¡ ƒh8mk ‡ôççèèèèèèèèèèèèèèèèèèèèèèèèèèèèèèèèèèèèèæéîb›ÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿýzšÿüþÿÿÿþÿýýýýýýýýýþÿÿþþýýýýýýýýýÿþÿÿÿüüÿt™ÿüÿÿÿüüÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿþûýÿÿýýÿx˜ÿüþýÿ´Sba````bYÑÿýÿ¯Xb````a_XÄÿýýÿýs˜ÿüüÿìO²ÿüÿ{sõÿýüÿu–ÿüÿÿÿf»ÿüÿ†…ÿþýüÿt›ÿüûÿø`ºÿüÿƒ„þýûþýu‘ÿýýýücºÿüÿƒƒÿüýýÿrœÿüýýÿbºÿüÿƒÿüýüþu“ÿýüÿúcºÿüÿƒ…ÿýüþüsšÿüýþûf»ÿüÿ„ƒÿüüýÿr“ÿüüýþe¹ÿüÿƒŠÿýüýþt™ÿüüÿû_µÿýÿ‚wÿþüþýrÿýüÿîðÿÿþæùþüýÿr—ÿûýýÿÿÿÿÿýýüÿq•ÿýýÿÿÿÿþýþür“ÿüþÿÿÿþýÿo—ÿýÿÿþþþt‘ÿþþÿüq Èÿüÿ™·ÿüÿ~ºÿüÿ„ºÿüÿƒ #»ÿüÿ…F¾û÷úꈱÿüÿ{WùÿþÿÿýÿÈ(I„·ÂîÿþÿàÈw{ÿüüùúüÿè- ¢ÿýÿÿÿÿÿÿÿÿó=ŽêÿþÿúÕPtçÁ §ÿûýÿÿÿÿÿüÿðr YojDmáÿüÿÇŒÿüýÿÿþüýÿþÿ઀ru’»X³ÿýüüüÿã/V9Àÿýÿ7„Äëÿþÿÿÿÿþÿ޶ÿüýÿÿüÿÖU¸ÿüÿ0Øÿüþþýüÿ˜¤ÿûþÿÿýÿœ¼ÿüÿ† ºÿúýýýûÿn @bnjS7µÿþÿýÿ¨ÀÿüÿŽ ¾ÿýÿÿýÿÛ´ýþÿþÿÞE¥ÿûÿæ3&468;=9Ëÿýÿ 5>;966&NÜäâàßßáO~ÿúúúúûÿ÷Gùÿÿ³6AHNQUWTÒÿýÿ®QXURNIC:50'Wúÿþÿÿýÿ»eÿüÿÉ7INTY\^\Ôÿýÿ±X`\YVPIH‚‚|wrms/RºâìèЂ ?àÿýÿÿp8SUX\_]Ôÿýÿ²Y`]YWT:‹ÿÿÿÿþÿõD !*'öþþÿþÿìd7ISW\YÐÿùÿ®W^]VL9xóþûüüøÿ±cÿýýÿÿþÿí}KAKORÞÿüÿ¹PL;:J”ùÿþÿÿüÿë8fõÿýýÿýþÿo$,5,ƒª¥©j*KqœÖÿÿÿÿÿýÿãGGåÿþûûÿ} DÐϲ¢œ¤¸ÑáøÿÿþôíïùÿÏ)‹Þÿùk?áÿþÿÿÿÿÿÿÿÿ߆LC?>DM €[Rñÿýþþþþþþýÿ¢ ƒ½ÕϨ_ ™ÒèûýÿÿÿÿýÿÆ8åÿþÿÿþÿ¦  +?Pcn_K<‡ÿõøùùõÿì4$»ÿþÿþÿï|GXVVW3flamp-2.2.12/data/flamp.png0000644000175000017500000000714414463050062012342 00000000000000‰PNG  IHDR00Wù‡gAMA± üasRGB®Îé cHRMz&€„ú€èu0ê`:˜pœºQ<bKGDÿÿÿ ½§“ pHYs  šœ –IDAThÞÍšy”UÕ•‡¿}νo¨zU%C1•b!Q$Á eж1Šâ²‰Æ‰ÖND4ΨѨ+ÝÎËt±QÛ¨+Ú¶ã,ËDÉ`–­¤Õâ@I– ”ŒEQõÞ«wï9»ÿxïQ—G!C§MöZ§nÕ½gŸ»‡ßÞgïsKè!n.6'îý­‘,W&…HZ™¨c£*“®­ÕL*ÃÿQ™÷¢Hr‘ _Ãçw’¯7Æ•¡ Ë›Z%LeXàþãöÚëí̼(¡HÒX \“UzøIàì`v…ÙT0À<àa )ñ’Ú5 •—XYÏÏOu•{µð@7ppDbNU¦ïw$ _ûÞmà”îëÅò뀓sk)¨\_¨ñâu•û–íÓ@WÂòUÞ«v‚w%ªû1½Ãé¼ÊóTe„‰ßxµ†ïÖÊütenr>À-ôÀ()|ó»”« $³SL£ s–©.^½¾R£ÀM5ëšïÍ Á£ÄïW%ÖÜ­´^e´À]l›bàÛ5Ú’¾)1/°sjÝm’ÄøÉv^ö­ÊÜ ñÂí)`JÜP³^5uW-¿Ë°Ù%Ý}7ÛY)á‰j‘Ѓù¤à1å@þ‹ _뉀­7»ê¦Ñذmßœx–„Mu$lv:Ûì®’ðDR̪Ìýåv<ðƒËWùv;Ûì*Uá°õŽ]4Φ¼áUUàFàjzRe6.aùÝÎ6»ë‰0—mcbÐÎÖ%Â*Ê;mUø/ 6_¤DÕ÷ÒcýdvªÉô«ÀåþÿwØl’›Ý=5BöV¨UñóW€Íö¨ê‰ÚÀî­¯*vi…÷K‡Í)QU8%½àãKË6»JɧZvT…®z寎ùQÕ uÀ¶Þî¯Ì ’ µÚÍ‚œ·+¤™òÀÆšg+s¶tHÕnI@*.ÛòÜïàeÿç*¯ªvV°­q«u¿V'e3_fT:‰áXñ`v$à_DДÇNVµR`iGèâÌñ¤rO±Çð‹¨¼fÎ'ç$ó€Ú-ZéFE ò ‚f‹Q 9_†Ä>ÁX¶Qñ«4Ö94M„¹¦ 31‡Äû¶Ç“iï‡}èCJ÷È~ºXÞ%ÒÞ µK0Cø²À&Œ÷0{”pþÈ´ÆõŠ‹=—œOò{%ï=xŒTË<éóÍ} ^ì‹=JÁ¶£™ÄösèÕI?•C½K¤!˜Þâa§<`$q~¡˜ ŽK™_/‰ãY# Ì1Q·La÷=©55,—â¯|-©¿tAiÌ[k#¯pÎH;ëÂÑÁ‰EôÙâJ{ûGï˜M–TQ¼ó*x§Îƒ¨ãï¥Õ‰4m¨Ho‡;¥€pÆîcìâÞÿî}l4­ŒH×DÒ¶ðÏÅpúþþÚ©#ƒ™RRï ÆŠÐ¡ŠT²â°Ù{ü^foýf¢7nx·ã–K¢Æ~!æ¬&¡¹1FAÚ•h³²42ñu›½_bELŒºÞdûB¬çá a4f…ËÏ̸?.sCÆŽH1uZúŠ•–ýäÙâ©?벟¯z¡û‚™û…á‘{ÚÓºóÄY«¦ä¶†hÑݸΒæÆõ ^<çøèÆîº®Ÿt°ùáCnâÓ/1ˆNͲ3¯y­P¼`okJ›}jCD(Õ8ÁîHøaDÎZ§­ÍΜ˜¹pÒ”ìC­Íö÷¹ÏöÉ™aÓN©?òåùÅ—žxÏmšró&÷7Ù8cL…â[óñfSv¾=Øø£†[ ,âéuÁ±£Fø³ì>ј\_§-i}u´K:Æ2h˜»äà~}X*-3,°Ë×{Övo»Ámõ·p ¡…ÈÁ~CC9o’Ó¶®TãM³ 'tÕVÔÚr0—"µ©@?[¾*:aÒw;µIíãR3þÔá?½tAt[[ÉVðN1ãúÊ]÷>ÞˉýêdÊ-2*ê¤?4D¤²¦Ý ±ªiéXSº3œ9öÊ'~°Äß¶°$Ë;Q#à+ž¤¤âq FÐÈ!Ã[¹ðøŒ[±&n¼mvî‰P9Nc\:A±(êÒ)Áיͣ”‘Ó w®(ñõWº¾¡€§|n„Órô-Ü ›©ô{¯¼ÝšwÎˆà ³ÇØ“ZûËéq—ŽÒÎÆ˜u]ê›ÂË»[\·*¯´äD—wêVV7ÍY§ÈÀ,þGGརwžò©’òÙfÏõs~zŽ‹º5Œ*FQâbK‘>xÙG~å”?ÿÏ_—‚§>Ætt#51&´%ýY^Sÿ²(ZtÌóÝ7Ì~¥tl`õU1j=΍/oÃâq}S8ûªñáÅ9kªI±57ŒOñI‡¯úïÓNÚ7uô£ƒ‰‡š¯Íì+{µŽ×ÿ¡e­i†¤í¨R^‰=ÒáU0Ÿ®uOžøÏ³ž]P²:µÉy²!ç÷®ÎýýòxokiDË;pì·ZÅ@}M¬õFY×íñFp¡a¯WWùö›Ås¯ ™l€Ï|hU%HiJUž'Qçg;tZ&ˆJ‰` ø)Á°Ë¦¤_¸æî|vß=‹u`î]EŸe+Ý;oþ1²@‹s¤)j–ž“9G¹ÍLR#°g徜Wb¯D\æÖýfµ?=e$²B!ŠJbpi!X_¤Ó%Ï–=!xo•_:v€‰Jy ­µ‚Ä ±ÃgrÂÂOÜëû †vG¤¼ÇyÅ ¨lPzN™CzŽ «ßjÓvºÂS=•¤R&4:Òž™ÐCRjÀDõ˜(Q 6õˆtÍ_Laq&.óL|¾ûÉçŽMEGÎwEMD¤$Î4hÛ/Þs/<Óån¿ç;¹ÉçNÍ\·¶ÃX‘|É3°9äïÆ†‡¿üN´ÀZT¯[öúí5éÉûBYC…5Ç’>ùÉ\Y¶ŠÁ¢ "ƒ0ù&Ìâ ã–µƒy_7òÌ }æÂ׋¿˜ÒÂÀ{'Ûìì_©[°Úm³°æî«÷˜Ûœ“ó6nÐL:U¯&eE5DnþÇú뻊×üîýx‰5ôE©ªUcõè„Ê5U¹z[Á¯/o;y…õ“IM>ŠôùEUMaœ‰ÊNŒAÓüüµ¸ù€Qz d_Y©üÏ:µ+ó-\§o_è×¾½Î¯_ÓMaùj¯£-c[S3œGC#Ø@$´"Æ ©@êŽ?8ud³¶mƒoë(h‡)7%±”=Ñ@ŸÊ‘…1ð)°ÀC—Âê ÒÑ‚MŸFvÆ©Ô_‘Ådë€,Æf“Æ(h8»î§ä¿ó0ùÏ ˆKTuRýaQ¯=;òÀ=Œz§ºðßÏkÙ;}g©Ã×!â½Wb‡‰œúB inyòµâe3ïèœg…L³šìz|!‚o£(vÀk)øí~Ãö"yÁþãHMÈY³ŸQ%@*@Àã1Í"ŸýT»Î½Î_šr¬lUUï°w<0°÷ýpO·bþçÇ^öO 7èT5°¸(V2i,ù¸ôýoܲùGË?÷¥’=|šfþ­ §›ÑO#´ÝAÉB&„þØÁð{ôà ôÞÃÄ¡›ðùé¶åÀ¯ëkM*À/zØθ“Îãrp½}Ü.UkŽ fìôqÖµô“ÁgZ?aFi­– ¥´r£›3é²ö{V´9.’úɧkÝ#]èPÊP’rhå”[5 %B³ÊŸç™âãf,oÓ.l〉öɘÔk”²KLǯêëòÏ·ÍR‰½è¶Á=P©JåäÃRòÉ:¯SƆ•tàgÖ_Ð'`ù¡sÚ[ÿ‰r‘­ÿ‡é.ûð´Ñ—+©Õ¼L³JÜ£jþòÁÓhskðí‹Û³¼è ”’ibéÜÿÊ¿¼r™>òÆ‚Xßh‹¶Àš]UÊݘ)ÅÈi“Ò¾>-¼³4’¥›œ^·)—=•ú¹y8¼€Áô3ålaÊößò2o³Yý›ßoÞ4aÖ%©Ã¦Z÷t&/C¼xA´|΢¦¿‘nç?íÚM³ž{³Ôe âü¶-ÙNudZ®Rqµ¿¨d: ØR¬š$¾žÎâ£/¼š†Ô‚¾ï5Eøþúý©ݤ°.6­T·"»—áÔ“s'—¹!QÆçCKµs ‰»>wuõ­fêAãSû=÷fémkÅ8¿mW¶Ó§ÉèYסÞ<…r‹¤Ëˆão±1žB&¿€îÏŠÛùˆ^Á±É½/üæåƒGœï6é1hê¦êûHûÒâ¹]+Ý¢áƒ-¯v>Ùì²µä{9"°Àk¥òÏIx ‰Ó¶ô+C­¼øß¥Ò.>mÂÁõã}Aû)‡Œ DºÚýGß»·ë¾×À>q|¼Ú©lY¥‡þˆbª­(ؼ{tEXtCommentCreated with GIMPWIEND®B`‚flamp-2.2.12/configure0000775000175000017500000100534114607050316011535 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.71 for FLAMP 2.2.12. # # Report bugs to . # # Copyright (C) 2009 Dave Freese, W1HKJ (w1hkj AT w1hkj DOT com) # # # Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, # Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh as_nop=: if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi # Reset variables that may have inherited troublesome values from # the environment. # IFS needs to be set, to space, tab, and newline, in precisely that order. # (If _AS_PATH_WALK were called with IFS unset, it would have the # side effect of setting IFS to empty, thus disabling word splitting.) # Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl IFS=" "" $as_nl" PS1='$ ' PS2='> ' PS4='+ ' # Ensure predictable behavior from utilities with locale-dependent output. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # We cannot yet rely on "unset" to work, but we need these variables # to be unset--not just set to an empty or harmless value--now, to # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct # also avoids known problems related to "unset" and subshell syntax # in other old shells (e.g. bash 2.01 and pdksh 5.2.14). for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH do eval test \${$as_var+y} \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done # Ensure that fds 0, 1, and 2 are open. if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="as_nop=: if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else \$as_nop case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ) then : else \$as_nop exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 blah=\$(echo \$(echo blah)) test x\"\$blah\" = xblah || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" if (eval "$as_required") 2>/dev/null then : as_have_required=yes else $as_nop as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null then : else $as_nop as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$as_shell as_have_required=yes if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null then : break 2 fi fi done;; esac as_found=false done IFS=$as_save_IFS if $as_found then : else $as_nop if { test -f "$SHELL" || test -f "$SHELL.exe"; } && as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$SHELL as_have_required=yes fi fi if test "x$CONFIG_SHELL" != x then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno then : printf "%s\n" "$0: This script requires a shell more modern than all" printf "%s\n" "$0: the shells that I found on your system." if test ${ZSH_VERSION+y} ; then printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." else printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and w1hkj AT w1hkj DOT $0: com about your system, including any error possibly $0: output before this message. Then install a modern $0: shell, or manually run the script under such a shell if $0: you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_nop # --------- # Do nothing but, unlike ":", preserve the value of $?. as_fn_nop () { return $? } as_nop=as_fn_nop # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null then : eval 'as_fn_append () { eval $1+=\$2 }' else $as_nop as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null then : eval 'as_fn_arith () { as_val=$(( $* )) }' else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_nop # --------- # Do nothing but, unlike ":", preserve the value of $?. as_fn_nop () { return $? } as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } # Determine whether it's possible to make 'echo' print without a newline. # These variables are no longer used directly by Autoconf, but are AC_SUBSTed # for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac # For backward compatibility with old third-party macros, we provide # the shell variables $as_echo and $as_echo_n. New code should use # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. as_echo='printf %s\n' as_echo_n='printf %s' rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='FLAMP' PACKAGE_TARNAME='flamp' PACKAGE_VERSION='2.2.12' PACKAGE_STRING='FLAMP 2.2.12' PACKAGE_BUGREPORT='w1hkj AT w1hkj DOT com' PACKAGE_URL='' ac_unique_file="src/flamp.cxx" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_STDIO_H # include #endif #ifdef HAVE_STDLIB_H # include #endif #ifdef HAVE_STRING_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_header_c_list= ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS FLAMP_BUILD_LDADD FLAMP_BUILD_LDFLAGS FLAMP_BUILD_CXXFLAGS FLAMP_BUILD_CPPFLAGS ENABLE_FLXMLRPC_FALSE ENABLE_FLXMLRPC_TRUE FLXMLRPC_LIBS FLXMLRPC_CFLAGS X_LIBS X_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG HAVE_FLUID_FALSE HAVE_FLUID_TRUE FLUID FLTK_LIBS FLTK_CFLAGS FLTK_CONFIG COMPAT_STRCASESTR_FALSE COMPAT_STRCASESTR_TRUE EXTRA_LIBS COMPAT_REGEX_FALSE COMPAT_REGEX_TRUE PTW32_LIBS PTW32_CFLAGS MINGW32_FALSE MINGW32_TRUE WIN32_FALSE WIN32_TRUE HAVE_NSIS_FALSE HAVE_NSIS_TRUE HAVE_WINDRES_FALSE HAVE_WINDRES_TRUE MAKENSIS WINDRES DARWIN_FALSE DARWIN_TRUE MAC_UNIVERSAL_LDFLAGS MAC_UNIVERSAL_CFLAGS COMPAT_STACK_FALSE COMPAT_STACK_TRUE RDYNAMIC DEBUG_CFLAGS ENABLE_DEBUG_FALSE ENABLE_DEBUG_TRUE BFD_LIBS BFD_CFLAGS OPT_CFLAGS am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE ac_ct_CC CFLAGS CC am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__include DEPDIR OBJEXT EXEEXT ac_ct_CXX CPPFLAGS LDFLAGS CXXFLAGS CXX AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V CSCOPE ETAGS CTAGS am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_os target_vendor target_cpu target host_os host_vendor host_cpu host build_os build_vendor build_cpu build AC_CONFIG_ARGS FLAMP_VERSION FLAMP_VERSION_PATCH FLAMP_VERSION_MINOR FLAMP_VERSION_MAJOR target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir runstatedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL am__quote' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_dependency_tracking enable_static enable_optimizations enable_debug with_bfd enable_mac_universal with_ptw32 with_flxmlrpc ' ac_precious_vars='build_alias host_alias target_alias CXX CXXFLAGS LDFLAGS LIBS CPPFLAGS CCC CC CFLAGS BFD_CFLAGS BFD_LIBS PTW32_CFLAGS PTW32_LIBS FLTK_CONFIG FLTK_CFLAGS FLTK_LIBS FLUID PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR X_CFLAGS X_LIBS FLXMLRPC_CFLAGS FLXMLRPC_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -runstatedir | --runstatedir | --runstatedi | --runstated \ | --runstate | --runstat | --runsta | --runst | --runs \ | --run | --ru | --r) ac_prev=runstatedir ;; -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | --run=* | --ru=* | --r=*) runstatedir=$ac_optarg ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures FLAMP 2.2.12 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/flamp] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of FLAMP 2.2.12:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --enable-static enable static linking for some libraries --enable-optimizations use x86 optimizations (none|sse|sse2|sse3|native) [none] --enable-debug turn on debugging --enable-mac-universal build a universal binary on Mac OS X [no] Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-bfd[=DIR] search for libbfd in DIR/include and DIR/lib [mingw32 only] --with-ptw32[=DIR] search for pthreads-w32 in DIR/include and DIR/lib [mingw32 only] --with-flxmlrpc use external flxmlrpc library [autodetect] Some influential environment variables: CXX C++ compiler command CXXFLAGS C++ compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CC C compiler command CFLAGS C compiler flags BFD_CFLAGS C compiler flags for libbfd BFD_LIBS linker flags for libbfd PTW32_CFLAGS C compiler flags for pthreads-w32 PTW32_LIBS linker flags for pthreads-w32 FLTK_CONFIG Path to fltk-config utility FLTK_CFLAGS C compiler flags for FLTK, overriding fltk-config FLTK_LIBS linker flags for FLTK, overriding fltk-config FLUID Fast Light User-Interface Designer PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path X_CFLAGS C compiler flags for X, overriding pkg-config X_LIBS linker flags for X, overriding pkg-config FLXMLRPC_CFLAGS C compiler flags for FLXMLRPC, overriding pkg-config FLXMLRPC_LIBS linker flags for FLXMLRPC, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for configure.gnu first; this name is used for a wrapper for # Metaconfig's "Configure" on case-insensitive file systems. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF FLAMP configure 2.2.12 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Copyright (C) 2009 Dave Freese, W1HKJ (w1hkj AT w1hkj DOT com) _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest.beam if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext then : ac_retval=0 else $as_nop printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest.beam if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext then : ac_retval=0 else $as_nop printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$3=yes" else $as_nop eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else $as_nop eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else $as_nop eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext } then : ac_retval=0 else $as_nop printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. */ #include #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main (void) { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$3=yes" else $as_nop eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext } then : ac_retval=0 else $as_nop printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_link ac_configure_args_raw= for ac_arg do case $ac_arg in *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append ac_configure_args_raw " '$ac_arg'" done case $ac_configure_args_raw in *$as_nl*) ac_safe_unquote= ;; *) ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. ac_unsafe_a="$ac_unsafe_z#~" ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; esac cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by FLAMP $as_me 2.2.12, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac printf "%s\n" "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Sanitize IFS. IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo printf "%s\n" "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo printf "%s\n" "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then printf "%s\n" "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then printf "%s\n" "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && printf "%s\n" "$as_me: caught signal $ac_signal" printf "%s\n" "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h printf "%s\n" "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then ac_site_files="$CONFIG_SITE" elif test "x$prefix" != xNONE; then ac_site_files="$prefix/share/config.site $prefix/etc/config.site" else ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi for ac_site_file in $ac_site_files do case $ac_site_file in #( */*) : ;; #( *) : ac_site_file=./$ac_site_file ;; esac if test -f "$ac_site_file" && test -r "$ac_site_file"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 printf "%s\n" "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 printf "%s\n" "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Test code for whether the C++ compiler supports C++98 (global declarations) ac_cxx_conftest_cxx98_globals=' // Does the compiler advertise C++98 conformance? #if !defined __cplusplus || __cplusplus < 199711L # error "Compiler does not advertise C++98 conformance" #endif // These inclusions are to reject old compilers that // lack the unsuffixed header files. #include #include // and are *not* freestanding headers in C++98. extern void assert (int); namespace std { extern int strcmp (const char *, const char *); } // Namespaces, exceptions, and templates were all added after "C++ 2.0". using std::exception; using std::strcmp; namespace { void test_exception_syntax() { try { throw "test"; } catch (const char *s) { // Extra parentheses suppress a warning when building autoconf itself, // due to lint rules shared with more typical C programs. assert (!(strcmp) (s, "test")); } } template struct test_template { T const val; explicit test_template(T t) : val(t) {} template T add(U u) { return static_cast(u) + val; } }; } // anonymous namespace ' # Test code for whether the C++ compiler supports C++98 (body of main) ac_cxx_conftest_cxx98_main=' assert (argc); assert (! argv[0]); { test_exception_syntax (); test_template tt (2.0); assert (tt.add (4) == 6.0); assert (true && !false); } ' # Test code for whether the C++ compiler supports C++11 (global declarations) ac_cxx_conftest_cxx11_globals=' // Does the compiler advertise C++ 2011 conformance? #if !defined __cplusplus || __cplusplus < 201103L # error "Compiler does not advertise C++11 conformance" #endif namespace cxx11test { constexpr int get_val() { return 20; } struct testinit { int i; double d; }; class delegate { public: delegate(int n) : n(n) {} delegate(): delegate(2354) {} virtual int getval() { return this->n; }; protected: int n; }; class overridden : public delegate { public: overridden(int n): delegate(n) {} virtual int getval() override final { return this->n * 2; } }; class nocopy { public: nocopy(int i): i(i) {} nocopy() = default; nocopy(const nocopy&) = delete; nocopy & operator=(const nocopy&) = delete; private: int i; }; // for testing lambda expressions template Ret eval(Fn f, Ret v) { return f(v); } // for testing variadic templates and trailing return types template auto sum(V first) -> V { return first; } template auto sum(V first, Args... rest) -> V { return first + sum(rest...); } } ' # Test code for whether the C++ compiler supports C++11 (body of main) ac_cxx_conftest_cxx11_main=' { // Test auto and decltype auto a1 = 6538; auto a2 = 48573953.4; auto a3 = "String literal"; int total = 0; for (auto i = a3; *i; ++i) { total += *i; } decltype(a2) a4 = 34895.034; } { // Test constexpr short sa[cxx11test::get_val()] = { 0 }; } { // Test initializer lists cxx11test::testinit il = { 4323, 435234.23544 }; } { // Test range-based for int array[] = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3, 14, 19, 17, 8, 6, 20, 16, 2, 11, 1}; for (auto &x : array) { x += 23; } } { // Test lambda expressions using cxx11test::eval; assert (eval ([](int x) { return x*2; }, 21) == 42); double d = 2.0; assert (eval ([&](double x) { return d += x; }, 3.0) == 5.0); assert (d == 5.0); assert (eval ([=](double x) mutable { return d += x; }, 4.0) == 9.0); assert (d == 5.0); } { // Test use of variadic templates using cxx11test::sum; auto a = sum(1); auto b = sum(1, 2); auto c = sum(1.0, 2.0, 3.0); } { // Test constructor delegation cxx11test::delegate d1; cxx11test::delegate d2(); cxx11test::delegate d3(45); } { // Test override and final cxx11test::overridden o1(55464); } { // Test nullptr char *c = nullptr; } { // Test template brackets test_template<::test_template> v(test_template(12)); } { // Unicode literals char const *utf8 = u8"UTF-8 string \u2500"; char16_t const *utf16 = u"UTF-8 string \u2500"; char32_t const *utf32 = U"UTF-32 string \u2500"; } ' # Test code for whether the C compiler supports C++11 (complete). ac_cxx_conftest_cxx11_program="${ac_cxx_conftest_cxx98_globals} ${ac_cxx_conftest_cxx11_globals} int main (int argc, char **argv) { int ok = 0; ${ac_cxx_conftest_cxx98_main} ${ac_cxx_conftest_cxx11_main} return ok; } " # Test code for whether the C compiler supports C++98 (complete). ac_cxx_conftest_cxx98_program="${ac_cxx_conftest_cxx98_globals} int main (int argc, char **argv) { int ok = 0; ${ac_cxx_conftest_cxx98_main} return ok; } " # Test code for whether the C compiler supports C89 (global declarations) ac_c_conftest_c89_globals=' /* Does the compiler advertise C89 conformance? Do not test the value of __STDC__, because some compilers set it to 0 while being otherwise adequately conformant. */ #if !defined __STDC__ # error "Compiler does not advertise C89 conformance" #endif #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ struct buf { int x; }; struct buf * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not \xHH hex character constants. These do not provoke an error unfortunately, instead are silently treated as an "x". The following induces an error, until -std is added to get proper ANSI mode. Curiously \x00 != x always comes out true, for an array size at least. It is necessary to write \x00 == 0 to get something that is true only with -std. */ int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) '\''x'\'' int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), int, int);' # Test code for whether the C compiler supports C89 (body of main). ac_c_conftest_c89_main=' ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); ' # Test code for whether the C compiler supports C99 (global declarations) ac_c_conftest_c99_globals=' // Does the compiler advertise C99 conformance? #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L # error "Compiler does not advertise C99 conformance" #endif #include extern int puts (const char *); extern int printf (const char *, ...); extern int dprintf (int, const char *, ...); extern void *malloc (size_t); // Check varargs macros. These examples are taken from C99 6.10.3.5. // dprintf is used instead of fprintf to avoid needing to declare // FILE and stderr. #define debug(...) dprintf (2, __VA_ARGS__) #define showlist(...) puts (#__VA_ARGS__) #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) static void test_varargs_macros (void) { int x = 1234; int y = 5678; debug ("Flag"); debug ("X = %d\n", x); showlist (The first, second, and third items.); report (x>y, "x is %d but y is %d", x, y); } // Check long long types. #define BIG64 18446744073709551615ull #define BIG32 4294967295ul #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) #if !BIG_OK #error "your preprocessor is broken" #endif #if BIG_OK #else #error "your preprocessor is broken" #endif static long long int bignum = -9223372036854775807LL; static unsigned long long int ubignum = BIG64; struct incomplete_array { int datasize; double data[]; }; struct named_init { int number; const wchar_t *name; double average; }; typedef const char *ccp; static inline int test_restrict (ccp restrict text) { // See if C++-style comments work. // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) continue; return 0; } // Check varargs and va_copy. static bool test_varargs (const char *format, ...) { va_list args; va_start (args, format); va_list args_copy; va_copy (args_copy, args); const char *str = ""; int number = 0; float fnumber = 0; while (*format) { switch (*format++) { case '\''s'\'': // string str = va_arg (args_copy, const char *); break; case '\''d'\'': // int number = va_arg (args_copy, int); break; case '\''f'\'': // float fnumber = va_arg (args_copy, double); break; default: break; } } va_end (args_copy); va_end (args); return *str && number && fnumber; } ' # Test code for whether the C compiler supports C99 (body of main). ac_c_conftest_c99_main=' // Check bool. _Bool success = false; success |= (argc != 0); // Check restrict. if (test_restrict ("String literal") == 0) success = true; char *restrict newvar = "Another string"; // Check varargs. success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); test_varargs_macros (); // Check flexible array members. struct incomplete_array *ia = malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234; // Check named initializers. struct named_init ni = { .number = 34, .name = L"Test wide string", .average = 543.34343, }; ni.number = 58; int dynamic_array[ni.number]; dynamic_array[0] = argv[0][0]; dynamic_array[ni.number - 1] = 543; // work around unused variable warnings ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' || dynamic_array[ni.number - 1] != 543); ' # Test code for whether the C compiler supports C11 (global declarations) ac_c_conftest_c11_globals=' // Does the compiler advertise C11 conformance? #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L # error "Compiler does not advertise C11 conformance" #endif // Check _Alignas. char _Alignas (double) aligned_as_double; char _Alignas (0) no_special_alignment; extern char aligned_as_int; char _Alignas (0) _Alignas (int) aligned_as_int; // Check _Alignof. enum { int_alignment = _Alignof (int), int_array_alignment = _Alignof (int[100]), char_alignment = _Alignof (char) }; _Static_assert (0 < -_Alignof (int), "_Alignof is signed"); // Check _Noreturn. int _Noreturn does_not_return (void) { for (;;) continue; } // Check _Static_assert. struct test_static_assert { int x; _Static_assert (sizeof (int) <= sizeof (long int), "_Static_assert does not work in struct"); long int y; }; // Check UTF-8 literals. #define u8 syntax error! char const utf8_literal[] = u8"happens to be ASCII" "another string"; // Check duplicate typedefs. typedef long *long_ptr; typedef long int *long_ptr; typedef long_ptr long_ptr; // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. struct anonymous { union { struct { int i; int j; }; struct { int k; long int l; } w; }; int m; } v1; ' # Test code for whether the C compiler supports C11 (body of main). ac_c_conftest_c11_main=' _Static_assert ((offsetof (struct anonymous, i) == offsetof (struct anonymous, w.k)), "Anonymous union alignment botch"); v1.i = 2; v1.w.k = 5; ok |= v1.i != 5; ' # Test code for whether the C compiler supports C11 (complete). ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} ${ac_c_conftest_c99_globals} ${ac_c_conftest_c11_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} ${ac_c_conftest_c99_main} ${ac_c_conftest_c11_main} return ok; } " # Test code for whether the C compiler supports C99 (complete). ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} ${ac_c_conftest_c99_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} ${ac_c_conftest_c99_main} return ok; } " # Test code for whether the C compiler supports C89 (complete). ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} return ok; } " as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H" as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H" # Auxiliary files required by this configure script. ac_aux_files="compile missing install-sh config.guess config.sub" # Locations in which to look for auxiliary files. ac_aux_dir_candidates="${srcdir}/build-aux" # Search for a directory containing all of the required auxiliary files, # $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. # If we don't find one directory that contains all the files we need, # we report the set of missing files from the *first* directory in # $ac_aux_dir_candidates and give up. ac_missing_aux_files="" ac_first_candidate=: printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in $ac_aux_dir_candidates do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac as_found=: printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 ac_aux_dir_found=yes ac_install_sh= for ac_aux in $ac_aux_files do # As a special case, if "install-sh" is required, that requirement # can be satisfied by any of "install-sh", "install.sh", or "shtool", # and $ac_install_sh is set appropriately for whichever one is found. if test x"$ac_aux" = x"install-sh" then if test -f "${as_dir}install-sh"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 ac_install_sh="${as_dir}install-sh -c" elif test -f "${as_dir}install.sh"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 ac_install_sh="${as_dir}install.sh -c" elif test -f "${as_dir}shtool"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 ac_install_sh="${as_dir}shtool install -c" else ac_aux_dir_found=no if $ac_first_candidate; then ac_missing_aux_files="${ac_missing_aux_files} install-sh" else break fi fi else if test -f "${as_dir}${ac_aux}"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 else ac_aux_dir_found=no if $ac_first_candidate; then ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" else break fi fi fi done if test "$ac_aux_dir_found" = yes; then ac_aux_dir="$as_dir" break fi ac_first_candidate=false as_found=false done IFS=$as_save_IFS if $as_found then : else $as_nop as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. if test -f "${ac_aux_dir}config.guess"; then ac_config_guess="$SHELL ${ac_aux_dir}config.guess" fi if test -f "${ac_aux_dir}config.sub"; then ac_config_sub="$SHELL ${ac_aux_dir}config.sub" fi if test -f "$ac_aux_dir/configure"; then ac_configure="$SHELL ${ac_aux_dir}configure" fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu FLAMP_VERSION_MAJOR=2 FLAMP_VERSION_MINOR=2 FLAMP_VERSION_PATCH=.12 FLAMP_VERSION=2.2.12 printf "%s\n" "#define FLAMP_VERSION_MAJOR 2" >>confdefs.h printf "%s\n" "#define FLAMP_VERSION_MINOR 2" >>confdefs.h printf "%s\n" "#define FLAMP_VERSION_PATCH \".12\"" >>confdefs.h printf "%s\n" "#define FLAMP_VERSION \"2.2.12\"" >>confdefs.h AC_CONFIG_ARGS=$ac_configure_args # define build, build_cpu, build_vendor, build_os # Make sure we can run config.sub. $SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 printf %s "checking build system type... " >&6; } if test ${ac_cv_build+y} then : printf %s "(cached) " >&6 else $as_nop ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 printf "%s\n" "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac # define host, host_cpu, host_vendor, host_os { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 printf %s "checking host system type... " >&6; } if test ${ac_cv_host+y} then : printf %s "(cached) " >&6 else $as_nop if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 printf "%s\n" "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # define target, target_cpu, target_vendor, target_os { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 printf %s "checking target system type... " >&6; } if test ${ac_cv_target+y} then : printf %s "(cached) " >&6 else $as_nop if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "${ac_aux_dir}config.sub" $target_alias` || as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $target_alias failed" "$LINENO" 5 fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 printf "%s\n" "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' set x $ac_cv_target shift target_cpu=$1 target_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: target_os=$* IFS=$ac_save_IFS case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- am__api_version='1.16' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 printf %s "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test ${ac_cv_path_install+y} then : printf %s "(cached) " >&6 else $as_nop as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac # Account for fact that we put trailing slashes in our PATH walk. case $as_dir in #(( ./ | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test ${ac_cv_path_install+y}; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 printf "%s\n" "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 printf %s "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"` # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_STRIP+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 printf "%s\n" "$STRIP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_STRIP+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 printf "%s\n" "$ac_ct_STRIP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5 printf %s "checking for a race-free mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test ${ac_cv_path_mkdir+y} then : printf %s "(cached) " >&6 else $as_nop as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir ('*'coreutils) '* | \ 'BusyBox '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test ${ac_cv_path_mkdir+y}; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 printf "%s\n" "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_AWK+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 printf "%s\n" "$AWK" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$AWK" && break done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval test \${ac_cv_prog_make_${ac_make}_set+y} then : printf %s "(cached) " >&6 else $as_nop cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } SET_MAKE= else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test ${enable_silent_rules+y} then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 printf %s "checking whether $am_make supports nested variables... " >&6; } if test ${am_cv_make_support_nested_variables+y} then : printf %s "(cached) " >&6 else $as_nop if printf "%s\n" 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='flamp' VERSION='2.2.12' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # Variables for tags utilities; see am/tags.am if test -z "$CTAGS"; then CTAGS=ctags fi if test -z "$ETAGS"; then ETAGS=etags fi if test -z "$CSCOPE"; then CSCOPE=cscope fi # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi #change the next config item for the specific application src's ac_config_headers="$ac_config_headers src/config.h" # Checks for programs. ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++ do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CXX+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 printf "%s\n" "$CXX" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CXX+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 printf "%s\n" "$ac_ct_CXX" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5 printf %s "checking whether the C++ compiler works... " >&6; } ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else $as_nop ac_file='' fi if test -z "$ac_file" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C++ compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++ compiler default output file name" >&5 printf %s "checking for C++ compiler default output file name... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 printf "%s\n" "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 printf %s "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else $as_nop { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 printf "%s\n" "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 printf %s "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot run C++ compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 printf "%s\n" "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 printf %s "checking for suffix of object files... " >&6; } if test ${ac_cv_objext+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_nop printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 printf "%s\n" "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C++" >&5 printf %s "checking whether the compiler supports GNU C++... " >&6; } if test ${ac_cv_cxx_compiler_gnu+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO" then : ac_compiler_gnu=yes else $as_nop ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 printf "%s\n" "$ac_cv_cxx_compiler_gnu" >&6; } ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+y} ac_save_CXXFLAGS=$CXXFLAGS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 printf %s "checking whether $CXX accepts -g... " >&6; } if test ${ac_cv_prog_cxx_g+y} then : printf %s "(cached) " >&6 else $as_nop ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO" then : ac_cv_prog_cxx_g=yes else $as_nop CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO" then : else $as_nop ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO" then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 printf "%s\n" "$ac_cv_prog_cxx_g" >&6; } if test $ac_test_CXXFLAGS; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_prog_cxx_stdcxx=no if test x$ac_prog_cxx_stdcxx = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5 printf %s "checking for $CXX option to enable C++11 features... " >&6; } if test ${ac_cv_prog_cxx_11+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cxx_11=no ac_save_CXX=$CXX cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_cxx_conftest_cxx11_program _ACEOF for ac_arg in '' -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x -qlanglvl=extended0x -AA do CXX="$ac_save_CXX $ac_arg" if ac_fn_cxx_try_compile "$LINENO" then : ac_cv_prog_cxx_cxx11=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cxx_cxx11" != "xno" && break done rm -f conftest.$ac_ext CXX=$ac_save_CXX fi if test "x$ac_cv_prog_cxx_cxx11" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cxx_cxx11" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5 printf "%s\n" "$ac_cv_prog_cxx_cxx11" >&6; } CXX="$CXX $ac_cv_prog_cxx_cxx11" fi ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11 ac_prog_cxx_stdcxx=cxx11 fi fi if test x$ac_prog_cxx_stdcxx = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5 printf %s "checking for $CXX option to enable C++98 features... " >&6; } if test ${ac_cv_prog_cxx_98+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cxx_98=no ac_save_CXX=$CXX cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_cxx_conftest_cxx98_program _ACEOF for ac_arg in '' -std=gnu++98 -std=c++98 -qlanglvl=extended -AA do CXX="$ac_save_CXX $ac_arg" if ac_fn_cxx_try_compile "$LINENO" then : ac_cv_prog_cxx_cxx98=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cxx_cxx98" != "xno" && break done rm -f conftest.$ac_ext CXX=$ac_save_CXX fi if test "x$ac_cv_prog_cxx_cxx98" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cxx_cxx98" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5 printf "%s\n" "$ac_cv_prog_cxx_cxx98" >&6; } CXX="$CXX $ac_cv_prog_cxx_cxx98" fi ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98 ac_prog_cxx_stdcxx=cxx98 fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; } cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out .PHONY: am__doit END am__include="#" am__quote= # BSD make does it like this. echo '.include "confinc.mk" # ignored' > confmf.BSD # Other make implementations (GNU, Solaris 10, AIX) do it like this. echo 'include confinc.mk # ignored' > confmf.GNU _am_result=no for s in GNU BSD; do { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } case $?:`cat confinc.out 2>/dev/null` in #( '0:this is the am__doit target') : case $s in #( BSD) : am__include='.include' am__quote='"' ;; #( *) : am__include='include' am__quote='' ;; esac ;; #( *) : ;; esac if test "$am__include" != "#"; then _am_result="yes ($s style)" break fi done rm -f confinc.* confmf.* { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 printf "%s\n" "${_am_result}" >&6; } # Check whether --enable-dependency-tracking was given. if test ${enable_dependency_tracking+y} then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CXX" am_compiler_list= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 printf %s "checking dependency style of $depcc... " >&6; } if test ${am_cv_CXX_dependencies_compiler_type+y} then : printf %s "(cached) " >&6 else $as_nop if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 printf "%s\n" "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. set dummy ${ac_tool_prefix}clang; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}clang" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "clang", so it can be a program name with args. set dummy clang; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="clang" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi fi test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion -version; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 printf %s "checking whether the compiler supports GNU C... " >&6; } if test ${ac_cv_c_compiler_gnu+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_compiler_gnu=yes else $as_nop ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } ac_compiler_gnu=$ac_cv_c_compiler_gnu if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+y} ac_save_CFLAGS=$CFLAGS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 printf %s "checking whether $CC accepts -g... " >&6; } if test ${ac_cv_prog_cc_g+y} then : printf %s "(cached) " >&6 else $as_nop ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes else $as_nop CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else $as_nop ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 printf "%s\n" "$ac_cv_prog_cc_g" >&6; } if test $ac_test_CFLAGS; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi ac_prog_cc_stdc=no if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 printf %s "checking for $CC option to enable C11 features... " >&6; } if test ${ac_cv_prog_cc_c11+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c11_program _ACEOF for ac_arg in '' -std=gnu11 do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c11=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c11" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c11" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cc_c11" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } CC="$CC $ac_cv_prog_cc_c11" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 ac_prog_cc_stdc=c11 fi fi if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 printf %s "checking for $CC option to enable C99 features... " >&6; } if test ${ac_cv_prog_cc_c99+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c99_program _ACEOF for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c99=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c99" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cc_c99" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } CC="$CC $ac_cv_prog_cc_c99" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 ac_prog_cc_stdc=c99 fi fi if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 printf %s "checking for $CC option to enable C89 features... " >&6; } if test ${ac_cv_prog_cc_c89+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c89_program _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c89" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cc_c89" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } CC="$CC $ac_cv_prog_cc_c89" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 ac_prog_cc_stdc=c89 fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 printf %s "checking whether $CC understands -c and -o together... " >&6; } if test ${am_cv_prog_cc_c_o+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 printf "%s\n" "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 printf %s "checking dependency style of $depcc... " >&6; } if test ${am_cv_CC_dependencies_compiler_type+y} then : printf %s "(cached) " >&6 else $as_nop if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_header= ac_cache= for ac_item in $ac_header_c_list do if test $ac_cache; then ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then printf "%s\n" "#define $ac_item 1" >> confdefs.h fi ac_header= ac_cache= elif test $ac_header; then ac_cache=$ac_item else ac_header=$ac_item fi done if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes then : printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; } if test ${ac_cv_safe_to_define___extensions__+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # define __EXTENSIONS__ 1 $ac_includes_default int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_safe_to_define___extensions__=yes else $as_nop ac_cv_safe_to_define___extensions__=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5 printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; } if test ${ac_cv_should_define__xopen_source+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_should_define__xopen_source=no if test $ac_cv_header_wchar_h = yes then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include mbstate_t x; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _XOPEN_SOURCE 500 #include mbstate_t x; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_should_define__xopen_source=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5 printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; } printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h if test $ac_cv_header_minix_config_h = yes then : MINIX=yes printf "%s\n" "#define _MINIX 1" >>confdefs.h printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h else $as_nop MINIX= fi if test $ac_cv_safe_to_define___extensions__ = yes then : printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h fi if test $ac_cv_should_define__xopen_source = yes then : printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h fi # Checks for libraries. # Checks for header files. ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes then : printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" if test "x$ac_cv_header_string_h" = xyes then : printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h fi # Checks for typedefs, structures, and compiler characteristics. ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" if test "x$ac_cv_type__Bool" = xyes then : printf "%s\n" "#define HAVE__BOOL 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 printf %s "checking for stdbool.h that conforms to C99... " >&6; } if test ${ac_cv_header_stdbool_h+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef __bool_true_false_are_defined #error "__bool_true_false_are_defined is not defined" #endif char a[__bool_true_false_are_defined == 1 ? 1 : -1]; /* Regardless of whether this is C++ or "_Bool" is a valid type name, "true" and "false" should be usable in #if expressions and integer constant expressions, and "bool" should be a valid type name. */ #if !true #error "'true' is not true" #endif #if true != 1 #error "'true' is not equal to 1" #endif char b[true == 1 ? 1 : -1]; char c[true]; #if false #error "'false' is not false" #endif #if false != 0 #error "'false' is not equal to 0" #endif char d[false == 0 ? 1 : -1]; enum { e = false, f = true, g = false * true, h = true * 256 }; char i[(bool) 0.5 == true ? 1 : -1]; char j[(bool) 0.0 == false ? 1 : -1]; char k[sizeof (bool) > 0 ? 1 : -1]; struct sb { bool s: 1; bool t; } s; char l[sizeof s.t > 0 ? 1 : -1]; /* The following fails for HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ bool m[h]; char n[sizeof m == h * sizeof m[0] ? 1 : -1]; char o[-1 - (bool) 0 < 0 ? 1 : -1]; /* Catch a bug in an HP-UX C compiler. See https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html https://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ bool p = true; bool *pp = &p; /* C 1999 specifies that bool, true, and false are to be macros, but C++ 2011 and later overrule this. */ #if __cplusplus < 201103 #ifndef bool #error "bool is not defined" #endif #ifndef false #error "false is not defined" #endif #ifndef true #error "true is not defined" #endif #endif /* If _Bool is available, repeat with it all the tests above that used bool. */ #ifdef HAVE__BOOL struct sB { _Bool s: 1; _Bool t; } t; char q[(_Bool) 0.5 == true ? 1 : -1]; char r[(_Bool) 0.0 == false ? 1 : -1]; char u[sizeof (_Bool) > 0 ? 1 : -1]; char v[sizeof t.t > 0 ? 1 : -1]; _Bool w[h]; char x[sizeof m == h * sizeof m[0] ? 1 : -1]; char y[-1 - (_Bool) 0 < 0 ? 1 : -1]; _Bool z = true; _Bool *pz = &p; #endif int main (void) { bool ps = &s; *pp |= p; *pp |= ! p; #ifdef HAVE__BOOL _Bool pt = &t; *pz |= z; *pz |= ! z; #endif /* Refer to every declared value, so they cannot be discarded as unused. */ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !j + !k + !l + !m + !n + !o + !p + !pp + !ps #ifdef HAVE__BOOL + !q + !r + !u + !v + !w + !x + !y + !z + !pt #endif ); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_header_stdbool_h=yes else $as_nop ac_cv_header_stdbool_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 printf "%s\n" "$ac_cv_header_stdbool_h" >&6; } if test $ac_cv_header_stdbool_h = yes; then printf "%s\n" "#define HAVE_STDBOOL_H 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes then : else $as_nop printf "%s\n" "#define size_t unsigned int" >>confdefs.h fi # Checks for library functions. ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo" if test "x$ac_cv_func_getaddrinfo" = xyes then : printf "%s\n" "#define HAVE_GETADDRINFO 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" if test "x$ac_cv_func_gethostbyname" = xyes then : printf "%s\n" "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "hstrerror" "ac_cv_func_hstrerror" if test "x$ac_cv_func_hstrerror" = xyes then : printf "%s\n" "#define HAVE_HSTRERROR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove" if test "x$ac_cv_func_memmove" = xyes then : printf "%s\n" "#define HAVE_MEMMOVE 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset" if test "x$ac_cv_func_memset" = xyes then : printf "%s\n" "#define HAVE_MEMSET 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "mkdir" "ac_cv_func_mkdir" if test "x$ac_cv_func_mkdir" = xyes then : printf "%s\n" "#define HAVE_MKDIR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select" if test "x$ac_cv_func_select" = xyes then : printf "%s\n" "#define HAVE_SELECT 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv" if test "x$ac_cv_func_setenv" = xyes then : printf "%s\n" "#define HAVE_SETENV 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf" if test "x$ac_cv_func_snprintf" = xyes then : printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" if test "x$ac_cv_func_socket" = xyes then : printf "%s\n" "#define HAVE_SOCKET 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "socketpair" "ac_cv_func_socketpair" if test "x$ac_cv_func_socketpair" = xyes then : printf "%s\n" "#define HAVE_SOCKETPAIR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp" if test "x$ac_cv_func_strcasecmp" = xyes then : printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr" if test "x$ac_cv_func_strcasestr" = xyes then : printf "%s\n" "#define HAVE_STRCASESTR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strchr" "ac_cv_func_strchr" if test "x$ac_cv_func_strchr" = xyes then : printf "%s\n" "#define HAVE_STRCHR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup" if test "x$ac_cv_func_strdup" = xyes then : printf "%s\n" "#define HAVE_STRDUP 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror" if test "x$ac_cv_func_strerror" = xyes then : printf "%s\n" "#define HAVE_STRERROR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy" if test "x$ac_cv_func_strlcpy" = xyes then : printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp" if test "x$ac_cv_func_strncasecmp" = xyes then : printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strrchr" "ac_cv_func_strrchr" if test "x$ac_cv_func_strrchr" = xyes then : printf "%s\n" "#define HAVE_STRRCHR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr" if test "x$ac_cv_func_strstr" = xyes then : printf "%s\n" "#define HAVE_STRSTR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen" if test "x$ac_cv_func_strnlen" = xyes then : printf "%s\n" "#define HAVE_STRNLEN 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol" if test "x$ac_cv_func_strtol" = xyes then : printf "%s\n" "#define HAVE_STRTOL 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "uname" "ac_cv_func_uname" if test "x$ac_cv_func_uname" = xyes then : printf "%s\n" "#define HAVE_UNAME 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv" if test "x$ac_cv_func_unsetenv" = xyes then : printf "%s\n" "#define HAVE_UNSETENV 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf" if test "x$ac_cv_func_vsnprintf" = xyes then : printf "%s\n" "#define HAVE_VSNPRINTF 1" >>confdefs.h fi ### static flag # Set ac_cv_static to yes/no # Substitute RTLIB in Makefile # Check whether --enable-static was given. if test ${enable_static+y} then : enableval=$enable_static; case "${enableval}" in yes|no) ac_cv_static="${enableval}" ;; *) as_fn_error $? "bad value ${enableval} for --enable-static" "$LINENO" 5 ;; esac else $as_nop ac_cv_static=no fi ### optimizations # Set ac_cv_opt to arg # Substitute OPT_FLAGS in Makefile # Check whether --enable-optimizations was given. if test ${enable_optimizations+y} then : enableval=$enable_optimizations; case "${enableval}" in none|sse|sse2|sse3|native) ac_cv_opt="${enableval}" ;; *) as_fn_error $? "bad value ${enableval} for --enable-optimizations" "$LINENO" 5 ;; esac else $as_nop ac_cv_opt=none fi OPT_CFLAGS="-O2 -ffast-math -fomit-frame-pointer" case "$ac_cv_opt" in sse) OPT_CFLAGS="$OPT_CFLAGS -msse -mfpmath=sse" ;; sse2) OPT_CFLAGS="$OPT_CFLAGS -msse2 -mfpmath=sse" ;; sse3) OPT_CFLAGS="$OPT_CFLAGS -msse3 -mfpmath=sse" ;; native) OPT_CFLAGS="$OPT_CFLAGS -march=native -mfpmath=sse" ;; none) ;; esac ### debug flag # Set ac_cv_debug to yes/no # Override CXXFLAGS # Set ENABLE_DEBUG Makefile conditional # Substitute RDYNAMIC in Makefile # Check whether --enable-debug was given. if test ${enable_debug+y} then : enableval=$enable_debug; case "${enableval}" in yes|no) ac_cv_debug="${enableval}" ;; *) as_fn_error $? "bad value ${enableval} for --enable-debug" "$LINENO" 5 ;; esac else $as_nop ac_cv_debug=no fi # Check whether --with-bfd was given. if test ${with_bfd+y} then : withval=$with_bfd; ac_cv_want_bfd="$withval" else $as_nop ac_cv_want_bfd=yes fi if test "x$ac_cv_debug" = "xyes" && test "x$ac_cv_want_bfd" != "xno" && \ test "x$target_mingw32" = "xyes"; then if test "x$ac_cv_want_bfd" != "xyes"; then # set -I and -L switches bfd_default_cflags="-I${ac_cv_want_bfd}/include" bfd_default_libs="-L${ac_cv_want_bfd}/lib" fi # don't override the user-specified vars BFD_CFLAGS="${BFD_CFLAGS:-$bfd_default_cflags}" BFD_LIBS="${BFD_LIBS:-$bfd_default_libs}" ac_cv_want_bfd="yes" CPPFLAGS_saved="$CPPFLAGS" LDFLAGS_saved="$LDFLAGS" CPPFLAGS="$CPPFLAGS $BFD_CFLAGS" LDFLAGS="$LDFLAGS $BFD_LIBS" ac_fn_c_check_header_compile "$LINENO" "bfd.h" "ac_cv_header_bfd_h" "$ac_includes_default" if test "x$ac_cv_header_bfd_h" = xyes then : ac_cv_have_bfd="yes" else $as_nop ac_cv_have_bfd="no" fi if test "x$ac_cv_have_bfd" = "xyes"; then bfd_other_libs="-liberty -lpsapi -limagehlp" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bfd_set_format in -lbfd" >&5 printf %s "checking for bfd_set_format in -lbfd... " >&6; } if test ${ac_cv_lib_bfd_bfd_set_format+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfd $bfd_other_libs $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char bfd_set_format (); int main (void) { return bfd_set_format (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_bfd_bfd_set_format=yes else $as_nop ac_cv_lib_bfd_bfd_set_format=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfd_bfd_set_format" >&5 printf "%s\n" "$ac_cv_lib_bfd_bfd_set_format" >&6; } if test "x$ac_cv_lib_bfd_bfd_set_format" = xyes then : ac_cv_have_bfd="yes" else $as_nop ac_cv_have_bfd="no" fi fi CPPFLAGS="$CPPFLAGS_saved" LDFLAGS="$LDFLAGS_saved" if test "x$ac_cv_have_bfd" = "xyes"; then BFD_LIBS="$BFD_LIBS -lbfd $bfd_other_libs" fi fi if test "x$ac_cv_debug" = "xyes"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for debug info flag" >&5 printf %s "checking for debug info flag... " >&6; } if test "x$GXX" = "xyes"; then if test "x$target_mingw32" = "xyes"; then gflag="-gstabs" else gflag="-ggdb3" fi else gflag="-g" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gflag" >&5 printf "%s\n" "$gflag" >&6; } DEBUG_CFLAGS="-O0 -fno-inline-functions -fno-omit-frame-pointer $gflag -Wall" LDFLAGS_saved="$LDFLAGS" LDFLAGS="$LDFLAGS -rdynamic" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -rdynamic" >&5 printf %s "checking whether $CC supports -rdynamic... " >&6; } # don't try this on win32; it succeeds but emits a warning at link time if test "x$target_win32" != "xyes"; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_rdynamic=yes else $as_nop ac_cv_rdynamic=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext else ac_cv_rdynamic=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rdynamic" >&5 printf "%s\n" "$ac_cv_rdynamic" >&6; } ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports -rdynamic" >&5 printf %s "checking whether $CXX supports -rdynamic... " >&6; } if test "x$target_win32" != "xyes"; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO" then : ac_cv_rdynamic=yes else $as_nop ac_cv_rdynamic=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext else ac_cv_rdynamic=no fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rdynamic" >&5 printf "%s\n" "$ac_cv_rdynamic" >&6; } LDFLAGS="$LDFLAGS_saved" if test "x$ac_cv_rdynamic" = "xyes"; then RDYNAMIC=-rdynamic fi CXXFLAGS="" CFLAGS="$CXXFLAGS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: debugging enabled; overriding CXXFLAGS" >&5 printf "%s\n" "$as_me: debugging enabled; overriding CXXFLAGS" >&6;} if test "x$target_darwin" = "xyes"; then ac_cv_compat_stack=yes printf "%s\n" "#define HAVE_DBG_STACK 1" >>confdefs.h elif test "x$target_mingw32" = "xyes" && test "x$ac_cv_have_bfd" = "xyes"; then ac_cv_compat_stack=yes printf "%s\n" "#define HAVE_DBG_STACK 1" >>confdefs.h else ac_cv_compat_stack=no printf "%s\n" "#define HAVE_DBG_STACK 0" >>confdefs.h fi fi if test "x$ac_cv_debug" = "xyes"; then ENABLE_DEBUG_TRUE= ENABLE_DEBUG_FALSE='#' else ENABLE_DEBUG_TRUE='#' ENABLE_DEBUG_FALSE= fi if test "x$ac_cv_compat_stack" = "xyes"; then COMPAT_STACK_TRUE= COMPAT_STACK_FALSE='#' else COMPAT_STACK_TRUE='#' COMPAT_STACK_FALSE= fi ###### OS support ### OSX # Set ac_cv_mac_universal to yes/no # Set DARWIN Makefile conditional # Substitute MAC_UNIVERSAL_CFLAGS and MAC_UNIVERSAL_LDFLAGS in Makefile case "$target_os" in darwin*) target_darwin="yes" ;; *) target_darwin="no" ;; esac # Check whether --enable-mac-universal was given. if test ${enable_mac_universal+y} then : enableval=$enable_mac_universal; case "${enableval}" in yes|no) ac_cv_mac_universal="${enableval}" ;; *) as_fn_error $? "bad value \"${enableval}\" for --enable-mac-universal" "$LINENO" 5 ;; esac else $as_nop ac_cv_mac_universal=no fi if test "x$target_darwin" = "xyes" && test "x$ac_cv_mac_universal" = "xyes"; then mac_minversion="-mmacosx-version-min=10.4" case "$target_os" in darwin8*) mac_arches="-arch i386 -arch ppc" mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.4u.sdk" mac_frameworks="-framework CoreFoundation" ;; darwin9*) mac_arches="-arch i386 -arch ppc -arch x86_64 -arch ppc64" mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.5.sdk" mac_frameworks="-framework CoreFoundation" ;; darwin10*) mac_arches="-arch i386 -arch x86_64" mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.6.sdk" mac_frameworks="-framework CoreFoundation" ;; *) mac_arches="" mac_sysroot="" mac_frameworks="-framework CoreFoundation" ;; esac MAC_UNIVERSAL_CFLAGS="$mac_arches $mac_sysroot $mac_minversion $mac_frameworks" MAC_UNIVERSAL_LDFLAGS="$mac_arches $mac_frameworks" fi if test "x$target_darwin" = "xyes"; then DARWIN_TRUE= DARWIN_FALSE='#' else DARWIN_TRUE='#' DARWIN_FALSE= fi ### win32 # Set WIN32 Makefile conditional # Set HAVE_WINDRES Makefile conditional # Substitute WINDRES in Makefile case "$target_os" in *mingw*) target_win32="yes" target_mingw32="yes" ;; *cygwin*|*win32*|*w32*) target_win32="yes" ;; *) target_win32="no" ;; esac if test "x$target_win32" = "xyes"; then # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. set dummy ${ac_tool_prefix}windres; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_WINDRES+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$WINDRES"; then ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_WINDRES="${ac_tool_prefix}windres" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi WINDRES=$ac_cv_prog_WINDRES if test -n "$WINDRES"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 printf "%s\n" "$WINDRES" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$WINDRES" = "x" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: The windres utility could not be found" >&5 printf "%s\n" "$as_me: WARNING: The windres utility could not be found" >&2;} fi printf "%s\n" "#define __WOE32__ 1" >>confdefs.h printf "%s\n" "#define __MINGW32__ 1" >>confdefs.h printf "%s\n" "#define _WINDOWS 1" >>confdefs.h fi if test "x$target_mingw32" = "xyes"; then # Extract the first word of "makensis", so it can be a program name with args. set dummy makensis; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_MAKENSIS+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$MAKENSIS"; then ac_cv_prog_MAKENSIS="$MAKENSIS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_MAKENSIS="makensis" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MAKENSIS=$ac_cv_prog_MAKENSIS if test -n "$MAKENSIS"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAKENSIS" >&5 printf "%s\n" "$MAKENSIS" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test "x$WINDRES" != "x"; then HAVE_WINDRES_TRUE= HAVE_WINDRES_FALSE='#' else HAVE_WINDRES_TRUE='#' HAVE_WINDRES_FALSE= fi if test "x$MAKENSIS" != "x"; then HAVE_NSIS_TRUE= HAVE_NSIS_FALSE='#' else HAVE_NSIS_TRUE='#' HAVE_NSIS_FALSE= fi if test "x$target_win32" = "xyes"; then WIN32_TRUE= WIN32_FALSE='#' else WIN32_TRUE='#' WIN32_FALSE= fi if test "x$target_mingw32" = "xyes"; then MINGW32_TRUE= MINGW32_FALSE='#' else MINGW32_TRUE='#' MINGW32_FALSE= fi # Check whether --with-ptw32 was given. if test ${with_ptw32+y} then : withval=$with_ptw32; ac_cv_want_ptw32="$withval" else $as_nop ac_cv_want_ptw32=no fi if test "x$ac_cv_want_ptw32" != "xno"; then if test "x$ac_cv_want_ptw32" != "xyes"; then # set -I and -L switches ptw32_default_cflags="-I${ac_cv_want_ptw32}/include" ptw32_default_libs="-L${ac_cv_want_ptw32}/lib" fi ptw32_default_cflags="-DPTW32_STATIC_LIB $ptw32_default_cflags" ptw32_default_libs="$ptw32_default_libs -lpthreadGC2 -lws2_32" # don't override the user-specified vars PTW32_CFLAGS="${PTW32_CFLAGS:-$ptw32_default_cflags}" PTW32_LIBS="${PTW32_LIBS:-$ptw32_default_libs}" ac_cv_want_ptw32="yes" else if test "x$target_mingw32" = "xyes"; then PTW32_LIBS="-lpthread -lwsock32 -lws2_32" fi fi ### Non-POSIX compatibility (i.e. mingw32) # Sets various Makefile conditionals; see m4/np-compat.m4 if test "x$ac_cv_header_regex_h" != "xyes"; then COMPAT_REGEX_TRUE= COMPAT_REGEX_FALSE='#' else COMPAT_REGEX_TRUE='#' COMPAT_REGEX_FALSE= fi if test "x$target_mingw32" = "xyes"; then sem_libs="pthreadGC2" else sem_libs="pthread rt" fi other_libs="" if test "x$ac_cv_want_ptw32" = "xyes"; then CFLAGS_saved="$CFLAGS" LDFLAGS_saved="$LDFLAGS" EXTRA_LIBS_saved="$EXTRA_LIBS" CFLAGS="$CFLAGS $PTW32_CFLAGS" LDFLAGS="$LDFLAGS $PTW32_LIBS" other_libs=-lws2_32 fi LIBS_search_libs_save="$LIBS" LIBS="" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 printf %s "checking for library containing dlopen... " >&6; } if test ${ac_cv_search_dlopen+y} then : printf %s "(cached) " >&6 else $as_nop ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char dlopen (); int main (void) { return dlopen (); ; return 0; } _ACEOF for ac_lib in '' dl do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $other_libs $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO" then : ac_cv_search_dlopen=$ac_res fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext if test ${ac_cv_search_dlopen+y} then : break fi done if test ${ac_cv_search_dlopen+y} then : else $as_nop ac_cv_search_dlopen=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 printf "%s\n" "$ac_cv_search_dlopen" >&6; } ac_res=$ac_cv_search_dlopen if test "$ac_res" != no then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" ac_cv_have_func_dlopen=1 else $as_nop ac_cv_have_func_dlopen=0 fi if test "x$LIBS" != "x"; then echo "$EXTRA_LIBS" | grep -q -e "$LIBS" || EXTRA_LIBS="$EXTRA_LIBS $LIBS" fi printf "%s\n" "#define HAVE_DLOPEN $ac_cv_have_func_dlopen" >>confdefs.h LIBS="$LIBS_search_libs_save" LIBS_search_libs_save="$LIBS" LIBS="" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 printf %s "checking for library containing clock_gettime... " >&6; } if test ${ac_cv_search_clock_gettime+y} then : printf %s "(cached) " >&6 else $as_nop ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char clock_gettime (); int main (void) { return clock_gettime (); ; return 0; } _ACEOF for ac_lib in '' rt do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $other_libs $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO" then : ac_cv_search_clock_gettime=$ac_res fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext if test ${ac_cv_search_clock_gettime+y} then : break fi done if test ${ac_cv_search_clock_gettime+y} then : else $as_nop ac_cv_search_clock_gettime=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 printf "%s\n" "$ac_cv_search_clock_gettime" >&6; } ac_res=$ac_cv_search_clock_gettime if test "$ac_res" != no then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" ac_cv_have_func_clock_gettime=1 else $as_nop ac_cv_have_func_clock_gettime=0 fi if test "x$LIBS" != "x"; then echo "$EXTRA_LIBS" | grep -q -e "$LIBS" || EXTRA_LIBS="$EXTRA_LIBS $LIBS" fi printf "%s\n" "#define HAVE_CLOCK_GETTIME $ac_cv_have_func_clock_gettime" >>confdefs.h LIBS="$LIBS_search_libs_save" LIBS_search_libs_save="$LIBS" LIBS="" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing gmtime_r" >&5 printf %s "checking for library containing gmtime_r... " >&6; } if test ${ac_cv_search_gmtime_r+y} then : printf %s "(cached) " >&6 else $as_nop ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char gmtime_r (); int main (void) { return gmtime_r (); ; return 0; } _ACEOF for ac_lib in '' rt do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $other_libs $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO" then : ac_cv_search_gmtime_r=$ac_res fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext if test ${ac_cv_search_gmtime_r+y} then : break fi done if test ${ac_cv_search_gmtime_r+y} then : else $as_nop ac_cv_search_gmtime_r=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gmtime_r" >&5 printf "%s\n" "$ac_cv_search_gmtime_r" >&6; } ac_res=$ac_cv_search_gmtime_r if test "$ac_res" != no then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" ac_cv_have_func_gmtime_r=1 else $as_nop ac_cv_have_func_gmtime_r=0 fi if test "x$LIBS" != "x"; then echo "$EXTRA_LIBS" | grep -q -e "$LIBS" || EXTRA_LIBS="$EXTRA_LIBS $LIBS" fi printf "%s\n" "#define HAVE_GMTIME_R $ac_cv_have_func_gmtime_r" >>confdefs.h LIBS="$LIBS_search_libs_save" LIBS_search_libs_save="$LIBS" LIBS="" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sem_unlink" >&5 printf %s "checking for library containing sem_unlink... " >&6; } if test ${ac_cv_search_sem_unlink+y} then : printf %s "(cached) " >&6 else $as_nop ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char sem_unlink (); int main (void) { return sem_unlink (); ; return 0; } _ACEOF for ac_lib in '' $sem_libs do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $other_libs $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO" then : ac_cv_search_sem_unlink=$ac_res fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext if test ${ac_cv_search_sem_unlink+y} then : break fi done if test ${ac_cv_search_sem_unlink+y} then : else $as_nop ac_cv_search_sem_unlink=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_unlink" >&5 printf "%s\n" "$ac_cv_search_sem_unlink" >&6; } ac_res=$ac_cv_search_sem_unlink if test "$ac_res" != no then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" ac_cv_have_func_sem_unlink=1 else $as_nop ac_cv_have_func_sem_unlink=0 fi if test "x$LIBS" != "x"; then echo "$EXTRA_LIBS" | grep -q -e "$LIBS" || EXTRA_LIBS="$EXTRA_LIBS $LIBS" fi printf "%s\n" "#define HAVE_SEM_UNLINK $ac_cv_have_func_sem_unlink" >>confdefs.h LIBS="$LIBS_search_libs_save" LIBS_search_libs_save="$LIBS" LIBS="" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sem_timedwait" >&5 printf %s "checking for library containing sem_timedwait... " >&6; } if test ${ac_cv_search_sem_timedwait+y} then : printf %s "(cached) " >&6 else $as_nop ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char sem_timedwait (); int main (void) { return sem_timedwait (); ; return 0; } _ACEOF for ac_lib in '' $sem_libs do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $other_libs $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO" then : ac_cv_search_sem_timedwait=$ac_res fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext if test ${ac_cv_search_sem_timedwait+y} then : break fi done if test ${ac_cv_search_sem_timedwait+y} then : else $as_nop ac_cv_search_sem_timedwait=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_timedwait" >&5 printf "%s\n" "$ac_cv_search_sem_timedwait" >&6; } ac_res=$ac_cv_search_sem_timedwait if test "$ac_res" != no then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" ac_cv_have_func_sem_timedwait=1 else $as_nop ac_cv_have_func_sem_timedwait=0 fi if test "x$LIBS" != "x"; then echo "$EXTRA_LIBS" | grep -q -e "$LIBS" || EXTRA_LIBS="$EXTRA_LIBS $LIBS" fi printf "%s\n" "#define HAVE_SEM_TIMEDWAIT $ac_cv_have_func_sem_timedwait" >>confdefs.h LIBS="$LIBS_search_libs_save" if test "x$ac_cv_want_ptw32" = "xyes"; then CFLAGS="$CFLAGS_saved" LDFLAGS="$LDFLAGS_saved" EXTRA_LIBS="$EXTRA_LIBS_saved" fi if test "x$ac_cv_func_strcasestr" != "xyes"; then COMPAT_STRCASESTR_TRUE= COMPAT_STRCASESTR_FALSE='#' else COMPAT_STRCASESTR_TRUE='#' COMPAT_STRCASESTR_FALSE= fi ### FLTK # Substitute FLTK_CFLAGS and FLTK_LIBS in Makefile # Set FLUID variable # Set HAVE_FLUID Makefile conditional if test "x$FLTK_CFLAGS" = "x" && test "x$FLTK_LIBS" = "x"; then if test "x$FLTK_CONFIG" = "x"; then # Extract the first word of "fltk-config", so it can be a program name with args. set dummy fltk-config; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_FLTK_CONFIG+y} then : printf %s "(cached) " >&6 else $as_nop case $FLTK_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_FLTK_CONFIG="$FLTK_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_FLTK_CONFIG="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_FLTK_CONFIG" && ac_cv_path_FLTK_CONFIG="no" ;; esac fi FLTK_CONFIG=$ac_cv_path_FLTK_CONFIG if test -n "$FLTK_CONFIG"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FLTK_CONFIG" >&5 printf "%s\n" "$FLTK_CONFIG" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fltk-config" >&5 printf %s "checking for fltk-config... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FLTK_CONFIG" >&5 printf "%s\n" "$FLTK_CONFIG" >&6; } fi if test "$FLTK_CONFIG" = "no"; then as_fn_error $? " *** The fltk-config script could not be found. Please install the development *** headers and libraries for FLTK 1.3.x, FLTK 1.4.x, or set PATH to the directory that *** contains fltk-config. " "$LINENO" 5 fi HAVE_FLTK_API_VERSION=no FLTK_API_VERSION="`$FLTK_CONFIG --api-version`" if test $? -ne 0; then as_fn_error $? "$FLTK_CONFIG failed" "$LINENO" 5 fi if test "x$FLTK_API_VERSION" = "x1.3" || test "x$FLTK_API_VERSION" = "x1.4"; then HAVE_FLTK_API_VERSION=yes fi FLTK_VERSION="`$FLTK_CONFIG --version`" FLAMP_FLTK_API_MAJOR=${FLTK_VERSION%%.*} FLAMP_FLTK_API_MINOR=${FLTK_VERSION#*.}; FLAMP_FLTK_API_MINOR=${FLAMP_FLTK_API_MINOR%%.*} FLAMP_FLTK_API_PATCH=${FLTK_VERSION#*.}; FLAMP_FLTK_API_PATCH=${FLAMP_FLTK_API_PATCH#*.}; if test "${HAVE_FLTK_API_VERSION}" = "no"; then as_fn_error $? " *** The version of FLTK found on your system provides API version $FLTK_API_VERSION. *** To build $PACKAGE you need a FLTK version that provides API 1.3. " "$LINENO" 5 fi FLTK_CFLAGS=`$FLTK_CONFIG --cxxflags` if test "x$ac_cv_static" != "xyes"; then FLTK_LIBS=`$FLTK_CONFIG --ldflags --use-images` else FLTK_LIBS=`$FLTK_CONFIG --ldstaticflags --use-images` fi else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not checking for FLTK" >&5 printf "%s\n" "$as_me: not checking for FLTK" >&6;} fi cat >>confdefs.h <<_ACEOF #define FLTK_BUILD_VERSION "`$FLTK_CONFIG --version`" _ACEOF printf "%s\n" "#define FLAMP_FLTK_API_MAJOR $FLAMP_FLTK_API_MAJOR" >>confdefs.h printf "%s\n" "#define FLAMP_FLTK_API_MINOR $FLAMP_FLTK_API_MINOR" >>confdefs.h printf "%s\n" "#define FLAMP_FLTK_API_PATCH $FLAMP_FLTK_API_PATCH" >>confdefs.h # Extract the first word of "fluid", so it can be a program name with args. set dummy fluid; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_FLUID+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$FLUID"; then ac_cv_prog_FLUID="$FLUID" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_FLUID="fluid" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi FLUID=$ac_cv_prog_FLUID if test -n "$FLUID"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FLUID" >&5 printf "%s\n" "$FLUID" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test -n "$FLUID"; then HAVE_FLUID_TRUE= HAVE_FLUID_FALSE='#' else HAVE_FLUID_TRUE='#' HAVE_FLUID_FALSE= fi ### XML-RPC library # Set ac_cv_xmlrpc to yes/no # Substitute XMLRPC_CFLAGS and XMLRPC_LIBS in Makefile # Define USE_XMLRPC in config.h # Set ENABLE_XMLRPC Makefile conditional #AC_FLAMP_XMLRPC ### X11 # Set ac_cv_x to yes/no # Define USE_X in config.h # Substitute X_CFLAGS and X_LIBS in Makefile if test "x$target_darwin" = "xno" && test "x$target_win32" = "xno"; then if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_PKG_CONFIG+y} then : printf %s "(cached) " >&6 else $as_nop case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 printf "%s\n" "$PKG_CONFIG" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_ac_pt_PKG_CONFIG+y} then : printf %s "(cached) " >&6 else $as_nop case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } PKG_CONFIG="" fi fi test "x$ac_cv_want_x" = "x" && ac_cv_want_x="check" case "x$ac_cv_want_x" in "xno") ac_cv_x=no ;; "xcheck") pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for x11" >&5 printf %s "checking for x11... " >&6; } if test -n "$X_CFLAGS"; then pkg_cv_X_CFLAGS="$X_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_X_CFLAGS=`$PKG_CONFIG --cflags "x11" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$X_LIBS"; then pkg_cv_X_LIBS="$X_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_X_LIBS=`$PKG_CONFIG --libs "x11" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then X_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "x11" 2>&1` else X_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "x11" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$X_PKG_ERRORS" >&5 ac_cv_x=no elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ac_cv_x=no else X_CFLAGS=$pkg_cv_X_CFLAGS X_LIBS=$pkg_cv_X_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } ac_cv_x=yes fi ;; "xyes") pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for x11" >&5 printf %s "checking for x11... " >&6; } if test -n "$X_CFLAGS"; then pkg_cv_X_CFLAGS="$X_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_X_CFLAGS=`$PKG_CONFIG --cflags "x11" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$X_LIBS"; then pkg_cv_X_LIBS="$X_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_X_LIBS=`$PKG_CONFIG --libs "x11" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then X_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "x11" 2>&1` else X_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "x11" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$X_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (x11) were not met: $X_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables X_CFLAGS and X_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables X_CFLAGS and X_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else X_CFLAGS=$pkg_cv_X_CFLAGS X_LIBS=$pkg_cv_X_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi # if we get here the test has succeeded ac_cv_x=yes ;; esac if test "x$ac_cv_x" = "xyes"; then printf "%s\n" "#define USE_X 1" >>confdefs.h pkg_x_version=`$PKG_CONFIG --modversion "x11" 2>/dev/null` else printf "%s\n" "#define USE_X 0" >>confdefs.h pkg_x_version="" fi printf "%s\n" "#define X_BUILD_VERSION \"$pkg_x_version\"" >>confdefs.h : fi ### asciidoc # substitute ASCIIDOC and A2X in doc/Makefile # set HAVE_ASCIIDOC Makefile conditional #AC_FLAMP_DOCS ### libflxmlrpc # Set ac_cv_flxmlrpc to yes/no # Define USE_FLXMLRPC in config.h # Substitute FLXMLRPC_CFLAGS and FLXMLRPC_LIBS in Makefile # Check whether --with-flxmlrpc was given. if test ${with_flxmlrpc+y} then : withval=$with_flxmlrpc; case "${withval}" in yes|no) ac_cv_want_flxmlrpc="${withval}" ;; *) as_fn_error $? "bad value \"${withval}\" for --with-flxmlrpc" "$LINENO" 5 ;; esac else $as_nop ac_cv_want_flxmlrpc=check fi test "x$ac_cv_want_flxmlrpc" = "x" && ac_cv_want_flxmlrpc="check" case "x$ac_cv_want_flxmlrpc" in "xno") ac_cv_flxmlrpc=no ;; "xcheck") pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flxmlrpc >= 1.0.0" >&5 printf %s "checking for flxmlrpc >= 1.0.0... " >&6; } if test -n "$FLXMLRPC_CFLAGS"; then pkg_cv_FLXMLRPC_CFLAGS="$FLXMLRPC_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"flxmlrpc >= 1.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "flxmlrpc >= 1.0.0") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_FLXMLRPC_CFLAGS=`$PKG_CONFIG --cflags "flxmlrpc >= 1.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$FLXMLRPC_LIBS"; then pkg_cv_FLXMLRPC_LIBS="$FLXMLRPC_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"flxmlrpc >= 1.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "flxmlrpc >= 1.0.0") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_FLXMLRPC_LIBS=`$PKG_CONFIG --libs "flxmlrpc >= 1.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then FLXMLRPC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "flxmlrpc >= 1.0.0" 2>&1` else FLXMLRPC_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "flxmlrpc >= 1.0.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$FLXMLRPC_PKG_ERRORS" >&5 ac_cv_flxmlrpc=no elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ac_cv_flxmlrpc=no else FLXMLRPC_CFLAGS=$pkg_cv_FLXMLRPC_CFLAGS FLXMLRPC_LIBS=$pkg_cv_FLXMLRPC_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } ac_cv_flxmlrpc=yes fi ;; "xyes") pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flxmlrpc >= 1.0.0" >&5 printf %s "checking for flxmlrpc >= 1.0.0... " >&6; } if test -n "$FLXMLRPC_CFLAGS"; then pkg_cv_FLXMLRPC_CFLAGS="$FLXMLRPC_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"flxmlrpc >= 1.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "flxmlrpc >= 1.0.0") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_FLXMLRPC_CFLAGS=`$PKG_CONFIG --cflags "flxmlrpc >= 1.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$FLXMLRPC_LIBS"; then pkg_cv_FLXMLRPC_LIBS="$FLXMLRPC_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"flxmlrpc >= 1.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "flxmlrpc >= 1.0.0") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_FLXMLRPC_LIBS=`$PKG_CONFIG --libs "flxmlrpc >= 1.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then FLXMLRPC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "flxmlrpc >= 1.0.0" 2>&1` else FLXMLRPC_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "flxmlrpc >= 1.0.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$FLXMLRPC_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (flxmlrpc >= 1.0.0) were not met: $FLXMLRPC_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables FLXMLRPC_CFLAGS and FLXMLRPC_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables FLXMLRPC_CFLAGS and FLXMLRPC_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else FLXMLRPC_CFLAGS=$pkg_cv_FLXMLRPC_CFLAGS FLXMLRPC_LIBS=$pkg_cv_FLXMLRPC_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi # if we get here the test has succeeded ac_cv_flxmlrpc=yes ;; esac if test "x$ac_cv_flxmlrpc" = "xyes"; then printf "%s\n" "#define USE_FLXMLRPC 1" >>confdefs.h pkg_flxmlrpc_version=`$PKG_CONFIG --modversion "flxmlrpc >= 1.0.0" 2>/dev/null` else printf "%s\n" "#define USE_FLXMLRPC 0" >>confdefs.h pkg_flxmlrpc_version="" fi printf "%s\n" "#define FLXMLRPC_BUILD_VERSION \"$pkg_flxmlrpc_version\"" >>confdefs.h if test "x$ac_cv_flxmlrpc" = "xyes"; then ENABLE_FLXMLRPC_TRUE= ENABLE_FLXMLRPC_FALSE='#' else ENABLE_FLXMLRPC_TRUE='#' ENABLE_FLXMLRPC_FALSE= fi ### build info # Define various build variables in config.h # Define build flags and substitute in Makefile.in # CPPFLAGS FLAMP_BUILD_CPPFLAGS="-I\$(srcdir) -I\$(srcdir)/include" if test "x$ac_cv_flxmlrpc" != "xyes"; then FLAMP_BUILD_CPPFLAGS="$FLAMP_BUILD_CPPFLAGS -I\$(srcdir)/xmlrpcpp" fi if test "x$target_win32" = "xyes"; then FLAMP_BUILD_CPPFLAGS="$FLAMP_BUILD_CPPFLAGS -D_WINDOWS" fi # CXXFLAGS FLAMP_BUILD_CXXFLAGS="$FLTK_CFLAGS -I\$(srcdir) -I\$(srcdir)/include \ $X_CFLAGS -pipe -Wall -fexceptions $OPT_CFLAGS $DEBUG_CFLAGS $PTW32_CFLAGS" if test "x$ac_cv_flxmlrpc" != "xyes"; then FLAMP_BUILD_CXXFLAGS="-I\$(srcdir)/xmlrpcpp $FLAMP_BUILD_CXXFLAGS" fi if test "x$target_mingw32" = "xyes"; then FLAMP_BUILD_CXXFLAGS="-mthreads $FLAMP_BUILD_CXXFLAGS" fi # LDFLAGS FLAMP_BUILD_LDFLAGS= # LDADD FLAMP_BUILD_LDADD="$FLTK_LIBS $X_LIBS $EXTRA_LIBS $PTW32_LIBS $FLXMLRPC_LIBS" if test "x$ac_cv_debug" = "xyes"; then FLAMP_BUILD_CXXFLAGS="$FLAMP_BUILD_CXXFLAGS -UNDEBUG" FLAMP_BUILD_LDFLAGS="$FLAMP_BUILD_LDFLAGS $RDYNAMIC" else FLAMP_BUILD_CXXFLAGS="$FLAMP_BUILD_CXXFLAGS -DNDEBUG" fi if test "x$target_mingw32" = "xyes"; then FLAMP_BUILD_LDFLAGS="-mthreads $FLAMP_BUILD_LDFLAGS" fi #define build variables for config.h printf "%s\n" "#define BUILD_BUILD_PLATFORM \"$build\"" >>confdefs.h printf "%s\n" "#define BUILD_HOST_PLATFORM \"$host\"" >>confdefs.h printf "%s\n" "#define BUILD_TARGET_PLATFORM \"$target\"" >>confdefs.h test "x$LC_ALL" != "x" && LC_ALL_saved="$LC_ALL" LC_ALL=C export LC_ALL ac_sh_dq="\"`echo $ac_configure_args | sed 's/"/\\\\"/g'`\"" printf "%s\n" "#define BUILD_CONFIGURE_ARGS $ac_sh_dq" >>confdefs.h # Allow BUILD_DATE, BUILD_USER, BUILD_HOST to be externally overridden by # environment variables. ac_sh_dq="\"$BUILD_DATE\"" test "x$BUILD_DATE" = "x" && ac_sh_dq="\"`date | sed 's/"/\\\\"/g'`\"" printf "%s\n" "#define BUILD_DATE $ac_sh_dq" >>confdefs.h ac_sh_dq="\"$BUILD_USER\"" test "x$BUILD_USER" = "x" && ac_sh_dq="\"`whoami | sed 's/"/\\\\"/g'`\"" printf "%s\n" "#define BUILD_USER $ac_sh_dq" >>confdefs.h ac_sh_dq="\"$BUILD_HOST\"" test "x$BUILD_HOST" = "x" && ac_sh_dq="\"`hostname | sed 's/"/\\\\"/g'`\"" printf "%s\n" "#define BUILD_HOST $ac_sh_dq" >>confdefs.h ac_sh_dq="\"`$CXX -v 2>&1 | tail -1 | sed 's/"/\\\\"/g'`\"" printf "%s\n" "#define BUILD_COMPILER $ac_sh_dq" >>confdefs.h ac_sh_dq="\"`echo $FLAMP_BUILD_CPPFLAGS $FLAMP_BUILD_CXXFLAGS | sed 's/"/\\\\"/g'`\"" printf "%s\n" "#define FLAMP_BUILD_CXXFLAGS $ac_sh_dq" >>confdefs.h ac_sh_dq="\"`echo $FLAMP_BUILD_LDFLAGS $FLAMP_BUILD_LDADD | sed 's/"/\\\\"/g'`\"" printf "%s\n" "#define FLAMP_BUILD_LDFLAGS $ac_sh_dq" >>confdefs.h if test "x$LC_ALL_saved" != "x"; then LC_ALL="$LC_ALL_saved" export LC_ALL fi #AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile]) ac_config_files="$ac_config_files Makefile src/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 printf "%s\n" "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 printf %s "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5 printf "%s\n" "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_DEBUG_TRUE}" && test -z "${ENABLE_DEBUG_FALSE}"; then as_fn_error $? "conditional \"ENABLE_DEBUG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${COMPAT_STACK_TRUE}" && test -z "${COMPAT_STACK_FALSE}"; then as_fn_error $? "conditional \"COMPAT_STACK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DARWIN_TRUE}" && test -z "${DARWIN_FALSE}"; then as_fn_error $? "conditional \"DARWIN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_WINDRES_TRUE}" && test -z "${HAVE_WINDRES_FALSE}"; then as_fn_error $? "conditional \"HAVE_WINDRES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_NSIS_TRUE}" && test -z "${HAVE_NSIS_FALSE}"; then as_fn_error $? "conditional \"HAVE_NSIS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WIN32_TRUE}" && test -z "${WIN32_FALSE}"; then as_fn_error $? "conditional \"WIN32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${MINGW32_TRUE}" && test -z "${MINGW32_FALSE}"; then as_fn_error $? "conditional \"MINGW32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${COMPAT_REGEX_TRUE}" && test -z "${COMPAT_REGEX_FALSE}"; then as_fn_error $? "conditional \"COMPAT_REGEX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${COMPAT_STRCASESTR_TRUE}" && test -z "${COMPAT_STRCASESTR_FALSE}"; then as_fn_error $? "conditional \"COMPAT_STRCASESTR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_FLUID_TRUE}" && test -z "${HAVE_FLUID_FALSE}"; then as_fn_error $? "conditional \"HAVE_FLUID\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_FLXMLRPC_TRUE}" && test -z "${ENABLE_FLXMLRPC_FALSE}"; then as_fn_error $? "conditional \"ENABLE_FLXMLRPC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh as_nop=: if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi # Reset variables that may have inherited troublesome values from # the environment. # IFS needs to be set, to space, tab, and newline, in precisely that order. # (If _AS_PATH_WALK were called with IFS unset, it would have the # side effect of setting IFS to empty, thus disabling word splitting.) # Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl IFS=" "" $as_nl" PS1='$ ' PS2='> ' PS4='+ ' # Ensure predictable behavior from utilities with locale-dependent output. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # We cannot yet rely on "unset" to work, but we need these variables # to be unset--not just set to an empty or harmless value--now, to # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct # also avoids known problems related to "unset" and subshell syntax # in other old shells (e.g. bash 2.01 and pdksh 5.2.14). for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH do eval test \${$as_var+y} \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done # Ensure that fds 0, 1, and 2 are open. if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null then : eval 'as_fn_append () { eval $1+=\$2 }' else $as_nop as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null then : eval 'as_fn_arith () { as_val=$(( $* )) }' else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # Determine whether it's possible to make 'echo' print without a newline. # These variables are no longer used directly by Autoconf, but are AC_SUBSTed # for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac # For backward compatibility with old third-party macros, we provide # the shell variables $as_echo and $as_echo_n. New code should use # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. as_echo='printf %s\n' as_echo_n='printf %s' rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by FLAMP $as_me 2.2.12, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ FLAMP config.status 2.2.12 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" Copyright (C) 2021 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) printf "%s\n" "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) printf "%s\n" "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) printf "%s\n" "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX printf "%s\n" "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 printf "%s\n" "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`printf "%s\n" "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 printf "%s\n" "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. # TODO: see whether this extra hack can be removed once we start # requiring Autoconf 2.70 or later. case $CONFIG_FILES in #( *\'*) : eval set x "$CONFIG_FILES" ;; #( *) : set x $CONFIG_FILES ;; #( *) : ;; esac shift # Used to flag and report bootstrapping failures. am_rc=0 for am_mf do # Strip MF so we end up with the name of the file. am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ || continue am_dirpart=`$as_dirname -- "$am_mf" || $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$am_mf" : 'X\(//\)[^/]' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$am_mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` am_filepart=`$as_basename -- "$am_mf" || $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X/"$am_mf" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` { echo "$as_me:$LINENO: cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles" >&5 (cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } || am_rc=$? done if test $am_rc -ne 0; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments for automatic dependency tracking. If GNU make was not used, consider re-running the configure script with MAKE=\"gmake\" (or whatever is necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See \`config.log' for more details" "$LINENO" 5; } fi { am_dirpart=; unset am_dirpart;} { am_filepart=; unset am_filepart;} { am_mf=; unset am_mf;} { am_rc=; unset am_rc;} rm -f conftest-deps.mk } ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi ac_xmlrpc_report="internal lib"; if test "x$ac_cv_flxmlrpc" = "xyes"; then ac_xmlrpc_report="external lib"; fi ### summary { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Configuration summary: Version ..................... $VERSION Target OS ................... $target_os Have flxmlrpc library ....... $ac_xmlrpc_report Static linking .............. $ac_cv_static CPU optimizations ........... $ac_cv_opt Debugging ................... $ac_cv_debug " >&5 printf "%s\n" " Configuration summary: Version ..................... $VERSION Target OS ................... $target_os Have flxmlrpc library ....... $ac_xmlrpc_report Static linking .............. $ac_cv_static CPU optimizations ........... $ac_cv_opt Debugging ................... $ac_cv_debug " >&6; } flamp-2.2.12/configure.ac0000664000175000017500000001054014607047455012122 00000000000000# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. # Generic support for FLTK applications AC_COPYRIGHT([Copyright (C) 2009 Dave Freese, W1HKJ (w1hkj AT w1hkj DOT com)]) AC_PREREQ([2.63]) dnl major and minor must be integers; patch may dnl contain other characters or be empty m4_define(FLAMP_MAJOR, [2]) m4_define(FLAMP_MINOR, [2]) m4_define(FLAMP_PATCH, [.12]) AC_INIT([FLAMP], FLAMP_MAJOR.FLAMP_MINOR[]FLAMP_PATCH, [w1hkj AT w1hkj DOT com]) AC_SUBST([FLAMP_VERSION_MAJOR], [FLAMP_MAJOR]) AC_SUBST([FLAMP_VERSION_MINOR], [FLAMP_MINOR]) AC_SUBST([FLAMP_VERSION_PATCH], [FLAMP_PATCH]) AC_SUBST([FLAMP_VERSION], [FLAMP_MAJOR.FLAMP_MINOR[]FLAMP_PATCH]) AC_DEFINE([FLAMP_VERSION_MAJOR], [FLAMP_MAJOR], [major version number]) AC_DEFINE([FLAMP_VERSION_MINOR], [FLAMP_MINOR], [minor version number]) AC_DEFINE([FLAMP_VERSION_PATCH], ["FLAMP_PATCH"], [patch/alpha version string]) AC_DEFINE([FLAMP_VERSION], ["FLAMP_MAJOR.FLAMP_MINOR[]FLAMP_PATCH"], [version string]) AC_SUBST([AC_CONFIG_ARGS], [$ac_configure_args]) AC_CONFIG_AUX_DIR([build-aux]) # define build, build_cpu, build_vendor, build_os AC_CANONICAL_BUILD # define host, host_cpu, host_vendor, host_os AC_CANONICAL_HOST # define target, target_cpu, target_vendor, target_os AC_CANONICAL_TARGET AM_INIT_AUTOMAKE([-Wall foreign std-options subdir-objects 1.9.6]) #change the next config item for the specific application src's AC_CONFIG_SRCDIR([src/flamp.cxx]) AC_CONFIG_HEADERS([src/config.h]) AC_CONFIG_MACRO_DIR([m4]) # Checks for programs. AC_PROG_CXX AC_PROG_CC AC_USE_SYSTEM_EXTENSIONS # Checks for libraries. # Checks for header files. AC_CHECK_HEADERS([stdlib.h string.h]) # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL AC_TYPE_SIZE_T # Checks for library functions. AC_CHECK_FUNCS([getaddrinfo gethostbyname hstrerror memmove memset mkdir select setenv snprintf socket socketpair strcasecmp strcasestr strchr strdup strerror strlcpy strncasecmp strrchr strstr strnlen strtol uname unsetenv vsnprintf]) ### static flag # Set ac_cv_static to yes/no # Substitute RTLIB in Makefile AC_FL_STATIC ### optimizations # Set ac_cv_opt to arg # Substitute OPT_FLAGS in Makefile AC_FL_OPT ### debug flag # Set ac_cv_debug to yes/no # Override CXXFLAGS # Set ENABLE_DEBUG Makefile conditional # Substitute RDYNAMIC in Makefile AC_FL_DEBUG ###### OS support ### OSX # Set ac_cv_mac_universal to yes/no # Set DARWIN Makefile conditional # Substitute MAC_UNIVERSAL_CFLAGS and MAC_UNIVERSAL_LDFLAGS in Makefile AC_FL_MACOSX ### win32 # Set WIN32 Makefile conditional # Set HAVE_WINDRES Makefile conditional # Substitute WINDRES in Makefile AC_FL_WIN32 ### Non-POSIX compatibility (i.e. mingw32) # Sets various Makefile conditionals; see m4/np-compat.m4 AC_FLAMP_NP_COMPAT ### FLTK # Substitute FLTK_CFLAGS and FLTK_LIBS in Makefile # Set FLUID variable # Set HAVE_FLUID Makefile conditional AC_CHECK_FLTK ### XML-RPC library # Set ac_cv_xmlrpc to yes/no # Substitute XMLRPC_CFLAGS and XMLRPC_LIBS in Makefile # Define USE_XMLRPC in config.h # Set ENABLE_XMLRPC Makefile conditional #AC_FLAMP_XMLRPC ### X11 # Set ac_cv_x to yes/no # Define USE_X in config.h # Substitute X_CFLAGS and X_LIBS in Makefile if test "x$target_darwin" = "xno" && test "x$target_win32" = "xno"; then AC_FLAMP_PKG_CHECK([x], [x11], [no], [yes]) fi ### asciidoc # substitute ASCIIDOC and A2X in doc/Makefile # set HAVE_ASCIIDOC Makefile conditional #AC_FLAMP_DOCS ### libflxmlrpc # Set ac_cv_flxmlrpc to yes/no # Define USE_FLXMLRPC in config.h # Substitute FLXMLRPC_CFLAGS and FLXMLRPC_LIBS in Makefile AC_FLAMP_PKG_CHECK([flxmlrpc], [flxmlrpc >= 1.0.0], [yes], [yes], [use external flxmlrpc library @<:@autodetect@:>@], [ENABLE_FLXMLRPC]) ### build info # Define various build variables in config.h AC_FLAMP_BUILD_INFO #AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile]) AC_CONFIG_FILES([Makefile src/Makefile]) AC_OUTPUT ac_xmlrpc_report="internal lib"; if test "x$ac_cv_flxmlrpc" = "xyes"; then ac_xmlrpc_report="external lib"; fi ### summary AC_MSG_RESULT([ Configuration summary: Version ..................... $VERSION Target OS ................... $target_os Have flxmlrpc library ....... $ac_xmlrpc_report Static linking .............. $ac_cv_static CPU optimizations ........... $ac_cv_opt Debugging ................... $ac_cv_debug ]) flamp-2.2.12/m4/0000775000175000017500000000000014607053767010237 500000000000000flamp-2.2.12/m4/debug.m40000664000175000017500000000753514517740574011520 00000000000000AC_DEFUN([AC_FL_RDYNAMIC], [ LDFLAGS_saved="$LDFLAGS" LDFLAGS="$LDFLAGS -rdynamic" AC_MSG_CHECKING([whether $CC supports -rdynamic]) # don't try this on win32; it succeeds but emits a warning at link time if test "x$target_win32" != "xyes"; then AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[ac_cv_rdynamic=yes],[ac_cv_rdynamic=no]) else ac_cv_rdynamic=no fi AC_MSG_RESULT([$ac_cv_rdynamic]) AC_LANG_PUSH(C++) AC_MSG_CHECKING([whether $CXX supports -rdynamic]) if test "x$target_win32" != "xyes"; then AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[ac_cv_rdynamic=yes],[ac_cv_rdynamic=no]) else ac_cv_rdynamic=no fi AC_LANG_POP(C++) AC_MSG_RESULT([$ac_cv_rdynamic]) LDFLAGS="$LDFLAGS_saved" ]) AC_DEFUN([AC_FL_DEBUG], [ AC_REQUIRE([AC_FL_OPT]) AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug], [turn on debugging]), [case "${enableval}" in yes|no) ac_cv_debug="${enableval}" ;; *) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;; esac], [ac_cv_debug=no]) AC_ARG_VAR([BFD_CFLAGS], [C compiler flags for libbfd]) AC_ARG_VAR([BFD_LIBS], [linker flags for libbfd]) AC_ARG_WITH([bfd], AS_HELP_STRING([--with-bfd@<:@=DIR@:>@], [search for libbfd in DIR/include and DIR/lib @<:@mingw32 only@:>@]), [ac_cv_want_bfd="$withval"], [ac_cv_want_bfd=yes]) if test "x$ac_cv_debug" = "xyes" && test "x$ac_cv_want_bfd" != "xno" && \ test "x$target_mingw32" = "xyes"; then if test "x$ac_cv_want_bfd" != "xyes"; then # set -I and -L switches bfd_default_cflags="-I${ac_cv_want_bfd}/include" bfd_default_libs="-L${ac_cv_want_bfd}/lib" fi # don't override the user-specified vars BFD_CFLAGS="${BFD_CFLAGS:-$bfd_default_cflags}" BFD_LIBS="${BFD_LIBS:-$bfd_default_libs}" ac_cv_want_bfd="yes" CPPFLAGS_saved="$CPPFLAGS" LDFLAGS_saved="$LDFLAGS" CPPFLAGS="$CPPFLAGS $BFD_CFLAGS" LDFLAGS="$LDFLAGS $BFD_LIBS" AC_CHECK_HEADER([bfd.h], [ac_cv_have_bfd="yes"], [ac_cv_have_bfd="no"]) if test "x$ac_cv_have_bfd" = "xyes"; then bfd_other_libs="-liberty -lpsapi -limagehlp" AC_CHECK_LIB([bfd], [bfd_set_format], [ac_cv_have_bfd="yes"], [ac_cv_have_bfd="no"], [$bfd_other_libs]) fi CPPFLAGS="$CPPFLAGS_saved" LDFLAGS="$LDFLAGS_saved" if test "x$ac_cv_have_bfd" = "xyes"; then BFD_LIBS="$BFD_LIBS -lbfd $bfd_other_libs" fi fi if test "x$ac_cv_debug" = "xyes"; then AC_MSG_CHECKING([for debug info flag]) if test "x$GXX" = "xyes"; then if test "x$target_mingw32" = "xyes"; then gflag="-gstabs" else gflag="-ggdb3" fi else gflag="-g" fi AC_MSG_RESULT([$gflag]) DEBUG_CFLAGS="-O0 -fno-inline-functions -fno-omit-frame-pointer $gflag -Wall" AC_FL_RDYNAMIC if test "x$ac_cv_rdynamic" = "xyes"; then RDYNAMIC=-rdynamic fi CXXFLAGS="" CFLAGS="$CXXFLAGS" AC_MSG_NOTICE([debugging enabled; overriding CXXFLAGS]) if test "x$target_darwin" = "xyes"; then ac_cv_compat_stack=yes AC_DEFINE([HAVE_DBG_STACK], 1, [Define to 1 if we have dbg::stack]) elif test "x$target_mingw32" = "xyes" && test "x$ac_cv_have_bfd" = "xyes"; then ac_cv_compat_stack=yes AC_DEFINE([HAVE_DBG_STACK], 1, [Define to 1 if we have dbg::stack]) else ac_cv_compat_stack=no AC_DEFINE([HAVE_DBG_STACK], 0, [Define to 0 if not using dbg::stack]) fi fi AM_CONDITIONAL([ENABLE_DEBUG], [test "x$ac_cv_debug" = "xyes"]) AC_SUBST([DEBUG_CFLAGS]) AC_SUBST([RDYNAMIC]) AM_CONDITIONAL([COMPAT_STACK], [test "x$ac_cv_compat_stack" = "xyes"]) ]) flamp-2.2.12/m4/macosx.m40000664000175000017500000000323614517740574011716 00000000000000AC_DEFUN([AC_FL_MACOSX], [ case "$target_os" in darwin*) target_darwin="yes" ;; *) target_darwin="no" ;; esac AC_ARG_ENABLE([mac-universal], AS_HELP_STRING([--enable-mac-universal], [build a universal binary on Mac OS X @<:@no@:>@]), [case "${enableval}" in yes|no) ac_cv_mac_universal="${enableval}" ;; *) AC_MSG_ERROR([bad value "${enableval}" for --enable-mac-universal]) ;; esac], [ac_cv_mac_universal=no]) if test "x$target_darwin" = "xyes" && test "x$ac_cv_mac_universal" = "xyes"; then mac_minversion="-mmacosx-version-min=10.4" case "$target_os" in darwin8*) mac_arches="-arch i386 -arch ppc" mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.4u.sdk" mac_frameworks="-framework CoreFoundation" ;; darwin9*) mac_arches="-arch i386 -arch ppc -arch x86_64 -arch ppc64" mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.5.sdk" mac_frameworks="-framework CoreFoundation" ;; darwin10*) mac_arches="-arch i386 -arch x86_64" mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.6.sdk" mac_frameworks="-framework CoreFoundation" ;; *) mac_arches="" mac_sysroot="" mac_frameworks="-framework CoreFoundation" ;; esac MAC_UNIVERSAL_CFLAGS="$mac_arches $mac_sysroot $mac_minversion $mac_frameworks" MAC_UNIVERSAL_LDFLAGS="$mac_arches $mac_frameworks" fi AC_SUBST([MAC_UNIVERSAL_CFLAGS]) AC_SUBST([MAC_UNIVERSAL_LDFLAGS]) AM_CONDITIONAL([DARWIN], [test "x$target_darwin" = "xyes"]) ]) flamp-2.2.12/m4/build.m40000644000175000017500000000562514463050061011506 00000000000000AC_DEFUN([AC_FLAMP_SH_DQ], [ ac_sh_dq="\"`$1 | sed 's/"/\\\\"/g'`\"" ]) AC_DEFUN([AC_FLAMP_BUILD_INFO], [ # Define build flags and substitute in Makefile.in # CPPFLAGS FLAMP_BUILD_CPPFLAGS="-I\$(srcdir) -I\$(srcdir)/include" if test "x$ac_cv_flxmlrpc" != "xyes"; then FLAMP_BUILD_CPPFLAGS="$FLAMP_BUILD_CPPFLAGS -I\$(srcdir)/xmlrpcpp" fi if test "x$target_win32" = "xyes"; then FLAMP_BUILD_CPPFLAGS="$FLAMP_BUILD_CPPFLAGS -D_WINDOWS" fi # CXXFLAGS FLAMP_BUILD_CXXFLAGS="$FLTK_CFLAGS -I\$(srcdir) -I\$(srcdir)/include \ $X_CFLAGS -pipe -Wall -fexceptions $OPT_CFLAGS $DEBUG_CFLAGS $PTW32_CFLAGS" if test "x$ac_cv_flxmlrpc" != "xyes"; then FLAMP_BUILD_CXXFLAGS="-I\$(srcdir)/xmlrpcpp $FLAMP_BUILD_CXXFLAGS" fi if test "x$target_mingw32" = "xyes"; then FLAMP_BUILD_CXXFLAGS="-mthreads $FLAMP_BUILD_CXXFLAGS" fi # LDFLAGS FLAMP_BUILD_LDFLAGS= # LDADD FLAMP_BUILD_LDADD="$FLTK_LIBS $X_LIBS $EXTRA_LIBS $PTW32_LIBS $FLXMLRPC_LIBS" if test "x$ac_cv_debug" = "xyes"; then FLAMP_BUILD_CXXFLAGS="$FLAMP_BUILD_CXXFLAGS -UNDEBUG" FLAMP_BUILD_LDFLAGS="$FLAMP_BUILD_LDFLAGS $RDYNAMIC" else FLAMP_BUILD_CXXFLAGS="$FLAMP_BUILD_CXXFLAGS -DNDEBUG" fi if test "x$target_mingw32" = "xyes"; then FLAMP_BUILD_LDFLAGS="-mthreads $FLAMP_BUILD_LDFLAGS" fi AC_SUBST([FLAMP_BUILD_CPPFLAGS]) AC_SUBST([FLAMP_BUILD_CXXFLAGS]) AC_SUBST([FLAMP_BUILD_LDFLAGS]) AC_SUBST([FLAMP_BUILD_LDADD]) #define build variables for config.h AC_DEFINE_UNQUOTED([BUILD_BUILD_PLATFORM], ["$build"], [Build platform]) AC_DEFINE_UNQUOTED([BUILD_HOST_PLATFORM], ["$host"], [Host platform]) AC_DEFINE_UNQUOTED([BUILD_TARGET_PLATFORM], ["$target"], [Target platform]) test "x$LC_ALL" != "x" && LC_ALL_saved="$LC_ALL" LC_ALL=C export LC_ALL AC_FLAMP_SH_DQ([echo $ac_configure_args]) AC_DEFINE_UNQUOTED([BUILD_CONFIGURE_ARGS], [$ac_sh_dq], [Configure arguments]) # Allow BUILD_DATE, BUILD_USER, BUILD_HOST to be externally overridden by # environment variables. ac_sh_dq="\"$BUILD_DATE\"" test "x$BUILD_DATE" = "x" && AC_FLAMP_SH_DQ([date]) AC_DEFINE_UNQUOTED([BUILD_DATE], [$ac_sh_dq], [Build date]) ac_sh_dq="\"$BUILD_USER\"" test "x$BUILD_USER" = "x" && AC_FLAMP_SH_DQ([whoami]) AC_DEFINE_UNQUOTED([BUILD_USER], [$ac_sh_dq], [Build user]) ac_sh_dq="\"$BUILD_HOST\"" test "x$BUILD_HOST" = "x" && AC_FLAMP_SH_DQ([hostname]) AC_DEFINE_UNQUOTED([BUILD_HOST], [$ac_sh_dq], [Build host]) AC_FLAMP_SH_DQ([$CXX -v 2>&1 | tail -1]) AC_DEFINE_UNQUOTED([BUILD_COMPILER], [$ac_sh_dq], [Compiler]) AC_FLAMP_SH_DQ([echo $FLAMP_BUILD_CPPFLAGS $FLAMP_BUILD_CXXFLAGS]) AC_DEFINE_UNQUOTED([FLAMP_BUILD_CXXFLAGS], [$ac_sh_dq], [FLAMP compiler flags]) AC_FLAMP_SH_DQ([echo $FLAMP_BUILD_LDFLAGS $FLAMP_BUILD_LDADD]) AC_DEFINE_UNQUOTED([FLAMP_BUILD_LDFLAGS], [$ac_sh_dq], [FLAMP linker flags]) if test "x$LC_ALL_saved" != "x"; then LC_ALL="$LC_ALL_saved" export LC_ALL fi ]) flamp-2.2.12/m4/fltk.m40000664000175000017500000000475614507650001011354 00000000000000AC_DEFUN([AC_CHECK_FLTK], [ AC_ARG_VAR([FLTK_CONFIG], [Path to fltk-config utility]) AC_ARG_VAR([FLTK_CFLAGS], [C compiler flags for FLTK, overriding fltk-config]) AC_ARG_VAR([FLTK_LIBS], [linker flags for FLTK, overriding fltk-config]) if test "x$FLTK_CFLAGS" = "x" && test "x$FLTK_LIBS" = "x"; then if test "x$FLTK_CONFIG" = "x"; then AC_PATH_PROG([FLTK_CONFIG], [fltk-config], [no]) else AC_MSG_CHECKING([for fltk-config]) AC_MSG_RESULT([$FLTK_CONFIG]) fi if test "$FLTK_CONFIG" = "no"; then AC_MSG_ERROR([ *** The fltk-config script could not be found. Please install the development *** headers and libraries for FLTK 1.3.x, FLTK 1.4.x, or set PATH to the directory that *** contains fltk-config. ]) fi HAVE_FLTK_API_VERSION=no FLTK_API_VERSION="`$FLTK_CONFIG --api-version`" if test $? -ne 0; then AC_MSG_ERROR([$FLTK_CONFIG failed]) fi if test "x$FLTK_API_VERSION" = "x1.3" || test "x$FLTK_API_VERSION" = "x1.4"; then HAVE_FLTK_API_VERSION=yes fi FLTK_VERSION="`$FLTK_CONFIG --version`" FLAMP_FLTK_API_MAJOR=${FLTK_VERSION%%.*} FLAMP_FLTK_API_MINOR=${FLTK_VERSION#*.}; FLAMP_FLTK_API_MINOR=${FLAMP_FLTK_API_MINOR%%.*} FLAMP_FLTK_API_PATCH=${FLTK_VERSION#*.}; FLAMP_FLTK_API_PATCH=${FLAMP_FLTK_API_PATCH#*.}; if test "${HAVE_FLTK_API_VERSION}" = "no"; then AC_MSG_ERROR([ *** The version of FLTK found on your system provides API version $FLTK_API_VERSION. *** To build $PACKAGE you need a FLTK version that provides API 1.3. ]) fi FLTK_CFLAGS=`$FLTK_CONFIG --cxxflags` if test "x$ac_cv_static" != "xyes"; then FLTK_LIBS=`$FLTK_CONFIG --ldflags --use-images` else FLTK_LIBS=`$FLTK_CONFIG --ldstaticflags --use-images` fi else AC_MSG_NOTICE([not checking for FLTK]) fi AC_SUBST([FLTK_CFLAGS]) AC_SUBST([FLTK_LIBS]) AC_DEFINE_UNQUOTED([FLTK_BUILD_VERSION], ["`$FLTK_CONFIG --version`"], [FLTK version]) AC_DEFINE_UNQUOTED([FLAMP_FLTK_API_MAJOR], [$FLAMP_FLTK_API_MAJOR], [FLTK API major version]) AC_DEFINE_UNQUOTED([FLAMP_FLTK_API_MINOR], [$FLAMP_FLTK_API_MINOR], [FLTK API minor version]) AC_DEFINE_UNQUOTED([FLAMP_FLTK_API_PATCH], [$FLAMP_FLTK_API_PATCH], [FLTK API patch]) AC_ARG_VAR([FLUID], [Fast Light User-Interface Designer]) AC_CHECK_PROG([FLUID], [fluid], [fluid]) AM_CONDITIONAL([HAVE_FLUID], [test -n "$FLUID"]) ]) flamp-2.2.12/m4/np-compat.m40000644000175000017500000000212614463050061012276 00000000000000AC_DEFUN([AC_FLAMP_NP_COMPAT], [ AC_REQUIRE([AC_FL_MACOSX]) AC_REQUIRE([AC_FL_WIN32]) AM_CONDITIONAL([COMPAT_REGEX], [test "x$ac_cv_header_regex_h" != "xyes"]) if test "x$target_mingw32" = "xyes"; then sem_libs="pthreadGC2" else sem_libs="pthread rt" fi other_libs="" if test "x$ac_cv_want_ptw32" = "xyes"; then CFLAGS_saved="$CFLAGS" LDFLAGS_saved="$LDFLAGS" EXTRA_LIBS_saved="$EXTRA_LIBS" CFLAGS="$CFLAGS $PTW32_CFLAGS" LDFLAGS="$LDFLAGS $PTW32_LIBS" other_libs=-lws2_32 fi AC_FLAMP_SEARCH_LIBS([dlopen], [dl], [$other_libs]) AC_FLAMP_SEARCH_LIBS([clock_gettime], [rt], [$other_libs]) AC_FLAMP_SEARCH_LIBS([gmtime_r], [rt], [$other_libs]) AC_FLAMP_SEARCH_LIBS([sem_unlink], [$sem_libs], [$other_libs]) AC_FLAMP_SEARCH_LIBS([sem_timedwait], [$sem_libs], [$other_libs]) if test "x$ac_cv_want_ptw32" = "xyes"; then CFLAGS="$CFLAGS_saved" LDFLAGS="$LDFLAGS_saved" EXTRA_LIBS="$EXTRA_LIBS_saved" fi AC_SUBST([EXTRA_LIBS]) AM_CONDITIONAL([COMPAT_STRCASESTR], [test "x$ac_cv_func_strcasestr" != "xyes"]) ]) flamp-2.2.12/m4/opt.m40000664000175000017500000000161114517740574011221 00000000000000AC_DEFUN([AC_FL_OPT], [ AC_ARG_ENABLE([optimizations], AS_HELP_STRING([--enable-optimizations], [use x86 optimizations (none|sse|sse2|sse3|native) @<:@none@:>@]), [case "${enableval}" in none|sse|sse2|sse3|native) ac_cv_opt="${enableval}" ;; *) AC_MSG_ERROR([bad value ${enableval} for --enable-optimizations]) ;; esac], [ac_cv_opt=none]) OPT_CFLAGS="-O2 -ffast-math -fomit-frame-pointer" case "$ac_cv_opt" in sse) OPT_CFLAGS="$OPT_CFLAGS -msse -mfpmath=sse" ;; sse2) OPT_CFLAGS="$OPT_CFLAGS -msse2 -mfpmath=sse" ;; sse3) OPT_CFLAGS="$OPT_CFLAGS -msse3 -mfpmath=sse" ;; native) OPT_CFLAGS="$OPT_CFLAGS -march=native -mfpmath=sse" ;; none) ;; esac AC_SUBST([OPT_CFLAGS]) ]) flamp-2.2.12/m4/funcs.m40000644000175000017500000000076114463050061011521 00000000000000# args: function, search-libs, other-libraries AC_DEFUN([AC_FLAMP_SEARCH_LIBS], [ m4_define([FUNC_NAME_UC], m4_translit([$1], [a-z], [A-Z])) LIBS_search_libs_save="$LIBS" LIBS="" AC_SEARCH_LIBS($1, $2, [ac_cv_have_func_[]$1=1], [ac_cv_have_func_[]$1=0], $3) if test "x$LIBS" != "x"; then echo "$EXTRA_LIBS" | grep -q -e "$LIBS" || EXTRA_LIBS="$EXTRA_LIBS $LIBS" fi AC_DEFINE_UNQUOTED([HAVE_]FUNC_NAME_UC, $ac_cv_have_func_[]$1, [Define to 1 if we have $1]) LIBS="$LIBS_search_libs_save" ]) flamp-2.2.12/m4/pkg-config.m40000664000175000017500000000266414517740574012454 00000000000000# name, version, show-in-help?, optional?, help-text, [am-cond] AC_DEFUN([AC_FLAMP_PKG_CHECK], [ m4_define([PKG_NAME_UC], m4_translit([$1], [a-z], [A-Z])) m4_if([$3], [yes], [ AC_ARG_WITH($1, AS_HELP_STRING([--with-[]$1], [$5]), [case "${withval}" in yes|no) ac_cv_want_[]$1="${withval}" ;; *) AC_MSG_ERROR([bad value "${withval}" for --with-[]$1]) ;; esac], [ac_cv_want_[]$1=check]) ]) m4_if([$4], [no], [ac_cv_want_[]$1=yes]) test "x$ac_cv_want_[]$1" = "x" && ac_cv_want_[]$1="check" case "x$ac_cv_want_[]$1" in "xno") ac_cv_[]$1=no ;; "xcheck") PKG_CHECK_MODULES(PKG_NAME_UC, [$2], [ac_cv_[]$1=yes], [ac_cv_[]$1=no]) ;; "xyes") PKG_CHECK_MODULES(PKG_NAME_UC, [$2]) # if we get here the test has succeeded ac_cv_[]$1=yes ;; esac if test "x$ac_cv_[]$1" = "xyes"; then AC_DEFINE([USE_]PKG_NAME_UC, 1, [Define to 1 if we are using $1]) pkg_[]$1_version=`$PKG_CONFIG --modversion "$2" 2>/dev/null` else AC_DEFINE([USE_]PKG_NAME_UC, 0, [Define to 1 if we are using $1]) pkg_[]$1_version="" fi AC_SUBST(PKG_NAME_UC[_CFLAGS]) AC_SUBST(PKG_NAME_UC[_LIBS]) AC_DEFINE_UNQUOTED(PKG_NAME_UC[_BUILD_VERSION], ["$pkg_[]$1_version"], [$1 version]) m4_ifval([$6], [ AM_CONDITIONAL([$6], [test "x$ac_cv_[]$1" = "xyes"]) ], [:]) ]) flamp-2.2.12/m4/static.m40000664000175000017500000000062014517740574011705 00000000000000AC_DEFUN([AC_FL_STATIC], [ AC_ARG_ENABLE([static], AS_HELP_STRING([--enable-static], [enable static linking for some libraries]), [case "${enableval}" in yes|no) ac_cv_static="${enableval}" ;; *) AC_MSG_ERROR([bad value ${enableval} for --enable-static]) ;; esac], [ac_cv_static=no]) ]) flamp-2.2.12/m4/win32.m40000664000175000017500000000423014517740574011361 00000000000000AC_DEFUN([AC_FL_WIN32], [ case "$target_os" in *mingw*) target_win32="yes" target_mingw32="yes" ;; *cygwin*|*win32*|*w32*) target_win32="yes" ;; *) target_win32="no" ;; esac if test "x$target_win32" = "xyes"; then AC_CHECK_PROG([WINDRES], [${ac_tool_prefix}windres], [${ac_tool_prefix}windres]) if [ test "x$WINDRES" = "x" ]; then AC_MSG_WARN([The windres utility could not be found]) fi AC_DEFINE([__WOE32__], 1, [Define to 1 if we are building on mingw]) AC_DEFINE([__MINGW32__], 1, [Define to 1 if we are building on cygwin or mingw]) AC_DEFINE([_WINDOWS], 1, [Define to 1 if we are building on cygwin or mingw]) fi if test "x$target_mingw32" = "xyes"; then AC_CHECK_PROG([MAKENSIS], [makensis], [makensis]) fi AC_SUBST([WINDRES]) AM_CONDITIONAL([HAVE_WINDRES], [test "x$WINDRES" != "x"]) AC_SUBST([MAKENSIS]) AM_CONDITIONAL([HAVE_NSIS], [test "x$MAKENSIS" != "x"]) AM_CONDITIONAL([WIN32], [test "x$target_win32" = "xyes"]) AM_CONDITIONAL([MINGW32], [test "x$target_mingw32" = "xyes"]) AC_ARG_VAR([PTW32_CFLAGS], [C compiler flags for pthreads-w32]) AC_ARG_VAR([PTW32_LIBS], [linker flags for pthreads-w32]) AC_ARG_WITH([ptw32], AS_HELP_STRING([--with-ptw32@<:@=DIR@:>@], [search for pthreads-w32 in DIR/include and DIR/lib @<:@mingw32 only@:>@]), [ac_cv_want_ptw32="$withval"], [ac_cv_want_ptw32=no]) if test "x$ac_cv_want_ptw32" != "xno"; then if test "x$ac_cv_want_ptw32" != "xyes"; then # set -I and -L switches ptw32_default_cflags="-I${ac_cv_want_ptw32}/include" ptw32_default_libs="-L${ac_cv_want_ptw32}/lib" fi ptw32_default_cflags="-DPTW32_STATIC_LIB $ptw32_default_cflags" ptw32_default_libs="$ptw32_default_libs -lpthreadGC2 -lws2_32" # don't override the user-specified vars PTW32_CFLAGS="${PTW32_CFLAGS:-$ptw32_default_cflags}" PTW32_LIBS="${PTW32_LIBS:-$ptw32_default_libs}" ac_cv_want_ptw32="yes" else if test "x$target_mingw32" = "xyes"; then PTW32_LIBS="-lpthread -lwsock32 -lws2_32" fi fi AC_SUBST([PTW32_CFLAGS]) AC_SUBST([PTW32_LIBS]) ]) flamp-2.2.12/ChangeLog0000664000175000017500000001076114607050211011373 000000000000002024-04-14 dave-w1hkj d54a011: Version 2.2.12 2024-04-09 kk5vd 6754d04: Compatibility/Modem Switch 24e1837: Document/GUI/Header Modem/Default Modems afb90bd: Tabs/Relay Options/GUI/Fluid 2024-01-07 dave-w1hkj 73db3b6: font browser e00f09b: Version 2.2.11 2023-12-26 kk5vd b4c0e55: Missing Data Save / Documentation / GUI widgets 2023-10-30 dave-w1hkj 86238fa: Version 2.2.10 2023-10-30 kk5vd b3fd601: Relay/Check Saves 302aedc: rs df merge 4ddc2ea: Online Conditions/Thread locks 1d57430: RX Panel/GUI cosmetic 2023-10-30 dave-w1hkj 05d35c2: UI design 2023-10-30 kk5vd 2aa9b08: TOD implementation merge with branch pu/rs 4c18016: Replay/XMLRPC/M4/Modem/Documentation/GUI 2023-09-02 dave-w1hkj 9d0b628: Version 2.2.09 235b2ae: Docs fb9d7c5: thor56 9d392f2: Thor 11/32/44 b06d9a7: Text Editor mod 64c02de: xmlrpc server 1e083e9: fltk 1.4.x mods 7a8854c: Main Window Icon d0392af: Version 2.2.08 2022-04-09 dcb314 7903a78: Fix logic error 2022-02-20 dave-w1hkj aea2528: namespace std 11c7859: Version 2.2.07 23b8ef8: tagSearch b37035c: Version 2.2.06 8ba02f0: Xmlrpc Client ID 9d5f47a: openSuse Tumbleweed 2021-02-07 David Freese b8597f6: macOS Info.index 1d8f4c1: MXE build 9ee7834: OS X build problem 07aa7f9: fltk 1.4 1b84267: fldigi i/o acddaf5: Win/mxe heartburn 5414622: xml mod 880cc0a: Version 2.2.05 6386d8b: socket block size 9580294: Version 2.0.4 8e79231: Thumb Drive d85070c: OS X build scripts 7752468: win-mingw b4ca616: flxmlrpc config c104dc6: INSTALL 2016-07-10 Kamal Mostafa 361bd9e: fix XmlRpc tm_mday comparison typo 2016-07-04 Robert Cunnings 2feb8c5: mxe update 2015-11-23 David Freese a7806a1: Fldigi on-line 28685e7: Version 2.2.03 2015-09-20 Robert Stiles 779c8fc: Bug Fixes/additions 2015-08-13 David Freese 7bbb3f1: MXE update 2015-06-08 Kamal Mostafa a7708a6: BUILD_{DATE,USER,HOST} 2015-04-24 David Freese a5fe969: Version 2.2.02 9ff9236: xmlrpc 9c38240: Version 2.2.01 ae83438: FSF address 03ca8af: Bug Fixes/Enhancements 2015-03-22 Robert Stiles 4f2aee3: Document and Timing Table Update 9787795: Minor Bug fixes. 2015-03-22 David Freese 9c489e7: fileselect 4a9c8a0: subdir-objects a01e276: On line help da16fc2: Version 2.2.00 6bf63a9: STRNLEN 2014-12-01 Robert Stiles 9d5a8ac: FLTK 1.3.3 Update 9104fc0: Relay, Modems, Scripting, Documentation, and Notices 2014-01-19 David Freese 0f8bb0b: Version 2.1.02 2014-01-19 Robert Stiles ba49254: Transmit Event Continuous 2014-01-17 David Freese 6fbd877: Version 2.1.01 7f8ea32: 64 bit compile issues 27006e5: Version 2.1.00 2013-07-29 Robert Stiles 75aec64: Unproto ARQ/Flmsg command filtering 9f50af4: TxRx Interval Timer/Header Modem 2013-06-20 David Freese 4dce33b: MXE build 8e0334b: Binary build 2013-05-05 Robert Stiles 9db548c: Filter Null Characters from CirQue Buffer 84d0c09: adjustReadQueIndex() index error on buffer count of 0 b74f406: Correct naming conflict between class/local 2013-05-02 David Freese fbf91c8: MT63 mode descriptors 2013-05-02 Robert Stiles 36ef184: Bug Fixes, Misc Change 3484814: Seperate Tag Search From CirQue 065c6a0: Compress FLMSG in FLAMP 5fb778d: Add timeout to cirque class 2013-04-26 David Freese edc88f1: HOME-DIR b63188e: kill doloop 2013-04-24 Robert Stiles ca74970: Hash/Queue Mods 2013-04-22 David Freese 054a19e: About/Events 7c6cff5: Fltk backward compatibility c716410: Version 2.0.00 4d6db34: THOR mode update ddc7cf3: Fetch parser 1314b34: Version 1.0.01 6383a21: MODES 7be9727: ARQ mod 11c50fa: Documentation update 0f75c6e: Drag-N-Drop 5c32740: Menu Folder e6ca0f4: Tx Queue deselect 58c54dd: Repeat Critical 2c53ff6: Version 1.0.0 66084a5: On Line Help 1454965: MS NBEMSapps c04a245: Fetch debug cad1adc: Timed Events 98aa0b5: Initial Code Base b022871: Version 0.3.0 flamp-2.2.12/COPYING0000644000175000017500000004313314463050125010655 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License.