view src/ndir.h @ 109141:fa173b9bd9ce

Fix some bad prototypes and formatting after conversion from K&R declaration. * lwlib/lwlib-Xaw.c: Include <ctype.h> for isdigit. (fill_xft_data, set_text): Remove unused variable screen. (draw_text): Cast bp to FcChar8*. (find_xft_data): Return 0 if inst or xft_data is not set. (wm_delete_window): Correct prototype. Initialize widget to 0 and return if widget is still 0 after loop. * lwlib/xlwmenu.c (XlwMenuSetValues, XlwMenuInitialize): Correct prototype. (display_menu_item): Remove unused variable gi. (make_windows_if_needed): Remove unused variable screen. (XlwMenuRedisplay): Remove unused variable i. * src/gtkutil.c (xg_get_pixbuf_from_pix_and_mask) (xg_get_image_for_pixmap, create_dialog) (xg_get_file_with_selection, xg_get_file_name, update_cl_data) (menuitem_highlight_callback, make_menu_item) (xg_create_one_menuitem, create_menus, xg_update_menu_item) (xg_create_scroll_bar, xg_update_scrollbar_pos) (xg_set_toolkit_scroll_bar_thumb, xg_tool_bar_button_cb) (xg_tool_bar_proxy_help_callback, xg_tool_bar_detach_callback) (xg_tool_bar_attach_callback, xg_tool_bar_help_callback) (xg_tool_bar_item_expose_callback): Reformat prototype. (xg_update_menubar): GList *group => GSList *group. (xg_modify_menubar_widgets): Initialize witem to 0, check witem != 0 before use. (update_frame_tool_bar): 4:th param to xg_get_image_for_pixmap changed to GTK_IMAGE (wimage). * src/xsettings.c (something_changedCB, parse_settings) (apply_xft_settings): Reformat prototype. (something_changedCB, init_gconf): Remove unused variable i. (read_settings): Remove unused variable long_len. * src/xsmfns.c (SSDATA): New macro. (smc_save_yourself_CB, x_session_initialize): Use SSDATA for strings passed to strlen/strcpy/strcat. (create_client_leader_window): Surround with #ifndef USE_GTK. Cast 7:th arg to XChangeProperty to (unsigned char *)
author Jan D <jan.h.d@swipnet.se>
date Mon, 05 Jul 2010 11:17:12 +0200
parents c3512b2085a0
children 68ca98ae70fb
line wrap: on
line source

/*
	<dir.h> -- definitions for 4.2BSD-compatible directory access

	last edit:	09-Jul-1983	D A Gwyn

 * The code here is forced by the interface, and is not subject to
 * copyright, constituting the only possible expression of the
 * algorithm in this format.
 */

#define DIRBLKSIZ	512		/* size of directory block */
#ifdef WINDOWSNT
#define MAXNAMLEN	255
#else  /* not WINDOWSNT */
#define MAXNAMLEN	15		/* maximum filename length */
#endif /* not WINDOWSNT */
	/* NOTE:  MAXNAMLEN must be one less than a multiple of 4 */

struct direct				/* data from readdir() */
	{
	long		d_ino;		/* inode number of entry */
	unsigned short	d_reclen;	/* length of this record */
	unsigned short	d_namlen;	/* length of string in d_name */
	char		d_name[MAXNAMLEN+1];	/* name of file */
	};

typedef struct
	{
	int	dd_fd;			/* file descriptor */
	int	dd_loc;			/* offset in block */
	int	dd_size;		/* amount of valid data */
	char	dd_buf[DIRBLKSIZ];	/* directory block */
	}	DIR;			/* stream data from opendir() */

extern DIR		*opendir();
extern struct direct	*readdir();
extern long		telldir();
extern void		seekdir();
extern void		closedir();

#define rewinddir( dirp )	seekdir( dirp, 0L )

/* arch-tag: aea50570-ffb7-43fd-b423-7743b10fbe6e
   (do not change this comment) */