git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v3 08/20] convert.h: drop 'extern' from function declaration

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Jun 6, 2018, 07:39 UTC
Message-ID
<20180606073933.14755-9-pclouds@gmail.com>
In-Reply-To
<20180606073933.14755-1-pclouds@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 convert.h | 56 ++++++++++++++++++++++++++++---------------------------
 1 file changed, 29 insertions(+), 27 deletions(-)
diff --git a/convert.h b/convert.h
index 01385d9288..0a0fa15b58 100644
--- a/convert.h
+++ b/convert.h
@@ -57,35 +57,36 @@ struct delayed_checkout {
 
 extern enum eol core_eol;
 extern char *check_roundtrip_encoding;
-extern const char *get_cached_convert_stats_ascii(const struct index_state *istate,
-						  const char *path);
-extern const char *get_wt_convert_stats_ascii(const char *path);
-extern const char *get_convert_attr_ascii(const char *path);
+const char *get_cached_convert_stats_ascii(const struct index_state *istate,
+					   const char *path);
+const char *get_wt_convert_stats_ascii(const char *path);
+const char *get_convert_attr_ascii(const char *path);
 
 /* returns 1 if *dst was used */
-extern int convert_to_git(const struct index_state *istate,
-			  const char *path, const char *src, size_t len,
-			  struct strbuf *dst, int conv_flags);
-extern int convert_to_working_tree(const char *path, const char *src,
-				   size_t len, struct strbuf *dst);
-extern int async_convert_to_working_tree(const char *path, const char *src,
-					 size_t len, struct strbuf *dst,
-					 void *dco);
-extern int async_query_available_blobs(const char *cmd, struct string_list *available_paths);
-extern int renormalize_buffer(const struct index_state *istate,
-			      const char *path, const char *src, size_t len,
-			      struct strbuf *dst);
+int convert_to_git(const struct index_state *istate,
+		   const char *path, const char *src, size_t len,
+		   struct strbuf *dst, int conv_flags);
+int convert_to_working_tree(const char *path, const char *src,
+			    size_t len, struct strbuf *dst);
+int async_convert_to_working_tree(const char *path, const char *src,
+				  size_t len, struct strbuf *dst,
+				  void *dco);
+int async_query_available_blobs(const char *cmd,
+				struct string_list *available_paths);
+int renormalize_buffer(const struct index_state *istate,
+		       const char *path, const char *src, size_t len,
+		       struct strbuf *dst);
 static inline int would_convert_to_git(const struct index_state *istate,
 				       const char *path)
 {
 	return convert_to_git(istate, path, NULL, 0, NULL, 0);
 }
 /* Precondition: would_convert_to_git_filter_fd(path) == true */
-extern void convert_to_git_filter_fd(const struct index_state *istate,
-				     const char *path, int fd,
-				     struct strbuf *dst,
-				     int conv_flags);
-extern int would_convert_to_git_filter_fd(const char *path);
+void convert_to_git_filter_fd(const struct index_state *istate,
+			      const char *path, int fd,
+			      struct strbuf *dst,
+			      int conv_flags);
+int would_convert_to_git_filter_fd(const char *path);
 
 /*****************************************************************
  *
@@ -95,9 +96,10 @@ extern int would_convert_to_git_filter_fd(const char *path);
 
 struct stream_filter; /* opaque */
 
-extern struct stream_filter *get_stream_filter(const char *path, const struct object_id *);
-extern void free_stream_filter(struct stream_filter *);
-extern int is_null_stream_filter(struct stream_filter *);
+struct stream_filter *get_stream_filter(const char *path,
+					const struct object_id *);
+void free_stream_filter(struct stream_filter *);
+int is_null_stream_filter(struct stream_filter *);
 
 /*
  * Use as much input up to *isize_p and fill output up to *osize_p;
@@ -111,8 +113,8 @@ extern int is_null_stream_filter(struct stream_filter *);
  * such filters know there is no more input coming and it is time for
  * them to produce the remaining output based on the buffered input.
  */
-extern int stream_filter(struct stream_filter *,
-			 const char *input, size_t *isize_p,
-			 char *output, size_t *osize_p);
+int stream_filter(struct stream_filter *,
+		  const char *input, size_t *isize_p,
+		  char *output, size_t *osize_p);
 
 #endif /* CONVERT_H */
-- 
2.18.0.rc0.333.g22e6ee6cdf
Previous: Brandon WilliamsNext: Nguyễn Thái Ngọc Duy
Message 44 of 92 in “unpack-trees.c: do not use "the_index"”
  1. unpack-trees.c: do not use "the_index"Nguyễn Thái Ngọc Duy, Jun 1, 2018
  2. Elijah NewrenJun 1, 2018
  3. Stefan BellerJun 1, 2018
  4. Duy NguyenJun 2, 2018
  5. Duy NguyenJun 2, 2018
  6. Elijah NewrenJun 3, 2018
  7. Brandon WilliamsJun 4, 2018
  8. 0/6 Fix "the_index" usage in unpack-trees.cNguyễn Thái Ngọc Duy, Jun 5, 2018
  9. 1/6 unpack-trees: remove 'extern' on function declarationNguyễn Thái Ngọc Duy, Jun 5, 2018
  10. 3/6 unpack-trees: don't shadow global var the_indexNguyễn Thái Ngọc Duy, Jun 5, 2018
  11. Ramsay JonesJun 5, 2018
  12. 4/6 unpack-tress: convert clear_ce_flags* to avoid the_indexNguyễn Thái Ngọc Duy, Jun 5, 2018
  13. Ramsay JonesJun 5, 2018
  14. 5/6 unpack-trees: avoid the_index in verify_absent()Nguyễn Thái Ngọc Duy, Jun 5, 2018
  15. 6/6 Forbid "the_index" in dir.c and unpack-trees.cNguyễn Thái Ngọc Duy, Jun 5, 2018
  16. Brandon WilliamsJun 5, 2018
  17. Duy NguyenJun 6, 2018
  18. 2/6 unpack-trees: add a note about path invalidationNguyễn Thái Ngọc Duy, Jun 5, 2018
  19. 0/5 Fix "the_index" usage in unpack-trees.cNguyễn Thái Ngọc Duy, Jun 6, 2018
  20. 1/5 unpack-trees: remove 'extern' on function declarationNguyễn Thái Ngọc Duy, Jun 6, 2018
  21. 4/5 unpack-tress: convert clear_ce_flags* to avoid the_indexNguyễn Thái Ngọc Duy, Jun 6, 2018
  22. 3/5 unpack-trees: don't shadow global var the_indexNguyễn Thái Ngọc Duy, Jun 6, 2018
  23. 2/5 unpack-trees: add a note about path invalidationNguyễn Thái Ngọc Duy, Jun 6, 2018
  24. 5/5 unpack-trees: avoid the_index in verify_absent()Nguyễn Thái Ngọc Duy, Jun 6, 2018
  25. 00/20 Fix incorrect use of the_indexNguyễn Thái Ngọc Duy, Jun 6, 2018
  26. 02/20 unpack-trees: add a note about path invalidationNguyễn Thái Ngọc Duy, Jun 6, 2018
  27. 01/20 unpack-trees: remove 'extern' on function declarationNguyễn Thái Ngọc Duy, Jun 6, 2018
  28. 04/20 unpack-tress: convert clear_ce_flags* to avoid the_indexNguyễn Thái Ngọc Duy, Jun 6, 2018
  29. 05/20 unpack-trees: avoid the_index in verify_absent()Nguyễn Thái Ngọc Duy, Jun 6, 2018
  30. 03/20 unpack-trees: don't shadow global var the_indexNguyễn Thái Ngọc Duy, Jun 6, 2018
  31. 11/20 ls-files: correct index argument to get_convert_attr_ascii()Nguyễn Thái Ngọc Duy, Jun 6, 2018
  32. 10/20 dir.c: remove an implicit dependency on the_index in pathspec codeNguyễn Thái Ngọc Duy, Jun 6, 2018
  33. 14/20 entry.c: use the right index instead of the_indexNguyễn Thái Ngọc Duy, Jun 6, 2018
  34. 09/20 convert.c: remove an implicit dependency on the_indexNguyễn Thái Ngọc Duy, Jun 6, 2018
  35. 19/20 grep: use the right index instead of the_indexNguyễn Thái Ngọc Duy, Jun 6, 2018
  36. 17/20 cache.c: remove an implicit dependency on the_indexNguyễn Thái Ngọc Duy, Jun 6, 2018
  37. Brandon WilliamsJun 6, 2018
  38. 18/20 resolve-undo.c: use the right index instead of the_indexNguyễn Thái Ngọc Duy, Jun 6, 2018
  39. 20/20 cache.h: make the_index part of "compatibility macros"Nguyễn Thái Ngọc Duy, Jun 6, 2018
  40. 16/20 preload-index.c: use the right index instead of the_indexNguyễn Thái Ngọc Duy, Jun 6, 2018
  41. 12/20 pathspec.c: use the right index instead of the_indexNguyễn Thái Ngọc Duy, Jun 6, 2018
  42. 15/20 attr: remove index from git_attr_set_direction()Nguyễn Thái Ngọc Duy, Jun 6, 2018
  43. Brandon WilliamsJun 6, 2018
  44. 08/20 convert.h: drop 'extern' from function declarationNguyễn Thái Ngọc Duy, Jun 6, 2018
  45. 13/20 submodule.c: use the right index instead of the_indexNguyễn Thái Ngọc Duy, Jun 6, 2018
  46. 06/20 attr.h: drop extern from function declarationNguyễn Thái Ngọc Duy, Jun 6, 2018
  47. 07/20 attr: remove an implicit dependency on the_indexNguyễn Thái Ngọc Duy, Jun 6, 2018
  48. Ramsay JonesJun 6, 2018
  49. Brandon WilliamsJun 6, 2018
  50. Duy NguyenJun 6, 2018
  51. Brandon WilliamsJun 6, 2018
  52. 00/23 Fix incorrect use of the_indexNguyễn Thái Ngọc Duy, Jun 6, 2018
  53. 01/23 unpack-trees: remove 'extern' on function declarationNguyễn Thái Ngọc Duy, Jun 6, 2018
  54. 02/23 unpack-trees: add a note about path invalidationNguyễn Thái Ngọc Duy, Jun 6, 2018
  55. 04/23 unpack-tress: convert clear_ce_flags* to avoid the_indexNguyễn Thái Ngọc Duy, Jun 6, 2018
  56. Elijah NewrenJun 7, 2018
  57. Duy NguyenJun 7, 2018
  58. Duy NguyenJun 8, 2018
  59. 03/23 unpack-trees: don't shadow global var the_indexNguyễn Thái Ngọc Duy, Jun 6, 2018
  60. 05/23 unpack-trees: avoid the_index in verify_absent()Nguyễn Thái Ngọc Duy, Jun 6, 2018
  61. 06/23 attr.h: drop extern from function declarationNguyễn Thái Ngọc Duy, Jun 6, 2018
  62. 08/23 convert.h: drop 'extern' from function declarationNguyễn Thái Ngọc Duy, Jun 6, 2018
  63. 09/23 convert.c: remove an implicit dependency on the_indexNguyễn Thái Ngọc Duy, Jun 6, 2018
  64. 11/23 ls-files: correct index argument to get_convert_attr_ascii()Nguyễn Thái Ngọc Duy, Jun 6, 2018
  65. 10/23 dir.c: remove an implicit dependency on the_index in pathspec codeNguyễn Thái Ngọc Duy, Jun 6, 2018
  66. 14/23 entry.c: use the right index instead of the_indexNguyễn Thái Ngọc Duy, Jun 6, 2018
  67. 13/23 submodule.c: use the right index instead of the_indexNguyễn Thái Ngọc Duy, Jun 6, 2018
  68. 16/23 preload-index.c: use the right index instead of the_indexNguyễn Thái Ngọc Duy, Jun 6, 2018
  69. 20/23 checkout: avoid the_index when possibleNguyễn Thái Ngọc Duy, Jun 6, 2018
  70. 23/23 cache.h: make the_index part of "compatibility macros"Nguyễn Thái Ngọc Duy, Jun 6, 2018
  71. 22/23 grep: use the right index instead of the_indexNguyễn Thái Ngọc Duy, Jun 6, 2018
  72. 19/23 difftool: use the right index instead of the_indexNguyễn Thái Ngọc Duy, Jun 6, 2018
  73. 21/23 resolve-undo.c: use the right index instead of the_indexNguyễn Thái Ngọc Duy, Jun 6, 2018
  74. 18/23 apply.c: use the right index instead of the_indexNguyễn Thái Ngọc Duy, Jun 6, 2018
  75. 15/23 attr: remove index from git_attr_set_direction()Nguyễn Thái Ngọc Duy, Jun 6, 2018
  76. Elijah NewrenJun 9, 2018
  77. 17/23 read-cache.c: remove an implicit dependency on the_indexNguyễn Thái Ngọc Duy, Jun 6, 2018
  78. Elijah NewrenJun 9, 2018
  79. Duy NguyenJun 9, 2018
  80. Elijah NewrenJun 9, 2018
  81. 12/23 pathspec.c: use the right index instead of the_indexNguyễn Thái Ngọc Duy, Jun 6, 2018
  82. 07/23 attr: remove an implicit dependency on the_indexNguyễn Thái Ngọc Duy, Jun 6, 2018
  83. Elijah NewrenJun 7, 2018
  84. Elijah NewrenJun 9, 2018
  85. Duy NguyenJun 11, 2018
  86. Elijah NewrenJun 11, 2018
  87. Duy NguyenJun 11, 2018
  88. Elijah NewrenJun 11, 2018
  89. Duy NguyenJun 11, 2018
  90. Duy NguyenJun 14, 2018
  91. Elijah NewrenJun 14, 2018
  92. Duy NguyenJun 11, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.