tcladdressbook-commits Mailing List for TclAddressBook
Status: Alpha
Brought to you by:
bdesgraupes
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(114) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(37) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(52) |
Aug
(70) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
| 2005 |
Jan
|
Feb
|
Mar
(2) |
Apr
(9) |
May
|
Jun
(8) |
Jul
|
Aug
(8) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2006 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2007 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Frédéric B. <bou...@us...> - 2007-02-05 12:50:25
|
Update of /cvsroot/tcladdressbook/Contribs/Tcl/AB2X/LaTeX In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv13406/Tcl/AB2X/LaTeX Added Files: addressbook.cls pdfbooklet.sty example-addressbook.cfg AddressBook.tex Log Message: Initial post of the AB2X utilities to the contribution section of TclAddressbook. --- NEW FILE: example-addressbook.cfg --- \RequirePackage[francais]{babel} % \newphonelabel{home}{domicile & :} \newphonelabel{work}{bureau & :} \newphonelabel{mobile}{portable & :} \newphonelabel{other}{} \newphonelabel{work fax}{fax bur. & :} % \newemaillabel{home}{perso & :} \newemaillabel{work}{travail & :} \newemaillabel{other}{} % \newurllabel{home page}{} --- NEW FILE: addressbook.cls --- %% -*-TeX-*- % ################################################################### % % FILE: "addressbook.cls" % created: 2005-06-28 16:43:12 % last update: 2007-01-12 16:05:54 % Author: Frédéric Boulanger % E-mail: Fre...@su... % mail: Supélec - Département Informatique % 3 rue Joliot-Curie, 91192 Gif-sur-Yvette, France % www: http://wwwsi.supelec.fr/fb/ % % Description: % % A LaTeX document class to typeset address books. % The address book should be obtained from an Apple address book % using the addressbook.tcl Tcl script. This script uses the % Tcladdressbook extension by Bernard Desgraupes: % <http://webperso.easyconnect.fr/bdesgraupes/tcl.html#tclab> % % History % % modified by rev reason % ---------- --- --- ----------- % 1940-01-26 FBO 1.0 original % ################################################################### %% \NeedsTeXFormat{LaTeX2e} \ProvidesClass{addressbook}[2005/03/11 v1.0 ^^J A class to typeset diaries] % \DeclareOption{francais}{\newcommand{\tongue}{francais}} % \ProcessOptions\relax \LoadClass[a4paper,twoside,12pt]{article} % \ifx\tongue\undefined % \else % \RequirePackage[\tongue]{babel} % \fi \RequirePackage[ a4paper, includehead, includefoot, nofoot, top=1cm, headheight=\baselineskip, left=1.5cm,right=1.5cm, ]{geometry} \setlength{\parindent}{0pt} \newcommand{\settototalheight}[2]{% \setbox\@tempboxa\hbox{{#2}}% #1\ht\@tempboxa\advance#1\dp\@tempboxa \setbox\@tempboxa\box\voidb@x } % New page for each new letter, plus mark for the page header \newcommand{\newLetter}[1]{% \newpage \mark{#1}% } % Get the information about one person and print it \newcommand{\person}[1]{% \let\adb@name\relax \let\adb@first\relax \let\adb@middle\relax \let\adb@title\relax \let\adb@org\relax \let\adb@dpt\relax \let\adb@phone\relax \let\adb@urls\relax \let\adb@address\relax \let\adb@note\relax \let\adb@email\relax \let\adb@homepage\relax #1\relax\printperson } \newlength{\adb@tmplen} \newlength{\adb@boxwidth} \newlength{\adb@boxwidthi} \newlength{\adb@phoneheight} \newlength{\adb@addressheight} \newsavebox{\adb@tmpbox} \newsavebox{\adb@phonebox} \newsavebox{\adb@addressbox} \newcommand{\adb@namepart}{0.4} \newcommand{\adb@titlepart}{0.3} \newcommand{\adb@phonepart}{0.3} \newcommand{\adb@emailext}{2} \newcommand{\adb@urlext}{2} \newcommand{\adb@addresspart}{0.7} % Print an address book entry \newcommand{\printperson}{% % Name \ifx\adb@name\relax \ifx\adb@org\relax \ifx\adb@first\relax \else \let\adb@name\adb@first \let\adb@first\relax \fi \else \let\adb@name\adb@org \let\adb@org\relax \fi \fi \settowidth{\adb@boxwidth}{\bfseries\adb@name\ \adb@first}% \let\adb@end\relax \ifdim\adb@boxwidth>\adb@namepart\linewidth \setlength{\adb@boxwidth}{\adb@namepart\linewidth}% \def\adb@end{\par\vspace{0.5\baselineskip}}% \fi \parbox[t]{\adb@boxwidth}{% \raggedright\bfseries\adb@name\ \adb@first\adb@end }\hfill% \dotfill % % Title/organization \settowidth{\adb@boxwidth}{\bfseries\itshape\adb@title}% \settowidth{\adb@boxwidthi}{\bfseries\adb@org}% \ifdim\adb@boxwidthi>\adb@boxwidth \setlength{\adb@boxwidth}{\adb@boxwidthi}% \fi \settowidth{\adb@boxwidthi}{\bfseries\adb@dpt}% \ifdim\adb@boxwidthi>\adb@boxwidth \setlength{\adb@boxwidth}{\adb@boxwidthi}% \fi \ifdim\adb@boxwidth>\adb@titlepart\linewidth \setlength{\adb@boxwidth}{\adb@titlepart\linewidth}% \fi \ifdim\adb@boxwidth>0pt \addtolength{\adb@boxwidth}{1em}% \ \parbox[t]{\adb@boxwidth}{% \centering\bfseries \ifx\adb@title\relax \adb@org \ifx\adb@dpt\relax\else \\\relax{\small\adb@dpt}% \fi \else \textit{\adb@title}% \ifx\adb@org\relax \else \par\adb@org \ifx\adb@dpt\relax\else \\\relax{\small\adb@dpt}% \fi \fi \fi }\hfill%\,\dotfill \fi % Telephone/e-mail/web site \savebox{\adb@phonebox}{\parbox[t]{\adb@phonepart\linewidth}{% \ifx\adb@phone\relax\else \savebox{\adb@tmpbox}{% \let\named\named@phone \noindent\parbox[t]{\adb@emailext\linewidth}{% \raggedleft \begin{tabular}{@{}l@{~}c@{ }r@{}} \adb@phone \end{tabular}% }% }% \settototalheight{\adb@tmplen}{\usebox{\adb@tmpbox}}% \addtolength{\adb@tmplen}{-\baselineskip}% \makebox[\linewidth][r]{\raisebox{-0.5\adb@tmplen}{\usebox{\adb@tmpbox}}}% \fi % \ifx\adb@email\relax\else \savebox{\adb@tmpbox}{% \let\named\named@email \noindent\parbox[t]{\adb@emailext\linewidth}{% \raggedleft \begin{tabular}{@{}l@{~}c@{ }r@{}} \adb@email \end{tabular}% }% }% \settototalheight{\adb@tmplen}{\usebox{\adb@tmpbox}}% \addtolength{\adb@tmplen}{-\baselineskip}% \par\noindent\makebox[\linewidth][r]{% \raisebox{-0.5\adb@tmplen}{\usebox{\adb@tmpbox}}% }% \fi \ifx\adb@urls\relax\else \savebox{\adb@tmpbox}{% \let\named\named@url \noindent\parbox[t]{\adb@emailext\linewidth}{% \raggedleft \begin{tabular}{@{}l@{~}c@{ }r@{}} \adb@urls \end{tabular}% }% }% \settototalheight{\adb@tmplen}{\usebox{\adb@tmpbox}}% \addtolength{\adb@tmplen}{-\baselineskip}% \par\noindent\makebox[\linewidth][r]{% \raisebox{-0.5\adb@tmplen}{\usebox{\adb@tmpbox}}% }% \fi }}% \settototalheight{\adb@phoneheight}{\usebox{\adb@phonebox}}% \addtolength{\adb@phoneheight}{-\baselineskip}% \,\raisebox{0pt}[0pt][0pt]{\usebox{\adb@phonebox}} \relax\let\named\undefined \par\nopagebreak % Address \ifx\adb@address\relax \vspace{\adb@phoneheight}% \else \let\named\named@address % \let\adb@addstreet\relax \let\adb@addzip\relax \let\adb@addcity\relax \let\adb@addstate\relax \let\adb@addcountry\relax \let\adb@addcountrycode\relax \adb@address \savebox{\adb@addressbox}{\parbox[t]{\adb@addresspart\linewidth}{% \ifx\adb@addstreet\relax\else \adb@addstreet\par \fi \ifx\adb@addzip\relax\else \adb@addzip\ \fi \adb@addcity \ifx\adb@addcountry\relax\else \par\adb@addcountry \fi \ifx\adb@note\relax\else \par\vspace*{0.2\baselineskip}\textit{\adb@note}% \fi }}% \settototalheight{\adb@addressheight}{\usebox{\adb@addressbox}}% \ifdim\adb@phoneheight>\adb@addressheight \setlength{\adb@addressheight}{\adb@phoneheight}% \fi \parbox[t][\adb@addressheight][t]{\adb@addresspart\linewidth}{% \usebox{\adb@addressbox}% }% \par\nopagebreak\vspace*{0.5\baselineskip}% \fi \relax\let\named\undefined \par\nopagebreak % \vspace*{0.5\baselineskip}% \hrulefill\par } %% Commands that get the information in an entry \newcommand{\Address}[1]{% \def\adb@address{#1}% } \newcommand{\Birthday}[1]{% #1 } \newcommand{\Email}[1]{% \def\adb@email{#1}% } \newcommand{\First}[1]{% \def\adb@first{#1}% } \newcommand{\HomePage}[1]{% \def\adb@homepage{#1}% } \newcommand{\JobTitle}[1]{% \def\adb@title{#1}% } \newcommand{\Last}[1]{% \def\adb@name{#1}% } \newcommand{\MaidenName}[1]{% #1 } \newcommand{\Middle}[1]{% \def\adb@middle{#1}% } \newcommand{\NickName}[1]{% #1 } \newcommand{\Note}[1]{% \def\adb@note{#1}% } \newcommand{\Organization}[1]{% \def\adb@org{#1}% } \newcommand{\ABDepartment}[1]{% \def\adb@dpt{#1}% } \newcommand{\Phone}[1]{% \def\adb@phone{#1}% } \newcommand{\URLs}[1]{% \def\adb@urls{#1}% } \newcommand{\Title}[1]{% \def\adb@title{#1}% } %% \newcommand{\City}[1]{% \def\adb@addcity{#1}% } \newcommand{\Country}[1]{% \def\adb@addcountry{#1}% } \newcommand{\CountryCode}[1]{% \def\adb@addcountrycode{#1}% } \newcommand{\State}[1]{% \def\adb@addstate{#1}% } \newcommand{\Street}[1]{% \def\adb@addstreet{#1}% } \newcommand{\ZIP}[1]{% \def\adb@addzip{#1}% } %% \newcommand{\ingroup}[1]{% } %% %% Parse the label and value of a tagged field. %% %% Label names can be changed in addressbook.cfg using %% the commands \newphonelabel, \newemaillabel and \newurllabel \newcommand{\named@}[3]{% \expandafter\adb@strip@cust@prefix #3:\end \expandafter\ifx\csname adb@#1@label@#2\endcsname\relax \def\adb@cur@line{#2 & : & \adb@custvalue\\}% \else \def\adb@tmp@cmd{}% \expandafter\ifx\csname adb@#1@label@#2\endcsname\adb@tmp@cmd \if|\adb@custpref| \def\adb@cur@line{ & & \adb@custvalue\\}% \else \def\adb@cur@line{\adb@custpref & : & \adb@custvalue\\}% \fi \else \def\adb@cur@line{\csname adb@#1@label@#2\endcsname & \adb@custvalue\\}% \fi \fi \adb@cur@line\par } % Telephone \newcommand{\named@phone}[2]{\named@{phone}{#1}{#2}} %% % URLs \newcommand{\named@url}[2]{\named@{url}{#1}{#2}} % E-mail \newcommand{\named@email}[2]{\named@{email}{#1}{#2}} % Adresse \newcommand{\named@address}[2]{% \def\adb@address@name{#1}#2% }% %%% %% Define new labels %% #1 is the type of the label (phone, email or url) %% #2 is the tag of the label as read from the address book %% #3 is the label as you want it printed %% Telephone, e-mail and url entries are typeset in a lcr tabular, %% the label and the separator are in the first two columns, so #3 %% should contain one '&' character. \newcommand{\newadblabel}[3]{% \expandafter\def\csname adb@#1@label@#2\endcsname{#3}% } % Short hand for \newadblabel{phone}{...}{...} \newcommand{\newphonelabel}[2]{% \newadblabel{phone}{#1}{#2}% } % Short hand for \newadblabel{email}{...}{...} \newcommand{\newemaillabel}[2]{% \newadblabel{email}{#1}{#2}% } % Short hand for \newadblabel{url}{...}{...} \newcommand{\newurllabel}[2]{% \newadblabel{url}{#1}{#2}% } % Look for a custom prefix in a field value: if a value starts with % <prefix>:, <prefix> is interpreted as a custom prefix that can be % used to override the label of the value. % The prefix is stored in \adb@custpref, and the value (with the % prefix and the ':' removed) is stored in \adb@custvalue. \def\adb@strip@cust@prefix#1:#2\end{% \if|#2| \xdef\adb@custpref{}% \xdef\adb@custvalue{#1}% \else \xdef\adb@custpref{#1}% \expandafter\adb@strip@column #2% \fi } \def\adb@strip@column #1:{% \xdef\adb@custvalue{#1}% }% %% Page header and footer \def\ps@repertoire{% \def\@oddhead{% \parbox{\textwidth}{% \rule{\textwidth}{0.5mm}\par \thepage\hfill\textbf{\firstmark}\par \vspace{-0.5\baselineskip}% \rule{\textwidth}{0.5mm}\par }% }% \def\@evenhead{% \parbox{\textwidth}{% \rule{\textwidth}{0.5mm}\par \textbf{\firstmark}\hfill\thepage\par \vspace{-0.5\baselineskip}% \rule{\textwidth}{0.5mm}\par }% }% \let\@oddfoot\@empty \let\@evenfoot\@empty } % Title of the addressbook. % Default is to use the french name {R\'epertoire}. Can be changed in % addressbook.cfg \newcommand{\adb@repname}{R\'epertoire} % First page of the address book is special \def\adb@firstpage{% \pagestyle{empty} \vspace*{\fill} \makebox[\textwidth][l]{\hfill\textit{\textbf{\Huge\adb@repname}}\hfill}\par \vspace{\stretch{3}} \makebox[\textwidth][l]{\hspace{\stretch{6}}\textit{\today}\hfill} \cleardoublepage \pagestyle{repertoire} } % Read config file if any \InputIfFileExists{addressbook.cfg} \relax % At the beginning of the document, make ':' not active so that it % can be used as a custom prefix separator, and build the first page. \AtBeginDocument{% \expandafter\ifx\csname shorthandoff\endcsname\relax\else \shorthandoff{:}% \fi \adb@firstpage } % At the end, write the number of the address book to help % the pdfbooklet package turn it into a 4 pages by sheet booklet. \newwrite\pagefile \AtEndDocument{% \immediate\openout\pagefile\jobname.pages \immediate\write\pagefile{\thepage}% \immediate\closeout\pagefile } \endinput % The end --- NEW FILE: pdfbooklet.sty --- (This appears to be a binary file; contents omitted.) --- NEW FILE: AddressBook.tex --- \documentclass[a4paper,twoside]{article} \usepackage{pdfbooklet} \begin{document} \newcommand{\dateiso}{% \the\year-% \ifnum\the\month<10 0\fi\the\month-% \ifnum\the\day<10 0\fi\the\day } \makepdfbooklet{AddressBook-\dateiso}% \end{document} |
|
From: Frédéric B. <bou...@us...> - 2007-02-05 12:50:25
|
Update of /cvsroot/tcladdressbook/Contribs/Tcl/AB2X In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv13406/Tcl/AB2X Added Files: ReadMe addressbook2xml.tcl addressbook2tex.tcl addressbook2tcl.tcl Log Message: Initial post of the AB2X utilities to the contribution section of TclAddressbook. --- NEW FILE: addressbook2tcl.tcl --- ## -*-Tcl-*- # ################################################################### # # FILE: "addressbook2tcl.tcl" # created: 2007-01-11 16:32:54 # last update: 2007-01-12 13:48:20 # Author: Frédéric Boulanger # E-mail: Fre...@su... # mail: Supélec - Département Informatique # 3 rue Joliot-Curie, 91192 Gif-sur-Yvette, France # www: http://wwwsi.supelec.fr/fb/ # # Description: # # History # # modified by rev reason # ---------- --- --- ----------- # 2007-01-11 FBO 1.0 original # ################################################################### ## # set suppressedFields [list \ # ABDate \ # ABPersonFlags \ # ABRelatedNames \ # AIMInstant \ # Creation \ # FirstPhonetic \ # ICQInstant \ # JabberInstant \ # LastPhonetic \ # MSNInstant \ # MiddlePhonetic \ # Modification \ # UID \ # YahooInstant \ # ] proc exportAddressBook {} { set suppressedFields [list UID] # set expfilename [putfile "Save exported addresses to" "AddressBook-[ISOTime::ISODate].tcl"] # if {[string length $expfilename] == 0} { # error "cancel" # } set expfilename "AddressBook-[clock format [clock seconds] -format "%Y-%m-%d"].tcl" set expfile [open $expfilename "w"] fconfigure $expfile -encoding utf-8 -translation lf puts $expfile "package require addressbook" package require addressbook set idlist [addressbook persons -ids] set grplist [addressbook groups -ids] foreach id $grplist { set data [addressbook record $id] set name "" foreach field $data { if {[lindex $field 0] == "GroupName"} { set name "[lindex $field 1]" break } } puts $expfile "set gid \[addressbook create group \"$name\"\]" puts $expfile "set map($id) \$gid" foreach field $data { set fieldname [lindex $field 0] set fieldvalue [lindex $field 1] if {[lsearch -exact $suppressedFields $fieldname] >= 0} { continue } puts $expfile "addressbook set \$gid $fieldname \{$fieldvalue\}" } puts $expfile "" } foreach id $idlist { set data [addressbook record $id] set name "" foreach field $data { if {[lindex $field 0] == "Last"} { set name "[lindex $field 1]" break } } puts $expfile "set uid \[addressbook create person \"$name\"\]" puts $expfile "set map($id) \$uid" foreach field $data { set fieldname [lindex $field 0] set fieldvalue [lindex $field 1] if {[lsearch -exact $suppressedFields $fieldname] >= 0} { continue } puts $expfile "addressbook set \$uid $fieldname \{$fieldvalue\}" } puts $expfile "" } foreach id [concat $grplist $idlist] { set parents [addressbook parents -ids $id] foreach p $parents { if {[string length $p] == 0} continue puts $expfile "addressbook add \$map($p) \$map($id)" } } puts $expfile "addressbook save" close $expfile } exportAddressBook --- NEW FILE: ReadMe --- AddressBook utilities --------------------- These programs are useful only on a Macintosh. They use the AddressBook Tcl extension by Bernard Desgraupes to extract information from the MacOS X AddressBook database. See: <http://perso.orange.fr/bdesgraupes/tcl.html> <http://sourceforge.net/projects/tcladdressbook> addressbook2tcl.tcl ------------------- Tcl script that dumps your AddressBook database into a Tcl script named AddressBook-YYYY-MM-DD.tcl. Executing this script reloads all the persons and groups in the database, so it restores your database if you empty it before running the script. This script therefore constitutes a human readable backup of your AddressBook database. (Exporting to VCard format does not make a backup since notes are dropped when exporting VCards). Warning: The ID of a restored person or group will not be the same as in the original database. This may cause synchronization issues with iSync. addressbook2xml.tcl ------------------- Tcl script that dumps your AddressBook database into an XML file named AddressBook-YYYY-MM-DD.xml. There is no DTD for this file since the elements bear the name of the attributes of the records. I didn't write anything that reads this XML format yet, but it yields a good textual representation of your AddressBook database. addressbook2tex.tcl ------------------- Tcl script that dumps your AddressBook database into a LaTeX file named AddressBook-YYYY-MM-DD.tex. The addressbook document class is the used to format this file into an A4 printable address book. Then, using the pdfbooklet LaTeX package, you can turn your PDF address book into an A6 printable address book. Print it in full duplex on A4 paper, cut the pages in two A5 sheets and fold them to get your A6 address book. Two staples in the fold will make a nice binding... addressbook.cls --------------- LaTeX document class for typesetting address books created with addressbook2tex.tcl addressbook.cfg --------------- Configuration file for addressbook.cls pdfbooklet.sty -------------- LaTeX package for building A6 booklets from A4 PDF documents. AddressBook.tex --------------- LaTeX file that uses pdfbooklet.sty to turn your A4 address book into an A6 booklet. Frédéric Boulanger <Fre...@su...> 2007-01-12 --- NEW FILE: addressbook2xml.tcl --- ## -*-Tcl-*- # ################################################################### # # FILE: "addressbook2xml.tcl" # created: 2007-01-11 16:32:54 # last update: 2007-01-12 13:48:12 # Author: Frédéric Boulanger # E-mail: Fre...@su... # mail: Supélec - Département Informatique # 3 rue Joliot-Curie, 91192 Gif-sur-Yvette, France # www: http://wwwsi.supelec.fr/fb/ # # Description: # # History # # modified by rev reason # ---------- --- --- ----------- # 2007-01-11 FBO 1.0 original # ################################################################### ## # set suppressedFields [list \ # ABDate \ # ABPersonFlags \ # ABRelatedNames \ # AIMInstant \ # Creation \ # FirstPhonetic \ # ICQInstant \ # JabberInstant \ # LastPhonetic \ # MSNInstant \ # MiddlePhonetic \ # Modification \ # UID \ # YahooInstant \ # ] proc exportAddressBook {} { set suppressedFields [list UID] # set expfilename [putfile "Save exported addresses to" "AddressBook-[ISOTime::ISODate].xml"] # if {[string length $expfilename] == 0} { # error "cancel" # } set expfilename "AddressBook-[clock format [clock seconds] -format "%Y-%m-%d"].xml" set expfile [open $expfilename "w"] fconfigure $expfile -encoding utf-8 -translation lf puts $expfile "<?xml version=\"1.0\" encoding=\"utf-8\"?>" puts $expfile "<addressbook>" package require addressbook set idlist [lsort -command compareEntries [addressbook persons -ids]] set gplist [lsort -command compareEntries [addressbook groups -ids]] foreach id $gplist { dumprecord $id $suppressedFields $expfile puts $expfile "" } foreach id $idlist { dumprecord $id $suppressedFields $expfile puts $expfile "" } puts $expfile "</addressbook>" close $expfile } proc dumprecord {id suppressedFields outfile} { set data [addressbook record $id] switch -exact -- [addressbook type $id] { ABPerson {set rectype "person"} ABGroup {set rectype "group"} default { error "Unknown record type \"[addressbook type $id]\"" } } puts $outfile "<$rectype>" foreach field $data { set fieldname [lindex $field 0] set fieldvalue [lindex $field 1] if {[lsearch -exact $suppressedFields $fieldname] >= 0} { continue } switch -exact -- [addressbook property type -${rectype}s $fieldname] { Date { set date [clock format $fieldvalue -format "%Y-%m-%d %H:%M:%S"] puts $outfile " <$fieldname>$date</$fieldname>" } Array - Data - Integer - Real - String { puts $outfile " <$fieldname>[normalize $fieldvalue]</$fieldname>" } MultiDate { puts $outfile " <$fieldname>" foreach item $fieldvalue { set date [clock format [lindex $item 1] -format "%Y-%m-%d %H:%M:%S"] puts $outfile " <item name=\"[lindex $item 0]\">$date</item>" } puts $outfile " </$fieldname>" } Dictionary - MultiArray - MultiData - MultiInteger - MultiReal - MultiString { puts $outfile " <$fieldname>" foreach item $fieldvalue { puts $outfile " <item name=\"[lindex $item 0]\">[normalize [lindex $item 1]]</item>" } puts $outfile " </$fieldname>" } MultiDictionary { puts $outfile " <$fieldname>" foreach item $fieldvalue { puts $outfile " <item name=\"[lindex $item 0]\">" foreach subitem [lindex $item 1] { puts $outfile " <[lindex $subitem 0]>[normalize [lindex $subitem 1]]</[lindex $subitem 0]>" } puts $outfile " </item>" } puts $outfile " </$fieldname>" } default { error "Unknown property type \"[addressbook property type -persons $field]\"" } } } set parents [addressbook parents -ids $id] foreach p $parents { if {[string length $p] == 0} continue puts $outfile "<ingroup>[normalize [addressbook set $p GroupName]]</ingroup>" } puts $outfile "</$rectype>" } # proc normalize {s} { # regsub -- {\[Comment\][\n\r]?} $s {} s # regsub -- {\[Comments\][\n\r]?} $s {} s # regsub -- {\[Commentaires\][\n\r]?} $s {} s # regsub -all -- {([&_$#])} $s {\\\1} s # regsub -all -- {[\n\r]} $s {\\newline } # } proc normalize {s} { regsub -all -- {&} $s {\&} s regsub -all -- {<} $s {\<} s regsub -all -- {>} $s {\>} s return $s } proc compareEntries {first second} { set fkey [getKeyOfEntry [addressbook record $first]] set skey [getKeyOfEntry [addressbook record $second]] set res [compareStrings [lindex $fkey 0] [lindex $skey 0]] if {$res == 0} { if {([llength $fkey] > 1) && ([llength $skey] > 1)} { set res [compareStrings [lindex $fkey 1] [lindex $skey 1]] } } return $res } proc getKeyOfEntry {record} { foreach item $record { array set data $item } if {[info exists data(Last)]} { lappend key $data(Last) if {[info exists data(First)]} { lappend key $data(First) } } elseif {[info exists data(Organization)]} { lappend key $data(Organization) } elseif {[info exists data(First)]} { lappend key $data(First) } else { lappend key "" } return $key } proc mapString {s} { string map { \ à a á a ä a â a \ ç c \ è e é e ë e ê e \ ì i à i ï i î i \ ñ n \ ò o ó o ö o ô o \ ù u ú u ü u û u \ ÿ y \ } [string tolower $s] } proc compareStrings {s1 s2} { string compare [mapString $s1] [mapString $s2] } exportAddressBook --- NEW FILE: addressbook2tex.tcl --- ## -*-Tcl-*- # ################################################################### # # FILE: "addressbook2tex.tcl" # created: 2007-01-11 16:32:54 # last update: 2007-01-12 16:06:48 # Author: Frédéric Boulanger # E-mail: Fre...@su... # mail: Supélec - Département Informatique # 3 rue Joliot-Curie, 91192 Gif-sur-Yvette, France # www: http://wwwsi.supelec.fr/fb/ # # Description: # # History # # modified by rev reason # ---------- --- --- ----------- # 2007-01-11 FBO 1.0 original # ################################################################### ## # set suppressedFields [list \ # ABDate \ # ABPersonFlags \ # ABRelatedNames \ # AIMInstant \ # Creation \ # FirstPhonetic \ # ICQInstant \ # JabberInstant \ # LastPhonetic \ # MSNInstant \ # MiddlePhonetic \ # Modification \ # UID \ # YahooInstant \ # ] proc exportAddressBook {} { set suppressedFields [list \ ABDate \ ABPersonFlags \ ABRelatedNames \ AIMInstant \ Creation \ FirstPhonetic \ ICQInstant \ JabberInstant \ LastPhonetic \ MSNInstant \ MiddlePhonetic \ Modification \ UID \ YahooInstant \ ] # set expfilename [putfile "Save exported addresses to" "AddressBook-[ISOTime::ISODate].xml"] # if {[string length $expfilename] == 0} { # error "cancel" # } set expfilename "AddressBook-[clock format [clock seconds] -format "%Y-%m-%d"].tex" puts "Exporting AddressBook to $expfilename" set expfile [open $expfilename "w"] fconfigure $expfile -encoding macRoman -translation lf puts $expfile "\\documentclass{addressbook}" puts $expfile "\\usepackage\[T1]{fontenc}" puts $expfile "\\usepackage\[applemac]{inputenc}" puts $expfile "" puts $expfile "\\begin{document}" package require addressbook puts "Sorting AddressBook entries" set idlist [lsort -command compareEntries [addressbook persons -ids]] puts "Writing entries to $expfilename" set lastLetter "" foreach id $idlist { set data [addressbook record $id] set k [mapString [lindex [getKeyOfEntry $data] 0]] if {[string index $k 0] != $lastLetter} { set lastLetter [string index $k 0] puts $expfile "\\newLetter{[string toupper $lastLetter]}" puts $expfile "" } puts $expfile "\\person{" foreach field $data { set fieldname [lindex $field 0] set fieldvalue [lindex $field 1] if {[lsearch -exact $suppressedFields $fieldname] >= 0} { continue } switch -exact -- [addressbook property type -persons $fieldname] { Date { set date [clock format $fieldvalue -format "%Y-%m-%d %H:%M:%S"] puts $expfile " \\$fieldname{$date}" } Array - Data - Integer - Real - String { puts $expfile " \\$fieldname{[normalize $fieldvalue]}" } MultiDate { puts $expfile " \\$fieldname{" foreach item $fieldvalue { set date [clock format [lindex $item 1] -format "%Y-%m-%d %H:%M:%S"] puts $expfile " \\named{[lindex $item 0]}{$date}" } puts $expfile " }" } Dictionary - MultiArray - MultiData - MultiInteger - MultiReal - MultiString { puts $expfile " \\$fieldname{" foreach item $fieldvalue { puts $expfile " \\named{[lindex $item 0]}{[normalize [lindex $item 1]]}" } puts $expfile " }" } MultiDictionary { puts $expfile " \\$fieldname{" foreach item $fieldvalue { puts $expfile " \\named{[lindex $item 0]}{" foreach subitem [lindex $item 1] { puts $expfile " \\[lindex $subitem 0]{[normalize [lindex $subitem 1]]}" } puts $expfile " }" } puts $expfile " }" } default { error "Unknown property type \"[addressbook property type -persons $field]\"" } } } set parents [addressbook parents -ids $id] foreach p $parents { if {[string length $p] == 0} continue puts $expfile " \\ingroup{[normalize [addressbook set $p GroupName]]}" } puts $expfile "}" puts $expfile "" } puts $expfile "\\end{document}" close $expfile puts "Done." } proc normalize {s} { regsub -- {\[Comment\][\n\r]?} $s {} s regsub -- {\[Comments\][\n\r]?} $s {} s regsub -- {\[Commentaires\][\n\r]?} $s {} s regsub -all -- {([&_$#])} $s {\\\1} s regsub -all -- {[\n\r]} $s {\\newline } return $s } proc compareEntries {first second} { set fkey [getKeyOfEntry [addressbook record $first]] set skey [getKeyOfEntry [addressbook record $second]] set res [compareStrings [lindex $fkey 0] [lindex $skey 0]] if {$res == 0} { if {([llength $fkey] > 1) && ([llength $skey] > 1)} { set res [compareStrings [lindex $fkey 1] [lindex $skey 1]] } } return $res } proc getKeyOfEntry {record} { foreach item $record { array set data $item } if {[info exists data(Last)]} { lappend key $data(Last) if {[info exists data(First)]} { lappend key $data(First) } } elseif {[info exists data(Organization)]} { lappend key $data(Organization) } elseif {[info exists data(First)]} { lappend key $data(First) } else { lappend key "" } return $key } proc mapString {s} { string map { \ à a á a ä a â a \ ç c \ è e é e ë e ê e \ ì i à i ï i î i \ ñ n \ ò o ó o ö o ô o \ ù u ú u ü u û u \ ÿ y \ } [string tolower $s] } proc compareStrings {s1 s2} { string compare [mapString $s1] [mapString $s2] } exportAddressBook |
|
From: Frédéric B. <bou...@us...> - 2007-02-05 12:50:09
|
Update of /cvsroot/tcladdressbook/Contribs/Tcl/AB2X In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv13246/Tcl/AB2X Log Message: Directory /cvsroot/tcladdressbook/Contribs/Tcl/AB2X added to the repository |
|
From: Frédéric B. <bou...@us...> - 2007-02-05 12:50:07
|
Update of /cvsroot/tcladdressbook/Contribs/Tcl/AB2X/LaTeX In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv13246/Tcl/AB2X/LaTeX Log Message: Directory /cvsroot/tcladdressbook/Contribs/Tcl/AB2X/LaTeX added to the repository |
|
From: Bernard D. <bde...@us...> - 2006-01-05 09:50:42
|
Update of /cvsroot/tcladdressbook/Source/tclconfig In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8513 Modified Files: tcl.m4 Log Message: Fixed backquote typo Index: tcl.m4 =================================================================== RCS file: /cvsroot/tcladdressbook/Source/tclconfig/tcl.m4,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- tcl.m4 9 Aug 2005 14:31:17 -0000 1.1 +++ tcl.m4 5 Jan 2006 09:50:33 -0000 1.2 @@ -13,6 +13,12 @@ AC_PREREQ(2.50) +# Possible values for key variables defined: +# +# TEA_WINDOWINGSYSTEM - win32 aqua x11 (mirrors 'tk windowingsystem') +# TEA_PLATFORM - windows unix +# + #------------------------------------------------------------------------ # TEA_PATH_TCLCONFIG -- [...1233 lines suppressed...] - # we need TCLSH_PROG defined to get Windows short pathnames - AC_REQUIRE([TEA_PROG_TCLSH]) - - AC_MSG_CHECKING([short pathname for $1 ($2)]) - - shortpath= - case "$2" in - *\ *) - # Only do this if we need to. - shortpath=`echo "puts [[file attributes {$2} -shortname]] ; exit" | ${TCLSH_PROG} 2>/dev/null` - ;; - esac - if test "x${shortpath}" = "x" ; then - AC_MSG_RESULT([not changed]) - else - $1=$shortpath - AC_MSG_RESULT([${$1}]) fi fi ]) |
|
From: Bernard D. <bde...@us...> - 2006-01-05 09:50:16
|
Update of /cvsroot/tcladdressbook/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8337 Modified Files: configure Log Message: TEA 3.4 Index: configure =================================================================== RCS file: /cvsroot/tcladdressbook/Source/configure,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- configure 9 Aug 2005 14:28:49 -0000 1.1 +++ configure 5 Jan 2006 09:50:08 -0000 1.2 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for Tcladdressbook 1.1. +# Generated by GNU Autoconf 2.59 for Tcladdressbook 1.1.5. # # Report bugs to <http://sourceforge.net/projects/tcladdressbook>. # @@ -269,8 +269,8 @@ # Identity of this package. PACKAGE_NAME='Tcladdressbook' PACKAGE_TARNAME='tcladdressbook' [...1395 lines suppressed...] +Tcladdressbook config.status 1.1.5 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" @@ -10768,7 +10666,6 @@ s,@TCL_THREADS@,$TCL_THREADS,;t t s,@SHARED_BUILD@,$SHARED_BUILD,;t t s,@AR@,$AR,;t t -s,@TCLSH_PROG@,$TCLSH_PROG,;t t s,@CELIB_DIR@,$CELIB_DIR,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@DL_LIBS@,$DL_LIBS,;t t @@ -10790,6 +10687,7 @@ s,@MAKE_STATIC_LIB@,$MAKE_STATIC_LIB,;t t s,@MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t s,@RANLIB_STUB@,$RANLIB_STUB,;t t +s,@TCLSH_PROG@,$TCLSH_PROG,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF |
|
From: Bernard D. <bde...@us...> - 2006-01-05 09:49:58
|
Update of /cvsroot/tcladdressbook/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8190 Modified Files: configure.ac Log Message: TEA 3.4 Index: configure.ac =================================================================== RCS file: /cvsroot/tcladdressbook/Source/configure.ac,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- configure.ac 5 Jan 2006 09:41:00 -0000 1.2 +++ configure.ac 5 Jan 2006 09:49:47 -0000 1.3 @@ -31,7 +31,7 @@ # as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE. #-------------------------------------------------------------------- -TEA_INIT([3.2]) +TEA_INIT([3.4]) AC_CONFIG_AUX_DIR(tclconfig) |
|
From: Bernard D. <bde...@us...> - 2006-01-05 09:41:38
|
Update of /cvsroot/tcladdressbook/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5942 Modified Files: pkgIndex.tcl.in Log Message: Using @PKG_LIB_FILE@ Index: pkgIndex.tcl.in =================================================================== RCS file: /cvsroot/tcladdressbook/Source/pkgIndex.tcl.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- pkgIndex.tcl.in 9 Aug 2005 14:28:49 -0000 1.1 +++ pkgIndex.tcl.in 5 Jan 2006 09:41:31 -0000 1.2 @@ -1,3 +1,3 @@ if {[catch {package require Tcl 8.2}]} return -package ifneeded addressbook @PACKAGE_VERSION@ [list load [file join $dir libTcladdressbook@PACKAGE_VERSION@.dylib] addressbook] +package ifneeded addressbook @PACKAGE_VERSION@ [list load [file join $dir @PKG_LIB_FILE@] addressbook] |
|
From: Bernard D. <bde...@us...> - 2006-01-05 09:41:09
|
Update of /cvsroot/tcladdressbook/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5722 Modified Files: TclAddressBook.mcp.xml TclAddressBook_version.h configure.ac Log Message: Bumped to 1.1.5 Index: TclAddressBook.mcp.xml =================================================================== RCS file: /cvsroot/tcladdressbook/Source/TclAddressBook.mcp.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- TclAddressBook.mcp.xml 9 Aug 2005 14:29:19 -0000 1.1 +++ TclAddressBook.mcp.xml 5 Jan 2006 09:41:00 -0000 1.2 @@ -812,7 +812,7 @@ <SETTING><NAME>Label</NAME><VALUE>0</VALUE></SETTING> <SETTING><NAME>Comments</NAME><VALUE></VALUE></SETTING> <SETTING><NAME>HasCustomBadge</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>HasRoutingInfo</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>HasRoutingInfo</NAME><VALUE>false</VALUE></SETTING> <!-- Settings for "PPC CodeGen" panel --> <SETTING><NAME>MWCodeGen_PPC_structalignment</NAME><VALUE>PPC_mw</VALUE></SETTING> @@ -905,7 +905,7 @@ <!-- Settings for "PPC Mac OS X Project" panel --> <SETTING><NAME>MWProject_MacOSX_type</NAME><VALUE>SharedLibrary</VALUE></SETTING> - <SETTING><NAME>MWProject_MacOSX_outfile</NAME><VALUE>libTcladdressbook1.1.dylib</VALUE></SETTING> + <SETTING><NAME>MWProject_MacOSX_outfile</NAME><VALUE>libTcladdressbook1.1.5.dylib</VALUE></SETTING> <SETTING><NAME>MWProject_MacOSX_filecreator</NAME><VALUE>????</VALUE></SETTING> <SETTING><NAME>MWProject_MacOSX_filetype</NAME><VALUE>MDYL</VALUE></SETTING> <SETTING><NAME>MWProject_MacOSX_vmaddress</NAME><VALUE>0</VALUE></SETTING> @@ -2100,7 +2100,7 @@ <!-- Settings for "PPC Mac OS X Project" panel --> <SETTING><NAME>MWProject_MacOSX_type</NAME><VALUE>SharedLibrary</VALUE></SETTING> - <SETTING><NAME>MWProject_MacOSX_outfile</NAME><VALUE>libTcladdressbook1.1.dylib</VALUE></SETTING> + <SETTING><NAME>MWProject_MacOSX_outfile</NAME><VALUE>libTcladdressbook1.1.5.dylib</VALUE></SETTING> <SETTING><NAME>MWProject_MacOSX_filecreator</NAME><VALUE>????</VALUE></SETTING> <SETTING><NAME>MWProject_MacOSX_filetype</NAME><VALUE>MDYL</VALUE></SETTING> <SETTING><NAME>MWProject_MacOSX_vmaddress</NAME><VALUE>0</VALUE></SETTING> Index: configure.ac =================================================================== RCS file: /cvsroot/tcladdressbook/Source/configure.ac,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- configure.ac 9 Aug 2005 14:28:49 -0000 1.1 +++ configure.ac 5 Jan 2006 09:41:00 -0000 1.2 @@ -23,7 +23,7 @@ # so you can encode the package version directly into the source files. #----------------------------------------------------------------------- -AC_INIT([Tcladdressbook], [1.1], [http://sourceforge.net/projects/tcladdressbook]) +AC_INIT([Tcladdressbook], [1.1.5], [http://sourceforge.net/projects/tcladdressbook]) #-------------------------------------------------------------------- # Call TEA_INIT as the first TEA_ macro to set up initial vars. Index: TclAddressBook_version.h =================================================================== RCS file: /cvsroot/tcladdressbook/Source/TclAddressBook_version.h,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- TclAddressBook_version.h 9 Aug 2005 14:29:19 -0000 1.17 +++ TclAddressBook_version.h 5 Jan 2006 09:41:00 -0000 1.18 @@ -10,7 +10,7 @@ #define TCLADDRESSBOOK_MAJOR 1 #define TCLADDRESSBOOK_MINOR 1 -#define TCLADDRESSBOOK_SUBMINOR 4 +#define TCLADDRESSBOOK_SUBMINOR 5 #define TCLADDRESSBOOK_STAGE 'f' #define TCLADDRESSBOOK_DEVEL 0 // 'd' for developStage |
|
From: Bernard D. <bde...@us...> - 2005-08-09 21:42:16
|
Update of /cvsroot/tcladdressbook/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27684 Modified Files: TclAddressBook.c TclAddressBook.h TclAddressBook.pch TclAddressBookUtils.c TclAddressBookUtils.h TclAddressBook_Headers.h TclAddressBook_version.h pkgIndex.tcl Added Files: TclAddressBook.mcp.xml Log Message: Switch to TEA Index: TclAddressBookUtils.h =================================================================== RCS file: /cvsroot/tcladdressbook/Source/TclAddressBookUtils.h,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- TclAddressBookUtils.h 3 Aug 2004 09:53:02 -0000 1.14 +++ TclAddressBookUtils.h 9 Aug 2005 14:29:19 -0000 1.15 @@ -1,13 +1,13 @@ /* * File : "TclAddressBookUtils.h" * Created: 2003-12-05 10:05:19 - * Last modification: 2004-08-01 19:16:40 + * Last modification: 2005-08-05 15:21:00 * Author: Bernard Desgraupes * e-mail: <bde...@ea...> * * Header file for TclAddressBookUtils.c * - * (c) Copyright : Bernard Desgraupes, 2003-2004 + * (c) Copyright : Bernard Desgraupes, 2003-2005 * All rights reserved. * This software is free software with BSD licence. * Versions history: see the Changes.Log file. @@ -16,8 +16,11 @@ * $Revision$ */ -#ifndef TCLADDRESSBOOKUTILS_H -#define TCLADDRESSBOOKUTILS_H +#ifndef _TCLADDRESSBOOKUTILS_H +#define _TCLADDRESSBOOKUTILS_H + +#include <Carbon/Carbon.h> +#include <AddressBook/AddressBook.h> /* * Enumerated values to designate the type of records @@ -154,4 +157,4 @@ Tcl_Obj* argPtr ); -#endif // TCLADDRESSBOOKUTILS_H \ No newline at end of file +#endif // _TCLADDRESSBOOKUTILS_H \ No newline at end of file Index: TclAddressBook_Headers.h =================================================================== RCS file: /cvsroot/tcladdressbook/Source/TclAddressBook_Headers.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- TclAddressBook_Headers.h 11 Dec 2003 08:58:40 -0000 1.2 +++ TclAddressBook_Headers.h 9 Aug 2005 14:29:19 -0000 1.3 @@ -1,6 +1,6 @@ // File: "TclAddressBook_Headers.h" // Created: 2003-11-26 12:56:37 -// Last modification: 2003-12-11 09:58:01 +// Last modification: 2005-08-09 09:52:51 // Author: Bernard Desgraupes // Description: Use this header to include the precompiled header // on OSX when building with CW Pro 8 @@ -11,13 +11,13 @@ #if __POWERPC__ #if TARGET_API_MAC_CARBON // Carbon - #if TARGET_API_MAC_OSX - // Carbon on X - #include "MW_TclAddressBookHeaderCarbonX" - #else - // CarbonLib on Classic - #error "No CarbonLib on Classic target" - #endif + #if TARGET_API_MAC_OSX + // Carbon on X + #include "MW_TclAddressBookHeaderCarbonX" + #else + // CarbonLib on Classic + #error "CarbonLib on Classic not supported" + #endif #else // Classic #error "No Classic target" Index: pkgIndex.tcl =================================================================== RCS file: /cvsroot/tcladdressbook/Source/pkgIndex.tcl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- pkgIndex.tcl 28 Jul 2004 23:23:59 -0000 1.2 +++ pkgIndex.tcl 9 Aug 2005 14:29:19 -0000 1.3 @@ -1,3 +1,3 @@ if {[catch {package require Tcl 8.2}]} return -package ifneeded addressbook 1.1 [list load [file join $dir addressbook1.1.dylib] addressbook] +package ifneeded addressbook 1.1 [list load [file join $dir libTcladdressbook1.1.dylib] addressbook] Index: TclAddressBook.h =================================================================== RCS file: /cvsroot/tcladdressbook/Source/TclAddressBook.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- TclAddressBook.h 11 Dec 2003 08:55:49 -0000 1.2 +++ TclAddressBook.h 9 Aug 2005 14:29:19 -0000 1.3 @@ -1,21 +1,47 @@ // File: "TclAddressBook.h" // Created: 2003-11-26 12:53:29 -// Last modification: 2003-12-11 09:51:39 +// Last modification: 2005-08-05 17:18:27 // Author: Bernard Desgraupes // Description: Use this header on OSX for dylib target built with CW Pro 8 + + +#ifndef _TCLADDRESSBOOK_H +#define _TCLADDRESSBOOK_H + + #define TARGET_API_MAC_CARBON 1 #define TARGET_API_MAC_OSX 1 // Stubs mechanism enabled #define USE_TCL_STUBS -#ifndef __MWERKS__ -#error "This prefix file is for the CW8 MachO target only." +#include <Carbon/Carbon.h> +#include <AddressBook/AddressBook.h> -#else +struct SFReply {char dummy;}; -#include "TclAddressBook_Headers.h" +typedef struct SFReply SFReply; +typedef struct SFReply StandardFileReply; + + +#if TARGET_RT_MAC_MACHO +#ifdef MAC_TCL +#undef MAC_TCL +#endif +#define TCLADDRESSBOOK_MACHO 1 +#endif + + +#include <Tcl/tcl.h> + + +#ifndef CONST84 // Tcl 8.4 backwards compatibility +# define CONST84 +# define CONST84_RETURN CONST +#endif + + +#endif // _TCLADDRESSBOOK_H -#endif // __MWERKS__ Index: TclAddressBook.pch =================================================================== RCS file: /cvsroot/tcladdressbook/Source/TclAddressBook.pch,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- TclAddressBook.pch 11 Dec 2003 10:35:39 -0000 1.4 +++ TclAddressBook.pch 9 Aug 2005 14:29:19 -0000 1.5 @@ -1,60 +1,15 @@ -// File: "TclAddressBook_CarbonMachO.pch" +// File: "TclAddressBook.pch" // Created: 2003-09-22 10:47:15 -// Last modification: 2003-12-11 09:52:10 +// Last modification: 2005-08-09 09:56:21 // Author: Bernard Desgraupes // Description: Use this header to include the precompiled headers -// on OSX for dylib target built with CW Pro 8 - - -#define TARGET_API_MAC_CARBON 1 -#define TARGET_API_MAC_OSX 1 - - -// Stubs mechanism enabled -#define USE_TCL_STUBS +// on OSX for target built with CW Pro 8 #ifndef __APPLE_CC__ -#if TARGET_API_MAC_CARBON - // Carbon -#if TARGET_API_MAC_OSX - // Carbon on X - #pragma precompile_target "MW_TclAddressBookHeaderCarbonX" -#else - // CarbonLib on Classic - #pragma precompile_target "MW_TclAddressBookHeaderCarbon" -#endif -#else - // Classic - #pragma precompile_target "MW_TclAddressBookHeaderPPC" -#endif -#endif - - -#include <Carbon/Carbon.h> -#include <AddressBook/AddressBook.h> - -struct SFReply {char dummy;}; - -typedef struct SFReply SFReply; -typedef struct SFReply StandardFileReply; - - -#if TARGET_RT_MAC_MACHO -#ifdef MAC_TCL -#undef MAC_TCL -#endif -#define TCLADDRESSBOOK_MACHO 1 -#endif - - -#include <Tcl/tcl.h> - - -#ifndef CONST84 // Tcl 8.4 backwards compatibility -# define CONST84 -# define CONST84_RETURN CONST +#pragma precompile_target "MW_TclAddressBookHeaderCarbonX" #endif +#include "TclAddressBook.h" #include "TclAddressBook_version.h" #include "TclAddressBookUtils.h" --- NEW FILE: TclAddressBook.mcp.xml --- <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <?codewarrior exportversion="1.0.1" ideversion="5.0" ?> <!DOCTYPE PROJECT [ <!ELEMENT PROJECT (TARGETLIST, TARGETORDER, GROUPLIST, DESIGNLIST?)> <!ELEMENT TARGETLIST (TARGET+)> <!ELEMENT TARGET (NAME, SETTINGLIST, FILELIST?, LINKORDER?, SEGMENTLIST?, OVERLAYGROUPLIST?, SUBTARGETLIST?, SUBPROJECTLIST?, FRAMEWORKLIST?, PACKAGEACTIONSLIST?)> <!ELEMENT NAME (#PCDATA)> <!ELEMENT USERSOURCETREETYPE (#PCDATA)> <!ELEMENT PATH (#PCDATA)> <!ELEMENT FILELIST (FILE*)> <!ELEMENT FILE (PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?, ROOTFILEREF?, FILEKIND?, FILEFLAGS?)> <!ELEMENT PATHTYPE (#PCDATA)> <!ELEMENT PATHROOT (#PCDATA)> <!ELEMENT ACCESSPATH (#PCDATA)> <!ELEMENT PATHFORMAT (#PCDATA)> <!ELEMENT ROOTFILEREF (PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?)> <!ELEMENT FILEKIND (#PCDATA)> <!ELEMENT FILEFLAGS (#PCDATA)> [...2469 lines suppressed...] <PATHFORMAT>Unix</PATHFORMAT> </FILEREF> </GROUP> <GROUP><NAME>Libraries</NAME> <FILEREF> <TARGETNAME>TclAddressBook Devel</TARGETNAME> <PATHTYPE>Name</PATHTYPE> <PATH>dylib1.o</PATH> <PATHFORMAT>MacOS</PATHFORMAT> </FILEREF> <FILEREF> <TARGETNAME>TclAddressBook Devel</TARGETNAME> <PATHTYPE>Name</PATHTYPE> <PATH>libtclstub8.4.a</PATH> <PATHFORMAT>Unix</PATHFORMAT> </FILEREF> </GROUP> </GROUPLIST> </PROJECT> Index: TclAddressBookUtils.c =================================================================== RCS file: /cvsroot/tcladdressbook/Source/TclAddressBookUtils.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- TclAddressBookUtils.c 6 Jun 2005 12:37:45 -0000 1.25 +++ TclAddressBookUtils.c 9 Aug 2005 14:29:19 -0000 1.26 @@ -1,13 +1,13 @@ /* * File : "TclAddressBookUtils.c" * Created: 2003-12-05 10:08:03 - * Last modification: 2005-03-30 18:09:13 + * Last modification: 2005-08-05 17:17:46 * Author: Bernard Desgraupes * e-mail: <bde...@ea...> * * Utility functions called by the TclABCmd command functions * - * (c) Copyright : Bernard Desgraupes, 2003-2004, 2005 + * (c) Copyright : Bernard Desgraupes, 2003-2005 * All rights reserved. * This software is free software with BSD licence. * Versions history: see the Changes.Log file. @@ -18,7 +18,9 @@ /* TclAddressBookUtils.h included in precompiled header */ -// #include "TclAddressBookUtils.h" +#include "TclAddressBook.h" +#include "TclAddressBookUtils.h" + // Global variable for the macRoman Tcl_Encoding token extern Tcl_Encoding gMacRomanEnc; Index: TclAddressBook.c =================================================================== RCS file: /cvsroot/tcladdressbook/Source/TclAddressBook.c,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- TclAddressBook.c 4 Apr 2005 06:32:12 -0000 1.43 +++ TclAddressBook.c 9 Aug 2005 14:29:19 -0000 1.44 @@ -1,14 +1,14 @@ /* * File : "TclAddressBook.c" * Created: 2003-11-26 12:54:15 - * Last modification: 2004-08-08 22:27:19 + * Last modification: 2005-08-04 17:19:46 * Author: Bernard Desgraupes * e-mail: <bde...@ea...> * * Load this extension in the Tcl interpreter with the following instruction: * package require addressbook * - * (c) Copyright : Bernard Desgraupes, 2003-2004 + * (c) Copyright : Bernard Desgraupes, 2003-2005 * All rights reserved. * This software is free software with BSD licence. * Versions history: see the Changes.Log file. @@ -18,8 +18,9 @@ */ -/* TclAddressBookUtils.h included in precompiled header */ -// #include "TclAddressBookUtils.h" +#include "TclAddressBook.h" +#include "TclAddressBook_version.h" +#include "TclAddressBookUtils.h" /* * Prototypes for static procedures defined later in this file: Index: TclAddressBook_version.h =================================================================== RCS file: /cvsroot/tcladdressbook/Source/TclAddressBook_version.h,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- TclAddressBook_version.h 6 Jun 2005 13:44:40 -0000 1.16 +++ TclAddressBook_version.h 9 Aug 2005 14:29:19 -0000 1.17 @@ -1,9 +1,13 @@ // File: "TclAddressBook_version.h" // Created: 2003-09-24 07:28:22 -// Last modification: 2005-06-06 15:16:09 +// Last modification: 2005-08-05 15:11:43 // Author: Bernard Desgraupes // Description: version numbering for Tcladdressbook + +#ifndef _TCLADDRESSBOOK_VERSION_H +#define _TCLADDRESSBOOK_VERSION_H + #define TCLADDRESSBOOK_MAJOR 1 #define TCLADDRESSBOOK_MINOR 1 #define TCLADDRESSBOOK_SUBMINOR 4 @@ -14,3 +18,4 @@ // 'b' for betaStage // 'f' for finalStage +#endif // _TCLADDRESSBOOK_VERSION_H |
|
From: Bernard D. <bde...@us...> - 2005-08-09 19:59:32
|
Update of /cvsroot/tcladdressbook/Source/tclconfig In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28171 Added Files: ChangeLog README.txt install-sh tcl.m4 Log Message: First checkin --- NEW FILE: install-sh --- #!/bin/sh # # install - install a program, script, or datafile # This comes from X11R5; it is not part of GNU. # # $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $ # # This script is compatible with the BSD install script, but was written # from scratch. # # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" instcmd="$mvprog" chmodcmd="" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; *) if [ x"$src" = x ] then src=$1 else dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` fi # Make a temp file name in the proper directory. dstdir=`dirname $dst` dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp # and set any options; do chmod last to preserve setuid bits if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi # Now rename the file to the real destination. $doit $rmcmd $dst $doit $mvcmd $dsttmp $dst exit 0 --- NEW FILE: tcl.m4 --- # tcl.m4 -- # # This file provides a set of autoconf macros to help TEA-enable # a Tcl extension. # # Copyright (c) 1999-2000 Ajuba Solutions. # Copyright (c) 2002-2005 ActiveState Corporation. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # # RCS: @(#) $Id: tcl.m4,v 1.1 2005/08/09 14:31:17 bdesgraupes Exp $ AC_PREREQ(2.50) #------------------------------------------------------------------------ # TEA_PATH_TCLCONFIG -- # # Locate the tclConfig.sh file and perform a sanity check on [...3788 lines suppressed...] # we need TCLSH_PROG defined to get Windows short pathnames AC_REQUIRE([TEA_PROG_TCLSH]) AC_MSG_CHECKING([short pathname for $1 ($2)]) shortpath= case "$2" in *\ *) # Only do this if we need to. shortpath=`echo "puts [[file attributes {$2} -shortname]] ; exit" | ${TCLSH_PROG} 2>/dev/null` ;; esac if test "x${shortpath}" = "x" ; then AC_MSG_RESULT([not changed]) else $1=$shortpath AC_MSG_RESULT([${$1}]) fi fi ]) --- NEW FILE: README.txt --- These files comprise the basic building blocks for a Tcl Extension Architecture (TEA) extension. For more information on TEA see: http://www.tcl.tk/doc/tea/ This package is part of the Tcl project at SourceForge, and latest sources should be available there: http://tcl.sourceforge.net/ This package is a freely available open source package. You can do virtually anything you like with it, such as modifying it, redistributing it, and selling it either in whole or in part. CONTENTS ======== The following is a short description of the files you will find in the sample extension. README.txt This file install-sh Program used for copying binaries and script files to their install locations. tcl.m4 Collection of Tcl autoconf macros. Included by a package's aclocal.m4 to define TEA_* macros. --- NEW FILE: ChangeLog --- 2005-03-24 Jeff Hobbs <je...@Ac...> * tcl.m4 (TEA_TCL_64BIT_FLAGS): use Tcl header defaults for wide int type only on Windows when __int64 is detected as valid. 2005-03-24 Don Porter <dg...@us...> * README.txt: Update reference to "SC_* macros" to "TEA_* macros". * tcl.m4: Incorporated recent improvements in SC_PATH_TCLCONFIG and SC_PATH_TKCONFIG into TEA_PATH_TCLCONFIG and TEA_PATH_TKCONFIG. Corrected search path in TEA_PATH_CONFIG and added AC_SUBST($1_BIN_DIR) to TEA_LOAD_CONFIG so that packages that load the configuration of another package can know where they loaded it from. 2005-03-18 Jeff Hobbs <je...@Ac...> * tcl.m4 (TEA_CONFIG_CFLAGS): correct 2005-03-17 change to have variant LD_SEARCH_FLAGS for gcc and cc builds. * tcl.m4 (TEA_PROG_TCLSH, TEA_PROG_WISH): correct x-compile check. 2005-03-17 Jeff Hobbs <je...@Ac...> * tcl.m4: Correct gcc build and HP-UX-11. 2005-02-08 Jeff Hobbs <je...@Ac...> * tcl.m4 (TEA_ADD_LIBS): don't touch lib args starting with -. (TEA_CONFIG_CFLAGS): only define _DLL for CE in shared build. (TEA_MAKE_LIB): set RANLIB* to : on Windows (it's not needed). 2005-02-01 Jeff Hobbs <je...@Ac...> * tcl.m4: redo of 2005-01-27 changes to correctly handle paths with spaces. Win/CE and Win/64 builds now require a prebuilt tclsh to handle conversion to short pathnames. This is done in the new TEA_PATH_NOSPACE macro. For Win/CE|64, make CC just the compiler and move the necessary includes to CFLAGS. (TEA_CONFIG_CFLAGS): Add Solaris 64-bit gcc build support. (TEA_PROG_TCLSH, TEA_PROG_WISH): Allow TCLSH_PROG and WISH_PROG to be set in the env and prevent resetting. (TEA_ADD_LIBS): On Windows using GCC (mingw), convert foo.lib args to -lfoo, for use with mingw. *** POTENTIAL INCOMPATABILITY *** (TEA_CONFIG_CFLAGS): Fix AIX gcc builds to work out-of-box. Bumped TEA to 3.2. 2005-01-27 Jeff Hobbs <je...@Ac...> * tcl.m4: remove cygpath calls to support msys. Update base CE build assumption to "420,ARMV4,ARM,Pocket PC 2003". Make STLIB_LD use $LINKBIN -lib. 2005-01-25 Daniel Steffen <da...@us...> * tcl.m4 (Darwin): fixed bug with static build linking to dynamic library in /usr/lib etc instead of linking to static library earlier in search path. [Tcl Bug 956908] Removed obsolete references to Rhapsody. 2004-12-29 Jeff Hobbs <je...@Ac...> * tcl.m4: Updates for VC7 compatibility, fixing CFLAGS and LDFLAGS options, using better default -O levels. [Bug 1092952, 1091967] 2004-12-29 Joe English <jen...@us...> * tcl.m4: Do not use ${DBGX} suffix when building shared libraries [patch #1081595, TIP #34] 2004-09-07 Jeff Hobbs <je...@Ac...> * tcl.m4 (TEA_CONFIG_CFLAGS): support eVC4 Win/CE builds 2004-08-10 Jeff Hobbs <je...@Ac...> * tcl.m4 (TEA_INIT, TEA_PREFIX): update handling of exec_prefix to work around subdir configures since autoconf only propagates the prefix (not exec_prefix). 2004-07-23 Daniel Steffen <da...@us...> * tcl.m4 (TEA_CONFIG_CFLAGS): Darwin section: brought inline with Tcl 8.5 HEAD config, removed core specific & obsolete settings. 2004-07-22 Jeff Hobbs <je...@Ac...> * tcl.m4 (TEA_PATH_X): check in TK_DEFS for MAC_OSX_TK to see if we are compiling on Aqua. Add TEA_WINDOWINGSYSTEM var that reflects 'tk windowingsystem' value. 2004-07-16 Jeff Hobbs <je...@Ac...> * tcl.m4 (TEA_ENABLE_THREADS): force a threaded build when building against a threaded core. (CFLAGS_WARNING): Remove -Wconversion for gcc builds (TEA_CONFIG_CFLAGS): Reorder configure.in for better 64-bit build configuration, replacing EXTRA_CFLAGS with CFLAGS. [Bug #874058] Update to latest Tcl 8.5 head config settings. Call this TEA version 3.1. 2004-04-29 Jeff Hobbs <je...@Ac...> * tcl.m4 (TEA_TCL_64BIT_FLAGS): replace AC_TRY_RUN test with AC_TRY_COMPILE for the long vs. long long check. (kenny) 2004-04-26 Jeff Hobbs <je...@Ac...> * tcl.m4 (TEA_TCL_64BIT_FLAGS): update against core tcl.m4 to define TCL_WIDE_INT_IS_LONG if 'using long'. 2004-03-19 Jeff Hobbs <je...@Ac...> * tcl.m4: correct Windows builds getting LDFLAGS info in MAKE_LIB 2004-02-11 Jeff Hobbs <je...@Ac...> * tcl.m4: correct TCL_INCLUDES for private headers on Windows - it doesn't need the eval. 2004-02-10 Jeff Hobbs <je...@Ac...> * tcl.m4: don't require TK_INCLUDES and TCL_INCLUDES to have the DIR_NATIVE vars defined when using private headers on unix. Allow $... to TEA_ADD_SOURCES for constructs like TEA_ADD_SOURCES([\$(WIN_OBJECTS)]), that allow the developer to place more in the Makefile.in. tkUnixPort.h checks for HAVE_LIMITS_H, so do both HAVE and CHECK on limits.h 2003-12-10 Jeff Hobbs <je...@Ac...> * Makefile.in: added TEA_ADD_LIBS, TEA_ADD_INCLUDES and * configure: TEA_ADD_CFLAGS to configurable parameters with * configure.in: PKG_* equivs in the Makefile. This allows the * tclconfig/tcl.m4: user to worry less about actual magic VAR names. Corrected Makefile.in to note that TEA_ADD_TCL_SOURCES requires exact file names. 2003-12-09 Jeff Hobbs <je...@Ac...> * tcl.m4: updated OpenBSD support based on [Patch #775246] (cassoff) 2003-12-05 Jeff Hobbs <je...@Ac...> * configure: * configure.in: * Makefile.in (VPATH): readd $(srcdir) to front of VPATH as the first part of VPATH can get chopped off. Change .c.$(OBJEXT) rule to .c.@OBJEXT@ to support more makes. * tclconfig/tcl.m4: add TEA_ADD_STUB_SOURCES to support libstub generation and TEA_ADD_TCL_SOURCES to replace RUNTIME_SOURCES as the way the user specifies library files. 2003-12-03 Jeff Hobbs <je...@Ac...> * configure: Update of TEA spec to (hopefully) simplify * configure.in: some aspects of TEA by making use of more * Makefile.in: AC 2.5x features. Use PACKAGE_NAME (instead * generic/tclsample.c: of PACKAGE) and PACKAGE_VERSION (instead of * tclconfig/tcl.m4: VERSION) arguments to AC_INIT as the TEA package name and version. Provide a version argument to TEA_INIT - starting with 3.0. Drop all use of interior shell substs that older makefiles didn't like. Use PKG_* naming convention instead. Move specification of source files and public headers into configure.in with TEA_ADD_SOURCES and TEA_ADD_HEADERS. These will be munged during ./configure into the right obj file names (no $(SOURCES:.c=.obj) needed). There is almost nothing that should be touched in Makefile.in now for the developer. May want to add a TEA_ADD_TCL_SOURCES for the RUNTIME_SOURCES that remains. Use SHLID_LD_FLAGS (instead of SHLID_LDFLAGS) as Tcl does. Only specify the user requested LDFLAGS/CFLAGS in the Makefile, don't mention the _OPTIMIZE/_DEBUG variants. 2003-10-15 Jeff Hobbs <je...@Ac...> * tcl.m4: create a TEA_SETUP_COMPILER_CC the precedes the TEA_SETUP_COMPILER macro. They are split so the check for CC occurs before any use of CC. Also add AC_PROG_CPP to the compiler checks. 2003-10-06 Jeff Hobbs <je...@Ac...> * tcl.m4: Updated for autoconf 2.5x prereq. Where TCL_WIDE_INT_TYPE would be __int64, defer to the code checks in tcl.h, which also handles TCL_LL_MODIFIER* properly. 2003-04-22 Jeff Hobbs <je...@Ac...> * tcl.m4: correct default setting of ARCH for WinCE builds. Correct \ escaping for CE sed macros. 2003-04-10 Jeff Hobbs <je...@Ac...> * tcl.m4: replace $(syscal) construct with older `syscall` for systems where sh != bash. 2003-04-09 Jeff Hobbs <je...@Ac...> * tcl.m4 (TEA_WITH_CELIB): add --enable-wince and --with-celib options for Windows/CE compilation support. Requires the Microsoft eMbedded SDK and Keuchel's celib emulation layer. 2003-02-18 Jeff Hobbs <je...@Ac...> * tcl.m4 (TEA_ENABLE_THREADS): Make sure -lpthread gets passed on the link line when checking for the pthread_attr_setstacksize symbol. (dejong) * tcl.m4 (TEA_SETUP_COMPILER): added default calls to TEA_TCL_EARLY_FLAGS, TEA_TCL_64BIT_FLAGS, TEA_MISSING_POSIX_HEADERS and TEA_BUGGY_STRTOD. 2003-02-14 Jeff Hobbs <je...@Ac...> * tcl.m4: correct HP-UX ia64 --enable-64bit build flags 2003-01-29 Jeff Hobbs <je...@Ac...> * tcl.m4: check $prefix/lib as well as $exec_prefix/lib when looking for tcl|tkConfig.sh, as this check is done before we would set exec_prefix when the user does not define it. 2003-01-21 Mo DeJong <md...@us...> * tcl.m4 (TEA_CONFIG_CFLAGS): Fix build support for mingw, the previous implementation would use VC++ when compiling with mingw gcc. Don't pass -fPIC since gcc always compiles pic code under win32. Change some hard coded cases of gcc to ${CC}. 2002-10-15 Jeff Hobbs <je...@Ac...> * tcl.m4: move the CFLAGS definition from TEA_ENABLE_SHARED to TEA_MAKE_LIB because setting too early confuses other AC_* macros. Correct the HP-11 SHLIB_LD_LIBS setting. * tcl.m4: add the CFLAGS definition into TEA_ENABLE_SHARED and make it pick up the env CFLAGS at configure time. 2002-10-09 Jeff Hobbs <je...@Ac...> * tcl.m4: add --enable-symbols=mem option to enable TCL_MEM_DEBUG. Improved AIX 64-bit build support, allow it on AIX-4 as well. Enable 64-bit HP-11 compilation with gcc. Enable 64-bit IRIX64-6 cc build support. Correct FreeBSD thread library linkage. Add OSF1 static build support. Improve SunOS-5 shared build SHLIB_LD macro. 2002-07-20 Zoran Vasiljevic <zo...@ar...> * tcl.m4: Added MINGW32 to list of systems checked for Windows build. Also, fixes some indentation issues with "--with-XXX" options. 2002-04-23 Jeff Hobbs <je...@Ac...> * tcl.m4 (TEA_ENABLE_THREADS): added USE_THREAD_ALLOC define to use new threaded allocatory by default on Unix for Tcl 8.4. (TEA_CONFIG_CFLAGS): corrected LD_SEARCH_FLAGS for FreeBSD-3+. 2002-04-22 Jeff Hobbs <je...@Ac...> * tcl.m4 (TEA_SETUP_COMPILER): removed call to AC_CYGWIN so that we can use autoconf 2.5x as well as 2.13. This prevents us from being able to warn against the use of cygwin gcc at configure time, but allows autoconf 2.5x, which is what is shipped with most newer systems. 2002-04-11 Jeff Hobbs <je...@Ac...> * tcl.m4: Enabled COFF as well as CV style debug info with --enable-symbols to allow Dr. Watson users to see function info. More info on debugging levels can be obtained at: http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp 2002-04-03 Jeff Hobbs <je...@Ac...> * tcl.m4: change all SC_* macros to TEA_*. The SC_ was for Scriptics, which is no more. TEA represents a better, independent prefix that won't need changing. Added preliminary mingw gcc support. [Patch #538772] Added TEA_PREFIX macro that handles defaulting the prefix and exec_prefix vars to those used by Tcl if none were specified. Added TEA_SETUP_COMPILER macro that encompasses the AC_PROG_CC check and several other basic AC_PROG checks needed for making executables. This greatly simplifies user's configure.in files. Collapsed AIX-5 defines into AIX-* with extra checks for doing the ELF stuff on AIX-5-ia64. Updated TEA_ENABLE_THREADS to take an optional arg to allow switching it on by default (for Thread) and add sanity checking to warn the user if configuring threads incompatibly. 2002-03-29 Jeff Hobbs <je...@Ac...> * tcl.m4: made sure that SHLIB_LDFLAGS was set to LDFLAGS_DEFAULT. Removed --enable-64bit support for AIX-4 because it wasn't correct. Added -MT or -MD Windows linker switches to properly support symbols-enabled builds. 2002-03-28 Jeff Hobbs <je...@Ac...> * tcl.m4: called AC_MSG_ERROR when SC_TEA_INIT wasn't called first instead of calling it as that inlines it each time in shell code. Changed Windows CFLAGS_OPTIMIZE to use -O2 instead of -Oti. Noted TCL_LIB_VERSIONS_OK=nodots for Windows builds. A few changes to support itcl (and perhaps others): Added support for making your own stub libraries to SC_MAKE_LIB. New SC_PATH_CONFIG and SC_LOAD_CONFIG that take a package name arg and find that ${pkg}Config.sh file. itk uses this for itcl. 2002-03-27 Jeff Hobbs <je...@Ac...> * tcl.m4: made SC_LOAD_TKCONFIG recognize when working with a Tk build dir setup. Added EXTRA_CFLAGS and SHLIB_LD_LIBS substs to SC_CONFIG_CFLAGS. Added XLIBSW onto LIBS when it is defined. Remove TCL_LIBS from MAKE_LIB and correctly use SHLIB_LD_LIBS instead to not rely as much on tclConfig.sh cached info. Add TK_BIN_DIR to paths to find wish in SC_PROG_WISH. These move towards making TEA much more independent of *Config.sh. 2002-03-19 Jeff Hobbs <je...@Ac...> * tcl.m4: corrected forgotten (UN)SHARED_LIB_SUFFIX and SHLIB_SUFFIX defines for Win. (SC_PATH_X): made this only do the check on unix platforms. 2002-03-12 Jeff Hobbs <je...@Ac...> * README.txt: updated to reflect fewer files 2002-03-06 Jeff Hobbs <je...@Ac...> * config.guess (removed): * config.sub (removed): removed unnecessary files * installFile.tcl (removed): * mkinstalldirs (removed): these aren't really necessary for making TEA work * tcl.m4 (SC_PUBLIC_TCL_HEADERS, SC_PUBLIC_TK_HEADERS): don't check /usr(/local)/include for includes on Windows when not using gcc 2002-03-05 Jeff Hobbs <je...@Ac...> * tcl.m4: added warnings on Windows, removed RELPATH define and added TCL_LIBS to MAKE_LIB macro. This import represents 2.0.0, or a new start at attempting to make TEA much easier for C extension developers. **** moved from tclpro project to core tcl project, **** **** renamed to 'tclconfig' **** 2001-03-15 Karl Lehenbauer <ka...@pr...> * installFile.tcl: Added updating of the modification time of the target file whether we overwrote it or decided that it hadn't changed. This was necessary for us to be able to determine whether or not a module install touched the file. 2001-03-08 Karl Lehenbauer <ka...@pr...> * installFile.tcl: Added support for converting new-style (1.1+) Cygnus drive paths to Tcl-style. 2001-01-15 <bre...@in...> * tcl.m4: Added FreeBSD clause. 2001-01-03 <bre...@in...> * tcl.m4: Fixed typo in SC_LIB_SPEC where it is checking for exec-prefix. 2000-12-01 <bre...@in...> * tcl.m4: Concatenated most of the Ajuba acsite.m4 file so we don't need to modify the autoconf installation. * config.guess: * config.sub: * installFile.tcl: Added files from the itcl config subdirectory, which should go away. 2000-7-29 <we...@aj...> * Fixed the use of TCL_SRC_DIR and TK_SRC_DIR within TCL_PRIVATE_INCLUDES and TK_PRIVATE_INCLUDES to match their recent change from $(srcdir) to $(srcdir)/.. |
|
From: Bernard D. <bde...@us...> - 2005-08-09 19:59:10
|
Update of /cvsroot/tcladdressbook/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27572 Added Files: Makefile.in TclAddressBookPrefix.h aclocal.m4 configure configure.ac pkgIndex.tcl.in Log Message: Installed TEA build system --- NEW FILE: Makefile.in --- # Makefile.in -- # # This file is a Makefile for Sample TEA Extension. If it has the name # "Makefile.in" then it is a template for a Makefile; to generate the # actual Makefile, run "./configure", which is a configuration script # generated by the "autoconf" program (constructs like "@foo@" will get # replaced in the actual Makefile. # # Copyright (c) 1999 Scriptics Corporation. # Copyright (c) 2002-2005 ActiveState Corporation. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # # RCS: @(#) $Id: Makefile.in,v 1.1 2005/08/09 14:28:49 bdesgraupes Exp $ #======================================================================== # Add additional lines to handle any additional AC_SUBST cases that # have been added in a customized configure script. #======================================================================== #SAMPLE_NEW_VAR = @SAMPLE_NEW_VAR@ #======================================================================== # Nothing of the variables below this line should need to be changed. # Please check the TARGETS section below to make sure the make targets # are correct. #======================================================================== #======================================================================== # The names of the source files is defined in the configure script. # The object files are used for linking into the final library. # This will be used when a dist target is added to the Makefile. # It is not important to specify the directory, as long as it is the # $(srcdir) or in the generic, win or unix subdirectory. #======================================================================== PKG_SOURCES = @PKG_SOURCES@ PKG_OBJECTS = @PKG_OBJECTS@ PKG_STUB_SOURCES = @PKG_STUB_SOURCES@ PKG_STUB_OBJECTS = @PKG_STUB_OBJECTS@ #======================================================================== # PKG_TCL_SOURCES identifies Tcl runtime files that are associated with # this package that need to be installed, if any. #======================================================================== PKG_TCL_SOURCES = @PKG_TCL_SOURCES@ #======================================================================== # This is a list of public header files to be installed, if any. #======================================================================== PKG_HEADERS = @PKG_HEADERS@ #======================================================================== # "PKG_LIB_FILE" refers to the library (dynamic or static as per # configuration options) composed of the named objects. #======================================================================== PKG_LIB_FILE = @PKG_LIB_FILE@ PKG_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@ lib_BINARIES = $(PKG_LIB_FILE) BINARIES = $(lib_BINARIES) SHELL = @SHELL@ srcdir = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ libdir = @libdir@ datadir = @datadir@ mandir = @mandir@ includedir = @includedir@ DESTDIR = PKG_DIR = $(PACKAGE_NAME)$(PACKAGE_VERSION) pkgdatadir = $(datadir)/$(PKG_DIR) pkglibdir = $(libdir)/$(PKG_DIR) pkgincludedir = $(includedir)/$(PKG_DIR) top_builddir = . INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ CC = @CC@ CFLAGS_DEFAULT = @CFLAGS_DEFAULT@ CFLAGS_WARNING = @CFLAGS_WARNING@ CLEANFILES = @CLEANFILES@ EXEEXT = @EXEEXT@ LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@ MAKE_LIB = @MAKE_LIB@ MAKE_SHARED_LIB = @MAKE_SHARED_LIB@ MAKE_STATIC_LIB = @MAKE_STATIC_LIB@ MAKE_STUB_LIB = @MAKE_STUB_LIB@ OBJEXT = @OBJEXT@ RANLIB = @RANLIB@ RANLIB_STUB = @RANLIB_STUB@ SHLIB_CFLAGS = @SHLIB_CFLAGS@ SHLIB_LD = @SHLIB_LD@ SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ STLIB_LD = @STLIB_LD@ TCL_DEFS = @TCL_DEFS@ TCL_BIN_DIR = @TCL_BIN_DIR@ TCL_SRC_DIR = @TCL_SRC_DIR@ # This is necessary for packages that use private Tcl headers #TCL_TOP_DIR_NATIVE = @TCL_TOP_DIR_NATIVE@ # Not used, but retained for reference of what libs Tcl required TCL_LIBS = @TCL_LIBS@ #======================================================================== # TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our # package without installing. The other environment variables allow us # to test against an uninstalled Tcl. Add special env vars that you # require for testing here (like TCLX_LIBRARY). #======================================================================== EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR) TCLSH_ENV = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \ @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \ PATH="$(EXTRA_PATH):$(PATH)" \ TCLLIBPATH="$(top_builddir)" TCLSH_PROG = @TCLSH_PROG@ TCLSH = $(TCLSH_ENV) $(TCLSH_PROG) SHARED_BUILD = @SHARED_BUILD@ INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ PKG_CFLAGS = @PKG_CFLAGS@ # TCL_DEFS is not strictly need here, but if you remove it, then you # must make sure that configure.in checks for the necessary components # that your library may use. TCL_DEFS can actually be a problem if # you do not compile with a similar machine setup as the Tcl core was # compiled with. #DEFS = $(TCL_DEFS) @DEFS@ $(PKG_CFLAGS) DEFS = @DEFS@ $(PKG_CFLAGS) CONFIG_CLEAN_FILES = Makefile CPPFLAGS = @CPPFLAGS@ LIBS = @PKG_LIBS@ @LIBS@ AR = @AR@ CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) #======================================================================== # Start of user-definable TARGETS section #======================================================================== #======================================================================== # TEA TARGETS. Please note that the "libraries:" target refers to platform # independent files, and the "binaries:" target inclues executable programs and # platform-dependent libraries. Modify these targets so that they install # the various pieces of your package. The make and install rules # for the BINARIES that you specified above have already been done. #======================================================================== all: binaries libraries doc #======================================================================== # The binaries target builds executable programs, Windows .dll's, unix # shared/static libraries, and any other platform-dependent files. # The list of targets to build for "binaries:" is specified at the top # of the Makefile, in the "BINARIES" variable. #======================================================================== binaries: $(BINARIES) pkgIndex.tcl libraries: #======================================================================== # Your doc target should differentiate from doc builds (by the developer) # and doc installs (see install-doc), which just install the docs on the # end user machine when building from source. #======================================================================== doc: @echo "If you have documentation to create, place the commands to" @echo "build the docs in the 'doc:' target. For example:" @echo " xml2nroff sample.xml > sample.n" @echo " xml2html sample.xml > sample.html" install: all install-binaries install-libraries install-doc install-binaries: binaries install-lib-binaries install-bin-binaries #======================================================================== # This rule installs platform-independent files, such as header files. # The list=...; for p in $$list handles the empty list case x-platform. #======================================================================== install-libraries: libraries @mkdir -p $(DESTDIR)$(includedir) @echo "Installing header files in $(DESTDIR)$(includedir)" @list='$(PKG_HEADERS)'; for i in $$list; do \ echo "Installing $(srcdir)/$$i" ; \ $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir) ; \ done; #======================================================================== # Install documentation. Unix manpages should go in the $(mandir) # directory. #======================================================================== install-doc: doc @mkdir -p $(DESTDIR)$(mandir)/mann @echo "Installing documentation in $(DESTDIR)$(mandir)" @list='$(srcdir)/doc/*.n'; for i in $$list; do \ echo "Installing $$i"; \ rm -f $(DESTDIR)$(mandir)/mann/`basename $$i`; \ $(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/mann ; \ done test: binaries libraries $(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS) shell: binaries libraries @$(TCLSH) $(SCRIPT) gdb: $(TCLSH_ENV) gdb $(TCLSH_PROG) $(SCRIPT) depend: #======================================================================== # $(PKG_LIB_FILE) should be listed as part of the BINARIES variable # mentioned above. That will ensure that this target is built when you # run "make binaries". # # The $(PKG_OBJECTS) objects are created and linked into the final # library. In most cases these object files will correspond to the # source files above. #======================================================================== $(PKG_LIB_FILE): $(PKG_OBJECTS) -rm -f $(PKG_LIB_FILE) ${MAKE_LIB} $(RANLIB) $(PKG_LIB_FILE) $(PKG_STUB_LIB_FILE): $(PKG_STUB_OBJECTS) -rm -f $(PKG_STUB_LIB_FILE) ${MAKE_STUB_LIB} $(RANLIB_STUB) $(PKG_STUB_LIB_FILE) #======================================================================== # We need to enumerate the list of .c to .o lines here. # # In the following lines, $(srcdir) refers to the toplevel directory # containing your extension. If your sources are in a subdirectory, # you will have to modify the paths to reflect this: # # sample.$(OBJEXT): $(srcdir)/generic/sample.c # $(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/sample.c` -o $@ # # Setting the VPATH variable to a list of paths will cause the makefile # to look into these paths when resolving .c to .obj dependencies. # As necessary, add $(srcdir):$(srcdir)/compat:.... #======================================================================== VPATH = $(srcdir):$(srcdir)/generic:$(srcdir)/unix:$(srcdir)/win .c.@OBJEXT@: $(COMPILE) -c `@CYGPATH@ $<` -o $@ #======================================================================== # Create the pkgIndex.tcl file. # It is usually easiest to let Tcl do this for you with pkg_mkIndex, but # you may find that you need to customize the package. If so, either # modify the -hand version, or create a pkgIndex.tcl.in file and have # the configure script output the pkgIndex.tcl by editing configure.in. #======================================================================== pkgIndex.tcl: ( echo pkg_mkIndex . $(PKG_LIB_FILE) \; exit; ) | $(TCLSH) pkgIndex.tcl-hand: (echo 'package ifneeded $(PACKAGE_NAME) $(PACKAGE_VERSION) \ [list load [file join $$dir $(PKG_LIB_FILE)]]'\ ) > pkgIndex.tcl #======================================================================== # Distribution creation # You may need to tweak this target to make it work correctly. #======================================================================== #COMPRESS = tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar COMPRESS = gtar zcvf $(PKG_DIR).tar.gz $(PKG_DIR) DIST_ROOT = /tmp/dist DIST_DIR = $(DIST_ROOT)/$(PKG_DIR) dist-clean: rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.* dist: dist-clean mkdir -p $(DIST_DIR) cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/license* \ $(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \ $(DIST_DIR)/ chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4 chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in for i in $(srcdir)/*.[ch]; do \ if [ -f $$i ]; then \ cp -p $$i $(DIST_DIR)/ ; \ fi; \ done; mkdir $(DIST_DIR)/tclconfig cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \ $(DIST_DIR)/tclconfig/ chmod 664 $(DIST_DIR)/tclconfig/tcl.m4 chmod +x $(DIST_DIR)/tclconfig/install-sh list='demos doc generic library mac tests unix win'; \ for p in $$list; do \ if test -d $(srcdir)/$$p ; then \ mkdir $(DIST_DIR)/$$p; \ cp -p $(srcdir)/$$p/*.* $(DIST_DIR)/$$p/; \ fi; \ done (cd $(DIST_ROOT); $(COMPRESS);) #======================================================================== # End of user-definable section #======================================================================== #======================================================================== # Don't modify the file to clean here. Instead, set the "CLEANFILES" # variable in configure.in #======================================================================== clean: -test -z "$(BINARIES)" || rm -f $(BINARIES) -rm -f *.$(OBJEXT) core *.core -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean: clean -rm -f *.tab.c -rm -f $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log config.status #======================================================================== # Install binary object libraries. On Windows this includes both .dll and # .lib files. Because the .lib files are not explicitly listed anywhere, # we need to deduce their existence from the .dll file of the same name. # Library files go into the lib directory. # In addition, this will generate the pkgIndex.tcl # file in the install location (assuming it can find a usable tclsh shell) # # You should not have to modify this target. #======================================================================== install-lib-binaries: binaries @mkdir -p $(DESTDIR)$(pkglibdir) @list='$(lib_BINARIES)'; for p in $$list; do \ if test -f $$p; then \ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \ stub=`echo $$p|sed -e "s/.*\(stub\).*/\1/"`; \ if test "x$$stub" = "xstub"; then \ echo " $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p"; \ $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p; \ else \ echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \ $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \ fi; \ ext=`echo $$p|sed -e "s/.*\.//"`; \ if test "x$$ext" = "xdll"; then \ lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \ if test -f $$lib; then \ echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \ $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \ fi; \ fi; \ fi; \ done @list='$(PKG_TCL_SOURCES)'; for p in $$list; do \ if test -f $(srcdir)/$$p; then \ destp=`basename $$p`; \ echo " Install $$destp $(DESTDIR)$(pkglibdir)/$$destp"; \ $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkglibdir)/$$destp; \ fi; \ done @if test "x$(SHARED_BUILD)" = "x1"; then \ echo " Install pkgIndex.tcl $(DESTDIR)$(pkglibdir)"; \ $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \ fi #======================================================================== # Install binary executables (e.g. .exe files and dependent .dll files) # This is for files that must go in the bin directory (located next to # wish and tclsh), like dependent .dll files on Windows. # # You should not have to modify this target, except to define bin_BINARIES # above if necessary. #======================================================================== install-bin-binaries: binaries @mkdir -p $(DESTDIR)$(bindir) @list='$(bin_BINARIES)'; for p in $$list; do \ if test -f $$p; then \ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \ fi; \ done .SUFFIXES: .c .$(OBJEXT) Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status uninstall-binaries: list='$(lib_BINARIES)'; for p in $$list; do \ rm -f $(DESTDIR)$(pkglibdir)/$$p; \ done list='$(PKG_TCL_SOURCES)'; for p in $$list; do \ p=`basename $$p`; \ rm -f $(DESTDIR)$(pkglibdir)/$$p; \ done list='$(bin_BINARIES)'; for p in $$list; do \ rm -f $(DESTDIR)$(bindir)/$$p; \ done .PHONY: all binaries clean depend distclean doc install libraries test # 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: --- NEW FILE: configure.ac --- #!/bin/bash -norc dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # # $Revision: 1.1 $ # $Date: 2005/08/09 14:28:49 $ #----------------------------------------------------------------------- # Configuration input file for the Tcladdressbook extension for MacOSX. # This file is based on the configure.in file provided with the Tcl # sampleextension. # The only places which needed to be modified are marked by the # string __CHANGE__ #----------------------------------------------------------------------- #----------------------------------------------------------------------- # __CHANGE__ # Set your package name and version numbers here. # # This initializes the environment with PACKAGE_NAME and PACKAGE_VERSION # set as provided. These will also be added as -D defs in your Makefile # so you can encode the package version directly into the source files. #----------------------------------------------------------------------- AC_INIT([Tcladdressbook], [1.1], [http://sourceforge.net/projects/tcladdressbook]) #-------------------------------------------------------------------- # Call TEA_INIT as the first TEA_ macro to set up initial vars. # This will define a ${TEA_PLATFORM} variable == "unix" or "windows" # as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE. #-------------------------------------------------------------------- TEA_INIT([3.2]) AC_CONFIG_AUX_DIR(tclconfig) #-------------------------------------------------------------------- # Load the tclConfig.sh file #-------------------------------------------------------------------- TEA_PATH_TCLCONFIG TEA_LOAD_TCLCONFIG #-------------------------------------------------------------------- # Load the tkConfig.sh file if necessary (Tk extension) #-------------------------------------------------------------------- #TEA_PATH_TKCONFIG #TEA_LOAD_TKCONFIG #----------------------------------------------------------------------- # Handle the --prefix=... option by defaulting to what Tcl gave. # Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER. #----------------------------------------------------------------------- TEA_PREFIX #----------------------------------------------------------------------- # Standard compiler checks. # This sets up CC by using the CC env var, or looks for gcc otherwise. # This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create # the basic setup necessary to compile executables. #----------------------------------------------------------------------- TEA_SETUP_COMPILER #----------------------------------------------------------------------- # __CHANGE__ # Specify the C source files to compile in TEA_ADD_SOURCES, # public headers that need to be installed in TEA_ADD_HEADERS, # stub library C source files to compile in TEA_ADD_STUB_SOURCES, # and runtime Tcl library files in TEA_ADD_TCL_SOURCES. # This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS # and PKG_TCL_SOURCES. #----------------------------------------------------------------------- TEA_ADD_SOURCES([TclAddressBook.c TclAddressBookUtils.c]) TEA_ADD_HEADERS([]) TEA_ADD_INCLUDES([]) TEA_ADD_LIBS([/System/Library/Frameworks/AddressBook.framework/Versions/A/AddressBook /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon]) TEA_ADD_CFLAGS([]) TEA_ADD_STUB_SOURCES([]) TEA_ADD_TCL_SOURCES([]) #-------------------------------------------------------------------- # __CHANGE__ # A few miscellaneous platform-specific items: # # Define a special symbol for Windows (BUILD_sample in this case) so # that we create the export library with the dll. # # Windows creates a few extra files that need to be cleaned up. # You can add more files to clean if your extension creates any extra # files. # # TEA_ADD_* any platform specific compiler/build info here. #-------------------------------------------------------------------- if test "${TEA_PLATFORM}" = "windows" ; then AC_DEFINE(BUILD_sample) CLEANFILES="pkgIndex.tcl *.lib *.dll *.exp *.ilk *.pdb vc*.pch" #TEA_ADD_SOURCES([win/winFile.c]) #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"]) else CLEANFILES="pkgIndex.tcl" #TEA_ADD_SOURCES([unix/unixFile.c]) #TEA_ADD_LIBS([-lsuperfly]) fi AC_SUBST(CLEANFILES) #-------------------------------------------------------------------- # __CHANGE__ # Choose which headers you need. Extension authors should try very # hard to only rely on the Tcl public header files. Internal headers # contain private data structures and are subject to change without # notice. # This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG #-------------------------------------------------------------------- TEA_PUBLIC_TCL_HEADERS #TEA_PRIVATE_TCL_HEADERS #TEA_PUBLIC_TK_HEADERS #TEA_PRIVATE_TK_HEADERS #TEA_PATH_X #-------------------------------------------------------------------- # Check whether --enable-threads or --disable-threads was given. # This auto-enables if Tcl was compiled threaded. #-------------------------------------------------------------------- TEA_ENABLE_THREADS #-------------------------------------------------------------------- # The statement below defines a collection of symbols related to # building as a shared library instead of a static library. #-------------------------------------------------------------------- TEA_ENABLE_SHARED #-------------------------------------------------------------------- # This macro figures out what flags to use with the compiler/linker # when building shared/static debug/optimized objects. This information # can be taken from the tclConfig.sh file, but this figures it all out. #-------------------------------------------------------------------- TEA_CONFIG_CFLAGS #-------------------------------------------------------------------- # Set the default compiler switches based on the --enable-symbols option. #-------------------------------------------------------------------- TEA_ENABLE_SYMBOLS #-------------------------------------------------------------------- # Everyone should be linking against the Tcl stub library. If you # can't for some reason, remove this definition. If you aren't using # stubs, you also need to modify the SHLIB_LD_LIBS setting below to # link against the non-stubbed Tcl library. Add Tk too if necessary. #-------------------------------------------------------------------- AC_DEFINE(USE_TCL_STUBS) #AC_DEFINE(USE_TK_STUBS) #-------------------------------------------------------------------- # This macro generates a line to use when building a library. It # depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS, # and TEA_LOAD_TCLCONFIG macros above. #-------------------------------------------------------------------- TEA_MAKE_LIB #-------------------------------------------------------------------- # Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl # file during the install process. Don't run the TCLSH_PROG through # ${CYGPATH} because it's being used directly by make. # Require that we use a tclsh shell version 8.2 or later since earlier # versions have bugs in the pkg_mkIndex routine. # Add WISH as well if this is a Tk extension. #-------------------------------------------------------------------- TEA_PROG_TCLSH #TEA_PROG_WISH #-------------------------------------------------------------------- # Finally, substitute all of the various values into the Makefile. # You may alternatively have a special pkgIndex.tcl.in or other files # which require substituting th AC variables in. Include these here. #-------------------------------------------------------------------- AC_CONFIG_FILES([Makefile] [pkgIndex.tcl]) AC_OUTPUT --- NEW FILE: pkgIndex.tcl.in --- if {[catch {package require Tcl 8.2}]} return package ifneeded addressbook @PACKAGE_VERSION@ [list load [file join $dir libTcladdressbook@PACKAGE_VERSION@.dylib] addressbook] --- NEW FILE: TclAddressBookPrefix.h --- // File: "TclAddressBook.h" // Created: 2003-11-26 12:53:29 // Last modification: 2005-08-09 09:53:13 // Author: Bernard Desgraupes // Description: Use this header on OSX for target built with CW Pro 8 #define TARGET_API_MAC_CARBON 1 #define TARGET_API_MAC_OSX 1 // Stubs mechanism enabled #define USE_TCL_STUBS #ifndef __MWERKS__ #error "This prefix file is for the CodeWarrior target only." #else #include "TclAddressBook_Headers.h" #endif // __MWERKS__ --- NEW FILE: configure --- #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59 for Tcladdressbook 1.1. # # Report bugs to <http://sourceforge.net/projects/tcladdressbook>. # # Copyright (C) 2003 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 Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. [...11021 lines suppressed...] # 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 || { (exit 1); exit 1; } fi --- NEW FILE: aclocal.m4 --- # # Include the TEA standard macro set # builtin(include,tclconfig/tcl.m4) # # Add here whatever m4 macros you want to define for your package # |
|
From: Bernard D. <bde...@us...> - 2005-08-09 19:44:38
|
Update of /cvsroot/tcladdressbook/Source/tclconfig In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27950/tclconfig Log Message: Directory /cvsroot/tcladdressbook/Source/tclconfig added to the repository |
|
From: Bernard D. <bde...@us...> - 2005-08-09 19:28:46
|
Update of /cvsroot/tcladdressbook/Source/TclAddressBook.xcodeproj In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32431 Added Files: project.pbxproj Log Message: First checkin (XCode 2.1) --- NEW FILE: project.pbxproj --- // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 42; objects = { /* Begin PBXBuildFile section */ D1004CFD05887AA6003C0555 /* TclAddressBook.c in Sources */ = {isa = PBXBuildFile; fileRef = D1004CFC05887AA6003C0555 /* TclAddressBook.c */; }; D1004CFF05887AAE003C0555 /* TclAddressBookUtils.c in Sources */ = {isa = PBXBuildFile; fileRef = D1004CFE05887AAE003C0555 /* TclAddressBookUtils.c */; }; D1004D0105887AD4003C0555 /* TclAddressBook_version.h in Sources */ = {isa = PBXBuildFile; fileRef = D1004D0005887AD4003C0555 /* TclAddressBook_version.h */; }; D1004D0305887ADA003C0555 /* TclAddressBookUtils.h in Sources */ = {isa = PBXBuildFile; fileRef = D1004D0205887ADA003C0555 /* TclAddressBookUtils.h */; }; D1004D1205887D9B003C0555 /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D1004D1105887D9B003C0555 /* AddressBook.framework */; }; D1004D7805888A3F003C0555 /* Tcl.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F94429230420B8C2006F146B /* Tcl.framework */; }; F5509190036C35B40130931B /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08FB77AAFE841565C02AAC07 /* Carbon.framework */; }; /* End PBXBuildFile section */ /* Begin PBXBuildStyle section */ 4F0BB7EC011F40E904CA0E50 /* Development */ = { isa = PBXBuildStyle; buildSettings = { GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_FIX_AND_CONTINUE = YES; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_OPTIMIZATION_LEVEL = 0; TEMP_DIR = "${OBJROOT}/Development.build/$(PROJECT_NAME).build/$(TARGET_NAME).build"; UNSTRIPPED_PRODUCT = YES; ZERO_LINK = YES; }; name = Development; }; 4F0BB7ED011F40E904CA0E50 /* Deployment */ = { isa = PBXBuildStyle; buildSettings = { DEBUGGING_SYMBOLS = NO; GCC_ENABLE_FIX_AND_CONTINUE = NO; OPTIMIZATION_CFLAGS = "-Os -mcpu=750"; TEMP_DIR = "${OBJROOT}/Deployment.build/$(PROJECT_NAME).build/$(TARGET_NAME).build"; ZERO_LINK = NO; }; name = Deployment; }; /* End PBXBuildStyle section */ /* Begin PBXFileReference section */ 08FB77AAFE841565C02AAC07 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; }; D1004CFC05887AA6003C0555 /* TclAddressBook.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = TclAddressBook.c; sourceTree = "<group>"; }; D1004CFE05887AAE003C0555 /* TclAddressBookUtils.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = TclAddressBookUtils.c; sourceTree = "<group>"; }; D1004D0005887AD4003C0555 /* TclAddressBook_version.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TclAddressBook_version.h; sourceTree = "<group>"; }; D1004D0205887ADA003C0555 /* TclAddressBookUtils.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TclAddressBookUtils.h; sourceTree = "<group>"; }; D1004D0405887B14003C0555 /* TclAddressBook.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TclAddressBook.h; sourceTree = "<group>"; }; D1004D0705887B90003C0555 /* TclAddressBook.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TclAddressBook.pch; sourceTree = "<group>"; }; D1004D0805887BA1003C0555 /* TclAddressBook_Headers.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TclAddressBook_Headers.h; sourceTree = "<group>"; }; D1004D1105887D9B003C0555 /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = /System/Library/Frameworks/AddressBook.framework; sourceTree = "<absolute>"; }; F550918E036C35030130931B /* libTcladdressbook1.1.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; path = libTcladdressbook1.1.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; F5A272820377DE8D01FEA954 /* libtclstub8.4.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libtclstub8.4.a; path = /Library/Frameworks/Tcl.framework/libtclstub8.4.a; sourceTree = "<absolute>"; }; F94429120420B651006F146B /* pkgIndex.tcl */ = {isa = PBXFileReference; lastKnownFileType = text; path = pkgIndex.tcl; sourceTree = "<group>"; }; F94429230420B8C2006F146B /* Tcl.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Tcl.framework; path = /Library/Frameworks/Tcl.framework; sourceTree = "<absolute>"; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ F550918B036C35030130931B /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( F5509190036C35B40130931B /* Carbon.framework in Frameworks */, D1004D1205887D9B003C0555 /* AddressBook.framework in Frameworks */, D1004D7805888A3F003C0555 /* Tcl.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 034768DDFF38A45A11DB9C8B /* Products */ = { isa = PBXGroup; children = ( F550918E036C35030130931B /* libTcladdressbook1.1.dylib */, ); name = Products; sourceTree = "<group>"; }; 0867D691FE84028FC02AAC07 = { isa = PBXGroup; children = ( 08FB77ACFE841707C02AAC07 /* Source */, F959A7C7056355AE006F5A0B /* Headers */, 089C1665FE841158C02AAC07 /* Resources */, 0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */, 034768DDFF38A45A11DB9C8B /* Products */, ); sourceTree = "<group>"; }; 0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */ = { isa = PBXGroup; children = ( 08FB77AAFE841565C02AAC07 /* Carbon.framework */, F5A272820377DE8D01FEA954 /* libtclstub8.4.a */, F94429230420B8C2006F146B /* Tcl.framework */, D1004D1105887D9B003C0555 /* AddressBook.framework */, ); name = "External Frameworks and Libraries"; sourceTree = "<group>"; }; 089C1665FE841158C02AAC07 /* Resources */ = { isa = PBXGroup; children = ( F94429120420B651006F146B /* pkgIndex.tcl */, ); name = Resources; sourceTree = "<group>"; }; 08FB77ACFE841707C02AAC07 /* Source */ = { isa = PBXGroup; children = ( D1004CFC05887AA6003C0555 /* TclAddressBook.c */, D1004CFE05887AAE003C0555 /* TclAddressBookUtils.c */, ); name = Source; sourceTree = "<group>"; }; F959A7C7056355AE006F5A0B /* Headers */ = { isa = PBXGroup; children = ( D1004D0705887B90003C0555 /* TclAddressBook.pch */, D1004D0405887B14003C0555 /* TclAddressBook.h */, D1004D0805887BA1003C0555 /* TclAddressBook_Headers.h */, D1004D0005887AD4003C0555 /* TclAddressBook_version.h */, D1004D0205887ADA003C0555 /* TclAddressBookUtils.h */, ); name = Headers; sourceTree = "<group>"; }; /* End PBXGroup section */ /* Begin PBXLibraryTarget section */ F550918D036C35030130931B /* tclAddressBook */ = { isa = PBXLibraryTarget; buildConfigurationList = D179E4E708A8F71400B6BA7F /* Build configuration list for PBXLibraryTarget "tclAddressBook" */; buildPhases = ( F96B6BDA0420C120006F146B /* ShellScript */, F550918A036C35030130931B /* Sources */, F550918B036C35030130931B /* Frameworks */, F96B6BDB0420C430006F146B /* ShellScript */, ); buildSettings = { CC = "gcc-3.3"; CPLUSPLUS = "g++-3.3"; DYLIB_COMPATIBILITY_VERSION = 1.0; DYLIB_CURRENT_VERSION = 1.1; DYLIB_INSTALLED_NAME = "addressbook${DYLIB_CURRENT_VERSION}.dylib"; EXPORTED_SYMBOLS_FILE = TclAddressBook.exp; FRAMEWORK_SEARCH_PATHS = ""; GCC_VERSION = 3.x; GLOBAL_CFLAGS = "-include TclAddressBook.pch"; HEADER_SEARCH_PATHS = ""; INSTALL_PATH = "/Library/Tcl/Tcladdressbook${DYLIB_CURRENT_VERSION}"; LIBRARY_SEARCH_PATHS = /Library/Frameworks/Tcl.framework; LIBRARY_STYLE = DYNAMIC; OPTIMIZATION_CFLAGS = "-O0"; OTHER_CFLAGS = ""; OTHER_LDFLAGS = "-ltclstub8.4"; OTHER_LIBTOOL_FLAGS = ""; OTHER_REZFLAGS = ""; PRECOMPILE_PREFIX_HEADER = NO; PREFIX_HEADER = ""; PRODUCT_NAME = addressbook1.1.dylib; SECTORDER_FLAGS = ""; USE_GCC3_PFE_SUPPORT = YES; WARNING_CFLAGS = ( "-Wmost", "-Wno-four-char-constants", "-Wno-unknown-pragmas", ); }; dependencies = ( ); name = tclAddressBook; productInstallPath = "/Library/Tcl/Tcladdressbook${DYLIB_CURRENT_VERSION}"; productName = "TclSpeech dylib"; productReference = F550918E036C35030130931B /* libTcladdressbook1.1.dylib */; }; /* End PBXLibraryTarget section */ /* Begin PBXProject section */ 0867D690FE84028FC02AAC07 /* Project object */ = { isa = PBXProject; buildConfigurationList = D179E4EB08A8F71400B6BA7F /* Build configuration list for PBXProject "TclAddressBook" */; buildSettings = { }; buildStyles = ( 4F0BB7EC011F40E904CA0E50 /* Development */, 4F0BB7ED011F40E904CA0E50 /* Deployment */, ); hasScannedForEncodings = 1; mainGroup = 0867D691FE84028FC02AAC07; productRefGroup = 034768DDFF38A45A11DB9C8B /* Products */; projectDirPath = ""; targets = ( F550918D036C35030130931B /* tclAddressBook */, ); }; /* End PBXProject section */ /* Begin PBXShellScriptBuildPhase section */ F96B6BDA0420C120006F146B /* ShellScript */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 8; files = ( ); runOnlyForDeploymentPostprocessing = 1; shellPath = /bin/sh; shellScript = "# ensure we can overwrite a previous install\nif [ -d \"${INSTALL_ROOT}${INSTALL_PATH}\" ]; then\n chmod -RH u+w \"${INSTALL_ROOT}${INSTALL_PATH}\"\nfi"; }; F96B6BDB0420C430006F146B /* ShellScript */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "/usr/bin/install -m 444 -g staff \"${SRCROOT}/pkgIndex.tcl\" \"${TARGET_BUILD_DIR}\""; }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ F550918A036C35030130931B /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( D1004CFD05887AA6003C0555 /* TclAddressBook.c in Sources */, D1004CFF05887AAE003C0555 /* TclAddressBookUtils.c in Sources */, D1004D0105887AD4003C0555 /* TclAddressBook_version.h in Sources */, D1004D0305887ADA003C0555 /* TclAddressBookUtils.h in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin XCBuildConfiguration section */ D179E4E808A8F71400B6BA7F /* Development */ = { isa = XCBuildConfiguration; buildSettings = { CC = "gcc-3.3"; CPLUSPLUS = "g++-3.3"; DYLIB_COMPATIBILITY_VERSION = 1.0; DYLIB_CURRENT_VERSION = 1.1; DYLIB_INSTALLED_NAME = "addressbook${DYLIB_CURRENT_VERSION}.dylib"; EXPORTED_SYMBOLS_FILE = TclAddressBook.exp; FRAMEWORK_SEARCH_PATHS = ""; GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_FIX_AND_CONTINUE = YES; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_VERSION = 3.x; GLOBAL_CFLAGS = "-include TclAddressBook.pch"; HEADER_SEARCH_PATHS = ""; INSTALL_PATH = "/Library/Tcl/Tcladdressbook${DYLIB_CURRENT_VERSION}"; LIBRARY_SEARCH_PATHS = /Library/Frameworks/Tcl.framework; LIBRARY_STYLE = DYNAMIC; OPTIMIZATION_CFLAGS = "-O0"; OTHER_CFLAGS = ""; OTHER_LDFLAGS = "-ltclstub8.4"; OTHER_LIBTOOL_FLAGS = ""; OTHER_REZFLAGS = ""; PRECOMPILE_PREFIX_HEADER = NO; PREFIX_HEADER = ""; PRODUCT_NAME = libTcladdressbook1.1.dylib; SECTORDER_FLAGS = ""; TEMP_DIR = "${OBJROOT}/Development.build/$(PROJECT_NAME).build/$(TARGET_NAME).build"; UNSTRIPPED_PRODUCT = YES; USE_GCC3_PFE_SUPPORT = YES; WARNING_CFLAGS = ( "-Wmost", "-Wno-four-char-constants", "-Wno-unknown-pragmas", ); ZERO_LINK = YES; }; name = Development; }; D179E4E908A8F71400B6BA7F /* Deployment */ = { isa = XCBuildConfiguration; buildSettings = { CC = "gcc-3.3"; CPLUSPLUS = "g++-3.3"; DEBUGGING_SYMBOLS = NO; DYLIB_COMPATIBILITY_VERSION = 1.0; DYLIB_CURRENT_VERSION = 1.1; DYLIB_INSTALLED_NAME = "addressbook${DYLIB_CURRENT_VERSION}.dylib"; EXPORTED_SYMBOLS_FILE = TclAddressBook.exp; FRAMEWORK_SEARCH_PATHS = ""; GCC_ENABLE_FIX_AND_CONTINUE = NO; GCC_VERSION = 3.x; GLOBAL_CFLAGS = "-include TclAddressBook.pch"; HEADER_SEARCH_PATHS = ""; INSTALL_PATH = "/Library/Tcl/Tcladdressbook${DYLIB_CURRENT_VERSION}"; LIBRARY_SEARCH_PATHS = /Library/Frameworks/Tcl.framework; LIBRARY_STYLE = DYNAMIC; OPTIMIZATION_CFLAGS = "-Os -mcpu=750"; OTHER_CFLAGS = ""; OTHER_LDFLAGS = "-ltclstub8.4"; OTHER_LIBTOOL_FLAGS = ""; OTHER_REZFLAGS = ""; PRECOMPILE_PREFIX_HEADER = NO; PREFIX_HEADER = ""; PRODUCT_NAME = addressbook1.1.dylib; SECTORDER_FLAGS = ""; TEMP_DIR = "${OBJROOT}/Deployment.build/$(PROJECT_NAME).build/$(TARGET_NAME).build"; USE_GCC3_PFE_SUPPORT = YES; WARNING_CFLAGS = ( "-Wmost", "-Wno-four-char-constants", "-Wno-unknown-pragmas", ); ZERO_LINK = NO; }; name = Deployment; }; D179E4EA08A8F71400B6BA7F /* Default */ = { isa = XCBuildConfiguration; buildSettings = { CC = "gcc-3.3"; CPLUSPLUS = "g++-3.3"; DYLIB_COMPATIBILITY_VERSION = 1.0; DYLIB_CURRENT_VERSION = 1.1; DYLIB_INSTALLED_NAME = "addressbook${DYLIB_CURRENT_VERSION}.dylib"; EXPORTED_SYMBOLS_FILE = TclAddressBook.exp; FRAMEWORK_SEARCH_PATHS = ""; GCC_VERSION = 3.x; GLOBAL_CFLAGS = "-include TclAddressBook.pch"; HEADER_SEARCH_PATHS = ""; INSTALL_PATH = "/Library/Tcl/Tcladdressbook${DYLIB_CURRENT_VERSION}"; LIBRARY_SEARCH_PATHS = /Library/Frameworks/Tcl.framework; LIBRARY_STYLE = DYNAMIC; OPTIMIZATION_CFLAGS = "-O0"; OTHER_CFLAGS = ""; OTHER_LDFLAGS = "-ltclstub8.4"; OTHER_LIBTOOL_FLAGS = ""; OTHER_REZFLAGS = ""; PRECOMPILE_PREFIX_HEADER = NO; PREFIX_HEADER = ""; PRODUCT_NAME = addressbook1.1.dylib; SECTORDER_FLAGS = ""; USE_GCC3_PFE_SUPPORT = YES; WARNING_CFLAGS = ( "-Wmost", "-Wno-four-char-constants", "-Wno-unknown-pragmas", ); }; name = Default; }; D179E4EC08A8F71400B6BA7F /* Development */ = { isa = XCBuildConfiguration; buildSettings = { }; name = Development; }; D179E4ED08A8F71400B6BA7F /* Deployment */ = { isa = XCBuildConfiguration; buildSettings = { }; name = Deployment; }; D179E4EE08A8F71400B6BA7F /* Default */ = { isa = XCBuildConfiguration; buildSettings = { }; name = Default; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ D179E4E708A8F71400B6BA7F /* Build configuration list for PBXLibraryTarget "tclAddressBook" */ = { isa = XCConfigurationList; buildConfigurations = ( D179E4E808A8F71400B6BA7F /* Development */, D179E4E908A8F71400B6BA7F /* Deployment */, D179E4EA08A8F71400B6BA7F /* Default */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Default; }; D179E4EB08A8F71400B6BA7F /* Build configuration list for PBXProject "TclAddressBook" */ = { isa = XCConfigurationList; buildConfigurations = ( D179E4EC08A8F71400B6BA7F /* Development */, D179E4ED08A8F71400B6BA7F /* Deployment */, D179E4EE08A8F71400B6BA7F /* Default */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Default; }; /* End XCConfigurationList section */ }; rootObject = 0867D690FE84028FC02AAC07 /* Project object */; } |
|
From: Bernard D. <bde...@us...> - 2005-08-09 19:14:02
|
Update of /cvsroot/tcladdressbook/Source/TclAddressBook.xcodeproj In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32218/TclAddressBook.xcodeproj Log Message: Directory /cvsroot/tcladdressbook/Source/TclAddressBook.xcodeproj added to the repository |
|
From: Bernard D. <bde...@us...> - 2005-08-09 18:18:04
|
Update of /cvsroot/tcladdressbook/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13591 Modified Files: Changes.Log Log Message: TEA support Modifs for CW9 Index: Changes.Log =================================================================== RCS file: /cvsroot/tcladdressbook/Source/Changes.Log,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- Changes.Log 6 Jun 2005 13:44:06 -0000 1.31 +++ Changes.Log 9 Aug 2005 15:48:52 -0000 1.32 @@ -32,6 +32,13 @@ ================================================================================ += 1.1.5b1 last update: +================================================================================ +¥ Modifications for TEA support. +¥ Minor syntax modifications for CW9. +¥ + +================================================================================ = 1.1.4 released last update: 2005-06-06 15:13:59 ================================================================================ ¥ Fixed refcounts issue introduced in the multidictionary values by the recent |
|
From: Bernard D. <bde...@us...> - 2005-08-09 18:17:54
|
Update of /cvsroot/tcladdressbook/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13677 Modified Files: TclAddressBook.c TclAddressBookUtils.c Log Message: Minor syntax modifs for CW9 Index: TclAddressBookUtils.c =================================================================== RCS file: /cvsroot/tcladdressbook/Source/TclAddressBookUtils.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- TclAddressBookUtils.c 9 Aug 2005 14:29:19 -0000 1.26 +++ TclAddressBookUtils.c 9 Aug 2005 15:49:18 -0000 1.27 @@ -137,7 +137,7 @@ unsigned int mvCount; Tcl_DString ds; - if (CFStringGetCString(inProperty, thePropName, sizeof(thePropName), NULL)) { + if (CFStringGetCString(inProperty, thePropName, sizeof(thePropName), kCFStringEncodingMacRoman)) { if (inRecordType == rec_person) { thePropType = ABTypeOfProperty(ab, kABPersonRecordType, inProperty); @@ -150,7 +150,7 @@ case kABStringProperty: // Get the entry for the string property - if (CFStringGetCString(inValue, theStr, sizeof(theStr), NULL)) { + if (CFStringGetCString(inValue, theStr, sizeof(theStr), kCFStringEncodingMacRoman)) { TclAB_PutValueInResult(interp, thePropName, theStr, allValues); } break; @@ -187,8 +187,8 @@ subValue = ABMultiValueCopyValueAtIndex(multiValue, j); if (subLabel && subValue) { localizedStr = ABCopyLocalizedPropertyOrLabel(subLabel); - if ( CFStringGetCString(localizedStr, theLabelStr, sizeof(theLabelStr), NULL) - && CFStringGetCString(subValue, theSubStr, sizeof(theSubStr), NULL)) { + if ( CFStringGetCString(localizedStr, theLabelStr, sizeof(theLabelStr), kCFStringEncodingMacRoman) + && CFStringGetCString(subValue, theSubStr, sizeof(theSubStr), kCFStringEncodingMacRoman)) { Tcl_DStringStartSublist(&ds); Tcl_DStringAppendElement(&ds, theLabelStr); Tcl_DStringAppendElement(&ds, theSubStr); @@ -214,7 +214,7 @@ subValue = ABMultiValueCopyValueAtIndex(multiValue, j); if (subLabel && subValue) { localizedStr = ABCopyLocalizedPropertyOrLabel(subLabel); - if (CFStringGetCString(localizedStr, theLabelStr, sizeof(theLabelStr), NULL)) { + if (CFStringGetCString(localizedStr, theLabelStr, sizeof(theLabelStr), kCFStringEncodingMacRoman)) { Tcl_DStringStartSublist(&ds); theAbsTime = CFDateGetAbsoluteTime(subValue); // See comment in kABDateProperty case above @@ -253,7 +253,7 @@ if (subLabel) { localizedStr = ABCopyLocalizedPropertyOrLabel(subLabel); CFRelease(subLabel); - if (CFStringGetCString(localizedStr, theLabelStr, sizeof(theLabelStr), NULL)) { + if (CFStringGetCString(localizedStr, theLabelStr, sizeof(theLabelStr), kCFStringEncodingMacRoman)) { // Get the dict theDict = ABMultiValueCopyValueAtIndex(multiValue, j); if (theDict) { @@ -271,8 +271,8 @@ for (k = 0; k < dictCount; k++) { if (theKeys[k] && theVals[k] ) { // Make a two items list for each key/value pair - if (CFStringGetCString(theKeys[k], theStr, sizeof(theStr), NULL) - && CFStringGetCString(theVals[k], theSubStr, sizeof(theSubStr), NULL)) { + if (CFStringGetCString(theKeys[k], theStr, sizeof(theStr), kCFStringEncodingMacRoman) + && CFStringGetCString(theVals[k], theSubStr, sizeof(theSubStr), kCFStringEncodingMacRoman)) { Tcl_DStringStartSublist(&ds); Tcl_DStringAppendElement(&ds, theStr); Tcl_DStringAppendElement(&ds, theSubStr); @@ -607,9 +607,9 @@ if (!typeRef) { return rec_undefined; } - if ( CFStringCompare(typeRef, CFSTR("ABPerson"), NULL) == kCFCompareEqualTo ) { + if ( CFStringCompare(typeRef, CFSTR("ABPerson"), kCFStringEncodingMacRoman) == kCFCompareEqualTo ) { kind = rec_person; - } else if ( CFStringCompare(typeRef, CFSTR("ABGroup"), NULL) == kCFCompareEqualTo ) { + } else if ( CFStringCompare(typeRef, CFSTR("ABGroup"), kCFStringEncodingMacRoman) == kCFCompareEqualTo ) { kind = rec_group; } else { kind = rec_undefined; @@ -646,7 +646,7 @@ if (!*outRecordRef) { char theStr[256]; Tcl_AppendStringsToObj(resultPtr, "Unrecognized record ID ", (char *) NULL); - if (CFStringGetCString(inUID, theStr, sizeof(theStr), NULL)) { + if (CFStringGetCString(inUID, theStr, sizeof(theStr), kCFStringEncodingMacRoman)) { Tcl_AppendStringsToObj(resultPtr, theStr, (char *) NULL); } return false; @@ -685,7 +685,7 @@ int kind; Boolean result = true; - uidRef = CFStringCreateWithCString(NULL, inUID, NULL); + uidRef = CFStringCreateWithCString(NULL, inUID, kCFStringEncodingMacRoman); // Find the record corresponding to the UID *outItemRef = ABCopyRecordForUniqueId(ab, uidRef); @@ -896,7 +896,7 @@ theRecord = (ABRecordRef) CFArrayGetValueAtIndex(allElements,i); // Get the unique id for this record uniqueId = ABRecordCopyUniqueId(theRecord); - CFStringGetCString(uniqueId, theUID, sizeof(theUID), NULL); + CFStringGetCString(uniqueId, theUID, sizeof(theUID), kCFStringEncodingMacRoman); CFRelease(uniqueId); if (onlyID) { @@ -910,7 +910,7 @@ } if (text) { - if (CFStringGetCString(text, theName, sizeof(theName), NULL)) { + if (CFStringGetCString(text, theName, sizeof(theName), kCFStringEncodingMacRoman)) { Tcl_Obj * objs[2]; Tcl_DString ds; @@ -1064,7 +1064,7 @@ } else { // Retrieve the UID for the newly created record uniqueId = ABRecordCopyUniqueId(theRecord); - CFStringGetCString(uniqueId, theUID, sizeof(theUID), NULL); + CFStringGetCString(uniqueId, theUID, sizeof(theUID), kCFStringEncodingMacRoman); CFRelease(uniqueId); Tcl_AppendStringsToObj(resultPtr, theUID, (char *) NULL); result = TCL_OK; @@ -1209,7 +1209,7 @@ // Get the record at index i theProperty = CFArrayGetValueAtIndex(theItems,i); - if (theProperty && CFStringGetCString(theProperty, theName, sizeof(theName), NULL)) { + if (theProperty && CFStringGetCString(theProperty, theName, sizeof(theName), kCFStringEncodingMacRoman)) { Tcl_DString ds; Tcl_DStringInit(&ds); @@ -1290,7 +1290,7 @@ ABRecordRef theRecord; theUID = Tcl_GetStringFromObj(objv[3], &length); - uidRef = CFStringCreateWithCString(NULL, theUID, NULL); + uidRef = CFStringCreateWithCString(NULL, theUID, kCFStringEncodingMacRoman); if (uidRef) { // Find the record corresponding to the UID @@ -1403,12 +1403,12 @@ return TCL_ERROR; } - for (index = 0; theABPropertyTypes[index] != NULL; index++) { + for (index = 0; theABPropertyTypes[index] != (ABPropertyType) NULL; index++) { if (theABPropertyTypes[index] == thePropType) { break; } } - if (theABPropertyTypes[index] == NULL) { + if (theABPropertyTypes[index] == (ABPropertyType) NULL) { Tcl_AppendStringsToObj(resultPtr, "Unknown", (char *) NULL); return TCL_ERROR; } else { @@ -1593,7 +1593,7 @@ Tcl_AppendStringsToObj(resultPtr, "Couldn't get identifier at index ", theIndex, (char *) NULL); result = TCL_ERROR; } else { - CFStringGetCString(identRef, theString, sizeof(theString), NULL); + CFStringGetCString(identRef, theString, sizeof(theString), kCFStringEncodingMacRoman); Tcl_ExternalToUtfDString(gMacRomanEnc, theString, strlen(theString), &ds); Tcl_DStringResult(interp, &ds); Tcl_DStringFree(&ds); @@ -1827,7 +1827,7 @@ Tcl_AppendStringsToObj(resultPtr, "Couldn't get primary identifier for '", theProperty, "' property", (char *) NULL); result = TCL_ERROR; } else { - CFStringGetCString(identRef, theString, sizeof(theString), NULL); + CFStringGetCString(identRef, theString, sizeof(theString), kCFStringEncodingMacRoman); CFRelease(identRef); Tcl_ExternalToUtfDString(gMacRomanEnc, theString, strlen(theString), &ds); Tcl_DStringResult(interp, &ds); @@ -1963,7 +1963,7 @@ result = TCL_ERROR; } else { char theString[256]; - CFStringGetCString(identRef, theString, sizeof(theString), NULL); + CFStringGetCString(identRef, theString, sizeof(theString), kCFStringEncodingMacRoman); CFRelease(identRef); Tcl_ExternalToUtfDString(gMacRomanEnc, theString, strlen(theString), &ds); Tcl_DStringResult(interp, &ds); Index: TclAddressBook.c =================================================================== RCS file: /cvsroot/tcladdressbook/Source/TclAddressBook.c,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- TclAddressBook.c 9 Aug 2005 14:29:19 -0000 1.44 +++ TclAddressBook.c 9 Aug 2005 15:49:18 -0000 1.45 @@ -328,7 +328,7 @@ Tcl_IncrRefCount(objv[i]); // Next argument should be a person or a group ID objID = Tcl_GetStringFromObj(objv[i], &length); - strRef = CFStringCreateWithCString(NULL, objID, NULL); + strRef = CFStringCreateWithCString(NULL, objID, kCFStringEncodingMacRoman); // Find the record corresponding to the UID success = TclAB_RecordFromUID(ab, strRef, resultPtr, &objRecord); CFRelease(strRef); @@ -615,7 +615,7 @@ } theUID = Tcl_GetStringFromObj(objv[2], &length); - strRef = CFStringCreateWithCString(NULL, theUID, NULL); + strRef = CFStringCreateWithCString(NULL, theUID, kCFStringEncodingMacRoman); // Get the address book ab = ABGetSharedAddressBook(); @@ -665,10 +665,9 @@ { ABAddressBookRef ab; ABRecordRef theRecord; - CFStringRef uidRef; CFDataRef vCard; CONST84 char * theUID; - int kind, length; + int length; Tcl_Obj * objPtr; if (objc != 3) { @@ -758,7 +757,7 @@ return TCL_ERROR; } uniqueId = ABRecordCopyUniqueId(myRecord); - CFStringGetCString(uniqueId, theUID, sizeof(theUID), NULL); + CFStringGetCString(uniqueId, theUID, sizeof(theUID), kCFStringEncodingMacRoman); CFRelease(uniqueId); Tcl_SetObjResult(interp, Tcl_NewStringObj(theUID, strlen(theUID))); } else { @@ -913,10 +912,9 @@ { ABAddressBookRef ab; ABRecordRef theRecord; - CFStringRef uidRef; CFDataRef imageRef; CONST84 char * theUID; - int length, kind, result = TCL_OK; + int length, result = TCL_OK; Tcl_Obj * objPtr; Boolean setIt = false; unsigned char * imageBytes; @@ -1072,7 +1070,7 @@ // Retrieve the UID for the newly created record uidRef = ABRecordCopyUniqueId(newRecord); if (uidRef) { - CFStringGetCString(uidRef, theUID, sizeof(theUID), NULL); + CFStringGetCString(uidRef, theUID, sizeof(theUID), kCFStringEncodingMacRoman); CFRelease(uidRef); Tcl_AppendStringsToObj(resultPtr, theUID, (char *) NULL); } @@ -1208,7 +1206,7 @@ } else { char theString[256]; CFStringRef localizedRef = ABCopyLocalizedPropertyOrLabel(labelRef); - CFStringGetCString(localizedRef, theString, sizeof(theString), NULL); + CFStringGetCString(localizedRef, theString, sizeof(theString), kCFStringEncodingMacRoman); CFRelease(localizedRef); CFRelease(labelRef); Tcl_ExternalToUtfDString(gMacRomanEnc, theString, strlen(theString), &ds); @@ -1284,7 +1282,7 @@ ab = ABGetSharedAddressBook(); theUID = Tcl_GetStringFromObj(objv[objc-1], &length); - uidRef = CFStringCreateWithCString(NULL, theUID, NULL); + uidRef = CFStringCreateWithCString(NULL, theUID, kCFStringEncodingMacRoman); // Find the record corresponding to the UID success = TclAB_RecordFromUID(ab, uidRef, resultPtr, &theRecord); @@ -1483,7 +1481,7 @@ Tcl_ResetResult(interp); theUID = Tcl_GetStringFromObj(objv[2], &length); - uidRef = CFStringCreateWithCString(NULL, theUID, NULL); + uidRef = CFStringCreateWithCString(NULL, theUID, kCFStringEncodingMacRoman); // Get the address book ab = ABGetSharedAddressBook(); @@ -1562,7 +1560,7 @@ Tcl_IncrRefCount(objv[i]); // Next argument should be a person or a group ID objID = Tcl_GetStringFromObj(objv[i], &length); - strRef = CFStringCreateWithCString(NULL, objID, NULL); + strRef = CFStringCreateWithCString(NULL, objID, kCFStringEncodingMacRoman); // Find the record corresponding to the UID success = TclAB_RecordFromUID(ab, strRef, resultPtr, &objRecord); CFRelease(strRef); @@ -1905,7 +1903,7 @@ } // Make CFString objects - uidRef = CFStringCreateWithCString(NULL, theUID, NULL); + uidRef = CFStringCreateWithCString(NULL, theUID, kCFStringEncodingMacRoman); // Get the address book ab = ABGetSharedAddressBook(); @@ -2062,7 +2060,7 @@ theUID = Tcl_GetStringFromObj(objv[2], &length); // Make a CFString object - uidRef = CFStringCreateWithCString(NULL, theUID, NULL); + uidRef = CFStringCreateWithCString(NULL, theUID, kCFStringEncodingMacRoman); // Get the address book ab = ABGetSharedAddressBook(); @@ -2084,7 +2082,7 @@ return TCL_ERROR; } - if ( CFStringGetCString(typeRef, theStr, sizeof(theStr), NULL) ) { + if ( CFStringGetCString(typeRef, theStr, sizeof(theStr), kCFStringEncodingMacRoman) ) { Tcl_AppendStringsToObj(resultPtr, theStr, (char *) NULL); } else { Tcl_AppendStringsToObj(resultPtr, "CFStringGetCString error", (char *) NULL); |
|
From: Bernard D. <bde...@us...> - 2005-06-06 13:44:50
|
Update of /cvsroot/tcladdressbook/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17485 Modified Files: TclAddressBook_version.h Log Message: 1.1.4 released Index: TclAddressBook_version.h =================================================================== RCS file: /cvsroot/tcladdressbook/Source/TclAddressBook_version.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- TclAddressBook_version.h 4 Apr 2005 08:25:26 -0000 1.15 +++ TclAddressBook_version.h 6 Jun 2005 13:44:40 -0000 1.16 @@ -1,14 +1,14 @@ // File: "TclAddressBook_version.h" // Created: 2003-09-24 07:28:22 -// Last modification: 2005-04-04 10:19:44 +// Last modification: 2005-06-06 15:16:09 // Author: Bernard Desgraupes // Description: version numbering for Tcladdressbook #define TCLADDRESSBOOK_MAJOR 1 #define TCLADDRESSBOOK_MINOR 1 #define TCLADDRESSBOOK_SUBMINOR 4 -#define TCLADDRESSBOOK_STAGE 'b' -#define TCLADDRESSBOOK_DEVEL 1 +#define TCLADDRESSBOOK_STAGE 'f' +#define TCLADDRESSBOOK_DEVEL 0 // 'd' for developStage // 'a' for alphaStage // 'b' for betaStage |
|
From: Bernard D. <bde...@us...> - 2005-06-06 13:44:16
|
Update of /cvsroot/tcladdressbook/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17312 Modified Files: Changes.Log Log Message: Updated for 1.1.4 tagging and release Index: Changes.Log =================================================================== RCS file: /cvsroot/tcladdressbook/Source/Changes.Log,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- Changes.Log 6 Jun 2005 13:07:07 -0000 1.30 +++ Changes.Log 6 Jun 2005 13:44:06 -0000 1.31 @@ -32,7 +32,7 @@ ================================================================================ -= 1.1.4b1 development last update: += 1.1.4 released last update: 2005-06-06 15:13:59 ================================================================================ ¥ Fixed refcounts issue introduced in the multidictionary values by the recent changes in 1.1.3. |
|
From: Bernard D. <bde...@us...> - 2005-06-06 13:41:08
|
Update of /cvsroot/tcladdressbook/Help In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15778 Modified Files: ReadMe TclAB_QuickStart.html Log Message: Updated to 1.1.4 Index: ReadMe =================================================================== RCS file: /cvsroot/tcladdressbook/Help/ReadMe,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ReadMe 4 Apr 2005 06:50:43 -0000 1.7 +++ ReadMe 6 Jun 2005 13:40:59 -0000 1.8 @@ -1,4 +1,4 @@ -TclAddressBook 1.1.3 +TclAddressBook 1.1.4 ==================== This is the Tcladdressbook extension implementing an [addressbook] command Index: TclAB_QuickStart.html =================================================================== RCS file: /cvsroot/tcladdressbook/Help/TclAB_QuickStart.html,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- TclAB_QuickStart.html 2 Aug 2004 07:36:26 -0000 1.12 +++ TclAB_QuickStart.html 6 Jun 2005 13:40:59 -0000 1.13 @@ -5,11 +5,11 @@ </HEAD> <BODY> <P><!-- logo --> -<P><IMG SRC="Images/TclAB_logo.gif " ALT="TclAB Logo" ALIGN=bottom></P> +<P><IMG SRC="../Images/TclAB_logo.gif " ALT="TclAB Logo" ALIGN=bottom></P> <P> <A HREF="TclAB.html">Home Page</A> | <A HREF="http://sourceforge.net/projects/tcladdressbook"> Project Page at SourceForge</A><P><HR><BLOCKQUOTE><P><I> This file is a tutorial that demonstrates the [addressbook] command defined by the Tcladdressbook extension for Tcl. It documents -version 1.1. All the Tcl instructions in the sections +version 1.1.4. All the Tcl instructions in the sections below are very short one-line commands which you can try in any Tcl shell, like tclsh for instance. <P> For a detailed and complete description of the syntax of each subcommand, @@ -229,7 +229,7 @@ addressbook set $theid ABDate [list [list "birthday Franny" 621597600] [list "birthday Zooey" 816692400]] </PRE><P> <LI> Multi dictionary value <PRE> - addressbook set $theid Address [list [list Home [list {CountryCode fr} {City Paris} {Country France} {ZIP 75001} {Street "1, avenue de l'Opéra"}]]] + addressbook set $theid Address [list [list Home [list {CountryCode fr} {City Paris} {Country France} {ZIP 75001} {Street "1, avenue de l'Opra"}]]] </PRE> </UL><P><H3><A NAME="M16"></A>The [search] subcommand</H3> This command can be used to report the IDs of the records corresponding to @@ -391,6 +391,6 @@ keylget grp GroupName clock format [keylget grp Modification] </PRE><P><HR> -<P> Last updated 2004-08-02 09:34:50<P> +<P> Last updated 2005-06-06 15:40:04<P> </BODY> </HTML> \ No newline at end of file |
|
From: Bernard D. <bde...@us...> - 2005-06-06 13:39:09
|
Update of /cvsroot/tcladdressbook/Help In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14849 Modified Files: TclAddressBookHelp.html tcladdressbook.n Log Message: Updated for 1.1.4 Index: tcladdressbook.n =================================================================== RCS file: /cvsroot/tcladdressbook/Help/tcladdressbook.n,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- tcladdressbook.n 2 Aug 2004 08:08:33 -0000 1.11 +++ tcladdressbook.n 6 Jun 2005 13:38:49 -0000 1.12 @@ -1,7 +1,7 @@ .de uline \Z'\\$1'\v'.25m'\D'l \w'\\$1'u 0'\v'-.25m' .. -.TH tcladdressbook n "" "2004-08-02" "addressbook extension for Tcl" +.TH tcladdressbook n "" "2005-06-06" "addressbook extension for Tcl" .SH NAME .PP addressbook - manipulate the Macintosh OSX Address Book database @@ -144,7 +144,9 @@ This command imports data in VCard format. The data specified by the \fI vCardData\fP argument must be valid data in VCard format: a new record is created in the database corresponding to the information contained in the -VCard. Note that the data can be binary if the VCard contains an image. +VCard. Note that the data can be binary if the VCard contains an image. +Starting from version 1.1.1 of the extension, the image is also imported by +the command as a custom icon for the record. .SS addressbook label \fI personID\fP \fI propName\fP \fI index\fP ?\fI value\fP? .PP This command lets you get or set the label of a value in a multi-value property @@ -410,6 +412,15 @@ setting value with [identifier primary]. .IP * 4 1.1 -- 2004/08/02 -- Tests passed. Release of 1.1 version. +.IP * 4 +1.1.1 -- 2004/08/09 -- Technical upgrade. More error checking. +Fixed a memory leak. Images imported from VCards. +.IP * 4 +1.1.2 -- 2004/08/25 -- Better import command. +.IP * 4 +1.1.3 -- 2005/04/04 -- Linked again stub Tcl library. +.IP * 4 +1.1.4 -- 2005/06/06 -- Refcounts fix. .RE .SH REQUIREMENTS AND PORTABILITY .PP Index: TclAddressBookHelp.html =================================================================== RCS file: /cvsroot/tcladdressbook/Help/TclAddressBookHelp.html,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- TclAddressBookHelp.html 8 Aug 2004 20:45:42 -0000 1.25 +++ TclAddressBookHelp.html 6 Jun 2005 13:38:48 -0000 1.26 @@ -5,10 +5,10 @@ </HEAD> <BODY> <P><!-- logo --> -<P><IMG SRC="Images/TclAB_logo.gif " ALT="TclAB Logo" ALIGN=bottom></P> +<P><IMG SRC="../Images/TclAB_logo.gif " ALT="TclAB Logo" ALIGN=bottom></P> <P> <A HREF="TclAB.html"> Home Page</A> | <A HREF="http://sourceforge.net/projects/tcladdressbook"> Project Page at SourceForge</A><P><HR><BLOCKQUOTE><P><I> This is a manual page for the Tcladdressbook extension for Tcl. It -documents version 1.1.1. +documents version 1.1.4. </I></P></BLOCKQUOTE><HR> <UL> <LI><A HREF="#M1">NAME</A> @@ -347,6 +347,9 @@ <LI> 1.1 -- 2004/08/02 -- Tests passed. Release of 1.1 version. <LI> 1.1.1 -- 2004/08/09 -- Technical upgrade. More error checking. Fixed a memory leak. Images imported from VCards. + <LI> 1.1.2 -- 2004/08/25 -- Better import command. + <LI> 1.1.3 -- 2005/04/04 -- Linked again stub Tcl library. + <LI> 1.1.4 -- 2005/06/06 -- Refcounts fix. </UL><P><H2><A NAME="M37"></A>REQUIREMENTS AND PORTABILITY</H2> This extension is only useful on Macintosh platforms. Version 10.2 or greater of the system is required: the AddressBook framework was introduced @@ -373,6 +376,6 @@ See the TclX extension for keyed lists: TclX(n). See the Mk4Tcl extension for commands to open directly the database file.<P><H2><A NAME="M43"></A>KEYWORDS</H2> Address book, data base.<P><HR> -<P> Last updated 2004-08-08 22:38:01<P> +<P> Last updated 2005-06-06 15:37:19<P> </BODY> </HTML> \ No newline at end of file |
|
From: Bernard D. <bde...@us...> - 2005-06-06 13:07:17
|
Update of /cvsroot/tcladdressbook/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30397 Modified Files: Changes.Log Log Message: Refcounts fix (post factum) Index: Changes.Log =================================================================== RCS file: /cvsroot/tcladdressbook/Source/Changes.Log,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- Changes.Log 6 Jun 2005 10:11:01 -0000 1.29 +++ Changes.Log 6 Jun 2005 13:07:07 -0000 1.30 @@ -34,6 +34,8 @@ ================================================================================ = 1.1.4b1 development last update: ================================================================================ +¥ Fixed refcounts issue introduced in the multidictionary values by the recent + changes in 1.1.3. ¥ removed unnecessary direct link to Tcl.framework from TclAddressBook.pbproj ================================================================================ |
|
From: Bernard D. <bde...@us...> - 2005-06-06 12:37:59
|
Update of /cvsroot/tcladdressbook/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13188 Modified Files: TclAddressBookUtils.c Log Message: MultiDict fixes Index: TclAddressBookUtils.c =================================================================== RCS file: /cvsroot/tcladdressbook/Source/TclAddressBookUtils.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- TclAddressBookUtils.c 30 Mar 2005 16:55:38 -0000 1.24 +++ TclAddressBookUtils.c 6 Jun 2005 12:37:45 -0000 1.25 @@ -438,45 +438,57 @@ multiValue = ABMultiValueCreateMutable(); // Parse the new string value as a Tcl list of two elems sublists objPtr = Tcl_NewStringObj(inValue, strlen(inValue)); - Tcl_IncrRefCount(objPtr); - Tcl_ListObjLength(interp, objPtr, &listLen); - // Loop over all the sublists - for (j = 0; j < listLen; j++) { - Tcl_ListObjIndex(interp, objPtr, j, &elemPtr); - Tcl_ListObjIndex(interp, elemPtr, 0, &labelPtr); - Tcl_ListObjIndex(interp, elemPtr, 1, &valuePtr); - - // Make CFStrings out of the Tcl objects - switch (inPropType) { - case kABMultiStringProperty: - subValue = CFStringCreateWithCString(NULL, Tcl_GetStringFromObj(valuePtr, &length), kCFStringEncodingUTF8); - break; - - case kABMultiDateProperty: - theDouble = atof(Tcl_GetStringFromObj(valuePtr, &length)); - theDouble -= kCFAbsoluteTimeIntervalSince1970; - subValue = CFDateCreate(NULL, theDouble); - break; - - case kABMultiIntegerProperty: - case kABMultiRealProperty: - theSInt32 = atoi(Tcl_GetStringFromObj(valuePtr, &length)); - subValue = CFNumberCreate(NULL, kCFNumberSInt32Type, &theSInt32); - break; + + if (objPtr) { + Tcl_IncrRefCount(objPtr); + Tcl_ListObjLength(interp, objPtr, &listLen); + // Loop over all the sublists + for (j = 0; j < listLen; j++) { + Tcl_ListObjIndex(interp, objPtr, j, &elemPtr); + if (elemPtr) { + Tcl_IncrRefCount(elemPtr); + Tcl_ListObjIndex(interp, elemPtr, 0, &labelPtr); + Tcl_ListObjIndex(interp, elemPtr, 1, &valuePtr); + + if (labelPtr && valuePtr) { + Tcl_IncrRefCount(labelPtr); + Tcl_IncrRefCount(valuePtr); + + // Make CFStrings out of the Tcl objects + switch (inPropType) { + case kABMultiStringProperty: + subValue = CFStringCreateWithCString(NULL, Tcl_GetStringFromObj(valuePtr, &length), kCFStringEncodingUTF8); + break; + + case kABMultiDateProperty: + theDouble = atof(Tcl_GetStringFromObj(valuePtr, &length)); + theDouble -= kCFAbsoluteTimeIntervalSince1970; + subValue = CFDateCreate(NULL, theDouble); + break; + + case kABMultiIntegerProperty: + case kABMultiRealProperty: + theSInt32 = atoi(Tcl_GetStringFromObj(valuePtr, &length)); + subValue = CFNumberCreate(NULL, kCFNumberSInt32Type, &theSInt32); + break; + + } + subLabel = CFStringCreateWithCString(NULL, Tcl_GetStringFromObj(labelPtr, &length), kCFStringEncodingUTF8); + // Add the value/label pair to the multivalue + if (subValue && subLabel) { + result = ABMultiValueAdd(multiValue, subValue, subLabel, NULL); + } + if (subValue) CFRelease(subValue); + if (subLabel) CFRelease(subLabel); + Tcl_DecrRefCount(labelPtr); + Tcl_DecrRefCount(valuePtr); + } + Tcl_DecrRefCount(elemPtr); + } } - subLabel = CFStringCreateWithCString(NULL, Tcl_GetStringFromObj(labelPtr, &length), kCFStringEncodingUTF8); - // Add the value/label pair to the multivalue - if (subValue && subLabel) { - result = ABMultiValueAdd(multiValue, subValue, subLabel, NULL); - } - if (subValue) CFRelease(subValue); - if (subLabel) CFRelease(subLabel); - Tcl_DecrRefCount(elemPtr); - Tcl_DecrRefCount(labelPtr); - Tcl_DecrRefCount(valuePtr); - } - Tcl_DecrRefCount(objPtr); + Tcl_DecrRefCount(objPtr); + } return multiValue; @@ -486,58 +498,69 @@ multiValue = ABMultiValueCreateMutable(); // Parse the new string value as a Tcl list of label/dictionary pairs objPtr = Tcl_NewStringObj(inValue, strlen(inValue)); - Tcl_IncrRefCount(objPtr); - Tcl_ListObjLength(interp, objPtr, &listLen); - // Loop over all the label/dictionary pairs. - for (j = 0; j < listLen; j++) { - CFDictionaryRef theDict; - CFStringRef * theKeys; - CFStringRef * theVals; - - // The dictionary itself is represented as a list of two-items - // sublists, each one corresponding to a key/value pair. - Tcl_ListObjIndex(interp, objPtr, j, &elemPtr); - Tcl_ListObjIndex(interp, elemPtr, 0, &labelPtr); - Tcl_ListObjIndex(interp, elemPtr, 1, &dictPtr); - - Tcl_ListObjLength(interp, dictPtr, &subListLen); + if (objPtr) { + Tcl_IncrRefCount(objPtr); + Tcl_ListObjLength(interp, objPtr, &listLen); - // Allocate memory to store the keys and values - theKeys = (CFStringRef*) NewPtrClear(sizeof(CFStringRef) * subListLen); - theVals = (CFStringRef*) NewPtrClear(sizeof(CFStringRef) * subListLen); - if ((theKeys != NULL) && (theVals != NULL)) { - // Loop over all the elements of the flat dict list - for (k = 0; k < subListLen; k++) { - Tcl_ListObjIndex(interp, dictPtr, k, &subElemPtr); - Tcl_ListObjIndex(interp, subElemPtr, 0, &keyPtr); - Tcl_ListObjIndex(interp, subElemPtr, 1, &valuePtr); + // Loop over all the label/dictionary pairs. + for (j = 0; j < listLen; j++) { + CFDictionaryRef theDict; + CFStringRef * theKeys; + CFStringRef * theVals; + + // The dictionary itself is represented as a list of two-items + // sublists, each one corresponding to a key/value pair. + Tcl_ListObjIndex(interp, objPtr, j, &elemPtr); + + if (elemPtr) { + Tcl_IncrRefCount(elemPtr); + Tcl_ListObjIndex(interp, elemPtr, 0, &labelPtr); + Tcl_ListObjIndex(interp, elemPtr, 1, &dictPtr); + if (labelPtr && dictPtr) { + Tcl_IncrRefCount(labelPtr); + Tcl_IncrRefCount(dictPtr); + Tcl_ListObjLength(interp, dictPtr, &subListLen); + + // Allocate memory to store the keys and values + theKeys = (CFStringRef*) NewPtrClear(sizeof(CFStringRef) * subListLen); + theVals = (CFStringRef*) NewPtrClear(sizeof(CFStringRef) * subListLen); + if ((theKeys != NULL) && (theVals != NULL)) { + // Loop over all the elements of the flat dict list + for (k = 0; k < subListLen; k++) { + Tcl_ListObjIndex(interp, dictPtr, k, &subElemPtr); + if (subElemPtr) { + Tcl_IncrRefCount(subElemPtr); + Tcl_ListObjIndex(interp, subElemPtr, 0, &keyPtr); + Tcl_ListObjIndex(interp, subElemPtr, 1, &valuePtr); - // Make CFStrings out of the Tcl objects - theKeys[k] = CFStringCreateWithCString(NULL, Tcl_GetStringFromObj(keyPtr, &length), kCFStringEncodingUTF8); - theVals[k] = CFStringCreateWithCString(NULL, Tcl_GetStringFromObj(valuePtr, &length), kCFStringEncodingUTF8); - Tcl_DecrRefCount(subElemPtr); - Tcl_DecrRefCount(keyPtr); - Tcl_DecrRefCount(valuePtr); - } - } - // Create and populate a CFDictionary with the key/value pairs - theDict = CFDictionaryCreate(NULL, theKeys, theVals, subListLen, NULL, NULL); - if (theDict) { - subLabel = CFStringCreateWithCString(NULL, Tcl_GetStringFromObj(labelPtr, &length), kCFStringEncodingUTF8); - if (subLabel) { - result = ABMultiValueAdd(multiValue, theDict, subLabel, NULL); - CFRelease(subLabel); + // Make CFStrings out of the Tcl objects + theKeys[k] = CFStringCreateWithCString(NULL, Tcl_GetStringFromObj(keyPtr, &length), kCFStringEncodingUTF8); + theVals[k] = CFStringCreateWithCString(NULL, Tcl_GetStringFromObj(valuePtr, &length), kCFStringEncodingUTF8); + Tcl_DecrRefCount(subElemPtr); + } + } + } + // Create and populate a CFDictionary with the key/value pairs + theDict = CFDictionaryCreate(NULL, theKeys, theVals, subListLen, NULL, NULL); + if (theDict) { + subLabel = CFStringCreateWithCString(NULL, Tcl_GetStringFromObj(labelPtr, &length), kCFStringEncodingUTF8); + if (subLabel) { + result = ABMultiValueAdd(multiValue, theDict, subLabel, NULL); + CFRelease(subLabel); + } + CFRelease(theDict); + } + if (theKeys) DisposePtr(theKeys); + if (theVals) DisposePtr(theVals); + Tcl_DecrRefCount(labelPtr); + Tcl_DecrRefCount(dictPtr); + } + Tcl_DecrRefCount(elemPtr); } - CFRelease(theDict); - } - if (theKeys) DisposePtr(theKeys); - if (theVals) DisposePtr(theVals); - Tcl_DecrRefCount(elemPtr); - Tcl_DecrRefCount(labelPtr); - Tcl_DecrRefCount(dictPtr); - } - Tcl_DecrRefCount(objPtr); + } + Tcl_DecrRefCount(objPtr); + } return multiValue; @@ -892,10 +915,14 @@ Tcl_DStringInit(&ds); Tcl_ExternalToUtfDString(gMacRomanEnc, theName, strlen(theName), &ds); objs[0] = Tcl_NewStringObj(theUID, strlen(theUID)); + Tcl_IncrRefCount(objs[0]); objs[1] = Tcl_NewStringObj(Tcl_DStringValue(&ds), Tcl_DStringLength(&ds)); + Tcl_IncrRefCount(objs[1]); Tcl_DStringFree(&ds); listPtr = Tcl_NewListObj(2, objs); + Tcl_DecrRefCount(objs[0]); + Tcl_DecrRefCount(objs[1]); result = Tcl_ListObjAppendElement(interp, resultPtr, listPtr); if (result != TCL_OK) { CFRelease(text); @@ -1972,14 +1999,16 @@ TclAB_MakeSearchRefFromTcl(Tcl_Interp *interp, CONST84 char * inValue, ABPropertyType inPropType, CFStringRef * outLabel, CFStringRef * outKey, CFTypeRef * outValue) { - int listLen, subListLen, length, result = true; + int listLen, subListLen, length; SInt32 theSInt32; double theDouble; char * theStr; Tcl_Obj *objPtr, *labelPtr, *dictPtr, *keyPtr, *valuePtr; + Boolean result = true; *outLabel = NULL; *outKey = NULL; + *outValue = NULL; switch (inPropType) { case kABStringProperty: @@ -1989,99 +2018,129 @@ *outValue = TclAB_MakeValueRefFromTcl(interp, inValue, inPropType); return (*outValue != NULL); - + case kABMultiStringProperty: case kABMultiDateProperty: case kABMultiIntegerProperty: case kABMultiRealProperty: // The value string should be a two-elements Tcl list representing a label/value pair objPtr = Tcl_NewStringObj(inValue, strlen(inValue)); - Tcl_IncrRefCount(objPtr); - Tcl_ListObjLength(interp, objPtr, &listLen); - // Parse the label/value pair. - if (listLen == 2) { - Tcl_ListObjIndex(interp, objPtr, 0, &labelPtr); - Tcl_ListObjIndex(interp, objPtr, 1, &valuePtr); - - // Make CFStrings out of the Tcl objects - switch (inPropType) { - case kABMultiStringProperty: - *outValue = CFStringCreateWithCString(NULL, Tcl_GetStringFromObj(valuePtr, &length), kCFStringEncodingUTF8); - break; - - case kABMultiDateProperty: - theDouble = atof(Tcl_GetStringFromObj(valuePtr, &length)); - theDouble -= kCFAbsoluteTimeIntervalSince1970; - *outValue = CFDateCreate(NULL, theDouble); - break; - - case kABMultiIntegerProperty: - case kABMultiRealProperty: - theSInt32 = atoi(Tcl_GetStringFromObj(valuePtr, &length)); - *outValue = CFNumberCreate(NULL, kCFNumberSInt32Type, &theSInt32); - break; + + if (objPtr) { + Tcl_IncrRefCount(objPtr); + Tcl_ListObjLength(interp, objPtr, &listLen); + // Parse the label/value pair. + if (listLen == 2) { + Tcl_ListObjIndex(interp, objPtr, 0, &labelPtr); + Tcl_ListObjIndex(interp, objPtr, 1, &valuePtr); + if (labelPtr && valuePtr) { + Tcl_IncrRefCount(labelPtr); + Tcl_IncrRefCount(valuePtr); + + // Make CFStrings out of the Tcl objects + switch (inPropType) { + case kABMultiStringProperty: + *outValue = CFStringCreateWithCString(NULL, Tcl_GetStringFromObj(valuePtr, &length), kCFStringEncodingUTF8); + break; + + case kABMultiDateProperty: + theDouble = atof(Tcl_GetStringFromObj(valuePtr, &length)); + theDouble -= kCFAbsoluteTimeIntervalSince1970; + *outValue = CFDateCreate(NULL, theDouble); + break; + + case kABMultiIntegerProperty: + case kABMultiRealProperty: + theSInt32 = atoi(Tcl_GetStringFromObj(valuePtr, &length)); + *outValue = CFNumberCreate(NULL, kCFNumberSInt32Type, &theSInt32); + break; + + } + theStr = Tcl_GetStringFromObj(labelPtr, &length); + if (length) { + *outLabel = CFStringCreateWithCString(NULL, theStr, kCFStringEncodingUTF8); + } + Tcl_DecrRefCount(labelPtr); + Tcl_DecrRefCount(valuePtr); + } + } else { + // Malformed value + Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "Malformed argument. Should be: {label value}", (char *) NULL); + result = false; } - theStr = Tcl_GetStringFromObj(labelPtr, &length); - if (length) { - *outLabel = CFStringCreateWithCString(NULL, theStr, kCFStringEncodingUTF8); - } - Tcl_DecrRefCount(labelPtr); - Tcl_DecrRefCount(valuePtr); Tcl_DecrRefCount(objPtr); - return true; } else { - // Malformed value - Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "Malformed value. Should be: {label value}", (char *) NULL); - return false; + Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "Could not make string from value", (char *) NULL); + result = false; } - + return result; + case kABDictionaryProperty: case kABMultiDictionaryProperty: - // The value string should be a two-elements Tcl list representing a label/dictionary pair + // The value string should be a two-elements Tcl list representing + // a single label/dictionary pair objPtr = Tcl_NewStringObj(inValue, strlen(inValue)); - Tcl_IncrRefCount(objPtr); - Tcl_ListObjLength(interp, objPtr, &listLen); - // Parse the label/dictionary pair. - if (listLen == 2) { - // The dictionary itself should be a two-elements Tcl list - // representing a single key/value pair. - Tcl_ListObjIndex(interp, objPtr, 0, &labelPtr); - Tcl_ListObjIndex(interp, objPtr, 1, &dictPtr); + + if (objPtr) { + Tcl_IncrRefCount(objPtr); + Tcl_ListObjLength(interp, objPtr, &listLen); + // Parse the label/dictionary pair. + if (listLen == 2) { + // The dictionary itself should be a two-elements Tcl list + // representing a single key/value pair. + Tcl_ListObjIndex(interp, objPtr, 0, &labelPtr); + Tcl_ListObjIndex(interp, objPtr, 1, &dictPtr); - Tcl_ListObjLength(interp, dictPtr, &subListLen); - if (subListLen == 2) { - Tcl_ListObjIndex(interp, dictPtr, 0, &keyPtr); - Tcl_ListObjIndex(interp, dictPtr, 1, &valuePtr); + if (labelPtr && dictPtr) { + Tcl_IncrRefCount(labelPtr); + Tcl_IncrRefCount(dictPtr); + Tcl_ListObjLength(interp, dictPtr, &subListLen); + if (subListLen == 2) { + Tcl_ListObjIndex(interp, dictPtr, 0, &keyPtr); + Tcl_ListObjIndex(interp, dictPtr, 1, &valuePtr); + + if (keyPtr && valuePtr) { + Tcl_IncrRefCount(keyPtr); + Tcl_IncrRefCount(valuePtr); - // Make CFStrings out of the Tcl objects - *outValue = CFStringCreateWithCString(NULL, Tcl_GetStringFromObj(valuePtr, &length), kCFStringEncodingUTF8); - theStr = Tcl_GetStringFromObj(keyPtr, &length); - if (length) { - *outKey = CFStringCreateWithCString(NULL, theStr, kCFStringEncodingUTF8); - } - Tcl_DecrRefCount(keyPtr); - Tcl_DecrRefCount(valuePtr); + // Make CFStrings out of the Tcl objects + *outValue = CFStringCreateWithCString(NULL, Tcl_GetStringFromObj(valuePtr, &length), kCFStringEncodingUTF8); + theStr = Tcl_GetStringFromObj(keyPtr, &length); + if (length) { + *outKey = CFStringCreateWithCString(NULL, theStr, kCFStringEncodingUTF8); + } + Tcl_DecrRefCount(keyPtr); + Tcl_DecrRefCount(valuePtr); + } else { + Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "Could not get key or value", (char *) NULL); + result = false; + } + } else { + // Malformed value + Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "Malformed inner list. Should be: {key value}", (char *) NULL); + result = false; + } + theStr = Tcl_GetStringFromObj(labelPtr, &length); + if (result && length) { + *outLabel = CFStringCreateWithCString(NULL, theStr, kCFStringEncodingUTF8); + } + Tcl_DecrRefCount(labelPtr); + Tcl_DecrRefCount(dictPtr); + } } else { // Malformed value - Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "Malformed inner list. Should be: {key value}", (char *) NULL); - return false; - } - theStr = Tcl_GetStringFromObj(labelPtr, &length); - if (length) { - *outLabel = CFStringCreateWithCString(NULL, theStr, kCFStringEncodingUTF8); + Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "Malformed outer list. Should be: {label {key value}}", (char *) NULL); + result = false; } - Tcl_DecrRefCount(labelPtr); - Tcl_DecrRefCount(dictPtr); Tcl_DecrRefCount(objPtr); - return true; } else { - // Malformed value - Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "Malformed outer list. Should be: {label {key value}}", (char *) NULL); - return false; + Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "Could not make string from value", (char *) NULL); + result = false; } - + return result; + case kABErrorInProperty: default: |
|
From: Daniel A. S. <da...@us...> - 2005-06-06 10:11:17
|
Update of /cvsroot/tcladdressbook/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26018 Modified Files: Changes.Log Log Message: removed unnecessary direct link to Tcl.framework from TclAddressBook.pbproj Index: Changes.Log =================================================================== RCS file: /cvsroot/tcladdressbook/Source/Changes.Log,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- Changes.Log 4 Apr 2005 08:25:26 -0000 1.28 +++ Changes.Log 6 Jun 2005 10:11:01 -0000 1.29 @@ -34,7 +34,7 @@ ================================================================================ = 1.1.4b1 development last update: ================================================================================ -¥ +¥ removed unnecessary direct link to Tcl.framework from TclAddressBook.pbproj ================================================================================ = 1.1.3 released last update: 2005-04-04 06:57:17 |
|
From: Daniel A. S. <da...@us...> - 2005-06-06 10:11:13
|
Update of /cvsroot/tcladdressbook/Source/TclAddressBook.pbproj In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26018/TclAddressBook.pbproj Modified Files: project.pbxproj Log Message: removed unnecessary direct link to Tcl.framework from TclAddressBook.pbproj Index: project.pbxproj =================================================================== RCS file: /cvsroot/tcladdressbook/Source/TclAddressBook.pbproj/project.pbxproj,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- project.pbxproj 2 Aug 2004 09:32:40 -0000 1.3 +++ project.pbxproj 6 Jun 2005 10:11:02 -0000 1.4 @@ -201,12 +201,6 @@ settings = { }; }; - D1004D7805888A3F003C0555 = { - fileRef = F94429230420B8C2006F146B; - isa = PBXBuildFile; - settings = { - }; - }; //D10 //D11 //D12 @@ -233,7 +227,6 @@ files = ( F5509190036C35B40130931B, D1004D1205887D9B003C0555, - D1004D7805888A3F003C0555, ); isa = PBXFrameworksBuildPhase; runOnlyForDeploymentPostprocessing = 0; |