[PATCH 12/13] make sure that printf is available whereever it is used
Andy Wingo
wingo at pobox.com
Mon Mar 29 17:41:07 EDT 2010
So, the right thing is for each file to be in its own module. Barring
that it's tough to see what the environment is in a given module. So to
be safe, everywhere there's a printf, make sure the (gnucash printf)
module is duly included.
---
src/app-utils/date-utilities.scm | 3 ++-
src/business/business-reports/aging.scm | 1 +
src/business/business-reports/easy-invoice.scm | 1 +
src/business/business-reports/fancy-invoice.scm | 1 +
src/business/business-reports/invoice.scm | 1 +
src/business/business-reports/job-report.scm | 1 +
src/business/business-reports/owner-report.scm | 1 +
src/import-export/qif-import/qif-file.scm | 1 +
src/import-export/qif-import/qif-parse.scm | 2 ++
src/import-export/qif-import/qif-to-gnc.scm | 1 +
src/report/report-system/eguile-gnc.scm | 1 +
src/report/report-system/html-document.scm | 1 +
src/report/report-system/html-table.scm | 2 ++
src/report/report-system/html-text.scm | 2 ++
src/report/report-system/html-utilities.scm | 2 ++
src/report/report-system/report-utilities.scm | 1 +
src/report/report-system/report.scm | 1 +
.../standard-reports/budget-income-statement.scm | 1 +
src/report/standard-reports/income-statement.scm | 1 +
src/report/standard-reports/trial-balance.scm | 1 +
20 files changed, 25 insertions(+), 1 deletions(-)
diff --git a/src/app-utils/date-utilities.scm b/src/app-utils/date-utilities.scm
index ff694c7..42b3641 100644
--- a/src/app-utils/date-utilities.scm
+++ b/src/app-utils/date-utilities.scm
@@ -20,7 +20,8 @@
;; 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
;; Boston, MA 02110-1301, USA gnu at gnu.org
-(use-modules (gnucash core-utils))
+(use-modules (gnucash core-utils)
+ (gnucash printf))
(define gnc:reldate-list '())
diff --git a/src/business/business-reports/aging.scm b/src/business/business-reports/aging.scm
index bedae14..407ccec 100644
--- a/src/business/business-reports/aging.scm
+++ b/src/business/business-reports/aging.scm
@@ -27,6 +27,7 @@
(define-module (gnucash report aging))
(use-modules (gnucash main))
+(use-modules (gnucash printf))
(use-modules (gnucash gnc-module))
(gnc:module-load "gnucash/report/report-system" 0)
diff --git a/src/business/business-reports/easy-invoice.scm b/src/business/business-reports/easy-invoice.scm
index 9cf7746..c507b99 100644
--- a/src/business/business-reports/easy-invoice.scm
+++ b/src/business/business-reports/easy-invoice.scm
@@ -31,6 +31,7 @@
(define-module (gnucash report easy-invoice))
(use-modules (srfi srfi-1))
+(use-modules (gnucash printf))
(use-modules (gnucash gnc-module))
(gnc:module-load "gnucash/report/report-system" 0)
diff --git a/src/business/business-reports/fancy-invoice.scm b/src/business/business-reports/fancy-invoice.scm
index b14a239..d503112 100644
--- a/src/business/business-reports/fancy-invoice.scm
+++ b/src/business/business-reports/fancy-invoice.scm
@@ -49,6 +49,7 @@
(define-module (gnucash report fancy-invoice))
(use-modules (srfi srfi-1))
+(use-modules (gnucash printf))
(use-modules (gnucash gnc-module))
(gnc:module-load "gnucash/report/report-system" 0)
diff --git a/src/business/business-reports/invoice.scm b/src/business/business-reports/invoice.scm
index 65f6388..c2b05cc 100644
--- a/src/business/business-reports/invoice.scm
+++ b/src/business/business-reports/invoice.scm
@@ -25,6 +25,7 @@
(define-module (gnucash report invoice))
(use-modules (srfi srfi-1))
+(use-modules (gnucash printf))
(use-modules (gnucash gnc-module))
(gnc:module-load "gnucash/report/report-system" 0)
diff --git a/src/business/business-reports/job-report.scm b/src/business/business-reports/job-report.scm
index d2727aa..49f2f31 100644
--- a/src/business/business-reports/job-report.scm
+++ b/src/business/business-reports/job-report.scm
@@ -27,6 +27,7 @@
(define-module (gnucash report job-report))
(use-modules (srfi srfi-1))
+(use-modules (gnucash printf))
(use-modules (gnucash gnc-module))
(use-modules (gnucash main)) ; for gnc:debug
diff --git a/src/business/business-reports/owner-report.scm b/src/business/business-reports/owner-report.scm
index 50454b9..862942a 100644
--- a/src/business/business-reports/owner-report.scm
+++ b/src/business/business-reports/owner-report.scm
@@ -28,6 +28,7 @@
(use-modules (srfi srfi-1))
(use-modules (gnucash gnc-module))
+(use-modules (gnucash printf))
(use-modules (gnucash main)) ; for gnc:debug
(gnc:module-load "gnucash/report/report-system" 0)
diff --git a/src/import-export/qif-import/qif-file.scm b/src/import-export/qif-import/qif-file.scm
index 2b804a8..e502db5 100644
--- a/src/import-export/qif-import/qif-file.scm
+++ b/src/import-export/qif-import/qif-file.scm
@@ -7,6 +7,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(use-modules (gnucash core-utils))
+(use-modules (gnucash printf))
(use-modules (ice-9 regex))
(use-modules (srfi srfi-13))
diff --git a/src/import-export/qif-import/qif-parse.scm b/src/import-export/qif-import/qif-parse.scm
index 5045ba1..725a49d 100644
--- a/src/import-export/qif-import/qif-parse.scm
+++ b/src/import-export/qif-import/qif-parse.scm
@@ -5,6 +5,8 @@
;;; Bill Gribble <grib at billgribble.com> 20 Feb 2000
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(use-modules (gnucash printf))
+
(define qif-category-compiled-rexp
(make-regexp "^ *(\\[)?([^]/|]*)(]?)(/?)([^|]*)(\\|(\\[)?([^]/]*)(]?)(/?)(.*))? *$"))
diff --git a/src/import-export/qif-import/qif-to-gnc.scm b/src/import-export/qif-import/qif-to-gnc.scm
index f7aae6e..8a50e6a 100644
--- a/src/import-export/qif-import/qif-to-gnc.scm
+++ b/src/import-export/qif-import/qif-to-gnc.scm
@@ -7,6 +7,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(use-modules (srfi srfi-13))
+(use-modules (gnucash printf))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
diff --git a/src/report/report-system/eguile-gnc.scm b/src/report/report-system/eguile-gnc.scm
index 3846d53..d3099bd 100644
--- a/src/report/report-system/eguile-gnc.scm
+++ b/src/report/report-system/eguile-gnc.scm
@@ -85,6 +85,7 @@
(use-modules (ice-9 regex)) ; for regular expressions
(use-modules (ice-9 rdelim)) ; for read-line
+(use-modules (gnucash printf))
(use-modules (gnucash app-utils)) ; for _
;; This is needed for displaying error messages -- note that it assumes that
diff --git a/src/report/report-system/html-document.scm b/src/report/report-system/html-document.scm
index d641897..40105a3 100644
--- a/src/report/report-system/html-document.scm
+++ b/src/report/report-system/html-document.scm
@@ -22,6 +22,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(gnc:module-load "gnucash/html" 0)
+(use-modules (gnucash printf))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; <html-document> class
diff --git a/src/report/report-system/html-table.scm b/src/report/report-system/html-table.scm
index 5eb4299..c3ad796 100644
--- a/src/report/report-system/html-table.scm
+++ b/src/report/report-system/html-table.scm
@@ -33,6 +33,8 @@
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(use-modules (gnucash printf))
+
(define <html-table>
(make-record-type "<html-table>"
'(col-headers
diff --git a/src/report/report-system/html-text.scm b/src/report/report-system/html-text.scm
index 2c512a1..c515773 100644
--- a/src/report/report-system/html-text.scm
+++ b/src/report/report-system/html-text.scm
@@ -30,6 +30,8 @@
;; doc as arg to get the string out.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(use-modules (gnucash printf))
+
(define <html-text>
(make-record-type "<html-text>"
'(body style)))
diff --git a/src/report/report-system/html-utilities.scm b/src/report/report-system/html-utilities.scm
index 29631f6..b8a9f02 100644
--- a/src/report/report-system/html-utilities.scm
+++ b/src/report/report-system/html-utilities.scm
@@ -22,6 +22,8 @@
;; Boston, MA 02110-1301, USA gnu at gnu.org
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(use-modules (gnucash printf))
+
;; returns a list with n #f (empty cell) values
(define (gnc:html-make-empty-cell) #f)
(define (gnc:html-make-empty-cells n)
diff --git a/src/report/report-system/report-utilities.scm b/src/report/report-system/report-utilities.scm
index 26c8a23..3281cd4 100644
--- a/src/report/report-system/report-utilities.scm
+++ b/src/report/report-system/report-utilities.scm
@@ -18,6 +18,7 @@
;; Boston, MA 02110-1301, USA gnu at gnu.org
(use-modules (srfi srfi-13))
+(use-modules (gnucash printf))
(define (list-ref-safe list elt)
(if (> (length list) elt)
diff --git a/src/report/report-system/report.scm b/src/report/report-system/report.scm
index 77999f8..3bc9ccd 100644
--- a/src/report/report-system/report.scm
+++ b/src/report/report-system/report.scm
@@ -21,6 +21,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(use-modules (gnucash main))
+(use-modules (gnucash printf))
(use-modules (sw_report_system))
;; This hash should contain all the reports available and will be used
diff --git a/src/report/standard-reports/budget-income-statement.scm b/src/report/standard-reports/budget-income-statement.scm
index 880a9ca..c53b35f 100644
--- a/src/report/standard-reports/budget-income-statement.scm
+++ b/src/report/standard-reports/budget-income-statement.scm
@@ -42,6 +42,7 @@
(define-module (gnucash report standard-reports budget-income-statement))
(use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing.
+(use-modules (gnucash printf))
(use-modules (gnucash gnc-module))
(gnc:module-load "gnucash/report/report-system" 0)
diff --git a/src/report/standard-reports/income-statement.scm b/src/report/standard-reports/income-statement.scm
index fed2223..92f61ad 100644
--- a/src/report/standard-reports/income-statement.scm
+++ b/src/report/standard-reports/income-statement.scm
@@ -43,6 +43,7 @@
(define-module (gnucash report standard-reports income-statement))
(use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing.
+(use-modules (gnucash printf))
(use-modules (gnucash gnc-module))
(gnc:module-load "gnucash/report/report-system" 0)
diff --git a/src/report/standard-reports/trial-balance.scm b/src/report/standard-reports/trial-balance.scm
index 782067b..53d4924 100644
--- a/src/report/standard-reports/trial-balance.scm
+++ b/src/report/standard-reports/trial-balance.scm
@@ -52,6 +52,7 @@
(define-module (gnucash report standard-reports trial-balance))
(use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing.
+(use-modules (gnucash printf))
(use-modules (gnucash gnc-module))
(gnc:module-load "gnucash/report/report-system" 0)
--
1.6.2.5
--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment; filename=0013-N_-in-the-root-module.patch
More information about the gnucash-devel
mailing list