[BACK]Return to mandocdb.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/mandocdb.c between version 1.111 and 1.113

version 1.111, 2014/01/19 00:09:38 version 1.113, 2014/01/19 22:48:16
Line 157  static int  parse_mdoc_Nd(struct mpage *, const struct
Line 157  static int  parse_mdoc_Nd(struct mpage *, const struct
 static  int      parse_mdoc_Nm(struct mpage *, const struct mdoc_node *);  static  int      parse_mdoc_Nm(struct mpage *, const struct mdoc_node *);
 static  int      parse_mdoc_Sh(struct mpage *, const struct mdoc_node *);  static  int      parse_mdoc_Sh(struct mpage *, const struct mdoc_node *);
 static  int      parse_mdoc_Xr(struct mpage *, const struct mdoc_node *);  static  int      parse_mdoc_Xr(struct mpage *, const struct mdoc_node *);
 static  void     putkey(const struct mpage *,  static  void     putkey(const struct mpage *, char *, uint64_t);
                         const char *, uint64_t);  
 static  void     putkeys(const struct mpage *,  static  void     putkeys(const struct mpage *,
                         const char *, size_t, uint64_t);                          const char *, size_t, uint64_t);
 static  void     putmdockey(const struct mpage *,  static  void     putmdockey(const struct mpage *,
Line 957  mlink_check(struct mpage *mpage, struct mlink *mlink)
Line 956  mlink_check(struct mpage *mpage, struct mlink *mlink)
 static void  static void
 mpages_merge(struct mchars *mc, struct mparse *mp)  mpages_merge(struct mchars *mc, struct mparse *mp)
 {  {
           char                     any[] = "any";
         struct ohash_info        str_info;          struct ohash_info        str_info;
         struct mpage            *mpage;          struct mpage            *mpage;
         struct mlink            *mlink;          struct mlink            *mlink;
         struct mdoc             *mdoc;          struct mdoc             *mdoc;
         struct man              *man;          struct man              *man;
         const char              *cp;          char                    *cp;
         int                      match;          int                      match;
         unsigned int             pslot;          unsigned int             pslot;
         enum mandoclevel         lvl;          enum mandoclevel         lvl;
Line 1028  mpages_merge(struct mchars *mc, struct mparse *mp)
Line 1028  mpages_merge(struct mchars *mc, struct mparse *mp)
                 }                  }
                 putkey(mpage, mpage->sec, TYPE_sec);                  putkey(mpage, mpage->sec, TYPE_sec);
                 putkey(mpage, '\0' == *mpage->arch ?                  putkey(mpage, '\0' == *mpage->arch ?
                     "any" : mpage->arch, TYPE_arch);                      any : mpage->arch, TYPE_arch);
   
                 for (mlink = mpage->mlinks; mlink; mlink = mlink->next) {                  for (mlink = mpage->mlinks; mlink; mlink = mlink->next) {
                         if ('\0' != *mlink->dsec)                          if ('\0' != *mlink->dsec)
Line 1036  mpages_merge(struct mchars *mc, struct mparse *mp)
Line 1036  mpages_merge(struct mchars *mc, struct mparse *mp)
                         if ('\0' != *mlink->fsec)                          if ('\0' != *mlink->fsec)
                                 putkey(mpage, mlink->fsec, TYPE_sec);                                  putkey(mpage, mlink->fsec, TYPE_sec);
                         putkey(mpage, '\0' == *mlink->arch ?                          putkey(mpage, '\0' == *mlink->arch ?
                             "any" : mlink->arch, TYPE_arch);                              any : mlink->arch, TYPE_arch);
                         putkey(mpage, mlink->name, TYPE_Nm);                          putkey(mpage, mlink->name, TYPE_Nm);
                 }                  }
   
Line 1186  parse_cat(struct mpage *mpage)
Line 1186  parse_cat(struct mpage *mpage)
  * Put a type/word pair into the word database for this particular file.   * Put a type/word pair into the word database for this particular file.
  */   */
 static void  static void
 putkey(const struct mpage *mpage, const char *value, uint64_t type)  putkey(const struct mpage *mpage, char *value, uint64_t type)
 {  {
           char     *cp;
   
         assert(NULL != value);          assert(NULL != value);
           if (TYPE_arch == type)
                   for (cp = value; *cp; cp++)
                           if (isupper((unsigned char)*cp))
                                   *cp = _tolower((unsigned char)*cp);
         putkeys(mpage, value, strlen(value), type);          putkeys(mpage, value, strlen(value), type);
 }  }
   
Line 1443  parse_mdoc_Fd(struct mpage *mpage, const struct mdoc_n
Line 1448  parse_mdoc_Fd(struct mpage *mpage, const struct mdoc_n
 static int  static int
 parse_mdoc_Fn(struct mpage *mpage, const struct mdoc_node *n)  parse_mdoc_Fn(struct mpage *mpage, const struct mdoc_node *n)
 {  {
         const char      *cp;          char    *cp;
   
         if (NULL == (n = n->child) || MDOC_TEXT != n->type)          if (NULL == (n = n->child) || MDOC_TEXT != n->type)
                 return(0);                  return(0);

Legend:
Removed from v.1.111  
changed lines
  Added in v.1.113

CVSweb