apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@lnd.com>
Subject Re: apr_ function prefixes
Date Tue, 06 Feb 2001 08:41:05 GMT
+1 ... we need these changes, only we have attacked this as time has permitted.

My only comment, take this group:

> apr_get_shm_name            apr_shm_name_get
> apr_set_shm_name            apr_shm_name_set
> apr_open_shmem              apr_shm_open

I'd personally like to see apr_shm_get/set_name (and agree with you on apr_shm_open)
but I'd much prefer the apr_shm prefix on all shm fn's, etc.

Renaming today is fine [although I haven't finished the jobs I signed up for, yet]
since we have apr_compat.h (or apu_compat.h for apr-util symbols), and that should
help avoid breaking existing consumers, or get them working again quickly.

APR has just sort of grown, and since we have a bunch of folks moving stuff into
apr, we have done is several different ways.  Any patches to clean this up would
be quite appropriate.

Bill


----- Original Message ----- 
From: "Doug MacEachern" <dougm@covalent.net>
To: <dev@apr.apache.org>
Sent: Monday, February 05, 2001 9:21 PM
Subject: apr_ function prefixes


> there's a number of places where apr (and httpd) is not consistent with
> prefixes or doesn't use one at all (beyond apr_ or ap_).
> personally, i like to see functions named with the prefix of the base type
> (struct) they operate on if possible.  for example, apr_xlate_t related
> functions all have an apr_xlate_ prefix, this is goodness.  for certain
> types, many, but not all related functions use a consistent prefix
> (e.g. apr_table_t), for some there is no prefix at all.
> i know this might be considered "late in the game", but in reality apr is
> very young software.  consistent/meaningful naming should start now,
> rather than 2 years down the road when i suspect it'll be in pretty
> widespread use.  below are some suggestions, i think i still have a
> rename script handy if there's consensus to move forward on some or all.
> 
> apr_pollfd_t:
> apr_add_poll_socket         apr_poll_socket_add
> apr_clear_poll_sockets      apr_poll_socket_clear
> apr_get_polldata            apr_poll_data_get
> apr_get_revents             apr_poll_revents_get
> apr_mask_poll_socket        apr_poll_socket_mask
> apr_remove_poll_socket      apr_poll_socket_remove
> apr_set_polldata            apr_poll_data_set
> apr_setup_poll              apr_poll_setup
> 
> apr_time_t:
> apr_now                     apr_time_now
> 
> apr_array_header_t:
> apr_append_arrays           apr_array_append
> apr_copy_array              apr_array_copy
> apr_copy_array_hdr          apr_array_copy_hdr
> apr_make_array              apr_array_make
> apr_push_array              apr_array_push
> 
> apr_socket_t:
> apr_close_socket            apr_socket_close
> apr_create_socket           apr_socket_create
> apr_get_sockaddr            apr_socket_addr_get
> apr_get_socketdata          apr_socket_data_get
> apr_set_socketdata          apr_socket_data_set
> 
> apr_sockaddr_t:
> apr_getaddrinfo             apr_sockaddr_info_get
> apr_get_ipaddr              apr_sockaddr_ip_get
> apr_set_ipaddr              apr_sockaddr_ip_set
> apr_set_port                apr_sockaddr_port_set
> apr_get_port                apr_sockaddr_port_get
> 
> apr_pool_t:
> apr_create_pool             apr_pool_create
> apr_destroy_pool            apr_pool_destroy
> apr_get_userdata            apr_pool_userdata_get
> apr_set_userdata            apr_pool_userdata_set
> apr_kill_cleanup            apr_pool_cleanup_kill
> apr_run_cleanup             apr_pool_cleanup_run
> apr_null_cleanup            apr_cleanup_null
> apr_register_cleanup        apr_cleanup_register
> apr_make_sub_pool           apr_pool_sub_make
> apr_note_subprocess         apr_pool_note_subprocess
> 
> apr_lock_t:
> apr_child_init_lock         apr_lock_child_init
> apr_create_lock             apr_lock_create
> apr_destroy_lock            apr_lock_destroy
> apr_get_lockdata            apr_lock_data_get
> apr_set_lockdata            apr_lock_data_set
> apr_lock                    apr_lock_aquire
> apr_unlock                  apr_lock_release
> 
> apr_table_:
> apr_clear_table             apr_table_clear
> apr_copy_table              apr_table_copy
> apr_make_table              apr_table_make
> apr_overlap_tables          apr_table_overlap
> apr_overlay_tables          apr_table_overlay
> 
> apr_file_t:
> apr_open                    apr_file_open
> apr_close                   apr_file_close
> apr_create_namedpipe        apr_file_namedpipe_create
> apr_create_pipe             apr_file_pipe_create
> apr_dupfile                 apr_file_dup
> apr_flush                   apr_file_flush
> apr_eof                     apr_file_eof
> apr_ferror                  apr_file_error
> apr_fgets                   apr_file_gets
> apr_fprintf                 apr_file_printf
> apr_full_read               apr_file_read_file
> apr_full_write              apr_file_write_full
> apr_getc                    apr_file_getc
> apr_ungetc                  apr_file_ungetc
> apr_putc                    apr_file_putc
> apr_puts                    apr_file_puts
> apr_read                    apr_file_read
> apr_write                   apr_file_write
> apr_writev                  apr_file_writev
> apr_seek                    apr_file_seek
> apr_get_filedata            apr_file_data_get
> apr_getfileinfo             apr_file_info_get
> apr_get_filename            apr_file_name_get
> apr_get_file_pool           apr_file_pool_get
> apr_get_pipe_timeout        apr_file_pipe_timeout_get
> apr_set_pipe_timeout        apr_file_pipe_timeout_set
> apr_lock_file               apr_file_lock
> apr_unlock_file             apr_file_unlock
> apr_open_stderr             apr_file_open_stderr
> apr_open_stdout             apr_file_open_stderr
> apr_remove_file             apr_file_remove
> apr_rename_file             apr_file_rename
> apr_set_filedata            apr_file_data_set
> apr_setfileperms            apr_file_perms_set
> 
> apr_procattr_t:
> apr_createprocattr_init     apr_procattr_create
> apr_setprocattr_childerr    apr_procattr_child_err_set
> apr_setprocattr_childin     apr_procattr_child_in_set
> apr_setprocattr_childout    apr_procattr_child_out_set
> apr_setprocattr_cmdtype     apr_procattr_cmdtype_set
> apr_setprocattr_detach      apr_procattr_detach_set
> apr_setprocattr_dir         apr_procattr_dir_set
> apr_setprocattr_io          apr_procattr_io_set
> apr_setprocattr_limit       apr_procattr_limit_set
> 
> apr_proc_t:
> apr_create_process          apr_proc_create
> apr_fork                    apr_proc_fork
> apr_kill                    apr_proc_kill
> apr_probe_writable_fds      apr_proc_probe_writable_fds
> apr_reap_other_child        apr_proc_other_child_read
> apr_register_other_child    apr_proc_other_child_register
> apr_unregister_other_child  apr_proc_other_child_unregister
> apr_check_other_child       apr_proc_other_child_check
> apr_wait_all_procs          apr_proc_wait_all_procs
> apr_wait_proc               apr_proc_wait
> apr_detach                  apr_proc_detach
> 
> apr_thread_t:
> apr_create_thread           apr_thread_create
> apr_get_threaddata          apr_thread_data_get
> apr_set_threaddata          apr_thread_data_set
> apr_thread_detach           apr_thread_detach
> 
> apr_threadkey_t:
> apr_get_threadkeydata       apr_threadkey_data_get
> apr_set_threadkeydata       apr_threadkey_data_set
> apr_create_thread_private   apr_threadkey_private_create
> apr_delete_thread_private   apr_threadkey_private_delete
> apr_get_thread_private      apr_threadkey_private_get
> apr_set_thread_private      apr_threadkey_private_set
> 
> apr_threadatt_t:
> apr_create_threadattr       apr_threadattr_create
> apr_getthreadattr_detach    apr_threadattr_detach_set
> apr_setthreadattr_detach    apr_threadattr_detach_get
> 
> apr_dir_t:
> apr_make_dir                apr_dir_make
> apr_remove_dir              apr_dir_remove
> 
> apr_uuid_t:
> apr_format_uuid             apr_uuid_format
> apr_get_uuid                apr_uuid_parse
> apr_parse_uuid              apr_uuid_parse
> 
> apr_shmem_t:
> apr_get_shm_name            apr_shm_name_get
> apr_set_shm_name            apr_shm_name_set
> apr_open_shmem              apr_shm_open
> 
> apr_hash_t:
> apr_make_hash               apr_hash_make
> 
> misc:
> apr_getpass                 apr_password_get
> apr_validate_password       apr_password_validate
> apr_generic_hook_get        apr_hook_generic_get
> apr_hook_generic            apr_hook_generic_add
> 
> 



Mime
View raw message