[sane-devel] Improve const-correctness

Markus Elfring Markus.Elfring at web.de
Fri Jun 29 14:50:20 UTC 2007


Hello!

Would you like to apply the advices from the article 
"http://en.wikipedia.org/wiki/Const-correctness" to more places in your 
source files?
I suggest to add the key word "const" to the type specifiers for 
parameters like the following.
- xsane-save.h:
  filename (function "xsane_get_filesize")
  image_info (functions "xsane_write_pnm_header", "xsane_save_ps_page", 
"xsane_save_pdf")
  server, port (function "open_socket")
  fd_socket, user, passwd (function "pop3_login")
  fd_socket, from, reply_to, to, subject, boundary, related (function 
"write_email_header")

- xsane-preview.h:
  parameters (function "preview_create_batch_icon")

- xsane-viewer.h:
  filename, selection_filetype, allow_reduction_to_lineart, 
output_filename, allow_modification, image_saved (function 
"xsane_viewer_new")

http://xsane.org/download/xsane-0.994.tar.gz

Regards,
Markus



More information about the sane-devel mailing list